Under CF9, I'm converting SVGs to PNGs using the Batik (1.7) transcoder. The SVGs contain text using non-standard fonts which I've installed under Windows on the server, but which are being replaced with fallback system fonts during the Batik conversion. I've tried both TTF and OTF fonts and the suggestions here: http://webmonkeyswithlaserbeams.wordpress.com/2009/04/29/custom-fonts-in-coldfusion/. Embedding the fonts in the SVGs isn't a viable option due to parsing performance problems in another area of the application.
Asked
Active
Viewed 925 times
1
-
Have you installed the font under Server Settings > Font Management in your CF Administrator? – Henry Oct 21 '11 at 21:42
-
Yes, I've confirmed that the fonts are in the "Current System Fonts" list there. – Zane T. Oct 21 '11 at 22:01
-
Have you tried using the exact font name listed there? – Henry Oct 21 '11 at 22:41
-
Yep, I've tried both the Family and and Face values with no change. – Zane T. Oct 21 '11 at 23:26
-
might wanna resort to http://xmlgraphics.apache.org/batik/mailing-lists.html – Henry Oct 21 '11 at 23:31
-
maybe u need to use their SVG Font Converter – Henry Oct 21 '11 at 23:32
-
I was able to get better results by resorting to ImageMagick commands instead of Batik for the conversion, though YMMV. – Zane T. Jan 11 '12 at 22:01
2 Answers
0
I found that Batik renders fonts well if you specify a font-family in your SVG that is registered with the Grahpics environment.
Unregistering, however, does not seem to work.
-1
You have to embed the svg font definations inside your svg. There is no other way.

Mike Judkins
- 14
-
These links I found say "There is, too!" http://stackoverflow.com/questions/17993130/svg-to-png-text-not-showing-properly-arial-font/17993932#17993932 http://batik.2283329.n4.nabble.com/Batik-1-7-Transcoder-Chinese-Font-td2977384.html – RobertG Oct 10 '14 at 10:40