freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] ftstring.c patch


From: Detlef Würkner
Subject: [Devel] ftstring.c patch
Date: Fri, 08 Feb 2002 10:48:09 +0100

Hello!

Rewriting ftstring.c to work with embedded bitmaps would be complicated,
so this patch just disables the usage of embedded bitmaps.
----8<----
--- ft2demos-2.0.7/src/ftstring.c.ori   Fri Dec 14 14:53:28 2001
+++ ft2demos-2.0.7/src/ftstring.c       Fri Feb  8 09:42:39 2002
@@ -51,7 +51,7 @@
 
   static int  hinted    = 1;       /* is glyph hinting active ?    */
   static int  antialias = 1;       /* is anti-aliasing active ?    */
-  static int  use_sbits = 1;       /* do we use embedded bitmaps ? */
+  static int  use_sbits = 0;       /* do we use embedded bitmaps ? */
   static int  kerning   = 1;
 
   static int  res = 72;  /* default resolution in dpi */
@@ -204,6 +204,8 @@
     load_flags = FT_LOAD_DEFAULT;
     if( !hinted )
       load_flags |= FT_LOAD_NO_HINTING;
+    if( !use_sbits )
+      load_flags |= FT_LOAD_NO_BITMAP;
 
     num_grays = 256;
     if (!antialias)
@@ -236,8 +238,7 @@
 
       /* load the glyph image (in its native format) */
       /* for now, we take a monochrome glyph bitmap  */
-      error = FT_Load_Glyph( face, glyph->glyph_index,
-                             hinted ? FT_LOAD_DEFAULT : FT_LOAD_NO_HINTING );
+      error = FT_Load_Glyph( face, glyph->glyph_index, load_flags );
       if (error) continue;
 
       error = FT_Get_Glyph ( face->glyph, &glyph->image );
@@ -477,10 +478,14 @@
       return 1;
 
     case grKEY('b'):
+#if 0
       use_sbits  = !use_sbits;
       new_header = use_sbits
                      ? (char *)"embedded bitmaps are now used when available"
                      : (char *)"embedded bitmaps are now ignored";
+#else
+      new_header = (char *)"embedded bitmaps cant be rotated/transformed";
+#endif
       return 1;
 
     case grKEY('n'):
----8<----

Ciao, Detlef
-- 
_ // address@hidden
\X/  Detlef Wuerkner, Langgoens/Germany



reply via email to

[Prev in Thread] Current Thread [Next in Thread]