Page 1 of 1

Finish the code for customized fonts

Posted: Tue Mar 14, 2023 2:58 pm
by DarkHorse2
WiTE2 allows users to customize various font elements via GuiFonts.json, shown in part, here:

Code: Select all

	"FONT_MEDIUM" 			: { "active": "true",  "id": "1",  "name": "PT Root UI Bold", "size": "14", "format": "", 		"file": "", "desc" : "Medium Font - Common Header Font" },
	"FONT_SMALL" 			: { "active": "true",  "id": "2",  "name": "PT Root UI Bold", "size": "10",	"format": "", 		"file": "", "desc" : "Small Font - Common Game Font" },
	"FONT_LARGE" 			: { "active": "true",  "id": "3",  "name": "PT Root UI Bold", "size": "18", "format": "", 		"file": "", "desc" : "Large Font - End Game Screen" },
	
	"FONT_NARROW" 			: { "active": "true",  "id": "4",  "name": "PT Root UI Bold",  "size": "10", "format": "", 		"file": "", "desc" : "Narrow Font - Top Right Menu date/turn" },
	
	"FONT_UNIT" 			: { "active": "true",  "id": "5",  "name": "PT Root UI Bold",  "size": "11", "format": "", 	"file": "", "desc" : "Unit Font - Unit Counters High Zoom" },
	"FONT_UNIT_SMALL"		: { "active": "true",  "id": "6",  "name": "PT Root UI Bold",  "size": "9",  "format": "", 	"file": "", "desc" : "Unit Font Small - Unit Counters Med Zoom" },
	
	"FONT_MAIN_TAB"			: { "active": "true",  "id": "7",  "name": "PT Root UI Bold",  "size": "11", "format": "", 	"file": "", "desc" : "Top Menu Tab Font" },
	
	"FONT_SMALL_BOLD"		: { "active": "true",  "id": "8",  "name": "PT Root UI Bold",  "size": "7", "format": "", 	"file": "", "desc" : "Unit Small Bold - Unit Counters Med Zoom and Commander's Report" },
	"FONT_EDITOR"			: { "active": "true",  "id": "9",  "name": "PT Root UI Bold",  "size": "9", "format": "", 		"file": "", "desc" : "Editor Font" },
	"FONT_CONSOLE"			: { "active": "true",  "id": "10", "name": "Lucida Console",  "size": "9", 	"format": "", 		"file": "", "desc" : "Console Font - Event Logs" },
For the most part, it works OK as I use the following:
PT Root UI is a special part of the PT Root typeface family. It consists of four styles of normal proportions, from Light to Bold, intended for screen reading, interfaces, websites, as well as wayfinding systems. PT Root UI is a modern uniwidth sans serif whose individual character widths are constant across all weights. This is especially convenient for headers, menu bars and interface elements. It has a broad language support, including the Latin Extended and Cyrillic (including Cyrillic Asian), different sets of figures and currency signs, fractions and indices, as well as a number of wayfinding signs and alternative forms. PT Root UI was designed by Vitaly Kuzmin and released by Paratype in 2018.
https://www.paratype.com/fonts/pt/pt-root-ui

However, I suspect it is not being accounted for in the display of the Production Chart screen Pop-Ups when hovering over the charts, causing the rendered text to be a mess.

(see - https://www.matrixgames.com/forums/view ... 9&t=393650)

I suspect the proper scaling routine is not being invoked when rendering this text, like it is on other UI elements.

Thank you.

Re: Finish the code for customized fonts

Posted: Mon Jun 30, 2025 3:44 pm
by Joel Billings
Pavel responded: I see no issue with font scaling on production chart screens. Text justification on rollover is currently not supported.