shithub: freetype+ttf2subf

Download patch

ref: 6dd303db0d38b7d02759f8ce701d35c20af56c36
parent: d1e9249b63667f6ea5e86f5372acef4747d31867
author: Werner Lemberg <[email protected]>
date: Sun Nov 26 16:25:53 EST 2000

* builds/ansi/ansi.mk: Fix inclusion order of files.


* src/type1/t1objs.c (T1_Init_Face): Compute style flags.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2000-11-26  Werner Lemberg  <[email protected]>
 
+	* builds/ansi/ansi.mk: Fix inclusion order of files.
+
+2000-11-26  Keith Packard  <[email protected]>
+
+	* src/type1/t1objs.c (T1_Init_Face): Compute style flags.
+
+2000-11-26  Werner Lemberg  <[email protected]>
+
 	* builds/compiler/ansi-cc.mk (CLEAN_LIBRARY): Fix rule and
 	conditional.
 
--- a/builds/ansi/ansi.mk
+++ b/builds/ansi/ansi.mk
@@ -13,7 +13,7 @@
 # fully.
 
 
-include $(TOP)/builds/ansi/ansi-def.mk
 include $(TOP)/builds/compiler/ansi-cc.mk
+include $(TOP)/builds/ansi/ansi-def.mk
 
 # EOF
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -19,7 +19,9 @@
 #include <freetype/internal/ftdebug.h>
 #include <freetype/internal/ftstream.h>
 
+#include <string.h>         /* strcmp() */
 
+
 #ifdef FT_FLAT_COMPILE
 
 #include "t1gload.h"
@@ -256,6 +258,17 @@
           root->family_name = face->type1.font_name;
           root->style_name  = (char *)"Regular";
         }
+      }
+
+      /* compute style flags */
+      root->style_flags = 0;
+      if ( face->type1.font_info.italic_angle )
+        root->style_flags |= FT_STYLE_FLAG_ITALIC;
+      if ( face->type1.font_info.weight )
+      {
+        if ( !strcmp( face->type1.font_info.weight, "Bold"  ) ||
+             !strcmp( face->type1.font_info.weight, "Black" ) )
+          root->style_flags |= FT_STYLE_FLAG_BOLD;
       }
 
       /* no embedded bitmap support */