01-17-2018, 06:31 AM | #16 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
While writing the above posts I've been thinking about how to prove if the kepub renderer is changing the width of the NO-BREAK SPACE. And I realised the test book I posted can do it.
Open it to the page with the spaces. Choose a font and size. It will be easier with a larger font as the line needs to go over to the next line. Set it to justify and then step through the margin lengths. Does the distance between the two quotes for the NO-BREAK SPACE? My eyes say it doesn't change, but the space just before it does. But, it might be a better test if there were letters either side instead of the quote. Using punctuation characters might affect the behaviour. |
01-17-2018, 06:32 AM | #17 |
Unicycle Daredevil
Posts: 13,923
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
Would it work to use an empty span with a fixed width?
html Code:
—<span class="dialogue"></span>Yadda... Code:
span.dialogue {width:5px} or span.dialogue {width:1mm} |
01-17-2018, 07:46 AM | #18 |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
|
01-17-2018, 02:51 PM | #19 |
Librarian
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
|
@davidfor : yes , i was agreeing with you (and was too tired to be clear haha) ; in french the correct use for a fixed width would be the narrow non breaking space but whatever. (there is a distinction in french between a non breaking space with fixed width and a "variable width" non breaking space). this distinction is irrelevant in english because there is no need of a space before punctuation.
@Semwize : as i linked above: because of a bug so old it became a fact (but I'm still saying in case of dialogues, the stretching is ulgy and problematic for the reading so I use epubs (it's the only case where it's a real problem, in fact) In french dialogues must be aligned (each first word after each dash have to be aligned, as a rule) Last edited by cramoisi; 01-17-2018 at 03:34 PM. |
01-17-2018, 03:05 PM | #20 |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
|
01-17-2018, 06:06 PM | #21 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Here's another test for this: Take you text that use em dashes to indicate dialog. Replace the em dashes with some other punctuation. I'm not sure what would be best, but my first thought is a quote character, maybe just the straight quote mark. The idea is to choose a character that is treated as you correctly. So, maybe a letter will work. Then what happens when you look at that page using the kepub renderer? Do the lines that need to be justified behave differently at the start to the lines that don't? Assuming each line had started with an em dash and a no-break space as the OP stated, and now starts with some other character followed by the no-break space, this should give a better idea whether the no-break space is stretched or not. |
|
01-18-2018, 12:58 AM | #22 |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
|
01-18-2018, 01:43 AM | #23 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
|
01-18-2018, 01:46 AM | #24 |
Librarian
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
|
@davidfor : ok, i checked the first book i bought from the kobo store
https://www.dropbox.com/s/2t5orhocyr...38.59.png?dl=0 https://www.dropbox.com/s/2vslmvwpk5...43.59.png?dl=0 Then, i remove the drm and check inside it : there's only a "justified space" (aka : a common space) after each dash. So I put fine space, and recheck : there is a difference but very slight at this police size : https://www.dropbox.com/s/1st8pqdj05...04.54.png?dl=0 But when i change the margin and the size you can see it clearly : https://www.dropbox.com/s/jdi8semo31...12.37.png?dl=0 The problem is that kobo doesn't use a fixed width space where it should be in french even if they conserve the correct width in the kobo application desktop. Last edited by cramoisi; 01-18-2018 at 02:15 AM. |
01-18-2018, 01:53 AM | #25 | |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
Quote:
Screenshot above. This is not good, the dialogues are really all crooked. Last edited by Semwize; 01-18-2018 at 02:04 AM. |
|
01-18-2018, 02:03 AM | #26 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
The OP stated that no-breaking spaces were not supported. That is wrong. They are supported and do at least two of the expect functions (act as a space, prevent line breaks). Semwize is stating that no-breaking spaces are treated the same as a normal space and will be expanded or compressed as needed to justify the text. From the evidence I see, that is not the case. As I have stated several times, I suspect it is the handling of the other characters near the no-breaking space that is contributing the extra spacing and making it look like the no-breaking space is actually the culprit. If someone wants another way to test this, then create an epub with the following in it: Code:
<p>m m m m m m m m m m m m m m</p> But, I'll also state that based on my research, stretching the non-breaking space is the correct behaviour. The fact that no renderer has gotten this correct doesn't keep it form being correct. That means that for languages like those under discussion, it should be done by some other method. Possible a narrow-non-breaking space. Or two. From the discussion a while ago about French, I thought that was the character that should be used. |
|
01-18-2018, 02:08 AM | #27 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Which is it? Maybe the best solution is to post a sample book to look at. |
|
01-18-2018, 02:18 AM | #28 |
Guru
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
As GeoffR advised, I removed the spaces after m-dash (n-dash, quotation-dash - I checked all these symbols). The space after m-dash (n-dash, quotation-dash) is stretched.
Last edited by Semwize; 01-18-2018 at 02:23 AM. |
01-18-2018, 02:22 AM | #29 | |
Librarian
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
|
Quote:
My second screenshot only shows that where one's could think the space wrongly stretch in kepub, it's normal since they are normal spaces where it's should not. And in the screenshot above (the third and fourth) I use a narrow-non-breaking-space and it stretches too. So there is no solution for that regarding kepub. (I edit my post when you were writing your answer, could you recheck ?) Last edited by cramoisi; 01-18-2018 at 02:26 AM. |
|
01-18-2018, 05:45 AM | #30 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
But, I'm still curious about whether the non-breaking space is stretching or not. And for another part of my curiosity, what did Kobo say when you reported the problem? |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Non-breaking space | JSWolf | ePub | 38 | 06-09-2020 09:00 PM |
non-breaking space | cramoisi | KOReader | 22 | 04-25-2017 03:47 AM |
Non breaking space (possible) bug | rferran | Sigil | 3 | 12-02-2016 12:33 PM |
Non-Breaking space | drago87 | Conversion | 0 | 01-20-2016 05:52 AM |
Why the non-breaking space? | Notjohn | Sigil | 2 | 06-08-2015 05:24 AM |