Quote:
Originally Posted by Kabukikaiser
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
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
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
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.