05-27-2014, 07:08 PM | #1 |
Addict
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
|
Problem with font subsetting
The subsetting feature is very useful. It will frequently reduce the space used for fonts by almost 90%. But on occasion it would appear to lose characters from the font. The examples below are with the small cap characters from LinBiolinum_RB. The first image is how the text appears in ADE without subsetting.
If I subset the font the heading looks like this: With Calibre the result is similar except that the fallback font makes the error more obvious: Is this a problem with Calibre? Is it an user error? Or what? |
05-27-2014, 07:11 PM | #2 |
Addict
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
|
Hmm. It would appear that the images in my post have gone AWOL. Is there a way to post images that are located on my machine, the insert image insists on a URL (which then disappeared).
|
Advert | |
|
05-27-2014, 07:21 PM | #3 | |
null operator (he/him)
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
See also ==>> https://www.mobileread.com/forums/faq...b3_attachments BR |
|
05-27-2014, 11:18 PM | #4 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Font subsetting currently does not support font-variant: small-caps or text-transform: capitalize
Adding support for both of those is certainly possible, but it's a lot of work for relatively rare use case. |
05-27-2014, 11:22 PM | #5 |
Addict
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
|
Thank you Red!
So here is the first, ADE with no subsetting: and then with subsetting: and the with Calibre and subsetted: |
Advert | |
|
05-27-2014, 11:24 PM | #6 |
Addict
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
|
and again, I'll eventually get it right.
|
05-28-2014, 12:04 AM | #7 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Actually, I take it back, I had a look at the font subsetting code and it does automatically preserve small caps substitution rules and the target glyphs, open the subset font in fontforge and check the smcp tables under Element->Font Info->Lookups
|
05-28-2014, 12:15 AM | #8 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
And here is what the subset font looks like on my system in the calibre viewer:
|
05-31-2014, 07:06 PM | #9 |
Addict
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
|
Well I've spent a fair bit of time looking at the fonts in FontForge and the their decomilation with ttx and I must admit that I'm in way over my head and I'm far outside my area of competence.
The font in question is LinBiolinum_RB. My first attempt was to copy the small cap glyphs from 0xE091 to replace the lowercase glyphs at 0x0061. This worked in that when I embedded the font, it would appear correctly, or at least it did after I removed the lower case ligatures that looked really funny with the surrounding small caps. When I subsetted the fonts, characters (and glyphs) went missing. I then exported all the glyphs as svg images and created a new font by importing just the basic alphanumeric characters and punctuation. Again they display correctly and again when I subset them, characters are lost. To check, I used a set of fonts that included small caps (Charis in this case) and everything was fine when I subsetted them. So there is something wrong with what or how I doing this. This is an area that I know nothing about. Any pointers to more information (other that the FontForge documentation, it is good but doesn't tell me the things I need to know) would be appreciated. |
06-05-2014, 01:11 AM | #10 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As I said, your example with Linolium RB works for me, see screenshot I posted. If you can provide a complete epub example file with embedded font that breaks on subsetting, that would help.
|
06-17-2014, 02:33 PM | #11 |
Resident Curmudgeon
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What is the code used to get ADE to display small caps from a font that also includes small caps?
|
06-17-2014, 05:36 PM | #12 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
The only way I know to get true small-caps to work in epubs is to use a separate set of @font-faces for the small-caps-only font files. But you're probably doing that already. If anyone knows different I'd also be interested to hear about it. |
|
06-17-2014, 05:57 PM | #13 | |
Resident Curmudgeon
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
06-17-2014, 06:10 PM | #14 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
|
|
06-17-2014, 07:01 PM | #15 | |
Resident Curmudgeon
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
https://www.mobileread.com/forums/sho...d.php?t=184056 Last edited by JSWolf; 07-19-2016 at 12:38 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem changing font size using font size key | Waylander | Conversion | 0 | 10-02-2013 03:30 PM |
Font subsetting problem | yktan | Calibre | 5 | 09-19-2013 11:00 PM |
Bug in font subsetting | JSWolf | Calibre | 9 | 01-17-2013 09:46 AM |
Font Problem | GeckoFriend | Feedback | 7 | 07-18-2012 08:04 AM |
ePub Font Subsetting | Cygfrydd | ePub | 2 | 08-17-2010 08:53 AM |