View Single Post
04/10/22, 08:26 PM   #1
Calamath
AddOn Author - Click to view addons
Join Date: Aug 2019
Posts: 36
[open] API for specifying fallback font

I would be grateful if you could add API to specify the fallback font (backup font).

Background:
Currently, specifying backup fonts is limited to GUIXML, being inconvenient when using proprietary fonts in add-ons.

And, since the default fallback font is not specified, many older add-ons using a font file name in the SetFont method do not display the missing glyphs.

I would offer the following proposal to resolve the ongoing issues since update 25.

Proposal:
(1) New SetBackupFont API
Add API to tie backup font files to a font file.
However, backup fonts already specified should not be replaced.

* SetBackupFont(*string* _fontFileName_, *string* _backupFontFileName_)
The font names must be a full path.

I understand that backup fonts are managed as a table per font file, not per font object.
That is why I do not want the CreateFont API extended.

I want to clarify that the purpose is to specify backup fonts for add-on proprietary fonts, not to change backup fonts for existing bundled fonts.

- Calamath

Last edited by Calamath : 01/16/24 at 09:41 AM.
  Reply With Quote