mirror of
https://github.com/holub/mame
synced 2025-06-29 23:48:56 +03:00
A lot of ttf fonts (including C/J/K fonts like unifont) do not have an
type attribute "Regular". This fix will load the first font found if no "bold" "bold italic" "italic" or "regular" attribute was found. [Couriersud]
This commit is contained in:
parent
8437514d2c
commit
3db357bff4
@ -266,7 +266,8 @@ osd_font_sdl::TTF_Font_ptr osd_font_sdl::search_font_config(std::string const &n
|
||||
{
|
||||
pat.reset(FcPatternCreate());
|
||||
FcPatternAddString(pat.get(), FC_FAMILY, (const FcChar8 *)name.c_str());
|
||||
FcPatternAddString(pat.get(), FC_STYLE, (const FcChar8 *)"Regular");
|
||||
//Quite a lot of fonts don't have a "Regular" font type attribute
|
||||
//FcPatternAddString(pat.get(), FC_STYLE, (const FcChar8 *)"Regular");
|
||||
FcPatternAddString(pat.get(), FC_FONTFORMAT, (const FcChar8 *)"TrueType");
|
||||
fontset.reset(FcFontList(config, pat.get(), os.get()));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user