View Single Post
Old 08-02-2025, 05:02 AM   #1
chrisridd
Guru
chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.
 
chrisridd's Avatar
 
Posts: 982
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
Font handling in SVGs

I'm about to draw a bunch of line art diagrams for a book intended for my Inkpad Color 3.

Using SVG is the "obvious" choice, however I did a quick test and it doesn't look like PB honours the specified typeface at all. Essentially everything looks like Times.

I'm drawing using Affinity Designer 2; here's a bit of my exported SVG using Times New Roman:

Code:
<text x="448.819px" y="706.625px" style="font-family:'TimesNewRomanPSMT', 'Times New Roman', serif;font-size:50px;">12pt ks@%</text>
And here's a bit of my test using Arial:

Code:
<text x="448.819px" y="708.863px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:50px;">12pt artscGR</text>
Both look plausible to me, but both get rendered wrong. Times is apparently a little wider than Times New Roman, and I noticed some text getting truncated on the RHS, so I think it is using Times.

Are there any known issues here or tricks I can use? At the end of the day I can always embed a PNG, or get the export to render text as curves, but the downsides of those options are clear.

Edit: I also tried the latest Inkscape, but it was no better.
Edit: I tried embedding the font and using @font-face in CSS - no change. I tried <link>ing the stylesheet into the SVG files - also no change.

Last edited by chrisridd; 08-02-2025 at 07:09 AM. Reason: Tried embedding the fonts
chrisridd is offline   Reply With Quote