From 1d212475b9d8faa7b5b2e5789560a2007fcfbe81 Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Thu, 8 Jun 2023 01:28:20 -0700 Subject: [PATCH] More locale font defaults Based on what we have as plain TTF files in the repo, and what's available in Ubuntu. --- docs/CHANGES.txt | 6 ++++++ src/fonts.c | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index e4011c276..75907e463 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -73,7 +73,13 @@ https://tuxpaint.org/ * WIP Different default fonts may be set on a per-locale basis (hard-coded into Tux Paint). Most locales still use "DejaVu Sans", if available. As of 0.9.31, things are configured as: + + Arabic: Nice + + Gujarati: Lohit Gujarati + + Hebrew: Nachlieli CLM + + Hindi: Lohit Devanagari + Japanese: TBD + + Thai: Garuda + + Tibetan: Tsampa Keyboard Closes https://sourceforge.net/p/tuxpaint/feature-requests/240/ Bill Kendrick (code) diff --git a/src/fonts.c b/src/fonts.c index ad499b68e..fd713bc9f 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -176,11 +176,36 @@ static void reliable_read(int fd, void *buf, size_t count); const char * PANGO_DEFAULT_FONT = "DejaVu Sans"; default_locale_font_t default_local_fonts[] = { + // Initially based on "otfinfo --info fonts/locale/*.ttf | grep "Full name:" { LANG_JA, "TakaoPGothic" /* Included in Ubuntu "fonts-takao-gothic" package */ // FIXME: Shin-ichi recommend something, please! -bjk 2023.06.08 }, + { + LANG_BO, // NOTE: Our current translation is Wylie transliterated, not Unicode! */ + "Tsampa Keyboard" /* FIXME: Not packaged in Ubuntu! */ + }, + { + LANG_GU, + "Lohit Gujarati" /* Included in Ubuntu "fonts-lohit-gujr" package */ + }, + { + LANG_TH, + "Garuda" /* Included in Ubuntu "fonts-tlwg-garuda-ttf" package */ + }, + { + LANG_AR, + "Nice" /* Included in Ubuntu "fonts-arabeyes" package (ae_Nice) */ + }, + { + LANG_HE, + "Nachlieli CLM" /* Inclued in Ubuntu "culmus" package */ + }, + { + LANG_HI, + "Lohit Devanagari" /* Included in Ubuntu "fonts-lohit-deva" package */ + }, {-1, NULL}, };