View Single Post
Old 04-14-2020, 10:27 PM   #22
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by wff View Post
That's not good news :-(
But what remains strange to me is that it is the only book I have this issue with.
Would you like me to show you a sample of another French book?
From my testing, the rendering problems are exasperated by the extra spaces and line feeds in the text. I think that if you look at the other books, you won't find these.

Quote:
Originally Posted by wff View Post
Bingo, guys, fix may be on its way :-)
It seems that thin spaces were responsible for my problem.
I performed several "search and replace" after copying epub code in TextEdit:
- EN DASH replaced with –
- THIN SPACE replaced with   (for each punctuation sign, like ! ? ")
- Extra spaces replaced with single space
It looks great until now, but I have fixed just one chapter... Lot of work ahead :-)
I took SS to show you.
Thanks again everyone! I will tell you if everything is ok once it's done.
I think those are some of the suggestions made before. But, the are some issues as where you are putting the non-breaking space, the thin space is more correct. I think wrapping the text to remove extra spaces and line breaks is the first thing to do. I use the following saved search in the calibre editor to do this:

Code:
([\w-.,’”"'–;:\!…\?])\s*\n+\s*([\w"'’‘“]|<i)
With the replace text:

Code:
\1 \2
That matches most of what I have found when trying to wrap the text in paragraphs and replacing the line break with a single space. It isn't perfect, and have added things over time. It could probably be simplified, but, it works for me.
davidfor is offline   Reply With Quote