Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > PocketBook

Notices

Reply
 
Thread Tools Search this Thread
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
Old 08-03-2025, 02:50 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,735
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
I experimented with this more than 10 years ago and back then it only worked with ADE 4. Unfortunately, not much has changed since then.

Unless you can convince your readers to use ADE 4.x, you'll probably have to convert all SVG text to paths.
Attached Thumbnails
Click image for larger version

Name:	svg_test.png
Views:	3
Size:	33.7 KB
ID:	217244  
Attached Files
File Type: epub cover_svg.epub (72.9 KB, 2 views)
Doitsu is offline   Reply With Quote
Old 08-03-2025, 08:04 AM   #3
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
After some googling I think I've determined that PocketBook doesn't support fonts embedded in EPUBs at all, which I suspect then carries over to not supporting them in SVGs. That's really quite annoying. Surely the RMSDK supports this?

One question might be, if I installed a font in the usual system/fonts directory, can I refer to it in CSS, either with or without a @font-face? This would make the books completely non-portable, but would be a potential workaround.

Separately, I noticed that <pre> does not render with a monospaced font. But <tt> does, which is a bit surprising.

So "<pre><tt>...</tt></pre>" it is...
chrisridd is offline   Reply With Quote
Old 08-03-2025, 01:27 PM   #4
Moonbase59
Addict
Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.
 
Moonbase59's Avatar
 
Posts: 217
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
Quote:
Originally Posted by chrisridd View Post
[…] I've determined that PocketBook doesn't support fonts embedded in EPUBs at all […]
I have a Pocketbook Era (PB700), firmware U700.6.8.4183, and it does work well with embedded fonts. See thread in the German E-Reader Forum, which also has a test file.

That’s not SVG though, just normal embedded fonts.

Last edited by Moonbase59; 08-03-2025 at 01:30 PM.
Moonbase59 is offline   Reply With Quote
Old 08-03-2025, 02:14 PM   #5
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
Quote:
Originally Posted by Moonbase59 View Post
I have a Pocketbook Era (PB700), firmware U700.6.8.4183, and it does work well with embedded fonts. See thread in the German E-Reader Forum, which also has a test file.
Interesting. It doesn't fully work on my Inkpad Color 3. Photos attached. (Note to self, dust screen.)

But clearly it is working a bit, so that's something to build on.

Quote:
Originally Posted by Moonbase59 View Post
That’s not SVG though, just normal embedded fonts.
Getting the CSS to load the font is an important step though as you can make SVG link to the same CSS file.

Thanks for the link!!
Attached Thumbnails
Click image for larger version

Name:	inkpad.jpg
Views:	9
Size:	456.8 KB
ID:	217257   Click image for larger version

Name:	sigil.jpg
Views:	8
Size:	505.1 KB
ID:	217258  
chrisridd is offline   Reply With Quote
Old 08-03-2025, 03:01 PM   #6
Moonbase59
Addict
Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.
 
Moonbase59's Avatar
 
Posts: 217
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
You’re welcome!

The left pic (of the PB) looks like mine when I’ve set a font override (lower menu, "A" symbol). Are you sure this is set to "default" (which should use the embedded fonts)?

Oh, also make sure the PocketBook uses its built-in EPUB3 reader, not the EPUB2 reader. You can long-tap the book and select "Open With …" → "PB Reader (EPUB 3)". (Although this should normally default to the correct one if you haven’t changed the PB’s extensions.cfg.)

Last edited by Moonbase59; 08-03-2025 at 03:12 PM.
Moonbase59 is offline   Reply With Quote
Old 08-03-2025, 03:48 PM   #7
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
Quote:
Originally Posted by Moonbase59 View Post
You’re welcome!

The left pic (of the PB) looks like mine when I’ve set a font override (lower menu, "A" symbol). Are you sure this is set to "default" (which should use the embedded fonts)?
Ah, using "default" that makes a huge difference - everything uses the new fonts.

But if you look at the bottom of my first photo, you can see one of the custom fonts being used - the line starting "besitze". But in the CSS, that's using the same rule ("block_2" class) as the paragraph above it starting "Hervorhebungen" that is being rendered differently. What?! This is why I said it works "a bit".

Editing the rules to add "!important" to the font-family doesn't seem to make a difference when I'm not using "default".

I wonder if continually replacing the book via Calibre is confusing the PB? Maybe it has cached the old version.

Quote:
Originally Posted by Moonbase59 View Post
Oh, also make sure the PocketBook uses its built-in EPUB3 reader, not the EPUB2 reader. You can long-tap the book and select "Open With …" → "PB Reader (EPUB 3)". (Although this should normally default to the correct one if you haven’t changed the PB’s extensions.cfg.)
Yes, I'm using the EPUB3 reader.
chrisridd is offline   Reply With Quote
Old 08-03-2025, 04:08 PM   #8
Moonbase59
Addict
Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.
 
Moonbase59's Avatar
 
Posts: 217
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
Quote:
Originally Posted by chrisridd View Post
But if you look at the bottom of my first photo, you can see one of the custom fonts being used - the line starting "besitze". But in the CSS, that's using the same rule ("block_2" class) as the paragraph above it starting "Hervorhebungen" that is being rendered differently. What?! This is why I said it works "a bit".
It’s been some years since I made that test file. Had a very quick look in Sigil, and I would assume (without looking) that the PB font override does affect <p>aragraphs but not <li> in an <ul> (the three lines starting with "besitze" are actually an unordered list).

Reader overrides can be quite tricky… ;-) I’m rather sure my Tolino Vision 5 did that differently.
Moonbase59 is offline   Reply With Quote
Old Yesterday, 03:26 PM   #9
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
I did also ask PocketBook support for some guidance, along the lines of what Kobo provide on Github.

They implied that they may help a commercial author, but essentially they told me to pound sand.
chrisridd is offline   Reply With Quote
Reply

Tags
svg text


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to access note raw SVGs? (10.3 Go) Fitz Frobozz Onyx Boox 1 04-14-2025 09:38 PM
Do SVGs have to be wrapped in DIVs? what ePub 3 03-23-2021 02:40 AM
Marvin not handling not handling #151; pehkay Marvin 3 12-13-2013 07:27 AM
SVGs are centered by KF8, how do you prevent it? FunkeXMix Kindle Formats 3 01-09-2013 07:32 PM
ePub (and KF8) from SVGs heinrich66 ePub 5 05-03-2012 01:56 PM


All times are GMT -4. The time now is 06:08 PM.


MobileRead.com is a privately owned, operated and funded community.