View Single Post
Old 01-13-2022, 11:17 PM   #5
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 Kabukikaiser View Post
So, I am using pictures for my chapter titles in order to use a fancy font and, [...]
Bad idea.

This has been discussed quite a few times over the years. Here's some of the more recent threads:

And why are images-of-text bad?

In the 2018 post I link to in that 2nd response:

Quote:
Originally Posted by Tex2002ans View Post
The gist is that images of text are:
  • Not Accessible
    • Not readable by TTS
    • Not copy/pastable
    • Not able to be looking up by dictionary (Greek->English one)
  • Don't follow user preferences
    • Color, font, font size, [...]
Quote:
Originally Posted by Kabukikaiser View Post
of course, the TOC generator doesn't recognize them except as empty text when I use <h1></h1> to tag them, which leaves me with a TOC of empty texts.
There are a few ways to do this:

- - -

Method 1. Like DNSB said, using title="" is how you manually override what appears in Sigil's TOC generator:

Code:
<h1 title="1. The Beginning">Chapter 1: The Beginning</h1>
Would appear as:
  • 1. The Beginning
    • In the TOC + after Tools > Table of Contents > Generate Table of Contents.
  • Chapter 1: The Beginning
    • In the text itself.

Method 2 (Strongly recommend against). There are ways to "hide" an <h1> using CSS's display: none:

HTML:

Code:
<div class="chaptertitle">[[[Your image code here]]]</div>

<h1 class="invisible">Chapter 1: The Beginning</h1>
CSS:

Code:
 h1.invisible {
	display: none;
}
but this has the potential to break in many readers.

Method 3. Like KevinH said, embed+subset a "fancy font" and use it only for your chapter titles:

HTML:

Code:
<h1 class="fancytitle">Chapter 1: The Beginning</h1>
CSS:

Code:
h1.fancytitle {
	font-family: "Lucida Handwriting", cursive, sans-serif;
}
For info on how to do that, see my mini-tutorial I wrote for embedding Japanese fonts. (Instead of <span class="japanese">, you'll be using <h1 class="fancytitle">. You can then follow Steps 4+.)

For more info on "embedded font" issues (licensing, "Publisher Fonts" setting, etc.), see discussion in this recent thread: "ePub chinese fonts".

- - -

All methods (and pros/cons) were discussed in detail in those linked threads.

I completely recommend against using "chapter heading as images" though.

Last edited by Tex2002ans; 01-13-2022 at 11:29 PM.
Tex2002ans is offline   Reply With Quote