Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.
This is Savannah patch #7471. * src/base/ftobjs.c (FT_Load_Glyph): Implement it.
This commit is contained in:
parent
18fffa456e
commit
ff8095077c
|
@ -1,6 +1,14 @@
|
||||||
|
2011-02-19 Kevin Kofler <kevin.kofler@chello.at>
|
||||||
|
|
||||||
|
Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.
|
||||||
|
This is Savannah patch #7471.
|
||||||
|
|
||||||
|
* src/base/ftobjs.c (FT_Load_Glyph): Implement it.
|
||||||
|
|
||||||
2011-02-19 John Tytgat <John.Tytgat@esko.com>
|
2011-02-19 John Tytgat <John.Tytgat@esko.com>
|
||||||
|
|
||||||
[cff] Fix subset prefix removal.
|
[cff] Fix subset prefix removal.
|
||||||
|
This is Savannah patch #7465.
|
||||||
|
|
||||||
* src/cff/cffobjs.c (remove_subset_prefix): Update length after
|
* src/cff/cffobjs.c (remove_subset_prefix): Update length after
|
||||||
subset prefix removal.
|
subset prefix removal.
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* The FreeType private base classes (body). */
|
/* The FreeType private base classes (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
|
/* Copyright 1996-2011 by */
|
||||||
/* 2010 by */
|
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
@ -561,6 +560,7 @@
|
||||||
FT_Library library;
|
FT_Library library;
|
||||||
FT_Bool autohint = FALSE;
|
FT_Bool autohint = FALSE;
|
||||||
FT_Module hinter;
|
FT_Module hinter;
|
||||||
|
TT_Face ttface = (TT_Face)face;
|
||||||
|
|
||||||
|
|
||||||
if ( !face || !face->size || !face->glyph )
|
if ( !face || !face->size || !face->glyph )
|
||||||
|
@ -601,7 +601,8 @@
|
||||||
* - Then, auto-hint if FT_LOAD_FORCE_AUTOHINT is set or if we don't
|
* - Then, auto-hint if FT_LOAD_FORCE_AUTOHINT is set or if we don't
|
||||||
* have a native font hinter.
|
* have a native font hinter.
|
||||||
*
|
*
|
||||||
* - Otherwise, auto-hint for LIGHT hinting mode.
|
* - Otherwise, auto-hint for LIGHT hinting mode or if there isn't
|
||||||
|
* any hinting bytecode in the TrueType/OpenType font.
|
||||||
*
|
*
|
||||||
* - Exception: The font is `tricky' and requires the native hinter to
|
* - Exception: The font is `tricky' and requires the native hinter to
|
||||||
* load properly.
|
* load properly.
|
||||||
|
@ -626,8 +627,10 @@
|
||||||
FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags );
|
FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags );
|
||||||
|
|
||||||
|
|
||||||
if ( mode == FT_RENDER_MODE_LIGHT ||
|
if ( mode == FT_RENDER_MODE_LIGHT ||
|
||||||
face->internal->ignore_unpatented_hinter )
|
face->internal->ignore_unpatented_hinter ||
|
||||||
|
( FT_IS_SFNT( face ) &&
|
||||||
|
ttface->max_profile.maxSizeOfInstructions == 0 ) )
|
||||||
autohint = TRUE;
|
autohint = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue