Browse Source

* glyph advances are stored in 16.16 fixed-point format and not 26.6 format (https://www.freetype.org/freetype2/docs/reference/ft2-glyph_management.html#ft_glyph)

git-svn-id: trunk@49627 -
ondrej 4 years ago
parent
commit
83bb854f1e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      packages/fcl-image/src/freetype.pp

+ 4 - 4
packages/fcl-image/src/freetype.pp

@@ -687,8 +687,8 @@ begin
         begin
         begin
         with gl^.advance do
         with gl^.advance do
           begin
           begin
-          advanceX := x div 64;
-          advanceY := y div 64;
+          advanceX := x shr 16;
+          advanceY := y shr 16;
           end;
           end;
         with bm^ do
         with bm^ do
           begin
           begin
@@ -814,8 +814,8 @@ begin
       begin
       begin
       with gl^.advance do
       with gl^.advance do
         begin
         begin
-        advanceX := x shr 6;
-        advanceY := y shr 6;
+        advanceX := x shr 16;
+        advanceY := y shr 16;
         end;
         end;
       with bm^ do
       with bm^ do
         begin
         begin