09-17-2009, 05:16 AM | #1 |
Enthusiast
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
|
line breakup possible?
I am curious. Is it possible to give some sense of line break up in the epub format. For example, words knows how words end (with space) and even how words need to be broken up. I'm curious if it is possible to somehow to specify where words are broken up.
While this seems trivial... it's essential in asian languages. For example, the space in thai is used to signify the end of a sentence. For the reader however a sentence looks like a long word and if it's nearing the end of the page it needs some guidelines to know where it could be broken up correctly. BTW. The Sony ereader formats such books very weird. It just goes off page and you cannot see the words at all... anyone have a solution for this problem? |
09-17-2009, 06:30 AM | #2 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
The best way would be using: space (& #32;), no-break space (& #160;), zero-width space (& #8203;), and zero-width no-break space (& #65279;) where needed, and hope the reading software supports them.
(no space between & and # above, by the way.) |
09-17-2009, 09:32 AM | #3 |
Enthusiast
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
|
thank you i've found some other tags besides the one you gave me. I did a little test.
<wbr> ==> does not work & #8203; ==> does work but shows a ? on the place where this is inserted & shy; ==> does not work, and ends the document. i tried some other things... mainly using <wbr> now my prs600 has crashed |
09-17-2009, 11:08 AM | #4 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I don't think <wbr> is supported by the ePUB spec at all.
& shy; could work, but it gives (if implemented correctly) a hyphen at the end of broken lines, which you probably don't want in Asian scripts. & #8203; giving a ? is probably a problem of the default font, try one of these fonts. Last edited by Jellby; 09-17-2009 at 12:27 PM. |
09-17-2009, 11:12 AM | #5 |
The Grand Mouse 高貴的老鼠
Posts: 71,533
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
I don't know if this would work (I haven't tried it), but perhaps just enclosing parts of the sentence in <span>...</span> would be enough to allow/encourage line breaks between the spans rather than within spans?
|
09-17-2009, 11:17 AM | #6 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Does the CSS style
white-space: nowrap works in ePubs? I just don't know how far thought would go towards solving your problems, though... Last edited by frabjous; 09-17-2009 at 11:22 AM. |
09-17-2009, 12:19 PM | #7 | |
Enthusiast
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
|
Quote:
As for not able to support the & #8203... the font being used is an asian font... perhaps i should define multiple fonts and only use a different font when i want to use the zero width character.... however it's a problem which is also seen in some webbrowsers so i'm not totally convinced it's just the font. Last edited by Justice Strike; 09-17-2009 at 12:24 PM. |
|
09-17-2009, 12:32 PM | #8 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Sorry, I meant that & shy; could work but would show a hyphen (I've corrected the message now). As I said, <wbr> does not seem to be supported in ePUB, so don't use it, it's not a problem of implementation, but of the format specification.
|
09-17-2009, 05:59 PM | #9 |
Enthusiast
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
|
the & #8203; seems to work... in latin text... haven't tried it with thai though, i wouldn't know why it shouldn't work so i have good hopes
Now a automatic way of reformating thai text is needed but i think that's manageable. |
09-18-2009, 07:15 AM | #10 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
In Thai, would you need to insert & #8203; between every two characters (is a line break permitted everywhere)? If that's the case, I believe that's only a workaround, and ePUB renderers should at some point suport proper linebreaking algorithms for different languages (especially if the rules are as simple as "break anywhere").
|
09-18-2009, 08:17 AM | #11 | |
Enthusiast
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Get in line for Kindle 3 | Bander | Amazon Kindle | 105 | 08-07-2010 09:30 PM |
Line spacing | Ivo | Kobo Reader | 3 | 06-30-2010 12:54 PM |
I'm in line | Tangabird | Introduce Yourself | 4 | 11-12-2009 08:13 AM |
No line breaks | ecpepper | Amazon Kindle | 3 | 08-09-2009 06:42 PM |
Line on the screen | jpchan | Sony Reader | 13 | 09-12-2007 02:39 PM |