View Single Post
Old 11-04-2013, 03:28 AM   #83
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,557
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Psymon View Post
If I understand from what you're saying here that the if I include all that "hist", "liga", "dlig" stuff in my CSS code, then when I write my "olde" text using just a regular "s", then it should change that to a long-ess in the appropriate spots automatically?
Yes, that is.

Quote:
If that's what you meant, then it doesn't seem to be working -- not only is the long-ess not showing up, but none of the other ligs like "ct", "st", etc. are either.
Then, either the reader the reader does not support enabling the OpenType features, or there is some mistake in the CSS code, or there is a different syntax that will work.

Quote:
Well, it certainly seemed to work okay, by putting those ligs, etc. in myself (as you could see in those screenshots I took). And why not just put those ligs in manually here, there and everywhere, if they seem to be working just fine? If it's because of that searching issue, well, like I said there's still the "modern" version of my text, and even without ligs, etc. that "olde" version is almost unintelligible, let alone unspellable, anyway (to the average reader).
Searching, maintainability and general "cleanliness" of code

There's another option that doesn't rely on advanced OpenType features, just on standard ligatures (which are working in iBooks and ADE). Just modify the fonts adding the discretionary ligatures ("ct", "is"...) to the standard ligatures table ("liga"). Then, in your HTML text, use the long-s, but do not write the ligatures by hand, let the font use them. I'm pretty sure that will work.

To add these extra ligatures to the font in FontForge: Go to Element->Font Info, choose Lookups, and in the GSUB tab you have different tables. We want to modify the "liga" one(s). Click on the + sign of the "liga" entry (either of them if there are several), then select the subtable and click the "Edit Data" button. You'll see a table with the ligature name in the left column and the constituent glyphs in the right column, and you'll see it already includes some long-s ligatures.

Do the same with the "dlig" entry, and you'll see the list of discretionary ligatures that we want to add to the standard ones. Back to the "liga" table, click on the "<New>" entry and write what you saw in "dlig". When you are finished, export your font as OTF.
Jellby is offline   Reply With Quote