Re: [Tuxpaint-devel] Per-locale default font
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Shin-ichi T. <dol...@wm...> - 2023-06-10 13:33:16
|
Hi! The behavior of the font seartch methods seem to work differently on Linux and Windows. On linux, Tux Paint and Tux Paint Config seems not be able to find a locale font shipped with Tux Paint. On the other hand, they *can* find the locale font on windows. I think "noto sans" (pango's default on Rocky9?) looks good, but MS Gothic (default on Windows) looks quite bad. Please see some examples I wrapped up. https://z1.plala.jp/tuxpaint/tmp/uifonts2.html I confirmed pango's default (noto sans) on Rocky9 is good enough and guess TkaoPGothick also would not be bad. Therefore, just specifing "GJGothicPNSubset" as a default for Japanese would be O.K. at least for Japanese. However, how is it on other distro's? How is it for other languages? I think it would be better if we could find a way to use locale fonts also on Linux. Thanks! On Thu, 8 Jun 2023 00:52:07 -0700, Bill Kendrick wrote: > >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! > -- Shin-ichi TOYAMA <dol...@wm...> |