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:
parent
1f623cbe36
commit
3c8f25e6e9
4 changed files with 43 additions and 4 deletions
18
src/fonts.h
18
src/fonts.h
|
|
@ -19,7 +19,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: May 31, 2023
|
||||
Last updated: June 8, 2023
|
||||
*/
|
||||
|
||||
#ifndef FONTS_H
|
||||
|
|
@ -39,11 +39,23 @@
|
|||
#include "SDL_ttf.h"
|
||||
#include "SDL2_Pango.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
/* UI font, which as of 0.9.31, can be overridden by "uifont"
|
||||
setting (also, this will be used if "uifont=default" is specified,
|
||||
e.g. to override a config. file option using a command-line option) */
|
||||
e.g. to override a config. file option using a command-line option).
|
||||
|
||||
#define PANGO_DEFAULT_FONT "DejaVu Sans"
|
||||
Also, starting in 0.9.31, we can specify different preferred fonts
|
||||
based on locale.
|
||||
*/
|
||||
|
||||
typedef struct default_locale_font_s {
|
||||
int locale_id;
|
||||
const char * font_name;
|
||||
} default_locale_font_t;
|
||||
|
||||
extern default_locale_font_t default_local_fonts[];
|
||||
extern const char * PANGO_DEFAULT_FONT;
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue