WIP New "--uifont" option to specify UI font

If not specified, or "default" is specified (e.g., to override
a higher-up config file setting), it will fallback to what we
have #define'd in fonts.h as PANGO_DEFAULT_FONT, "DejaVu Sans".

It appears to fallback to this (or a reasonable fascimile) if
the font specified by the "uifont" option doesn't exist
(e.g., "tuxpaint --uifont=ABCD1234").

For https://sourceforge.net/p/tuxpaint/feature-requests/146/
This commit is contained in:
Bill Kendrick 2023-05-29 13:10:59 -07:00
parent b4a550a6e1
commit 83c4cbc676
6 changed files with 40 additions and 8 deletions

View file

@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
Last updated: April 30, 2023
Last updated: May 29, 2023
*/
#ifndef FONTS_H
@ -39,8 +39,11 @@
#include "SDL_ttf.h"
#include "SDL2_Pango.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) */
#define PANGO_DEFAULT_FONT "DejaVu Sans"
//#define PANGO_DEFAULT_FONT "OpenDyslexicAlta"
#include "compiler.h"