![]() |
#1 |
Member
![]() Posts: 15
Karma: 12
Join Date: Nov 2009
Device: sony prs600
|
Embedded fonts in epub
I have made an epub book and it works well. Only I try to embed a Garamond font and it does not show up on the Sony PRS600. The font stays Times New Roman-like.
The underlying HTML file shows up OK in Firefox, CSS and all. I mentiooned the OTF in the content.opf ok... Tried ttf and otf font... all NO GO ! Anyone succeeded in embedding fonts on this machine ? please help ! |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,932
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Have a look at The Secret Adversary by Agatha Christie. It is an ePub with embedded fonts. You can have a look and see how it's done.
https://www.mobileread.com/forums/showthread.php?t=53913 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() Posts: 79
Karma: 42
Join Date: Sep 2009
Device: sony reader touch (prs-600)
|
did you change the CSS to style the text with the new font? just sticking the file into the epub won't change anything (except the size of the epub). don't forget to reference the font file in the manifest, too.
this post here has some details. it says it's for "after calibre" but the process is exactly the same. https://www.mobileread.com/forums/showthread.php?t=61587 i've had no problem embedding a font and having it show up on my prs600, even a japanese font (for a japanese text). |
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 15
Karma: 12
Join Date: Nov 2009
Device: sony prs600
|
fonts in prs600
Yes, I did all those things.
Weird thing is, some <H1> headings show up in the correct font and others do not. And another thing is, that FireFox (with epub plug-in) shows the embedded font alright, but the Adobe Digital Edition program does not, as does not the PRS600. I show some parts of relevant files: the CSS: @font-face { font-weight: normal; font-family: "TrumpMediaevalLTStd-Roman" ; src: url(fonts/TrumpMediaevalLTStd-Roman.otf) ; } h3.toc_heading { margin-left: 24px; font-family: "TrumpMediaevalLTStd-Roman"; } h1 { margin-top:12.0pt; margin-right:0.5px; margin-bottom:24.0pt; margin-left:14.2pt; text-indent:0pt; font-size:140%; font-family: "TrumpMediaevalLTStd-Roman" ; } a HTML file (showing the h3 right): <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/> <link rel="stylesheet" type="text/css" href="ccjr2.css" /> <title>Table of Contents</title> </head> <body> <h3 class="toc_heading">Table of Contents</h3> Another HTML file (H1 showing the STANDARD font, not the mediaeval) FF shows it right, but Adobe and the SOny NOT: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/> <link REL="stylesheet" href="ccjr2.css" type="text/css" /> <title>Introduction</title> </head> <body> <p class="Author" style=" "> Samuel Freeman </p> <h1> Introduction <br/> John Rawls - An Overview </h1> and a piece of the <manifest> part of the OPF: <item id="ClassGarmndItBT" href="fonts/ClassicalGaramondItalicBT.ttf" media-type="application/vnd-ms-truetype"/> <item id="TrumpMediaevalLTStd-Italic" href="fonts/TrumpMediaevalLTStd-Italic.otf" media-type="application/vnd-ms-truetype"/> <item id="TrumpMediaevalLTStd-Roman" href="fonts/TrumpMediaevalLTStd-Roman.otf" media-type="application/vnd-ms-truetype"/> <item id="TrajanProBold" href="fonts/TrajanPro-Bold.otf" media-type="application/vnd-ms-truetype"/> </manifest> Anybody has a solution ?? |
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,246
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Hi Erik,
Does it make a difference if you add font-style: normal; to the @font-face in the CSS i.e. @font-face { font-style: normal; font-weight: normal; font-family: "TrumpMediaevalLTStd-Roman" ; src: url(fonts/TrumpMediaevalLTStd-Roman.otf) ; } |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,932
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You don't need font-weight, but you do need font-style.
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 15
Karma: 12
Join Date: Nov 2009
Device: sony prs600
|
grrrrrrr
Before assembling HTML files into an epub is is absolutely, unequivocally necessary to VALIDATE THE HTML.
As I just found out. Adobe Digital Edition and Sony are by far not as easy-going as Firefox is. Incomplete tag pairs are killing. |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
HTML -> EPUB with no embedded fonts | doremifaso | Calibre | 10 | 09-25-2010 05:56 AM |
iPad iBooks, ePub, embedded fonts & encryption | pdurrant | Apple Devices | 37 | 06-08-2010 01:24 PM |
Opus Opus, ePub and 'embedded' fonts | AnemicOak | Bookeen | 5 | 11-10-2009 12:21 PM |
ePub embedded fonts | JSWolf | Ectaco jetBook | 9 | 09-14-2009 08:43 PM |
ePub + Embedded Fonts | Cygfrydd | ePub | 11 | 03-02-2009 05:56 PM |