Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-27-2020, 01:10 PM   #1
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
Declaring Different Versions of One Font

I'm making an ePub using the Vollkorn font, and I wound up deciding to use the semi-bold version instead of the bold version for my <strong> text, so I made my @font-face declarations as usual.

Code:
@font-face {
  src: url(../Vollkorn-Regular.ttf);
  font-family: "Vollkorn";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Vollkorn-Italic.ttf);
  font-family: "Vollkorn";
  font-weight: normal;
  font-style: italic;
  font-stretch: normal;
}
@font-face {
  src: url(../Vollkorn-SemiBold.ttf);
  font-family: "Vollkorn";
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Vollkorn-SemiBoldItalic.ttf);
  font-family: "Vollkorn";
  font-weight: bold;
  font-style: italic;
  font-stretch: normal;
}
However, Calibre is throwing up an error because the proper font-family name for the semi-bold fonts is "Vollkorn Semi-Bold".

This is probably a very minor problem but I do want to get it cleared up.

What's the best practices way to declare all these fonts and tell the <body> to use them to get rid of the error?

Last edited by Rand Brittain; 09-27-2020 at 01:18 PM.
Rand Brittain is offline   Reply With Quote
Old 09-27-2020, 02:27 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,462
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Rand Brittain View Post
I'm making an ePub using the Vollkorn font, and I wound up deciding to use the semi-bold version instead of the bold version for my <strong> text, so I made my @font-face declarations as usual.

However, Calibre is throwing up an error because the proper font-family name for the semi-bold fonts is "Vollkorn Semi-Bold".

This is probably a very minor problem but I do want to get it cleared up.

What's the best practices way to declare all these fonts and tell the <body> to use them to get rid of the error?
The error message is correct. If you look at the font, the font-family name is Volkorn SemiBold. To modify this, you can edit the font family name. I used FontForge but there are several other free options. See the attached epub which calibre seems to be happy with. Oddly, calibre internal check is the only one I've run into that complains about the internal font family not matching. EpubCheck does not seem to care.
Attached Files
File Type: epub Font Tester V3 - epub - Ann Onymous.epub (13.36 MB, 167 views)

Last edited by DNSB; 09-27-2020 at 02:29 PM.
DNSB is online now   Reply With Quote
Advert
Old 09-27-2020, 05:01 PM   #3
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: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
The error message is correct. If you look at the font, the font-family name is Volkorn SemiBold. To modify this, you can edit the font family name. I used FontForge but there are several other free options. See the attached epub which calibre seems to be happy with. Oddly, calibre internal check is the only one I've run into that complains about the internal font family not matching. EpubCheck does not seem to care.
It's not really an error. the way the fonts are embedded will work no problem. The fonts do not need the internal name changed.
JSWolf is offline   Reply With Quote
Old 10-02-2020, 06:15 PM   #4
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
Okay, I guess I'll leave it at that.
Rand Brittain is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Last try before declaring PW2 dead ? Cmcm8319 Kindle Developer's Corner 18 08-03-2015 12:14 PM
Declaring default values for columns Snow Sciles Library Management 3 05-16-2014 07:33 AM
Newbie: Sigil versions vs. OS versions? bmwill Sigil 3 06-07-2013 09:40 PM
Free (Kindle) Declaring Spinsterhood by Jamie Lynn Braziel arcadata Deals and Resources (No Self-Promotion or Affiliate Links) 0 12-09-2011 06:07 PM
Sur Amazon, des versions électroniques plus chères que les versions papier IreneDelse Amazon Kindle 8 08-29-2008 08:35 AM


All times are GMT -4. The time now is 01:35 AM.


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