![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Feb 2013
Location: Belgium
Device: none - calibre on Windows
|
Inverse behaviour of fonts
Hi!
I did define in the stylesheet a font like this (example for p): p { margin:0pt; text-indent:1.5em; text-align: justify; font-family: "Rokwell",serif; font-size: 1.00em; widows: 2; orphans: 2; } In another book I did suppress the font-family line. I didn't define a @font-face. I Calibre and in FBreader (under Windows 7) I defined the default font for serif as Rokwell. (I do have Rokwell on my computer) The book with the defined font-family appears as sans-serif and the one without definition appears with Rokwell. But in both cases, italics are sans-serif! Any suggestion? Should there always be an "src: url..." line in the definition of a @font-face Thanks, Alain |
![]() |
![]() |
![]() |
#2 |
Digital Amanuensis
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
Have you tried
Code:
font-family: Rokwell, serif; Otherwise, if you embed the font in the eBook, define it with @font-face in the CSS and it should work. (Note: Calibre has problems with embedded fonts.) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Feb 2013
Location: Belgium
Device: none - calibre on Windows
|
The problem is that Rockwell is not a free font.
Alain |
![]() |
![]() |
![]() |
#4 |
Digital Amanuensis
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
I see.
Looking for the font, I have just noticed: "Rockwell" has a 'c', while your code above does not. Double check that. BTW, for a better test of embedded fonts, I suggest to use Readium in Chrome or Lucifox in Firefox. |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Feb 2013
Location: Belgium
Device: none - calibre on Windows
|
Thanks!
I'll follow your suggestions. A,d report. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Feb 2013
Location: Belgium
Device: none - calibre on Windows
|
OK, the problem was the misspelled name of the font.
Everything seems all right now. I'll make all checks. |
![]() |
![]() |
![]() |
#7 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,004
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
It might work if the font is installed on your computer. But it won't work if you want to read the ePub away from your computer. In that case, you have to embed the font(s).
|
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,004
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
p { margin: 0; text-indent: 1.5em; text-align: justify; font-family: Rockwell,serif } |
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Feb 2013
Location: Belgium
Device: none - calibre on Windows
|
Thanks for the suggestion on cleaning the code.
I'll extend this to other parts of the style sheet. |
![]() |
![]() |
![]() |
Tags |
@font-face, font definition |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Test behaviour different to Calibre behaviour | louwin | Library Management | 2 | 04-12-2012 07:34 PM |
Photos are Negative (Inverse) | nickbaer | Calibre | 5 | 03-18-2010 09:26 AM |
text inverse feature in adobe reader? | sciredz | 2 | 03-10-2010 06:35 PM | |
iPhone Inverse Display and Battery Life | Timoleon | Apple Devices | 0 | 10-24-2009 01:50 PM |
Cybook Gen3---contrast inverse | Cino | Bookeen | 9 | 07-02-2009 09:53 AM |