[truetype] Revert the reordering of trickyness checking.
Trickyness check by the family name is faster than that by the checksum.
This commit is contained in:
parent
abc47aa136
commit
86b7b2f614
11
ChangeLog
11
ChangeLog
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
[truetype] Always check the checksum to identify tricky fonts.
|
[truetype] Always check the checksum to identify tricky fonts.
|
||||||
|
|
||||||
Some PDF generators mangle the family name badly, prioritize
|
Because some PDF generators mangle the family name badly,
|
||||||
the check by the sfnt table checksums than the check by the
|
the trickyness check by the checksum should be invoked always.
|
||||||
family name. For sample PDF, see
|
For sample PDF, see
|
||||||
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
|
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
|
||||||
|
|
||||||
* src/truetype/ttobjs.c (tt_check_trickyness): Exchange the order
|
* src/truetype/ttobjs.c (tt_check_trickyness): Even when
|
||||||
of tt_check_trickyness_family() and tt_check_trickyness_sfnt_ids().
|
tt_check_trickyness_family() finds no trickyness,
|
||||||
|
tt_check_trickyness_sfnt_ids() is invoked.
|
||||||
|
|
||||||
2011-04-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
2011-04-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||||
|
|
||||||
|
|
|
@ -332,17 +332,17 @@
|
||||||
if ( !face )
|
if ( !face )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* For first, check the face name for quick check. */
|
||||||
|
if ( face->family_name &&
|
||||||
|
tt_check_trickyness_family( face->family_name ) )
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* Type42 fonts may lack `name' tables, we thus try to identify */
|
/* Type42 fonts may lack `name' tables, we thus try to identify */
|
||||||
/* tricky fonts by checking the checksums of Type42-persistent */
|
/* tricky fonts by checking the checksums of Type42-persistent */
|
||||||
/* sfnt tables (`cvt', `fpgm', and `prep'). */
|
/* sfnt tables (`cvt', `fpgm', and `prep'). */
|
||||||
if ( tt_check_trickyness_sfnt_ids( (TT_Face)face ) )
|
if ( tt_check_trickyness_sfnt_ids( (TT_Face)face ) )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* Secondary, check the face name. */
|
|
||||||
if ( face->family_name &&
|
|
||||||
tt_check_trickyness_family( face->family_name ) )
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue