![]() |
#1 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
@media amzn-kf8 and @font-face
According to --
http://www.bergsland.org/2012/10/ann...blishing-wins/ Quote:
Code:
@media amzn-kf8{ @font-face { font-family: 'AmeriGarmnd BT'; font-weight: normal; font-style: normal; src: url('../Fonts/AmeriGarmnd BT Roman.ttf'); } @font-face { font-family: 'AmeriGarmnd BT'; font-weight: bold; font-style: normal; src: url('../Fonts/AmeriGarmnd BT Bold.ttf'); } @font-face { font-family: 'AmeriGarmnd BT'; font-weight: normal; font-style: italic; src: url('../Fonts/AmeriGarmnd BT Italic.ttf'); } @font-face { font-family: 'AmeriGarmnd BT'; font-weight: bold; font-style: italic; src: url('../Fonts/AmeriGarmnd BT Bold Italic.ttf'); } } Searching seems to indicate that you cannot have @font-face inside a @media, but it does seem to work Question -- Is the Calibre error message wrong, or am I, or is there a better way to handle embedded fonts? I didn't know there was a @media 'thing' until a few days ago ![]() Paul |
|
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As per the CSS spec you do not put @font-face inside @media, which is why calibre warns you about it.
As far as I know, there is no need to put them inside @media for azw3, just use them the same as you would in epub, they will work. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Thank you
1. Your answer helped me to find a CSS mistake in a related style sheet. 2. The more robust debug (compared to Sigil) also points out an issue with the 4 variations of the embedded font (R, B, BI, and I) not having the same family name, but each has a unique family name (FONTNAME, FONTNAME-BOLD, FONTNAME-ITALIC", etc.) I have some more work to do Thanks again Paul |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle Previewer Font Face grayed out? | katl | Kindle Formats | 7 | 05-01-2013 05:44 PM |
Am I using @font-face correctly? | phossler | Sigil | 12 | 11-30-2012 04:38 PM |
Font size problems with KF8 - solved | Tugger | Kindle Formats | 21 | 10-05-2012 09:47 AM |
KF8, Sigil, and font size | Paddlin | Kindle Formats | 0 | 04-24-2012 05:41 PM |
TWO OPF files or something like Media Queries in the OPF file for KF8 and MOBI? | DHahn | Kindle Formats | 3 | 04-17-2012 04:06 AM |