summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorDavid Turner <david@freetype.org>2001-12-19 21:09:16 +0000
committerDavid Turner <david@freetype.org>2001-12-19 21:09:16 +0000
commit4937a3ebd2c77ece7796b312eb3814ce1b18b03b (patch)
treebbbb1d900b24b2275fc1342acc92d9a6f10f609d /src/base
parentc40a7e2d50fa71ca337fba3b58f424b67550e689 (diff)
downloadfreetype2-4937a3ebd2c77ece7796b312eb3814ce1b18b03b.tar.gz
* src/truetype/ttgload.c (TT_Load_Glyph), src/base/ftobjs.c
(FT_Load_Glyph): "fixed" the bug that prevented embedded bitmaps from begin loaded when the auto-hinter is used.. This actually is a hack but will be enough until the internal re-design scheduled for FreeType 2.1
Diffstat (limited to 'src/base')
-rw-r--r--src/base/ftobjs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 1a10f2a81..6189db99f 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -883,6 +883,22 @@
FT_AutoHinter_Interface* hinting;
+ /* try to load embedded bitmaps first when available */
+
+ /* XXX: this is really a temporary hack that should disappear */
+ /* promptly with FreeType 2.1 !! */
+ /* */
+ if ( FT_HAS_FIXED_SIZES( face ) )
+ {
+ error = driver->clazz->load_glyph( slot, face->size,
+ glyph_index,
+ load_flags | FT_LOAD_SBITS_ONLY );
+
+ if ( !error && slot->format == ft_glyph_format_bitmap )
+ goto Load_Ok;
+ }
+
+ /* load auto-hinted outline */
hinting = (FT_AutoHinter_Interface*)hinter->clazz->module_interface;
error = hinting->load_glyph( (FT_AutoHinter)hinter,
@@ -897,6 +913,7 @@
if ( error )
goto Exit;
+ Load_Ok:
/* compute the advance */
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
{