Mac OS X update - Standard Mac font paths will now be used during attempt to TTF fonts at startup. (eg. Foreign fonts can now be placed in /Library/Fonts or ~/Library/Fonts, alongside all the other standard Mac fonts)
This commit is contained in:
parent
3e171a164f
commit
83b00e8f60
1 changed files with 20 additions and 0 deletions
20
src/fonts.c
20
src/fonts.c
|
|
@ -129,6 +129,26 @@ TTF_Font *load_locale_font(TTF_Font * fallback, int size)
|
|||
|
||||
ret = TTF_OpenFont(str, size);
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (ret == NULL)
|
||||
{
|
||||
snprintf(str, sizeof(str), "%sfonts/%s.ttf", DATA_PREFIX, lang_prefix);
|
||||
ret = TTF_OpenFont(str, size);
|
||||
}
|
||||
|
||||
if (ret == NULL)
|
||||
{
|
||||
snprintf(str, sizeof(str), "/Library/Fonts/%s.ttf", lang_prefix);
|
||||
ret = TTF_OpenFont(str, size);
|
||||
}
|
||||
|
||||
if (ret == NULL)
|
||||
{
|
||||
snprintf(str, sizeof(str), "%s/%s.ttf", macosx.fontsPath, lang_prefix);
|
||||
ret = TTF_OpenFont(str, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ret == NULL)
|
||||
{
|
||||
ret = try_alternate_font(size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue