Ability to specify fonts on a per-locale basis

Add to the list found in `src/fonts.c` (use language IDs
found in `src/i18n.h`, e.g. "LANG_DE" for German).
h/t Shin-ichi for the suggestion

Closes https://sourceforge.net/p/tuxpaint/feature-requests/240/
This commit is contained in:
Bill Kendrick 2023-06-08 00:40:43 -07:00
parent 1f623cbe36
commit 3c8f25e6e9
4 changed files with 43 additions and 4 deletions

View file

@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
Last modified: June 1, 2023
Last modified: June 8, 2023
*/
#include <stdio.h>
@ -173,6 +173,16 @@ int button_label_y_nudge;
static void reliable_read(int fd, void *buf, size_t count);
#endif
const char * PANGO_DEFAULT_FONT = "DejaVu Sans";
default_locale_font_t default_local_fonts[] = {
{
LANG_JA,
"TakaoPGothic" /* Included in Ubuntu "fonts-takao-gothic" package */
// FIXME: Shin-ichi recommend something, please! -bjk 2023.06.08
},
{-1, NULL},
};
void TuxPaint_Font_CloseFont(TuxPaint_Font * tpf)
{