![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Stylistic ligature display
Hi
I decided to try some headings in lower case with a fancy font. I am facing a ligature display problem with the most common of them in French, fi and fl. (see screenshot) Up to now, this is what happens: - Sigil displays the text, ADE does it too, but with a standard fi or fl (screenshot) - Kobo just displays a blank space... - Prince (PDF) is the stricter of them: it gives me a dire warning and crashes the file. Though it is obvious now, it took me a while to find the right culprit after reading this text: Code:
*** Mercury runtime: caught segmentation violation *** cause: address not mapped to object address involved: 0x7a51000 This may have been caused by a stack overflow, due to unbounded recursion. exiting from signal handler Last edited by roger64; 05-21-2013 at 01:53 AM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
As you probably know, ligatures need to be defined in the font as glyphs and in layout tables. AFAIK, ADE supports the fi and fl ligatures if the font supports it. Some fonts also support the use of ZWNJ and ZWJ between two letters to enable/disable optional ligatures. (You could try inserting a ZWJ between f and i to test if that makes any difference.)
Also, to exclude font issues as the cause of your problems, you may want to repeat your tests with a commercial font. |
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
@Doitsu
Thank you for your reply. Today I learnt something. ![]() It's indeed a commercial font. I included ‍ in the ligatures to see what happens: - Sigil is impressed and displays a nice ligature. - Kobo is not and still leaves a blank... - Prince stops whining and now accepts to print the file. However, it would be very OK if I did not see this: ![]() Same result using: &-#8205; Last edited by roger64; 05-21-2013 at 04:12 AM. |
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
You're asking more of epub that it's able to deliver, particularly if you want portability between different readers.
|
![]() |
![]() |
![]() |
#5 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
If you want ligatures:
1. Don't change anything in the text, just write f + i, as usual. 2. If you are embedding and subsetting a font, make sure the ligatures and their definitions are not removed. 3. Hope that the reading software supports ligatures. |
![]() |
![]() |
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
@Jellby
Yes I am embedding the font and I realize now that the subset is probably crippled as far as ligatures are concerned. Thanks all for your advices. I will keep this font only for dropcaps and upppercase to keep Kobo happy... |
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
Kobo will display ligatures aslong as the font has the necessary glyphs--many do not, but Charis SIL does.
|
![]() |
![]() |
![]() |
#8 |
Member
![]() Posts: 15
Karma: 10
Join Date: Apr 2013
Location: Finland
Device: Bookeen Cybook Muse Frontlight
|
It’s not clear how you have tried to use ligatures, and which ligatures using which font. Primarily, ligatures are used via OpenType features in fonts that support them, and I would not expect e-book readers to be able to deal with this (you would use font-feature-settings in CSS). Inserting a zero-width joiner is a character-level request for applying ligature behavior when available, but probably ignored by most e-book software.
There is however a clumsy way, using ligature characters such as U+FB01 LATIN SMALL LIGATURE FI, which you can enter in XHTML as fi (or as such, character fi). There is a small set of such characters, but they work reliably in modern software provided that the font being used contains that character, in its correct position. (Many fonts contain such ligatures but possibly in wrong code positions.) |
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
Thanks for your explanations. I tried this "clumsy way", forcing the use of the required glyph (if present) using fi and it does indeed work for my fancy font with Sigil, ADE 1.7 and... yes, Kobo Glo! I understand that it is probably not advisable to use it for body text, since on most modern readers, the ability of changing fonts is a common feature and that some fonts may not have these ligatures. So the missing glyphs would probably be replaced by blanks or ? flags... But for my limited purpose (lowercase title in a non-replaceable font) it seems to work fine. Where could I find a list of these ligatures? I can think also of another use. Sometimes, in a book we find a small quote (only one... ) in, say, Greeks characters. I realize that these characters could also be summoned this way (screenshot). If they are missing in the font, provided we wrote something like: body (font-family:"My_special_font"; serif), they would also probably be displayed with the serif replacement font. ![]() Last edited by roger64; 05-31-2013 at 10:22 AM. |
|
![]() |
![]() |
![]() |
#10 | |
Member
![]() Posts: 15
Karma: 10
Join Date: Apr 2013
Location: Finland
Device: Bookeen Cybook Muse Frontlight
|
Limited set of ligature characters. Caveats on Greek letters.
There’s just a handful of ligatures of Latin letters defined as characters. Not counting ij and oe “ligatures” (which are really separate letters, though of ligature origin), the list (extracted from the Unicode character database) is
U+FB00 LATIN SMALL LIGATURE FF U+FB01 LATIN SMALL LIGATURE FI U+FB02 LATIN SMALL LIGATURE FL U+FB03 LATIN SMALL LIGATURE FFI U+FB04 LATIN SMALL LIGATURE FFL U+FB05 LATIN SMALL LIGATURE LONG S U+FB06 LATIN SMALL LIGATURE ST Quote:
That’s really a different question, and an interesting one. You might need to use an embedded font to make sure that Greek characters will show OK. |
|
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thanks for your handy list and your advices.
If I spoke about this random Greek quote, it's because I had a book with two short Greek words. I used embedded fonts in this book (subsets of) and did not want to add a special Greek font only for this purpose. The plain: ,serif coupled with the ISO codes (html codes are OK too) did the trick (at least for Sigil, calibre, ADE, Kobo...). This seems to work. Last edited by roger64; 06-04-2013 at 12:57 PM. |
![]() |
![]() |
![]() |
#12 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,311
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Instead of embedding a font for short/limited quotes in an alternate language, you could just insert it as an image. It wouldn't change if the reader changed font size, and it's not elegant, but if it is a stand-alone quote it should work well.
|
![]() |
![]() |
![]() |
#13 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
http://www.fileformat.info/info/unic...preview=entity Or for the basic Greek characters I use Wikipedia: https://en.wikipedia.org/wiki/Greek_letters I recently stumbled upon this incredible Wikipedia page for Greek letters with accents (look further down the page for organized tables of characters): https://en.wikipedia.org/wiki/Greek_diacritics Takes a little while to copy/paste one by one, but if there are only a few that are needed, it is not that bad. I did not have any luck getting these obscure Greek characters to display on my Nook (embedded font or no). I also heard it had zero luck displaying on the Nook App on Android (I assume because they do not have proper Unicode support?). It read perfectly fine on ADE on the PC, Sigil, Mantano Reader (Android)... I assume because these have proper Unicode support. Quote:
I have attached the EPUB (no embedded font). All Greek words are marked with the CSS class "greek" to allow very easy font tweaking. Would be great to figure out this Greek situation, would really be helpful for many books. ![]() |
||
![]() |
![]() |
![]() |
#14 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
|
![]() |
![]() |
![]() |
#15 | ||||
Member
![]() Posts: 15
Karma: 10
Join Date: Apr 2013
Location: Finland
Device: Bookeen Cybook Muse Frontlight
|
Quote:
Quote:
Quote:
Quote:
@font-face { font-family: FreeSerif; src: url(/Fonts/FreeSerif.otf; } .greek { font-family: FreeSerif; } and you would just need to add the FreeSerif.otf font in the Fonts folder. (I probably would not use FreeSerif, but it was easy to test with it.) But this does not help much in some important readers, which seem to lack support to font embedding. (In practice, if the technique worked widely enough, I would probably use a suitable free font for all text, since Greek text should be style-compatible with text in Latin letters. And then I would probably need to embed an italic and a bold and possibly even an italic bold typeface, too, making the file rather large, but probably not excessively large.) As far as Sigil is considered, things are fine. It lets you add the code for font embedding (though it has no special tools for it, you just write CSS), and it supports font embedding when it shows the book in Book View. |
||||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Display | lahnschnitzer | PocketBook | 5 | 12-17-2011 03:41 AM |
De-Ligature-ification | brewt | ePub | 32 | 07-31-2011 04:45 AM |
PRS-650 vizplex display or pearl display | hoytlee | Sony Reader | 2 | 10-05-2010 06:34 PM |
Pixel Qi 10" display will be sold as USB powered Secondary Display | Dulin's Books | News | 8 | 09-28-2010 06:15 PM |
Eink Display's (Sony PRS505) vs. Nokia N800's LCD Display | brecklundin | Which one should I buy? | 23 | 05-15-2008 04:15 AM |