Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FontHandler #9

Open
abu-irrational opened this issue Jul 7, 2024 · 2 comments
Open

FontHandler #9

abu-irrational opened this issue Jul 7, 2024 · 2 comments

Comments

@abu-irrational
Copy link

Hi William,
Im'going to finalize my integration with SvgAndMe.

I patched a cross-platform solution so that an "Arial.ttf" of my own is always pre-loaded, plus few more ttf/ttc font-files "picked from the platform" (if they exists).

Personally I don't like (or I don't understand) these SVG files using some external fonts.
Trying to load your "gallery/tango.svg" with my TclTk app or with your svgimage.exe, I got a lot of warning like this
== FontHandler::selectFontFamily, NOT FOUND; DejaVu Sans
and this is the result ...

immagine

Anyway, if SVG allows (by design) these 'approximations', .. I'll have to like them.

Now, here are some of my specific questions about waavs::FontHandler:
a) isn't there a method to unload a font ? (hmm .. BLFonManager has no such method .. )
b) trying to load an already loaded font should be a no-op, .. shouldn't it ?
c) why method FontHandler::loadFontFace(const char* filename, BLFontFace &ff) requires these two arguments ? Only the filename is necessary. Am I missing something ?

@Wiladams
Copy link
Owner

I don't know why I've never seen these til now.
a) No such method to remove. Are you concerned about to much space being taken up?
b).Loading already loaded, I'm not sure. FontHandler doesn't do anything, so it depends on blend2d
c) To fillin that specific BLFontFace object. But, this might be a 'legacy' API which is no longer necessary.

@Wiladams
Copy link
Owner

That Tango thing really shows off font challenges. Yes, unless you have the very specific font it's looking for, it's going to default to whatever you have set as the default for your graphics context. SVG does have support for internal fonts, but it seems this has fallen out of favor. I tried implementing that once, but blend2d isn't quite up for what comes as base64 encoded embedded fonts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants