Quote:
Originally Posted by roger64
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
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
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
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>― This is your sentence.</p>
and don't worry about the minute wiggling of first-character alignment.