Page 1 of 1

Is it possible to have a backup font?

Posted: Sun Aug 24, 2025 11:04 am
by Joubarbe
So I have a font A that I really like for standard characters. But then I need some extra unusual glyphs that I have with font B. Is it possible like in CSS to specify / register two fonts, then when the system cannot find a specific glyph in font A, it searches font B?

Pretty sure the answer is no, but who knows :D

Re: Is it possible to have a backup font?

Posted: Sun Aug 24, 2025 11:26 am
by AZJIO

Re: Is it possible to have a backup font?

Posted: Sun Aug 24, 2025 11:39 am
by Joubarbe
AZJIO wrote: Sun Aug 24, 2025 11:26 am viewtopic.php?t=81756
Thank you for your reply, but it's a different problem. Your problem is "if the system doesn't find my font", my problem is "if the system doesn't find the glyph". In my scenario, both fonts are registered and really exist in the system.

(and I realise that's CSS does exactly that; it fixes your problem, but not mine - probably hard to detect if a glyph exists or not?)

Re: Is it possible to have a backup font?

Posted: Sun Aug 24, 2025 12:10 pm
by jacdelad
I think you have to do this yourself: define your string somehow and render it into a custom gadget, like a canvas.
On the other hand: create your own font that fits your needs.

Re: Is it possible to have a backup font?

Posted: Sun Aug 24, 2025 5:29 pm
by minimy
May be using a character list and a procedure to verify if the glyph exist or not?.
if result="" then glyph not exist or maybe another character when is empty depend of the font. (some times are filled with arbitrary character, inspect your font)

If result=""
font= glyphFont
Else
font= textFont
Endif

Is only an idea. Idk if we are speaking about same thing... (because is sunday, im in the beach and i have a box of beers) :lol:

Re: Is it possible to have a backup font?

Posted: Mon Aug 25, 2025 11:27 am
by Joubarbe
Invalid characters do not return "", but a generic square. What I will end up doing is to take the glygh number (with 'glyph') and check that instead.

Re: Is it possible to have a backup font?

Posted: Mon Aug 25, 2025 1:38 pm
by Axolotl
I guess you have to do that by yourself.
For example windows always tries to find a character set, and that probably also applies to individual characters.
But that's far too specific for me to go into in any more detail...
See for yourself on M$ help pages or in the similar documentation of the OS you use, ...