Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Epub with paragraph and character styles missing

Community Beginner ,
Apr 12, 2022 Apr 12, 2022

I'm trying to export an indesign document which is a long 300+ page file to epub. I edited everything with more paragraph and character styles than I had in the file destined to pdf export, so as to not have style overides, and I added export tagging info.

 

When I check the results with any epub viewer on my computer it looks great. When I check with Sigil, the css and html outputs are a bit messy, but it previews fine (the only error I still have is with the endnotes not linking, but I've already seen another thread on that).

 

But when I open it with my ereader, it's never good. What happens is that one or more paragraph/charater styles simple doesn't appear. In the last export I made, any style that used semibold didn't appear (the text itself disappears). Afterwards I changed every semibold to bold and no paragraph text appeared at all, except for titles. Before, the chapter name style didn't appear. It appears to work in turns, with the result of every time I export, something is always missing or failing.

 

I'm using montserrat fonts, and I know the ereader is generally reading them, because they often appear correctly.

 

I have to say I'm entering despair mode, so any help would be really appreciated.

TOPICS
Bug , EPUB , How to , Import and export , Scripting
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 13, 2022 Apr 13, 2022

If you simply uncheck "Include Embeddable Fonts" on the Export | HTML & CSS panel, you're most of the way there. You'd have to disable Montserrat on your system or use a system that doesn't have it installed to see how most readers would see it... but of course, some out there will have the font installed and see problems in their copy. (Sometimes. Getting embedded/custom fonts to work right in Kindle and most EPUB readers is such a PITA that it may never work. 🙂 )

 

The right way, though, is t

...
Translate
Community Expert ,
Apr 12, 2022 Apr 12, 2022

Are you exporting to fixed (FXL) or reflowable? v3?

 

What reader are you using? They vary enormously. My recommendation is to use Thorium Reader as your proofing tool — if it presents properly in Thorium, it will likely present properly in all the 'better,' standard, conforming readers. (If it then doesn't present in another reader... really, it's that reader's fault.)

 

Validation and editing tools like Sigil are, IMVHO, a waste of time full of red herrings. The only validation needed is Thorium and, even if you aren't going to Kindle, Kindle Previewer. When it's perfect in those, you're done, no matter what (fairly pointless) validation says.

 

It sounds as if you are doing almost everything right; I'd recommend working to one and only one finish point and not try to make every tool, reader, validator etc. agree. You can't do it with EPUB. The field is too "unstandardized" for that, and if you're exporting from ID, you can skip all the steps that are more suited to the "hand building" mode using all the freeware editors and checkers and so forth.

 

Fill in the blanks here and we can probably get you to a successful EPUBlication. 🙂

 

 

ETA: Embedding fonts is not really a best practice with EPUB, either, and even using very standard fonts often multiplies the headaches of getting a stable, functional result. That you're using (I assume) Google fonts adds to the woes; the Montserrat family seems to be at the root of many bug and problem reports. (I like it and use in on a couple of websites; I don't think it's a good choice for book use, though.)

 

—

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 13, 2022 Apr 13, 2022

Hi! Thanks so much for your reply.

I'm exporting as reflowable v3.

To validate I'm using Kindle Previwer 3 and it looks good on it. I'm going to try Thorium now.

Yeah, I wouldn't use Montserrat for a book either, but the project I'm working on is a translation of a pre-existing book, and I was trying to be loyal to the original. Is there a way to take all font information away from the epub, without changing the font of every style on ID? I'm asking because I looked at some of the css stylesheets for other random ebooks and some of them don't have any font information whatsoever - which actually would be ok by me if I'm to discard the use of Montserrat.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 13, 2022 Apr 13, 2022

Btw, something weird that happened in one of the exports was that if the tag for any of the paragraph styles had a letter "i" in it, the resulting css would cut the tag at the "i" ("leftindent" would result in "left") and in the html file it would appear with a space in place of the "i" ("leftindent" would appear as "left ndent") -- I guess this was one of the bugs that was causing problems. But then I fixed it and some other random issue appeared.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2022 Apr 13, 2022

I think your weird text issues are caused by the font. As I noted, I've seen Monserrat pop up as the culprit in a lot of document problems.

 

—

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2022 Apr 13, 2022

If you simply uncheck "Include Embeddable Fonts" on the Export | HTML & CSS panel, you're most of the way there. You'd have to disable Montserrat on your system or use a system that doesn't have it installed to see how most readers would see it... but of course, some out there will have the font installed and see problems in their copy. (Sometimes. Getting embedded/custom fonts to work right in Kindle and most EPUB readers is such a PITA that it may never work. 🙂 )

 

The right way, though, is this:

  1. Export the book.
  2. Extract the default CSS file from the EPUB (I assume you know EPUB structure from your posts).
  3. Rename it KillMonserrat.css (or something more suitable).
  4. Edit it to change every instance of a font-family string to just 'serif;' — or get more stylish and change selected headings and styles to 'sans-serif;'
  5. Re-export the book, now including KillMonserrat.css as a custom CSS file in HTML & CSS.

 

You should now have a vanilla-font version without changing your source file or making irreversible changes to the EPUB.

 

—

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 14, 2022 Apr 14, 2022
LATEST

I deleted the embedded fonts and exchanged every instance of "Montserrat" by "sans-serif" in the css file, and now it's working seamlessly in every platform, including the Kobo.

 

I really can't thank you enough, this was driving me crazy, and delaying this project a lot. I'm really grateful.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 12, 2022 Apr 12, 2022
What eReader are you using? If the html and css are correct, and the
font is available, any eReader should interpret the file correctly.
Shirley Hopkins
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2022 Apr 12, 2022

Yes, if everything is perfect, it should work perfectly. 🙂

 

(Sorry, couldn't resist. If it were that easy, this forum wouldn't exist!)

 

—

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 13, 2022 Apr 13, 2022

I'm using a Kobo Nia.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines