* src/truetype/ttobjs.c: updated the TrueType loader to recognize

a few fonts that require the automatic unpatented loader
This commit is contained in:
David Turner 2006-09-01 14:09:35 +00:00
parent d898aeddbe
commit 6d79f214e1
2 changed files with 27 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2006-09-01 David Turner <david@freetype.org>
* src/truetype/ttobjs.c: updated the TrueType loader to recognize
a few fonts that require the automatic unpatented loader
2006-08-29 Dr. Werner Fink <werner@suse.de>
* configure: Make it possible to handle configure options which

View File

@ -266,9 +266,28 @@
*/
if ( !face->unpatented_hinting )
{
/* XXX: TODO: */
if ( strcmp( ttface->family_name, "What?" ) == 0 )
face->unpatented_hinting = 1;
static const char* const trick_names[] =
{
"DFKaiSho-SB", /* dfkaisb.ttf */
"DFKai-SB", /* kaiu.ttf */
"HuaTianSongTi?", /* htst3.ttf */
"MingLiU", /* mingliu.ttf & mingliu.ttc */
"PMingLiU", /* mingliu.ttc */
NULL
};
int nn;
/* note that we only check the face name at the moment, it might
* be worthy to do more checks for a few special cases
*/
for ( nn = 0; trick_names[nn] != NULL; nn++ )
{
if ( ft_strcmp( ttface->family_name, trick_names[nn] ) == 0 )
{
face->unpatented_hinting = 1;
break;
}
}
}
ttface->internal->force_autohint = !face->unpatented_hinting;