shithub: freetype+ttf2subf

Download patch

ref: 71ec10efe5409cdc73824408b0c019ba991ee965
parent: dba4b3243ad012b54980a72d537fbcfa0bb07018
author: David Turner <[email protected]>
date: Thu Feb 10 11:09:35 EST 2000

support for the IGNORE_GLOBAL_ADVANCE_WIDTH
loading flag

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -494,7 +494,9 @@
       TT_Short   left_bearing;
       TT_UShort  advance_width;
 
-      Get_HMetrics( face, index, TRUE,
+      Get_HMetrics( face, index,
+                    (TT_Bool)!(loader->load_flags &
+                                 FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH),
                     &left_bearing,
                     &advance_width );
 
@@ -980,7 +982,13 @@
       left_bearing = loader->left_bearing;
       advance      = loader->advance;
 
-      if ( face->postscript.isFixedPitch )
+     /* the flag FT_LOAD_NO_ADVANCE_CHECK was introduced to       */
+     /* correctly support DynaLab fonts, who have an incorrect    */
+     /* "advance_Width_Max" field !! It is used, to my knowledge  */
+     /* exclusively in the X-TrueType font server..               */
+     /*                                                           */
+      if ( face->postscript.isFixedPitch                        &&
+           (loader->load_flags & FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH) == 0 )
         advance = face->horizontal.advance_Width_Max;
 
       if ( !(loader->load_flags & FT_LOAD_NO_SCALE) )