[Tuxpaint-devel] Per-locale default font
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Bill K. <nb...@so...> - 2023-06-08 07:52:22
|
For a long while now, Tux Paint has used "DejaVu Sans" as the preferred font for the UI (requested via Pango, though based on what I see in screenshots on Twitter, some folks don't have that font and some alternatives are used). Recently, Shin-ichi noted that we have a font tucked away in "fonts/locale/" that looks much better for use with Japanese text, but we're not using it (we no longer load TTF files directly and use SDL_ttf to render strings, it's all SDL2_Pango now). Therefore, I've added the ability for us (the Tux Paint developers) to specify a preferred font on a per-locale basis. It's simply a language code (from our `src/i18n.h` file, e.g., "LANG_DE" for German, "LANG_ZH_CN" for Chinese (Simplified), etc.) and a string describing the font family we want Pango to load. (If left unspecified, we'll continue to ask for "DejaVu Sans".) This is now in the Git master branch over in the SourceForge project, and will be part of Tux Paint 0.9.31. I'm about to try to set fonts, as best I can, based on the collection of TTF files we have been shipping with Tux Paint. Those files seem to be useless now, unless I'm mistaken! However, I wonder if we could install them into the system where Pango can find them, when installing Tux Paint? Or perhaps we could somehow point Pango to our directory of locale fonts as an extra place to look when scanning for fonts...? Thoughts? And also, if you have a preferred font for your favorite locale, please share and I can add it to the list! -- -bill! Sent from my computer |