06-09-2011, 01:11 PM | #1 |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Embedded font bug or CSS bug in ADE
1. Get a copy of Notepad++ and an ePub with Charis SIL embedded.
2. Extract the CSS and load the CSS into Notepad++. 3. Change the encoding of the CSS to Encode in UTF-8. 4. Put the CSS back into the ePub and view the ePub in ADE. Now, you'll see that the base font is bold when it's not supposed to be. Take the same CSS and change the encoding to Encode in UTF-8 without BOM The base font will be fine. The bold is gone and the text is normal once again. Does anyone know why this happens and that the cause is? It also happens on my 650 as well as ADE for Windows. For those with a different reader that uses ADE, I'd be interested in seeing if that bug exists. |
06-09-2011, 03:26 PM | #2 |
Evangelist
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
At a first guess, I would think it has less to do with the embedded font, and more to do with the encoding of the CSS.
While the ePub 2 spec wasn't explicit on it, the CSS should be UTF8 encoded, but the whether or not the byte order marks are there shouldn't matter. So my guess is that there is something in the tool chain you are using that is outputting UTF8 that is causing RMSDK problems. Have you tried editing CSS with non embedded fonts? Last edited by Jim Lester; 06-09-2011 at 03:28 PM. Reason: Correctness :) |
Advert | |
|
06-09-2011, 05:35 PM | #3 | |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I'll attach a couple of B&N samples later tonight. One that shows the problem and one that does not. And the only difference will be the CSS encoding. |
|
06-10-2011, 05:58 AM | #4 |
Member
Posts: 15
Karma: 10
Join Date: Nov 2007
Location: Germany
Device: Sony PRS-300
|
I just tried what you described and confirmed that (at least on my OSX machine) ADE fails to load files containing the ByteOrderMark.
Here's what I did: I created a simple html containing a paragraph with bold text and added an external stylesheet which resets the font-weight of the bold element to normal. When I create the book with those files in the normal UTF-8 (or ascii) encoding everything's fine. But if I change the encoding of the stylesheet to UTF-8 with BOM the bold element is displayed bold again, meaning that the css file has not been loaded. Whats even more curious: changing the encoding of all of the other files to contain the BOM as well doesn't disturb ADE - even for the mimetype file. So stylesheets are the only one affected... What does that mean in your case? You probably have either presentational elements in your html markup (b, hx, unclosed hx, ...) or you have a css rule somewhere that declares your global text as bold which is then overridden back to normal by the stylesheet with the BOM - which isn't loaded due to its BOM, so the text remains bold. Don't use the BOM and you're fine. |
06-10-2011, 06:17 AM | #5 |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
This is an eBook sample from B&N. I've added in Charis SIL as the embedded font. The first sample and the second sample are identical except for the CSS. The CSS in the first sample is ansi encoded and the second sample has the CSS UTF-8 encoded.
When you view the first sample (using ADE), the embedded font is as it should be. When you view the second sample (using ADE), the embedded font is not correct. It's bold where it should be normal. Why this is, I do not know. It's a very odd bug. The code in both CSS is perfectly OK. |
Advert | |
|
06-10-2011, 02:45 PM | #6 |
Evangelist
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
RMSDK 9.1 is not happy with the CSS in SSM02.epub and emits the following errors:
Code:
W_CSS_PARSE_ERROR file:///.../SSM02.epub/OEBPS/pdlmsr.css BadSelector W_CSS_PARSE_ERROR file:///.../OEBPS/pdlmsr.css syntax error Unfortunately ADE 1.7 is using a fairly old version of the RMSDK 9.1 or before IIRC. Here's hoping Adobe will come up with a more modern version of ADE. |
06-10-2011, 04:43 PM | #7 | |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
As ADE improves, we are going to have a lot of devices out there with an old version of ADE. So the problem will be that ePub eBooks will have to pander to these older versions instead of using any of the new features. So when ePub gets upgraded, it won't matter as we'll have old ADE that needs to work. I doubt every company will be updating all their readers and/or apps. This is going to cause a splintering if publisher go with new ePub features. For example, I doubt Sony would update the 500, 505, 300, 600, 700, 650, 350, & 950 with a newer ADE. If Sony was to use a newer ADE, it would be on a newer reader. And this would mean when ePub is updated to use CSS3, and ADE follows, and publishers start using CSS3, all those Sony users would be stuck big time. I think Adobe should have made it mandatory for companies to update the ADE as they do as long as it would run on the given hardware. That way, we would not have to worry about updated spec with non-updated ADE. Last edited by JSWolf; 06-10-2011 at 04:48 PM. |
|
06-10-2011, 06:12 PM | #8 | |||
Evangelist
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
Quote:
Quote:
Quote:
|
|||
06-10-2011, 08:20 PM | #9 | |||
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
Quote:
|
|||
06-11-2011, 12:28 PM | #10 | |
Evangelist
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
Quote:
However vertical text support (among other things needed to do good layout of CCJK text) is also in the ePub3 spec, and Japanese text layout in ePub may be a compelling use case for Sony. |
|
06-11-2011, 03:34 PM | #11 |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I hope so. Since Sony released the 650 in Japan. That would be good to see Sony update ADE.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
iPad ePub, CSS : Bug with 'position:relative' property ? | Ereskelios | Apple Devices | 3 | 09-29-2014 08:53 AM |
Removing embedded font/overwrite some css? | silentguy | Conversion | 4 | 01-25-2011 01:41 PM |
Bizarre ADE bug with brackets | charleski | ePub | 4 | 08-12-2010 08:23 AM |
ADE bug in calculating width | DaleDe | ePub | 6 | 01-17-2010 10:33 AM |
Small html/css bug | twaits | Calibre | 5 | 01-12-2010 11:26 AM |