1

There doesn't seem to be any formatting guide for Google Play. I've been trying to determine how to turn off hyphenation for Google Play (and possibly in another Android reader like Gitden).

I have been using proprietary extensions to do it on Apple and Adobe.

  -webkit-hyphens: none;
   hyphens: none;
   adobe-hyphenate: none;

Does Google Play books use webkit or something like that. (It does not appear to turn it off when I set the style to that).

I guess this question boils down to: how do I determine what things are supported on ereaders on android? Thanks.

2 Answers 2

1

Like all new CSS specifications, hyphenation is a mess. I spent hours trying to disable hyphens in my titles for an Epub file viewed in Microsoft Edge. I've finally found a solution.

My reference comes from this MDN entry, but you need to note (in typical Microsoft fashion) that the presentation is only complete in its examples, not in its definition.

My title CSS includes all of the following:

-epub-hyphens: none;
-webkit-hyphens: none;
-ms-hyphens: none;
hyphens: none;
adobe-hyphenate: none;

Note that in Microsoft Edge, this only worked with the addition of -ms-hyphens. Honestly, this is so obvious an issue that the learned men and women of the world should have realized that only one would be required and that choosing a prefix that limited its use (predominantly to a company, I'm looking at you Microsoft, Mozilla, and Adobe) would only muddy the waters but not last the test of time.

1

This may or may not be an answer to the question I posed.

"EPUB 3 CSS Profile includes epub prefixed versions of the following properties from the CSS":

-epub-hyphens

The -epub-hyphens property does not include support for the value all.

So as I interpret it, in an epub file, you use

h1 {
-epub-hyphens: none;
 }

to accomplish that in an epub file. I'll confirm this in Google Play.

This makes apparent how simply looking at the spec doesn't provide you with sufficient information. Who would have ever thought that -hyphens wouldn't be supported but -epub-hyphens: none might be.

More background:

The EPUB 3 revision also introduced CSS properties for controlling hyphenation, line breaks, and word breaks. These properties were borrowed from CSS Text module, but again, because the module was not a final recommendation at the time, you must use the -epub- prefix with them. The -epub-hyphens property controls hyphenation. The value none disables hyphenation.

Reference: http://epubzone.org/news/epub-3-and-global-language-support

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.