Pango loads Tux Paint-supplied fonts on macOS.
Previously Pango loaded system-supplied fonts instead, which could lead to fonts not rendering in a human-readable text. This change fixes https://sourceforge.net/p/tuxpaint/bugs/265/
This commit is contained in:
parent
e00b6b4f4a
commit
3849480fd4
9 changed files with 178 additions and 6 deletions
10
src/fonts.c
10
src/fonts.c
|
|
@ -286,6 +286,16 @@ TuxPaint_Font *TuxPaint_Font_OpenFont(const char *pangodesc,
|
|||
desc);
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
* SDLPango_CreateContext_GivenFontDesc() defaults to ASCII character set
|
||||
* (at least on the macOS) unless the CHARSET environment varaible is set.
|
||||
* May also want to set on non-macOS platforms, also.
|
||||
*/
|
||||
|
||||
mysetenv("CHARSET", "UTF-8");
|
||||
#endif
|
||||
|
||||
tpf->pango_context = SDLPango_CreateContext_GivenFontDesc(desc);
|
||||
if (tpf->pango_context == NULL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue