You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Font.loaderEndElement calls Universe.registerFont. Universe keeps a map of font face names that map to Font instances. However, at the time Font.loader.EndElement is called, FontFace.build has not been called, which means that FontFace.fontFamily will be null. This means that any <font> tags in the SVG will get registered in the Universe with a key value of null.
As far as I can tell, this makes it so no <font> tags will ever get used properly.
The text was updated successfully, but these errors were encountered:
I did not find a way to get embedded SVG fonts to work (the <font> tag). I ended up using SVGSalamander's FontSystem class. If you look at line 283 of Text.java, if the Universe doesn't know about the requested font-family, it will call FontSystem.createFont(4). Ultimately, this can end up using a java.awt.Font that the JVM knows about.
However, I did find that SVGSalamander uses ints in the MissingGlyph class to store the bounding volume of the glyph for an individual character. Depending on the font you use, this can cause kerning issues. I created a PR to fix this issue (#21).
Font.loaderEndElement
callsUniverse.registerFont
.Universe
keeps a map of font face names that map toFont
instances. However, at the timeFont.loader.EndElement
is called,FontFace.build
has not been called, which means thatFontFace.fontFamily
will be null. This means that any<font>
tags in the SVG will get registered in theUniverse
with a key value of null.As far as I can tell, this makes it so no
<font>
tags will ever get used properly.The text was updated successfully, but these errors were encountered: