Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-16-2019, 10:49 AM   #16
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Psymon View Post
Oh, he must have done something "right" in that regard, because they did keep my ligs -- at least, as far as I can tell everything was rendering out just fine. Kudos to him on that!

I don't think I'll subset my fonts, though (not my own fonts, anyway), because even though I'm giving them away for free, I don't want subset versions floating around out there (if I can help it).
Well, that's your choice, but...who'd use a subset version?

Hitch
Hitch is offline   Reply With Quote
Old 01-16-2019, 11:13 AM   #17
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
Oh, of course, I can certainly understand your reasons for doing so -- just as with designing for the Amazon market, it totally makes sense that you want to reach that outlet to sell your books, and need to design for that. I'm not designing to "sell," though, but rather the emphasis for me is on being free to design things the way I want to (and not have those designs fall apart in Kindle or whatever).

I guess each approach has its reasons and merits -- it's just that with mine, you can't make any sort of living from it. I really do applaud you, though, and what you do, Hitch. It's not what I do, but nevertheless you're an "ebook hero" of mine. I guess it's similar to, say, a heavy metal guitarist being able to appreciate a classical violinist (or vice versa) or something.
Psymon is offline   Reply With Quote
Old 01-16-2019, 03:15 PM   #18
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,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Psymon View Post
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.

[...]

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).
This is one of the downsides of just randomly copying/pasting random code from the internet without actually knowing what the individual parts are actually doing. This giant mess of code you posted is all trying to enable some OpenType functionality via CSS.

I would highly recommend reading these fantastic articles (they also include fantastic visual comparisons):

Each of them goes through reasons/locations where you might want to include each setting.

This is also another good article showing visual examples of each setting + the CSS to enable each one:

And Mozilla's page on font-feature-settings is more developer-focused (but still fantastic). On the left-hand side, you can see select between different CSS properties you can use (like font-variant-ligatures, font-kerning, [...]).

Side Note: I was planning on writing a more in-depth article about this (for my blog, when that gets finalized lol). On Reddit a few months back, someone was posting about "O vs 0", and it was most likely an OpenType issue. So I wrote a few decent answers explaining the situation.

Side Note #2: And like Hitch mentioned, if you don't specify it in your CSS, there ain't no way it's turning on. It's all off by default (or parts of it already enabled/disabled by the browser/reading system when needed, like at certain font sizes... see "text-rendering" at CSS-Tricks). And many times, some settings are off by default for good reason (may slow rendering down dramatically).

Last edited by Tex2002ans; 01-16-2019 at 04:11 PM.
Tex2002ans is offline   Reply With Quote
Old 01-16-2019, 05:48 PM   #19
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
Oh, wow, took a peek at just the first link so far, and it looks like I have my studying to do!! It might take me a bit to check it all out (and grasp it) --- but I wonder if I'm really up for all that, when what I have works (as far as turning things "on"' goes) and all I wanted to do was turn them off for just one little instance, and I may never have the need again.

And in that regard, too, I'm reminded of what Jackie wrote earlier, too...

Quote:
Originally Posted by jackie_w View Post
For epub on any ADE-based epub rendering app then, for example, the standard 2-char 'fi' in the HTML will always be rendered in the app as the 1-char ligature 'fi' as long as the font being used actually contains that ligature. I don't know of anyway to stop that happening.
The one (and only) instance where I wanted to turn ligs off was for a long-"s" + "t" lig -- and that's one of the standard ligs found in almost any good font, along with fi, fl, ffl, etc. (as Jackie was referring to). So even with ligs turned off (or, rather, never turned on), that would likely render as the lig anyway.

I haven't tried it, but I also don't have every device to test it out on, either -- so perhaps I'm better off just doing it my kludgy way after all?

Last edited by Psymon; 01-16-2019 at 05:54 PM.
Psymon is offline   Reply With Quote
Old 01-16-2019, 06:03 PM   #20
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Psymon View Post
Oh, of course, I can certainly understand your reasons for doing so -- just as with designing for the Amazon market, it totally makes sense that you want to reach that outlet to sell your books, and need to design for that. I'm not designing to "sell," though, but rather the emphasis for me is on being free to design things the way I want to (and not have those designs fall apart in Kindle or whatever).

I guess each approach has its reasons and merits -- it's just that with mine, you can't make any sort of living from it. I really do applaud you, though, and what you do, Hitch. It's not what I do, but nevertheless you're an "ebook hero" of mine. I guess it's similar to, say, a heavy metal guitarist being able to appreciate a classical violinist (or vice versa) or something.
Boy, have I got YOU fooled! :-) A hero. Dang, I'll never get my head through the door tonight, folks.

Hitch
Hitch is offline   Reply With Quote
Old 01-16-2019, 06:04 PM   #21
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
Further to my last reply, in the section on ligatures at that one link you provided, Tex...

https://helpx.adobe.com/fonts/using/...ntax.html#liga

...it says the following...

Quote:
.class {
font-variant-ligatures: no-common-ligatures;
-moz-font-feature-settings: "liga" 0, "clig" 0;
-webkit-font-feature-settings: "liga" 0, "clig" 0;
font-feature-settings: "liga" 0, "clig" 0;
}

To disable this feature, use the no-common-ligatures value and a numeric index of zero for font-feature-settings.
That does NOT work! I had tried all of that before, except for that first line (with "no-common-ligatures"), but just added that in and still no luck -- my long-"s" + "t" lig still renders out. I suppose that's likely due to what Jackie was talking about.
Psymon is offline   Reply With Quote
Old 01-16-2019, 06:11 PM   #22
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 Hitch View Post
Boy, have I got YOU fooled! :-) A hero. Dang, I'll never get my head through the door tonight, folks.
LOL, well, compared to me you do certainly know your stuff, and have WAY more experience at this than I do! It's been a couple (or more) years since I've been active on this forum (having taken some time away from epublishing to learn type design instead), but you did help me a great deal before when I was around back then (as you might recall).

My apologies, though, if you can't get through the door tonight and have to sleep outdoors! Hope it's not too cold, wherever you are.
Psymon is offline   Reply With Quote
Old 01-16-2019, 09:04 PM   #23
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,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Psymon View Post
I had tried all of that before, except for that first line (with "no-common-ligatures"), but just added that in and still no luck -- my long-"s" + "t" lig still renders out.
1. "Renders out" in WHAT?

iBooks? ADE? Sigil? Chrome? Firefox? [...]

What program/device are you testing this in?

2. "st" is a Discretionary Ligature. That means it would fall under "dlig":

https://helpx.adobe.com/fonts/using/...ntax.html#dlig

(And/or Historical "hlig" (?).)

3. You mentioned you were pasting CSS from elsewhere. Can we see your entire CSS file?

You probably have something overriding something else.

If it's the EPUB you linked to in Post #6, you inserted:

Code:
	-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";
in about a million different locations.

Remember, KISS stupid. :P

Also, (ugly hack), I saw a Stack Exchange answer mentioning sticking a zero-width joiner (‍) between the st to stop the ligature from working:

Code:
<p>This is a tes&zwj;ting word</p>
Something along those lines would probably even force ADE to not render certain ligatures.

Last edited by Tex2002ans; 01-16-2019 at 09:09 PM.
Tex2002ans is offline   Reply With Quote
Old 01-17-2019, 12:30 AM   #24
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
Hey, Tex, pardon this brief reply -- I'm having some health issues at the moment, plus my keyboard is totally acting up on me and screwing up text I'm trying to type.

You make some very good points -- in particular about cleaning up all that redundancy in my CSS. And re #1, I meant in Sigil and ADE (and I presumed in iBooks).

VERY interesting about that zero-width joiner, too!

Oh, dammit! I can't type on this stupid keyboard!!! Let me get back to you, once I have a new keyboard, hopefully feel better, and I'll see if I can improve my CSS/HTML (and also my fonts need some fix-ups, too).

Might take me a couple/few days -- sorry, this keyboard issue is driving me crazy!

Last edited by Psymon; 01-17-2019 at 05:55 AM.
Psymon is offline   Reply With Quote
Old 01-17-2019, 03:53 AM   #25
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
Hitch said:
who'd use a subset version?

