View Single Post
Old 11-13-2019, 02:10 AM   #2
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,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by roger64 View Post
No-break space and alignment

I use a lot of them as French punctuation rules recommend to use them.
Did you accidentally post this in the wrong thread?

Quote:
Originally Posted by roger64 View Post
One of the use case is at the beginning of a paragraph, right after a "tiret de dialogue" (see screenshot).
I don't read French, but from what I gather, you use the HORIZONTAL BAR (U+2015):



as a "quotation dash" instead of an EM DASH (U+2014) (how well the bar character is supported on actual devices... I'm not sure).

If there is supposed to be a space after, and the bar isn't flush against the text, your best bet might be the NO-BREAK SPACE (U+00A0) since it's the most well-supported.

(See issues with more "rare spaces" below.)

* * *

Hmmm... I'm not a French reader, so I don't know.

All I've ever read about is French spacing around your typical punctuation:

!?:;«»

In that case, the proper French spacing would use a THIN SPACE (U+2009) (or technically the NARROW NO-BREAK SPACE (U+202F)).

But to be the most compatible (and won't line-break between punctuation+text), just stick with the NO-BREAK SPACE (U+00A0).

It's been discussed thoroughly in these threads:

break/no-break and other spaces
Problem with inline image (Posts #26, #30 , #35, + especially my tests in #48)

Quote:
Originally Posted by roger64 View Post
However, some may argue that the no-break space is justified, and as the space it represents can - slightly - vary, the alignment cannot be perfect.
A no-break space can be justified, it's not a fixed-width space.

The only difference from a normal space is it doesn't allow line-breaks.

Quote:
Originally Posted by roger64 View Post
I think, there are two ways to represent a no-break space
- if this character belongs to the embedded font, it can be represented by a fixed size space and the alignment is perfect.
- if this character is created by the reading software, it may be justified, and some glitches in the vertical alignment may appear.

If the above statement right?, what's the best way to obtain a perfect alignment?
You won't be able to get that "perfect alignment" in ebooks.

The closest you could probably get is using a fixed-width space instead (like a THIN SPACE), but those are less well supported, and could lead to more egregious issues.

So I would still just say use a NO-BREAK SPACE:

Code:
<p>―&nbsp;This is your sentence.</p>
and don't worry about the minute wiggling of first-character alignment.

Last edited by Tex2002ans; 11-13-2019 at 02:26 AM.
Tex2002ans is offline   Reply With Quote