|
|
On 8/5/21 8:05 AM Webb Hinton wrote:
Another option would be to embed a font (somehow) and load
the font from
this embedded resource, just like we can open jpg and png images
from
memory. Something like that, maybe...
I've been working with Ian's platform specific code and I have demo
code somewhere which loads a font from a ttf or similar file. This
works fine. Embedding a font in binary form in a program would
likely be more involved because the platform specific code Ian
provided does only load from a file. ISTR that e.g. Windows can load
from "font resources" but I don't know how to "build" such a
resource.
Are people still interested in this idea?
I'm still interested but for now I have working code for myself.
We could probably add a public method to load a font from a font
file to hide the platform specific code with what we have already.
If you need to bundle the font in binary form inside
the program you could convert the file to a binary image (e.g. with
xxd), compile it into the program, and write it to a temporary file
to load it.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/36f6bf9d-7751-eb55-de58-ddc4df064871%40online.de.
[ Direct Link to Message ] | |
|
| |