Oh, some wonky folks pirate anything --- there are countless partial fonts out on the free sites that must be subsets lifted from various sources. (I don't mean the ones labeled "Demo".)

Last edited by GrannyGrump; 01-17-2019 at 04:06 AM.
GrannyGrump is offline   Reply With Quote
Old 01-17-2019, 08:59 AM   #26
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Psymon View Post
Hey, Tex, pardon this brief reply -- I'm having some health issues at the moment, plus my keyboard is totally acting up on me and screwing up text I'm trying to type.

You make some very good points -- in particular about cleaning up all that redundancy in my CSS. And re #1, I meant in Sigil and ADE (and I presumed in iBooks).

VERY interesting about that zero-width joiner, too!

Oh, dammit! I can't type on this stupid keyboard!!! Let me get back to you, once I have a new keyboard, hopefully feel better, and I'll see if I can improve my CSS/HTML (and also my fonts need some fix-ups, too).

Might take me a couple/few days -- sorry, this keyboard issue is driving me crazy!
I have a keyboard that drives me insane, too, so, I feel ya, brother. :-)

Quote:
Originally Posted by GrannyGrump View Post
Hitch said:
who'd use a subset version?

Oh, some wonky folks pirate anything --- there are countless partial fonts out on the free sites that must be subsets lifted from various sources. (I don't mean the ones labeled "Demo".)
You are probably right. They're Psymon's fonts, so entirely his call. But yeah, I guess idiots will steal anything that isn't nailed down.

Hitch
Hitch is offline   Reply With Quote
Old 01-17-2019, 09:25 AM   #27
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 Hitch View Post
I have a keyboard that drives me insane, too, so, I feel ya, brother. :-)
Oh, that was you feeling me? I thought it was a ghost -- stop it!

Quote:
You are probably right. They're Psymon's fonts, so entirely his call. But yeah, I guess idiots will steal anything that isn't nailed down.
That's pretty much why I ended up deciding to just go with the SIL Open Font license for my fonts. I thought about selling them for the longest time, but talking with various "professional" type designers out there, I'd be lucky if I made $100/year from them, and that's just not worth the trouble of having to then declare myself a business, pay taxes, file quarterly reports and everything else.

And then I thought about having a license where only I could be giving them away via my site, just to make sure that other font sites don't have older versions, but invariably my fonts will probably end up "out there" anyway, and then what -- am I going to go after people on the other side of the world?

So I just said forget it -- with the SIL OFL, all those headaches are done with. It's a shame that inevitably older versions will end up out there, but what can ya do? If nothing else, it's a good Buddhist lesson in "non-attachment."

As far as my books go in which I'll use them, I doubt I'll ever subset them, if I can help it -- at least if people rip the fonts from my book, they're getting the full version of them (even if it means an extra meg or something in the total file size).

(PS. Still might take me a couple/few days to get back re that other stuff Tex mentioned -- lots going on at the moment.)

Last edited by Psymon; 01-17-2019 at 09:27 AM.
Psymon is offline   Reply With Quote
Old 01-18-2019, 09:51 AM   #28
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 Tex2002ans View Post
Also, (ugly hack), I saw a Stack Exchange answer mentioning sticking a zero-width joiner (&zwj;) between the st to stop the ligature from working:

Code:
<p>This is a tes&zwj;ting word</p>
Well, this is totally freaky. I only just now started taking a look at all the various stuff I need to fix up, but I was especially curious about the above, and just tried it out.

It works! Or seems to, but it's very strange what happens in my code when I do use that character entity.

I type in this, where I'd wanted that...

Code:
<i>&nbsp;Laſ&zwj;t Folio.</i>
..and as soon as I do it comes out exactly as I wanted, the lig doesn't render out.

But then when I save my book, it disappears! Or, rather, it doesn't disappear, but the "visible" character entity disappears, and yet it's still there, still preventing my lig to render out. It's like that character entity gets converted into an actual zero-width joiner. My code -- as soon as I save -- changed from the above to this...

Code:
<i>&nbsp;Laſ*t Folio.</i>
That zero-width joiner is still there, but invisible.

Oh, how weird. When I copy/paste that bit of code here into this forum post, and then preview my post (and only after I preview my post, not before), that zero-width joiner gets converted to an asterisk! Definitely not so in my epub, though -- as I said, in there it's literally invisible, with no space or anything in-between the long-s and t characters.

EDIT/FOLLOW-UP: Oh, bummer. While that &zwj; trick does seem to work out nicely in Sigil, when I look at my book in ADE it doesn't, my lig ends up rendering out anyway. Oh well. Perhaps I'm just better off sticking with my original kludge.

Mind you, I still have all that other stuff you mentioned to look at and check over -- we'll see what happens, where I end up here with all that.

Last edited by Psymon; 01-18-2019 at 09:57 AM.
Psymon is offline   Reply With Quote
Old 01-18-2019, 07:53 PM   #29
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,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Psymon View Post
..and as soon as I do it comes out exactly as I wanted, the lig doesn't render out.

But then when I save my book, it disappears!

Or, rather, it doesn't disappear, but the "visible" character entity disappears, and yet it's still there, still preventing my lig to render out. It's like that character entity gets converted into an actual zero-width joiner.
That's exactly what happens, Sigil/Calibre converts most "named entities" to the actual UTF-8 character. And since the zero-width joiner is "invisible" (zero-width)... that makes it hard to find. :P

In Sigil, you could go under Edit > Preferences > Preserve Entities, and add:

Code:
&zwj;
to the list. That should preserve it on open/save.

In EPUB3, HTML "named entities" are not allowed, so you have to use the decimal form instead:

Code:
& #8205;
(Remove the space between the "& #".)

Quote:
Originally Posted by Psymon View Post
Definitely not so in my epub, though -- as I said, in there it's literally invisible, with no space or anything in-between the long-s and t characters.
Yeah, it becomes a pain to find invisible characters.

You can see it exists if you do a Tools > Reports > Characters in HTML Files.

Or you can do a Regex search and use this:

Search: \x{200D}

That's the hex for a zero-width joiner.

See Regular-Expresssions.info's article on "Non-Printable Characters.

Quote:
Originally Posted by Psymon View Post
Oh, how weird. When I copy/paste that bit of code here into this forum post, and then preview my post (and only after I preview my post, not before), that zero-width joiner gets converted to an asterisk!
Yeah, who knows what strange ways these characters will react with MobileRead's forum posts.

Usually you can slap a noparse tag: (Remove the asterisks.)

Code:
[*noparse][/*noparse]
around stuff to suppress the forum from adding smilies (and other crap) in specific locations.

Side Note: I know there was an issue a while back I had with obscure Unicode characters disappearing when using "Quick Reply" or "Editing" my posts. But using "Advanced Reply" preserved a lot of the characters.

This Unicode 7.0 post I wrote was the culprit.

I doubt that bug has been fixed... I doubt many people are writing these characters in their posts, so the priority gets pushed down to the bottom. :P

* * *

Side Note: Those extremely interested in ligatures may also want to check out this speech, "Selective Ligature Suppression" given at TUG 2018.

It's based on a LaTeX package that was created, but a lot of the discussion applies to ligatures/typography more broadly.

While in most cases, ligatures are fine, there are rare exceptions which should be suppressed along "morpheme boundaries". Example:
  • "shelfful" should have the "ff" ligature suppressed
  • "clifflike" should have "ffl" suppressed, but allow "ff"

(Also another blog post I've been planning to write. Summaries of every talk I watch. :P)

Side Note to Side Note: And honestly, the actual title on Youtube is "TUG 2018 - Conference - Mico Loretan"... makes it absolutely impossible to find via search, and you have zero clue wtf the speech is unless you watched it.

That issue seriously plagues a lot of these obscure talks, so I hope to make them much more findable by promoting/summarizing them. :P

Last edited by Tex2002ans; 01-18-2019 at 08:17 PM.
Tex2002ans is offline   Reply With Quote
Old 01-19-2019, 05:28 PM   #30
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,931
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Psymon View Post
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).
Do you realize that all that stuff in your code is not actually valid ePub code?
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I turn off ligatures in ADE? JSWolf ePub 15 01-18-2013 04:10 PM
List of ligatures JSWolf General Discussions 12 01-17-2013 11:20 PM
Odyssey Hyphenation and Ligatures? owly Bookeen 2 12-21-2011 02:49 PM
old english ligatures bobcdy Workshop 3 08-26-2011 05:18 PM
What's with ligatures. frabjous ePub 44 03-03-2010 08:02 PM


All times are GMT -4. The time now is 02:07 AM.


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