anchor.diff:              end;
            End Else
            begin
  -            // @TODO handle matching point
  +            // TODO handle matching point
               //STBTT_assert(0);
            end;
            if (flags and (1 shl 3))<>0 then  // WE_HAVE_A_SCALE
            begin
  -            mtx[0] := ttSHORT(PtrUInt(comp2) - PtrUInt(Data)+ 0)/16384.0;
  +            mtx[0] := ttSHORT(PtrUInt(comp2) - PtrUInt(_Data)+ 0)/16384.0;
               mtx[1] := 0;
               mtx[2] := 0;
  -            mtx[3] := ttSHORT(PtrUInt(comp2) - PtrUInt(Data)+ 0)/16384.0;
  +            mtx[3] := ttSHORT(PtrUInt(comp2) - PtrUInt(_Data)+ 0)/16384.0;
               comp2 := Pointer(PtrUInt(comp2)+ 2);
            end else if (flags and (1 shl 6))<>0 then // WE_HAVE_AN_X_AND_YSCALE
            begin
  -            mtx[0] := ttSHORT(PtrUInt(comp2) - PtrUInt(Data)+ 0)/16384.0;
  +            mtx[0] := ttSHORT(PtrUInt(comp2) - PtrUInt(_Data)+ 0)/16384.0;
               comp2 := Pointer(PtrUInt(comp2)+ 2);
               mtx[1] := 0;
               mtx[2] := 0;
  -            mtx[3] := ttSHORT(PtrUInt(comp2) - PtrUInt(Data)+ 0)/16384.0;
  +            mtx[3] := ttSHORT(PtrUInt(comp2) - PtrUInt(_Data)+ 0)/16384.0;
               comp2 := Pointer(PtrUInt(comp2)+ 2);
            end else if (flags and (1 shl 7))<>0 then// WE_HAVE_A_TWO_BY_TWO
            begin
  -            mtx[0] := ttSHORT(PtrUInt(comp2) - PtrUInt(Data)+ 0)/16384.0;
  +            mtx[0] := ttSHORT(PtrUInt(comp2) - PtrUInt(_Data)+ 0)/16384.0;
               comp2 := Pointer(PtrUInt(comp2)+ 2);
  -            mtx[1] := ttSHORT(PtrUInt(comp2) - PtrUInt(Data)+ 0)/16384.0;
  +            mtx[1] := ttSHORT(PtrUInt(comp2) - PtrUInt(_Data)+ 0)/16384.0;
               comp2 := Pointer(PtrUInt(comp2)+ 2);
  -            mtx[2] := ttSHORT(PtrUInt(comp2) - PtrUInt(Data)+ 0)/16384.0;
  +            mtx[2] := ttSHORT(PtrUInt(comp2) - PtrUInt(_Data)+ 0)/16384.0;
               comp2 := Pointer(PtrUInt(comp2)+ 2);
  -            mtx[3] := ttSHORT(PtrUInt(comp2) - PtrUInt(Data)+ 0)/16384.0;
  +            mtx[3] := ttSHORT(PtrUInt(comp2) - PtrUInt(_Data)+ 0)/16384.0;
               comp2 := Pointer(PtrUInt(comp2)+ 2);
            end;
   
  
positive.code: 
  Procedure TTFFont.Release;
  Begin
    If Assigned(Data) Then
    Begin
      FreeMem(Data);
      Data := Nil;
    End;
  End;
  
  function TTFFont.ttBYTE(Const offset:Cardinal):Byte;
  begin
    If (Offset>=BufferSize) Then
      Result := 0
    Else
    Begin
      Result := Data[offset];
    End;
  end;
  
  function TTFFont.ttUSHORT(Const offset:Cardinal): Word;
  begin
    If (Offset>=BufferSize) Then
      Result := 0
    Else
    Begin
      Result := (Data[offset] shl 8) + Data[offset+1];
    End;
  end;
  
  function TTFFont.ttSHORT(Const offset:Cardinal): Smallint;
  begin
    If (Offset>=BufferSize) Then
      Result := 0
    Else
      Result := (SmallInt(Data[offset]) shl 8) + SmallInt(Data[offset+1]);
  end;
  
  function TTFFont.ttULONG(Const offset:Cardinal): Cardinal;
  begin
    If (Offset>=BufferSize) Then
      Result := 0
    Else
      Result := (PtrUInt(Data[offset]) shl 24) + (PtrUInt(Data[offset+1]) shl 16) + (PtrUInt(Data[offset+2]) shl 8) + Cardinal(Data[offset+3]);
  end;
  
  function TTFFont.ttLONG(Const offset:Cardinal): Integer;
  begin
    If (Offset>=BufferSize) Then
      Result := 0
    Else
      Result := PtrUInt(Data[offset] shl 24) + PtrUInt(Data[offset+1] shl 16) + PtrUInt(Data[offset+2] shl 8) + PtrUInt(Data[offset+3]);
  end;
  
  function TTFFont.stbtt_tag(Const offset:Cardinal; Const TableTag:FileHeader):Boolean;
  begin
    If (Offset>=BufferSize) Then
      Result := False
    Else
      Result:=(data[offset]=Byte(TableTag[1])) and (data[offset+1]=Byte(TableTag[2])) and (data[offset+2]=Byte(TableTag[3])) and (data[offset+3]=Byte(TableTag[4]));
  end;
  
  
  // @OPTIMIZE: binary search
  function TTFFont.stbtt__find_table(Const TableTag:FileHeader): Cardinal;
  var
    num_tables: Integer;
    tabledir: Cardinal;
    i: Cardinal;
    loc: Cardinal;
  begin
     num_tables := ttUSHORT(4);
     tabledir := 12;
  
     Result := 0;
     If (num_tables>0) Then
     for i:=0 to num_tables-1 do
     begin
        loc := tabledir + 16*i;
        if stbtt_tag(loc+0, TableTag) then
        begin
           Result := ttULONG(loc+8);
           Break;
        end;
     end;
  end;
  
  procedure TTFFont.stbtt_GetGlyphHMetrics(GlyphIndex: Integer; var advanceWidth, leftSideBearing: Integer);
  var
  
negative.code:   encoding_record: Cardinal;
    i,numTables: Cardinal;
  begin
    _Data := Nil;
    _DataSize := 0;
    _Ready := False;
  
    If (Source = Nil) then
  