02-27-2020, 10:24 AM | #1 |
Connoisseur
Posts: 86
Karma: 10
Join Date: Jan 2020
Device: kindle
|
Using Font family gets ignored in Sigil
I am using <span class="first-letter">F</span>
as a drop case in epub3 with css as .first-letter { display:block; float:left; font-size: 5em; line-height:0.8em; color:#bf253c; font-weight:normal; padding-right: 8px } When I use font-family:SerpentisBlack; or any other font that I have loaded into the Fonts folder, it gets ignored in the text. If I use a standard font i.e. font-family: "Comic Sans MS"; it works .first-letter { font-family: "Comic Sans MS"; display:block; float:left; font-size: 5em; line-height:0.8em; color:#bf253c; font-weight:normal; padding-right: 8px } |
02-27-2020, 10:31 AM | #2 |
Unicycle Daredevil
Posts: 13,926
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
Have you added an @font-face entry to the css?
|
Advert | |
|
02-27-2020, 10:37 AM | #3 |
Connoisseur
Posts: 86
Karma: 10
Join Date: Jan 2020
Device: kindle
|
Yes I did try that to no effect, do I add it like this
@font-face { font-family: SerpentisBlack; } in addition to my .first-letter brace? |
02-27-2020, 10:42 AM | #4 |
Unicycle Daredevil
Posts: 13,926
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
The full entry should look like this:
@font-face { font-family: 'SerpentisBlack'; font-weight: normal; font-style: normal; src: url('../Fonts/SerpentisBlack.ttf'); } Or .otf at the end, if it's an otf font. |
02-27-2020, 10:44 AM | #5 |
Connoisseur
Posts: 86
Karma: 10
Join Date: Jan 2020
Device: kindle
|
Ah that's it thank ypu
|
Advert | |
|
02-27-2020, 10:48 AM | #6 |
Unicycle Daredevil
Posts: 13,926
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
There's actually a Sigil plugin that adds these entries automatically for all the fonts you add to the Fonts folder.
|
02-27-2020, 10:50 AM | #7 |
Unicycle Daredevil
Posts: 13,926
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
|
02-28-2020, 11:25 AM | #8 |
Grand Sorcerer
Posts: 27,615
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Just to clarify and recap; this had nothing to do with Sigil. This was incorrect epub coding/font embedding in general. The only reason Comic Sans was working was because it was available in your system fonts. It wouldn't have worked on any reader that didn't have Comic Sans available.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to use font family in original document? | Swifty4635 | Conversion | 5 | 10-23-2019 05:07 AM |
Is there really a need to specify a font-family? | spamis | ePub | 11 | 03-01-2017 06:38 AM |
CSS: font-family fallbacks | ElMiko | Sigil | 4 | 02-08-2012 03:43 PM |
Changing Font Family | thymaster | Sony Reader | 6 | 09-19-2010 01:10 AM |
Font Family should help Contrast | jbruce | Sony Reader | 31 | 04-17-2009 12:43 AM |