![]() |
#16 |
Boo-Frickety-Hoo-Erizer
![]() ![]() ![]() ![]() ![]() ![]() Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
Usually I'm the one who can shout in a loud and confident voice "Man, am I ever doing this wrong!" So, here goes. WinXPsp3, calibre uninstalled and reinstalled at 7.1, upgraded yesterday to 7.2.
Attached: Lots of things: MinionMyriad-source.zip - actual source before calibre 7.2, created in Word 2007, cleaned up in Dreamweaver cs4 and converted to xhtml. Word quickstyles match (close enough, anyway) to the styles.css. Xhtml and css are close to validating - couple lines here and there about colors in hyperlinks and it's there. Clipboard01.jpg - a picture in firefox showing the top of that source with the ligatures properly in the correct fonts, Minion Pro and MyriadPro-BlackSemiExt. Basic Set - Brewt Himself.zip - the source zip file created by calibre. MyriadMinion3_plugin.zip - calibre plugin that embeds fonts in epubs, based on source by Paul Tomashevskyi posted in the sticky "How to Embed Fonts After Calibre" on this forum. Fonts sourced out of C:\Program Files\Calibre2\resources\fonts\MinionMyriad fontencrypt.zip - font encryption python script written by 'Paul Durrant' posted in the thread "fontencrypt.py - Add Adobe encryption to fonts in ePub" in this forum. I am running it separately; haven't succeeded in making it a plugin yet. BasicSet.epub - epub created by calibre with embedded fonts embeddeed by above plugin and encrypted by above python script. [Keep ligatures] checked in conversion. Results below are the same before and after encryption. So. I can see the fonts embedded with ligatures in ADE, minion. I don't see the ligatures, but it looks like the headline font in ade. I can see the ligatures in Calibre viewer, minion, but only if I set the default font to minion. I don't see the ligatures in calibre nor the correct font (myriad) in the headlines, even if I default the sans font to myriad. No overriding css in viewer. I see neither the ligatures nor the fonts in B&N/pc. So. Obviously, I'm doing things, lots of things, wrong because it almost works, but only sometimes. Have at me. -bjc Last edited by brewt; 06-12-2010 at 03:38 PM. |
![]() |
![]() |
![]() |
#17 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
As I thought, you've run into encoding issues. 'BasicSet-12.htm' shows no ligatures at all in Firefox, and looking at it with a hex editor shows that your ligatures have been transformed into garbled 3-byte UCS-2 surrogates.
I can only recommend that you follow the advice I gave yesterday and use explicit escape codes rather than trying to paste in characters and hope they remain intact across all those hops. |
![]() |
![]() |
![]() |
#18 |
Boo-Frickety-Hoo-Erizer
![]() ![]() ![]() ![]() ![]() ![]() Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
I'll believe you, but what am I seeing here?
Original-original: Code:
<p class="MsoBodyTextFirstIndent">st lost / st lost</p> <p class="MsoBodyTextFirstIndent">ff gruff / gru</p> <p class="MsoBodyTextFirstIndent">fi finish / nish</p> <p class="MsoBodyTextFirstIndent">fl flattery / * *attery</p> <p class="MsoBodyTextFirstIndent">ft swift / swi</p> <p class="BodyText4">ffl affluence / auence</p> <p class="MsoBodyText">Ligatures in Headline Font: (left plain, right hand changed)</p> <h1>ff gruff / ff gruff</h1> <h1>fi finish / fi finish</h1> <h1>fl flattery / fl flattery</h1> <h1>ffl affluence / ffl affluence</h1> Code:
<p class="MsoBodyTextFirstIndent">st lost / st lost</p> <p class="MsoBodyTextFirstIndent">ff gruff / gru</p> <p class="MsoBodyTextFirstIndent">fi finish / nish</p> <p class="MsoBodyTextFirstIndent">fl flattery / * *attery</p> <p class="MsoBodyTextFirstIndent">ft swift / swi</p> <p class="BodyText4">ffl affluence / auence</p> <p class="MsoBodyText">Ligatures in Headline Font: (left plain, right hand changed)</p> <h1>ff gruff / ff gruff</h1> <h1>fi finish / fi finish</h1> <h1>fl flattery / fl flattery</h1> <h1>ffl affluence / ffl affluence</h1> |
![]() |
![]() |
![]() |
#19 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,551
Karma: 145863177
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#20 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
is an example of the mangled 3-byte code (EFAC86) that has resulted from something in your chain mis-interpreting the 2-byte FB06 code for the st ligature and attempting to convert it. Hard to say if that's Word or Dreamweaver, but Word seems to produce html with the correct escape sequence for a private-use character. It seems calibre has somehow managed to separate this code back into the letters s and t, but can't do the same for the other mangled codes.
Ligatures (like swash caps, text figures and other typographic variants) are not part of the UTF spec* and you can't rely on programs to recognise such font-specific alternative characters. If you want to use them, make sure they're embedded as explicit escape sequences from the start. *[Edit]Unlike useful stuff like Linear B (which died out around 1100B.C.) and 38 different types of arrow... ![]() Last edited by charleski; 06-12-2010 at 09:50 PM. |
![]() |
![]() |
![]() |
#21 |
Boo-Frickety-Hoo-Erizer
![]() ![]() ![]() ![]() ![]() ![]() Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
Code:
Ligatures (like swash caps, text figures and other typographic variants) are not part of the UTF spec and you can't rely on programs to recognise such font-specific alternative characters. If you want to use them, make sure they're embedded as explicit escape sequences from the start. Code:
If I make the call Code:
font-family: serif; Oh, like I'm not gonna get that anyway for having such a lame idea. -bjc |
![]() |
![]() |
![]() |
#22 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Looking at the differences between your css and the one I use (which works with calibre): Yours: Code:
@font-face { font-style: normal; font-family: 'Minion Pro', serif; font-weight: normal; src: url(MinionPE.otf); } Code:
@font-face { font-family: "Carolus FG"; src: url("../fonts/CAROF___.TTF") format("truetype"); } Code:
@font-face { font-family: 'Minion Pro'; src: url(MinionPE.otf) format('opentype'); } |
|
![]() |
![]() |
![]() |
#23 | |
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Still haven't found any logic to it. The QtWebKit font loading problems are more extensive than just not showing font variants. This was all with the same version of Sigil and QtWebkit. So the font issues are directly related to the platform on which QtWebKit is running... Macs seem to have the least problems (but still have quite a few), probably because QtWebKit defers some operations to the system Webkit on Macs (but that's an educated guess). |
|
![]() |
![]() |
![]() |
#24 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,258
Karma: 3439432
Join Date: Feb 2008
Device: Amazon Kindle Paperwhite (300ppi), Samsung Galaxy Book 12
|
Unicode is set up for scholarship and backwards compatibility.
Variant forms which don't have linguistic significance (and are not needed for backwards compatibility like fi and fl) do not rate and will not get code points (and should not be assigned points in the PUA if one wants the under-lying text to be seen as text) |
![]() |
![]() |
![]() |
#25 |
Boo-Frickety-Hoo-Erizer
![]() ![]() ![]() ![]() ![]() ![]() Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
Code:
As far as I know, calibre does not support font encryption/obfuscation. And tho I didn't take a lot of time on it (quick & dirty, lots of other problems), the ligatures show up just fine in ade and calibre viewer. Made with Indesign (gak!) -bjc |
![]() |
![]() |
![]() |
#26 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
Quote:
Quote:
Ligatures certainly can have linguistic significance, just look at the ampersand sign, and Unicode honours this for many other languages. I wouldn't be so bothered if if weren't for the fact that the Unicode range contains such a large amount of rubbish. |
||
![]() |
![]() |
![]() |
#27 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
But what is your problem then? Is it only that you don't get it to work when you generate the ePUB with calibre? Note that your file BasicSet.epub does not pass epubcheck. |
|
![]() |
![]() |
![]() |
#28 | |
Boo-Frickety-Hoo-Erizer
![]() ![]() ![]() ![]() ![]() ![]() Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
|
Quote:
And my problem? Where do I start? Lazy, dull, dimwitted, lacking in understanding, frustrated, tired, poor, old, etc., etc. None of which the good folk here can do anything about. But I do appreciate your considerations, even if I am left with a generalized sense of a lack of direction. Every method leaves large numbers of things left out, making no choice the long term right choice. Ah well, Damn the decisions, full steam ahead. Guess I just want too much to be easier. Or maybe I just want to do more than is allowed, given the current state of he technologies. No hard feelings? -bjc |
|
![]() |
![]() |
![]() |
#29 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,258
Karma: 3439432
Join Date: Feb 2008
Device: Amazon Kindle Paperwhite (300ppi), Samsung Galaxy Book 12
|
charleski, more importantly, scholars are able to unambiguously set Cretan scripts and discuss them unambiguously.
If one wants ligatures it's simple enough to set a run of text and turn them on --- no need for unique code points which aren't practical in any case --- there are simply too many possibilities. I had to do quite a bit of fiddling to manage to encode just the options in Zapfino: http://www.tug.org/TUGboat/Articles/.../tb77adams.pdf Assigning codepoints for ligatures would be nightmarish and would quickly exhaust them. |
![]() |
![]() |
![]() |
#30 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
None at all.
But at this moment I think if would be beneficial to re-state what you want to attain. At first I thought you just wanted an ePUB with embedded fonts and ligatures that works, but you have already shown a sample that works in ADE and calibre viewer... So, what else do you want? Do you want to understand how to do it by hand? Do you want a workflow to get it from your source files? Also, when creating sample documents, try to make them simple. To test ligatures and embedded fonts, often a single font is enough, and including several families of different fonts only make the file larger and more cumbersome to analyse. As a general comment on ligatures I think the "right way" would be to have something like an OTF flag or feature that can be enabled/disabled, either through CSS or through software preferences, the same holds for old-style numbers and other features. Prince works along this lines. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trying to understand re-css-ification. | brewt | Calibre | 10 | 12-08-2009 03:27 PM |