* 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
This commit is contained in:
David Turner 2001-12-19 21:09:16 +00:00
parent c40a7e2d50
commit 4937a3ebd2
4 changed files with 31 additions and 0 deletions

View File

@ -1,5 +1,12 @@
2001-12-19 David Turner <david@freetype.org>
* 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
* include/freetype/cache/ftcache.h: added comments to indicate that
some of the exported functions should only be used by applications
that need to implement custom cache types

View File

@ -2068,6 +2068,9 @@ FT_BEGIN_HEADER
/* */
#define FT_LOAD_LINEAR_DESIGN 8192
/* temporary hack !! */
#define FT_LOAD_SBITS_ONLY 16384
/*************************************************************************/
/* */

View File

@ -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 )
{

View File

@ -1411,6 +1411,10 @@
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
/* return immediately if we only wanted the embedded bitmaps */
if ( load_flags & FT_LOAD_SBITS_ONLY )
return FT_Err_Invalid_Argument;
/* seek to the beginning of the glyph table. For Type 42 fonts */
/* the table might be accessed from a Postscript stream or something */
/* else... */