Quote:
Originally Posted by C_J
I do not know how to change fonts in Chapter Titles and Table of Contents.
What should I write in css to change these Fonts?
|
I think it depends on how the Chapter Titles and Table of Contents are defined in your source ebook. I can't help with TOC as I don't use them but I include an example below of what you might use for Chapter Titles.
Add the following to the CSS you already have. It will only work if your ebook's Chapter Titles have been specified using standard HTML heading tags <h1>, <h2>, ... <h6>
The example below sets Headings levels 1-6 to font Georgia, but you could use any font of your choosing.
Code:
@font-face { font-family: "Georgia"; font-weight: normal; font-style: normal; src: url(res:///Data/fonts/georgia.ttf);}
@font-face { font-family: "Georgia"; font-weight: normal; font-style: italic; src: url(res:///Data/fonts/georgiai.ttf);}
@font-face { font-family: "Georgia"; font-weight: bold; font-style: normal; src: url(res:///Data/fonts/georgiab.ttf);}
@font-face { font-family: "Georgia"; font-weight: bold; font-style: italic; src: url(res:///Data/fonts/georgiaz.ttf);}
h1, h2, h3, h4, h5, h6 {font-family: "Georgia";}
Similarly, if your source ebook tagged chapters something like this:
Code:
<p class="chapt">Chapter One</p>
rather than:
Code:
<h2>Chapter One</h2>
then I think you could achieve the same result by replacing the last line with:
Code:
p.chapt {font-family: "Georgia";}