Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-21-2013, 01:43 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
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
My question is: which kind of character should I write in the xhtml file (Sigil) within the EPUB to get a fine ligature display or at least to obtain what I did from Sigil and ADE, and avoid a crash?
Attached Thumbnails
Click image for larger version

Name:	ligature.png
Views:	528
Size:	47.5 KB
ID:	106069   Click image for larger version

Name:	filles.png
Views:	365
Size:	5.3 KB
ID:	106070  

Last edited by roger64; 05-21-2013 at 01:53 AM.
roger64 is offline   Reply With Quote
Old 05-21-2013, 02:36 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
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.
Doitsu is offline   Reply With Quote
Old 05-21-2013, 03:53 AM   #3
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
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;
Attached Thumbnails
Click image for larger version

Name:	pdf.png
Views:	339
Size:	8.5 KB
ID:	106075  

Last edited by roger64; 05-21-2013 at 04:12 AM.
roger64 is offline   Reply With Quote
Old 05-21-2013, 05:14 AM   #4
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
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.
exaltedwombat is offline   Reply With Quote
Old 05-21-2013, 05:33 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
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.
Jellby is offline   Reply With Quote
Old 05-21-2013, 05:40 AM   #6
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
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...
roger64 is offline   Reply With Quote
Old 05-25-2013, 05:19 PM   #7
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
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.
ShellShock is offline   Reply With Quote
Old 05-31-2013, 08:28 AM   #8
yucca
Member
yucca began at the beginning.
 
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.)
yucca is offline   Reply With Quote
Old 05-31-2013, 09:51 AM   #9
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by yucca View Post
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.)
@yucca

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.

Attached Thumbnails
Click image for larger version

Name:	TYPE_2013-05-31_15:59:04.png
Views:	443
Size:	31.5 KB
ID:	106460  

Last edited by roger64; 05-31-2013 at 10:22 AM.
roger64 is offline   Reply With Quote
Old 06-04-2013, 10:47 AM   #10
yucca
Member
yucca began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2013
Location: Finland
Device: Bookeen Cybook Muse Frontlight
Limited set of ligature characters. Caveats on Greek letters.

Quote:
Originally Posted by roger64 View Post
Where could I find a list of these ligatures?
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:
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.
Well, it should syntactically be body {font-family:"My_special_font", serif}. But there is no guarantee that the generic name serif maps to a font that contains the Greek characters you need, especially if the text is polytonic Greek. And you can enter the Greek characters as such (Sigil has no special tool for this, so you may need to use e.g. a Greek keyboard layout or use copy and paste), as named character references, or a numeric character references, as shown in the screenshot. But the problem is: will e-book readers be able to display them?

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.
yucca is offline   Reply With Quote
Old 06-04-2013, 12:51 PM   #11
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
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.
roger64 is offline   Reply With Quote
Old 06-04-2013, 01:16 PM   #12
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
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.
Turtle91 is offline   Reply With Quote
Old 06-04-2013, 03:13 PM   #13
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by yucca View Post
Well, it should syntactically be body {font-family:"My_special_font", serif}. But there is no guarantee that the generic name serif maps to a font that contains the Greek characters you need, especially if the text is polytonic Greek. And you can enter the Greek characters as such (Sigil has no special tool for this, so you may need to use e.g. a Greek keyboard layout or use copy and paste), as named character references, or a numeric character references, as shown in the screenshot.
I personally use this site to easily search for unicode characters (then I copy/paste them):

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.

Quote:
Originally Posted by yucca View Post
But the problem is: will e-book readers be able to display them?
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:
Originally Posted by yucca View Post
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.
Hmmm, perhaps someone with a little more embedded font experience might be able to help in my case.

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.
Tex2002ans is offline   Reply With Quote
Old 06-05-2013, 02:52 AM   #14
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Tex2002ans View Post
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.
Why not use the character map to copy-paste whatever you want?
Jellby is offline   Reply With Quote
Old 06-05-2013, 07:13 AM   #15
yucca
Member
yucca began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2013
Location: Finland
Device: Bookeen Cybook Muse Frontlight
Quote:
Originally Posted by Tex2002ans View Post
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?).
I suspect it is a font issue rather than Unicode support problem. The readers probably interpret the character data properly, they just fail to display it. E.g., Adobe Digital Editions (on Win 7) shows the Greek characters in your epub OK, except that they are too slanted, but this is probably a feature of the font it is using. (Greek letters have often been designed in italic style.)

Quote:
It read perfectly fine on ADE on the PC, Sigil, Mantano Reader (Android)... I assume because these have proper Unicode support.
Reader for PC shows simple Greek letters OK but shows the polytonic letters as question marks. This is typically a font problem, since many fonts lack the polytonic, or “Greek Extended”, characters (as they are mostly used in scholarly works only when presenting classical Greek text).

Quote:
Hmmm, perhaps someone with a little more embedded font experience might be able to help in my case.
It seems that I have been too optimistic about font embedding. It works fine in web browsers nowadays, and I had tested the technique in Android Reader, too, and was happy about it. But neither Adobe Digital Editions nor Reader for PC seems to support font embedding.

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.
Yes, that makes font tweaking very easy (if you want just the Greek words in an embedded font): after other @ rules, you would add e.g.

@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.
yucca is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 12:49 AM.


MobileRead.com is a privately owned, operated and funded community.