View Single Post
Old 01-15-2019, 09:45 PM   #8
Psymon
Chief Bohemian Misfit
Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.Psymon ought to be getting tired of karma fortunes by now.
 
Psymon's Avatar
 
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
Quote:
Originally Posted by jackie_w View Post
To turn ligatures (& kerning) on you can use CSS
Code:
text-rendering: optimizeLegibility;
To turn ligatures (& kerning) off you can use CSS
Code:
text-rendering: optimizeSpeed;
However, I don't know how many epub reading apps will take any notice of the CSS attribute 'text-rendering'.
Interesting, I've seen that optimizeLegibility (or optimizeSpeed) thing before, and thought I had that in my code, but it seems not -- it wouldn't hurt to add it in, I suppose.

I don't think it would work on all devices, however. It was somewhere in an earlier thread here from years ago (and via other tutorial websites on the 'net), when I first got into this, that I developed my CSS code to turn on ligs on as many platforms as possible -- in fact, I just today added in some extra stuff on top of what I had before, suited for web browsers, too, in case someone might end up looking at my book with a browser plugin or something (I have no idea if it will actually do anything -- ebooks in web browsers look like crap, from what I've seen -- but at the same time it does no harm to add it in).

This, from my CSS, turns off all hyphenation (since the English in my book is Elizabethan English, and I didn't want words breaking in ways they shouldn't) and should turn ligs -- and also kerning -- on in "everything"...

Code:
-webkit-hyphens:none;
-epub-hyphens:none;
-moz-hyphens:none;
hyphens:none;
-moz-font-feature-settings: "hist=1, liga=1, dlig=1";
-ms-font-feature-settings: "hist", "liga", "dlig";
-webkit-font-feature-settings: "hist", "liga", "dlig";
-o-font-feature-settings: "hist", "liga", "dlig";
font-feature-settings: "hist", "liga", "dlig";
-webkit-font-smoothing: antialiased; /* Chrome, Safari */
-moz-osx-font-smoothing: grayscale; /* Firefox */
-moz-font-feature-settings:    "kern" 1; 
-ms-font-feature-settings:     "kern" 1; 
-o-font-feature-settings:      "kern" 1; 
-webkit-font-feature-settings: "kern" 1; 
font-feature-settings: "kern" 1, "liga" 1;
font-kerning: normal;
How to turn it off, though? Pffft! That's why I'm here (with my query)!

I should probably add in that optimizeLegibility thing, too, like I said -- can't hurt, and thank you for that (even as a reminder).

Last edited by Psymon; 01-15-2019 at 09:50 PM.
Psymon is offline   Reply With Quote