Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-16-2013, 04:01 AM   #1
ADelm
Junior Member
ADelm began at the beginning.
 
Posts: 7
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
ADelm is offline   Reply With Quote
Old 02-16-2013, 08:38 AM   #2
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 583
Karma: 1258323
Join Date: Dec 2011
Location: Padova, Italy
Device: Kindle3, Odyssey, eDGe, A60, PRS-T1, iPad3, KoboGlo
Have you tried

Code:
font-family: Rokwell, serif;
(no quotes)?

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.)
AlPe is offline   Reply With Quote
Old 02-16-2013, 09:56 AM   #3
ADelm
Junior Member
ADelm began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2013
Location: Belgium
Device: none - calibre on Windows
The problem is that Rockwell is not a free font.

Alain
ADelm is offline   Reply With Quote
Old 02-16-2013, 10:00 AM   #4
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 583
Karma: 1258323
Join Date: Dec 2011
Location: Padova, Italy
Device: Kindle3, Odyssey, eDGe, A60, PRS-T1, iPad3, KoboGlo
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.
AlPe is offline   Reply With Quote
Old 02-16-2013, 01:36 PM   #5
ADelm
Junior Member
ADelm began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2013
Location: Belgium
Device: none - calibre on Windows
Thanks!

I'll follow your suggestions.
A,d report.
ADelm is offline   Reply With Quote
Old 02-16-2013, 04:00 PM   #6
ADelm
Junior Member
ADelm began at the beginning.
 
Posts: 7
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.
ADelm is offline   Reply With Quote
Old 02-19-2013, 09:42 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,215
Karma: 17169472
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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).
JSWolf is offline   Reply With Quote
Old 02-19-2013, 09:44 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,215
Karma: 17169472
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by ADelm View Post
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;
}
To neaten up your CSS code...

Code:
p {
margin: 0;
text-indent: 1.5em;
text-align: justify;
font-family: Rockwell,serif
}
The lines I removed are because they are default values.
JSWolf is offline   Reply With Quote
Old 02-25-2013, 06:14 AM   #9
ADelm
Junior Member
ADelm began at the beginning.
 
Posts: 7
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.
ADelm is offline   Reply With Quote
Reply

Tags
@font-face, font definition

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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 PDF 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


All times are GMT -4. The time now is 03:14 AM.


MobileRead.com is a privately owned, operated and funded community.