Commit e943ace3 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
parent 10e87394
......@@ -734,11 +734,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