View Single Post
Old 11-02-2021, 04:34 AM   #5
red_scharlach
Junior Member
red_scharlach began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2021
Device: none
Thank you to all of you for the replies!

Quote:
Originally Posted by JSWolf View Post
Remove all CSS code that has to do with hyphens. See if it works.
Hi, JSWolf!

Done it, and without that code the book has no hyphens at all (and no squares instead of hyphens), but that's not what i want to get!

Quote:
Originally Posted by Hitch View Post
So, do I understand that you mean to say that you turn hyphens off on specific Words? Is that right?

Hitch
Hi, Hitch!

No, regular <p> are supposed to be justified and with automatic hyphenation, but instead of a hyphen I'm getting that square character (previewing the html file in Sigil and Dreamweaver) or no hyphenation at all (opening the epub in Ibooks and ADE).
There are other elements (like h1, h2...) where I set hyphenation to "none".


Quote:
Originally Posted by Turtle91 View Post
I am certainly not an expert on hyphens - I don't use them, I prefer ragged-right. But boxes, or other symbols like that, usually happen when the symbol it is trying to use is not supported by the font.

I would start by removing any custom font, and just use a standard/default one. If that doesn't fix it, I would test by changing the language settings you are using. Perhaps the language is trying to use a non-standard hyphen symbol??

edit:

Welcome to MR!!
Hi Turtle!
The language settings are not the problem. Text is in spanish and is declared properly on the <html> line at the beggining of each file.

Regarding the fonts, I have no embedded fonts in the epub, I always try to avoid them to keep it simple and having no issues with licensing. I only specify preferred fonts, like this:

body {
font-family: Cambria, Horley, Athelas, Times, serif;
}

I've tried to remove this line from the CSS and this had no effect on the problem with hyphens, square characters still there.

However, I've noticed that there are a couple of sections on the epub where hyphenation was working properly. For these sections I have a different set of preferred fonts:

.creditos {
font-family: Arial, Helvetica, sans-serif;
}

I tried to apply this set to the whole body and... it works!

I have no idea why this is happening. I've done dozens of epubs from this same publisher, and the CSS and the structure of the HTML I had in this one were the same as in the previous ones. In the old ones, preferred font sets were the same I had in this one and they worked flawlessly.

My guess is that the problem has something to do with text encoding and that it probably comes from the original source in InDesign. The only variable with this book compared with the previous ones was that the designer of the paper version was a different person and he does some weird things in InDesign I've had to deal with, maybe there was something strange with text encoding in the InDesign file that was affecting the html export. But I'm not an expert in InDesign, so I don't know how to check it.
red_scharlach is offline   Reply With Quote