[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] fttimer.c patch
From: |
Detlef Würkner |
Subject: |
[Devel] fttimer.c patch |
Date: |
Fri, 08 Feb 2002 01:37:02 +0100 |
Hello!
When using (embedded) bitmap fonts, FT_Glyph_To_Bitmap() will
fail if the loaded glyph is already a bitmap. A patch:
----8<----
--- ft2demos-2.0.7/src/fttimer.c.ori Sun Jun 24 18:06:51 2001
+++ ft2demos-2.0.7/src/fttimer.c Fri Feb 8 00:25:44 2002
@@ -121,13 +121,18 @@
bitmap = glyphs[idx];
- error = FT_Glyph_To_Bitmap( &bitmap,
- antialias ? ft_render_mode_normal
- : ft_render_mode_mono,
- 0,
- 0 );
- if ( !error )
- FT_Done_Glyph( bitmap );
+ if (bitmap->format == ft_glyph_format_bitmap)
+ error = 0; /* we already have a (embedded) bitmap */
+ else
+ {
+ error = FT_Glyph_To_Bitmap( &bitmap,
+ antialias ? ft_render_mode_normal
+ : ft_render_mode_mono,
+ 0,
+ 0 );
+ if ( !error )
+ FT_Done_Glyph( bitmap );
+ }
return error;
}
----8<----
ftstring.c also calls FT_Glyph_To_Bitmap() untested and maybe must also
be patched. ftcommon.i is ok.
Ciao, Detlef
--
_ // address@hidden
\X/ Detlef Wuerkner, Langgoens/Germany
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Devel] fttimer.c patch,
Detlef Würkner <=