Commit 47034c14 authored by Felix Paul Kühne's avatar Felix Paul Kühne

freetype: in case the provided font name is neither found by name nor by...

freetype: in case the provided font name is neither found by name nor by family, let ATS check whether it is a correct PostScript name

This fixes issues with some Asian fonts as pointed by Naohiro Koriyama
(cherry picked from commit e943ace33cce82c1a59b67000f2fbd99ff54130e)
parent dee1ee38
......@@ -733,11 +733,17 @@ static char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )
{
msg_Err( p_filter, "ATS couldn't find either %s nor its family", psz_fontname );
msg_Dbg( p_filter, "ATS couldn't find either %s nor its family, checking PS name", psz_fontname );
ats_font_id = ATSFontFindFromPostScriptName( cf_fontName, kATSOptionFlagsDefault );
if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )
{
msg_Err( p_filter, "ATS couldn't find %s (no font name, family or PS name)", psz_fontname );
CFRelease( cf_fontName );
return NULL;
}
}
}
CFRelease( cf_fontName );
if ( noErr != ATSFontGetFileReference( ats_font_id, &ref ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment