Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-19-2019, 06:54 PM   #31
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: 1,147
Karma: 6100569
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by JSWolf View Post
Do you realize that all that stuff in your code is not actually valid ePub code?
It's valid CSS.

CSS is designed in a way where if the device doesn't understand it, it completely ignores that instruction.

Ugly/Bloated, yes. Invalid, no.
Tex2002ans is offline   Reply With Quote
Old 01-19-2019, 07:00 PM   #32
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: 427486
Join Date: May 2013
Device: iPad, ADE
Quote:
Originally Posted by JSWolf View Post
Do you realize that all that stuff in your code is not actually valid ePub code?
Well, my books "validate" -- but I guess the validator doesn't pore over my CSS. I do know that when I was trying to get my ligs to work (ages ago) I just added in anything and everything I could find to "turn them on," and as a result there's code that's more for getting webfonts on web pages to work in there, too. As I said before, though, what harm can it do to have it in (like if someone views my book online with a browser plugin or something)?

I don't know, maybe it's overkill, but what harm does it do to include it, just in case?

Thanks to Tex, too, for your other detailed reply! Looks very interesting, even promising to actually get that no-lig issue to work right -- I'll get back for a closer look at that after the weekend.

Last edited by Psymon; 01-19-2019 at 07:11 PM.
Psymon is offline   Reply With Quote
Old 01-19-2019, 07:16 PM   #33
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: 1,710
Karma: 11766682
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
Tex is correct - that is what devices are supposed to do: "Fail gracefully"

Unfortunately not all devices do what the spec requires

Just be very careful to validate the css as well - and test, test, test!
Turtle91 is offline   Reply With Quote
Old 01-19-2019, 07:24 PM   #34
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: 427486
Join Date: May 2013
Device: iPad, ADE
Quote:
Originally Posted by Turtle91 View Post
Tex is correct - that is what devices are supposed to do: "Fail gracefully"

Unfortunately not all devices do what the spec requires
Well, is there really anything "wrong," or "bad," with all that stuff I have in my CSS? If I "should" trim it down, at this point I don't know any more what's necessary and what's not.

Quote:
Just be very careful to validate the css as well - and test, test, test!
I can only test things on the devices/software I have -- which for me is in Sigil and ADE on my desktop PC, and then, for my "final test," on my iPad Mini. I can't afford to go out and buy other stuff just to test my books on.
Psymon is offline   Reply With Quote
Old 01-20-2019, 07:45 AM   #35
kso
Member
kso began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jun 2018
Location: UK
Device: kindle fire
Quote:
Originally Posted by Psymon View Post
I did earlier come up with this potential "noligs" class before, which I thought might work -- and which you'd think should work -- but it doesn't seem to, my ligs still show up anyway (and oh, I see I did use that optimizeSpeed thing in there... to no avail)...

Code:
.noligs {
	-moz-font-feature-settings: "hist=0, liga=0, dlig=0";
	-ms-font-feature-settings: "hist" 0, "liga" 0, "dlig" 0;
	-webkit-font-feature-settings: "hist" 0, "liga" 0, "dlig" 0;
 	-o-font-feature-settings: "hist" 0, "liga" 0, "dlig" 0;
	font-feature-settings: "hist" 0, "liga" 0, "dlig" 0;
	font-feature-settings: "kern" 1, "liga" 0;
	font-kerning: normal;
	text-rendering: optimizeSpeed;
}
From memory the following seems to work on some readers; haven't tested this everywhere:

Code:
.noligs {
	font-feature-settings: "liga" 0, "dlig" 0, "rlig" 0, "hlig" 0, "calt" 0;
}
klaus
kso is offline   Reply With Quote
Old 01-20-2019, 12:17 PM   #36
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: 52,474
Karma: 47532851
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by Turtle91 View Post
Tex is correct - that is what devices are supposed to do: "Fail gracefully"

Unfortunately not all devices do what the spec requires

Just be very careful to validate the css as well - and test, test, test!
ADE (RMSDK) will ignore the CSS 100% if there is one single error. And most ePub is read using ADE. Also,I can say that most of that code won't work with the most widely used versions of ADE.
JSWolf is offline   Reply With Quote
Old 01-20-2019, 03:10 PM   #37
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: 1,147
Karma: 6100569
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Psymon View Post
Well, is there really anything "wrong," or "bad," with all that stuff I have in my CSS? If I "should" trim it down, at this point I don't know any more what's necessary and what's not.
KISS.

Apply the ligatures to your <p>s or to your specific classes.

But there's no need for it to be on your html, body, fonts, p, classes, [...].

You're just going to cause yourself headaches when you can't figure out CSS Specificity:

https://css-tricks.com/specifics-on-css-specificity/

(What takes priority/overrides what.)

And then you'll be scratching your head as to why oh why your ligature can't be disabled. (Sound like someone?) :P

Quote:
Originally Posted by JSWolf View Post
ADE (RMSDK) will ignore the CSS 100% if there is one single error.
But there isn't an error. It's valid CSS, and how you declare a bunch of this ligature stuff:

Unprefixed forms: https://developer.mozilla.org/en-US/...ature-settings
Prefixed forms: https://css-tricks.com/almanac/prope...ture-settings/

Quote:
Originally Posted by JSWolf View Post
And most ePub is read using ADE. Also,I can say that most of that code won't work with the most widely used versions of ADE.
Come on, you know better than this!

The prefixed versions work on those specific browser vendors, and are used when the standards are still in flux:

https://developer.mozilla.org/en-US/.../Vendor_Prefix

If the device don't understand it, it don't use it! (It's how you can use CSS3 like rounded borders... where old ADE would just display square edges.)

Just take disabling hyphens:
  • adobe-hyphenate: none;
    • This was some proprietary ADE/Adobe thing. I personally wouldn't use it.
  • -epub-hyphens:none;
    • This is a valid way to disable in hyphens in EPUB. (See the specs.)
  • -webkit-hyphens:none;
    • This would work on iBooks
  • -moz-hyphens:none;
    • This would work in old Firefox <43.
    • I don't believe this is needed any more. Firefox supports the unprefixed version, and they're the ones who are pushing for proper hyphenation.
  • hyphens:none;
    • Hyphenation is relatively settled in CSS now. This would disable hyphens in anything modern + future.

Like I said. Hideous? Yes.

Would I do it? No (I would leave hyphenation to the device. Disabling would disproportionately hurt smaller devices + those who read with larger font sizes.).

Last edited by Tex2002ans; 01-20-2019 at 03:15 PM.
Tex2002ans is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:10 PM
List of ligatures JSWolf General Discussions 12 01-18-2013 12:20 AM
Odyssey Hyphenation and Ligatures? owly Bookeen 2 12-21-2011 03:49 PM
old english ligatures bobcdy Workshop 3 08-26-2011 06:18 PM
What's with ligatures. frabjous ePub 44 03-03-2010 09:02 PM


All times are GMT -4. The time now is 12:19 PM.


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