01-16-2013, 08:57 AM | #1 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Bug in font subsetting
Seems the font subsetting is removing ligatures and ADE for Windows is trying to render them from non-ligature text. So what we have are missing charters since the ligatures are now gone.
Is this something that's easy enough to fix? |
01-16-2013, 09:06 AM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to provide an example book, fonts are complex, there could be any number of things going on.
|
Advert | |
|
01-16-2013, 09:42 AM | #3 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
The ePub I've attached shows a subsetted font and missing letters due to ligatures. Code:
When Rand and Mat carried the first Code:
When Rand and Mat carried the rst |
|
01-16-2013, 10:23 AM | #4 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre's font subsetting code actually reads the gsub table in a font and includes all ligature combinations of the subset glyphs. The test file you attached has no f based words and no embedded fonts.
And converting a text file with the sentence When Rand and Mat carried the first in it with the embedded font Calibri (which has a fi ligature) results in the same rendering with and without subsetting in the calibre viewer. EDIT: Nevermind, I see that I downloaded an incorrect file, I'll look at your file in a bit |
01-16-2013, 11:33 AM | #5 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The font in use is Charis SIL. The link below is to the full versions of the font.
http://www.mediafire.com/download.php?64cse2dshispx08 Last edited by JSWolf; 02-03-2013 at 06:16 PM. |
Advert | |
|
01-16-2013, 04:09 PM | #6 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
01-16-2013, 10:02 PM | #7 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your problem is more likely caused by the font-family declarations using the same font-family name for all four variants of the font. Change it to use different names and you should be fine. I suspect there is something about the way the charis compact font is designed that causes this usage to be problematic. If not, let me know.
|
01-16-2013, 11:57 PM | #8 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
The way to do it (IMHO) is to make a list of all the ligatures and if the pairs exist in the ePub (unligatured), keep the ligature. As it is now, the only way the ligatured is kept is if the ligature is in the text. Last edited by JSWolf; 01-17-2013 at 12:04 AM. |
|
01-17-2013, 01:40 AM | #9 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You're right, there was a bug in the parsing of the GSUB table that was triggered by this particular font. Fix will be in the next release.
|
01-17-2013, 09:46 AM | #10 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Touch Firmware 2.1.5 bug: Document Default font setting | brionyrose | Kobo Reader | 0 | 10-26-2012 08:29 AM |
Embedded font bug or CSS bug in ADE | JSWolf | ePub | 10 | 06-11-2011 02:34 PM |
ePub Font Subsetting | Cygfrydd | ePub | 2 | 08-17-2010 08:53 AM |
Bug in MobiPocket font rendering? | jpt | Astak EZReader | 2 | 05-26-2010 08:22 PM |
PRS-505 bug or eBookLib bug? | porkupan | Sony Reader | 3 | 10-07-2007 10:44 PM |