06-11-2010, 01:04 PM | #1 |
Boo-Frickety-Hoo-Erizer
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
De-Ligature-ification
Ok, so I'm back at the font embedding thing.
One of the "good" reasons to use font embedding is so you can use all those really cool ligatures that are in font sets. But, with a little (finally) successful font embedding in Calibre, I'm finding that some of them are getting stripped (like 'st'). And, the calibre reader doesn't apparently know what to do some of with them, so leaves a blank hole. Attached is the pic, showing IE (which displays them correctly), Calibre and ADE. I know, I know, don't use ligatures. But I wanna! -bjc |
06-11-2010, 02:19 PM | #2 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
The proper way to deal with ligatures is not using them in your text, but rely on the rendering software to pick them when available. In other words, don't write anything special for "Th", "ffl" or "st", just write the usual individual letters. If you use a font that has ligatures for these combinations but the reader is not displaying them, complain to those responsible of the rendering software, the book itself is right.
By the way, note that in your sample, calibre is not using the same font (that's why some of the glyphs are not available), look at the W shape. As for splitting some ligatures, I think there is some checkbox to disable this. Last edited by Jellby; 06-11-2010 at 02:22 PM. |
Advert | |
|
06-11-2010, 02:35 PM | #3 |
Wizard
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
If you really want to get the alternate character forms in ADE, open the font in fontforge and find the actual address of the glyph (eg. the code for the st ligature in Minion is FB06), then insert that as a hexcode ( &xFB06; ).
Jellby is right, though. |
06-11-2010, 02:42 PM | #4 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
But there's a remaining question of why it is that Calibre isn't using the right font. Calibre's viewer does support embedded fonts (though it's a bit buggy with them, in the same way that WebKit is generally, especially with fonts sharing the same family name—still, that's not the issue here). You've got to figure out why calibre isn't supporting the embedded fonts. Are you using some kind of obfuscation on the fonts?
|
06-11-2010, 05:57 PM | #5 |
Boo-Frickety-Hoo-Erizer
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
No obfustication. And my encrypterator is on the fritz (hence the pic and not the epub).
It seems that the Calibre Viewer is overriding my embedment with it's defaults, i.e., Times New Roman. Bleah. I don't see a switch to turn that off in the Calibre viewer - do I just not know where to look? Or does Font Embedding only work with the calibre viewer if the fonts are in a certain place in the epub? Like in OEBPS, or Fonts, or something else? The epub shown had them in the root.... No, the Character for the [ st ] glyph was hand-replaced in the right version of the word 'staring' with Unicode character FB06 - it shows up correctly in the Internet Explorer rendition of the source xhtml. It seems that the conversion out of Calibre changed it from <p class="MsoBodyTextFirstIndent">staring staring</p> to <p class="MsoBodyTextFirstIndent">staring staring</p> I'm assuming that's by design - it can't have just 'accidently' done that. And, why, yes, there is a "Keep ligatures" checky-boxy thingy in calibre's Look & Feel section, but it doesn't seem to work. Same results on or off. At least, not the way I'm pushing it.... And I can't seem to put my hand to a rendering display software solution (for epubs, anyway) that inserts ligatures when availalble. And don't get me started on kerning, or hyphenation, or or or.... -bjc |
Advert | |
|
06-11-2010, 06:17 PM | #6 | |||
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Quote:
They should be in the proper location relative to the CSS file that calls them. E.g., if the CSS file has src: url("fontfile.otf") format("opentype"); then the font file should be in the same directory as the CSS file. If it says: src: url("fonts/fontfile.otf") format("opentype"); then it should be in the fonts subfolder of the folder where the CSS file is, and so on. Not sure how calibre handles this, but I do think it would be best practice to have these under OEBPS or a subfolder of OEBPS. It might be worth posting the relevant portion of the CSS file so we can see if there might be issues. Quote:
Quote:
With hyphenation and kerning you're probably out of luck. You could use Jellby's script to convert the ePub to suitably-formatted PDF via PrinceXML, however, with kerning and hyphenation. Last edited by frabjous; 06-11-2010 at 06:22 PM. |
|||
06-11-2010, 06:38 PM | #7 |
Boo-Frickety-Hoo-Erizer
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
If I really wanted to do the h&j bit, I'd just build pdfs out of Indesign. That is something it's actually good for, unlike epubbing. But thanks - epubs/mobi solves more problems for me at the moment that hard-coded page sizes don't.
I think my css calls are ok - the fonting works in ADE and B&N, which are fussier than calibre, most of the time. No, my calibre viewer is always set to override all fonts every tiime no matter what the epub source - by my hand, indesign, the best of the boards here. I must be doing something wrong. I'll try to come up with a sensible demo when I get my encrypterator spun up again. But thanks. -bjc |
06-11-2010, 08:32 PM | #8 |
Wizard
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
If your source is already xhtml, then I'd really recommend using Sigil instead of calibre. I've spent too much time cleaning up conversions that were done in calibre.
|
06-11-2010, 10:19 PM | #9 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Out of curiousity, what version of calibre are you using? Mine (0.6.51) definitely does embedded fonts.
You might ask about it in the calibre forum. |
06-12-2010, 12:21 AM | #10 | |
Boo-Frickety-Hoo-Erizer
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
Quote:
And yes, I remember earlier versions having embedded fonts override what I could pick (in the viewer). And I still prefer calibre over sigil - multi-format output is easier there when the css is different for mobi than epub (yes, it's true, I do things the hard way when possible), and I just got the font embedding plugin to work,and I can encrypt again, and all is weller with the world for my needs in calibre. -b |
|
06-12-2010, 05:22 AM | #11 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
You are not using a custom css in calibre viewer that has "!important" for fonts, are you?
Maybe the font is in a format calibre does not support. I think I tried it with TTF and it worked, but I've never tried OTF. Or maybe the font is not correctly embedded, and ADE and Explorer are using the version of the font installed in your system, not the embedded one, while calibre just doesn't use the embedded one and picks a default instead. Why don't you post a sample epub, so we can test? |
06-12-2010, 12:06 PM | #12 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
The reason why calibre is having problems displaying embedded fonts is because QtWebKit has problems displaying embedded fonts.
See this bug. That bug is the #1 reason why Sigil doesn't have explicit font embedding support. |
06-12-2010, 12:41 PM | #13 |
Boo-Frickety-Hoo-Erizer
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
My font call in the css has no !Important!'s on it. the font family reads like this:
Code:
font-family:"Minion Pro","Dutch801 Rm BT","Times New Roman","Goudy Old Style","Baskerville Old Face","Georgia",serif; Clearly (at least to me), Calibre viewer 7.2 is overriding the embedment with it's defaults. And yes, I can set those defaults to Minion and have it work 'better'. I've had minion work out before as embedded (ade picks up the embedded font, even if I remove it from my system fonts directory) as an otf - hain't got a ttf version. I just got my encrypter off its knees last night; I come up with an intelligible demo epub to post. Seems odd to me that as font embedding is part of the spec that the implementation of it in the viewers is so spotty. I mis-spake earlier; my B&N PC Viewer doesn't seem to utilize embedded fonts - any body have luck seeing embeddings on a real nook or the viewers? -bjc |
06-12-2010, 01:19 PM | #14 | |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Then, one should make sure the font names specified are the correct ones, in the case of embedded fonts they should match the names given in the @font-face, for system-installed fonts, it could be anything. But I can tell you calibre (0.7.0) can work with embedded fonts, as the attached screenshot shows. The title and drop-cap fonts are embedded in the ePUB, and they are not installed in this computer. If you are worried about embedding an un-obfuscated version of a commercial font, try with a free font instead and post a sample file, please. |
|
06-12-2010, 02:02 PM | #15 | |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Quote:
But I don't think this is the issue here. Brewt isn't getting any of the fonts in the family to show. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trying to understand re-css-ification. | brewt | Calibre | 10 | 12-08-2009 03:27 PM |