![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
|
Embedding fonts
Is it possible to embed fonts in EPUBs? If so, how do I practically do it?
Will such embedded fonts work with Sony Readers, specifically my PRS-500? Last edited by AprilHare; 12-21-2009 at 05:50 PM. |
![]() |
![]() |
![]() |
#2 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,386
Karma: 142887248
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
See https://www.mobileread.com/forums/showthread.php?t=36361 for more information. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 15
Karma: 12
Join Date: Nov 2009
Device: sony prs600
|
sure you can. You can put them anywhere in the directory structure, as long as you tell the .opf file where they are.
Use .otf fonts. Here is a CSS entry in one of my epubs (the font file is in the fonts directory): @font-face { font-weight: bold; font-style: normal; font-family: "MyriadProBold" ; src: url(fonts/MyriadPro-Bold.otf) ; } h1 { font-size:20pt; margin-bottom:20px; font-weight: bold; font-family: "MyriadProBold" ; text-align: right; } This is the entry in content.opf: <item id="MyriadProBold" href="fonts/MyriadPro-Bold.otf" media-type="application/vnd-ms-opentype"/> |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Well, legally speaking, you can't embed Myriad Pro (unencrypted) if you're going to distribute the PDFs to others. There are many free fonts you can legally embed however. Look at fontsquirrel.com or kernest.com.
Last edited by frabjous; 12-25-2009 at 12:19 AM. |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
|
I'm trying to remember if files need to be stored not compressed, and in a specific order?
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 15
Karma: 12
Join Date: Nov 2009
Device: sony prs600
|
Not fonts: they just have to be zipped into the epub, in the exact place where you say they must be (youe "say" that in the content.opf file AND in the .CSS file of course), eg. in a .\font folder.
Only the container.xml has a pre-defined place AND name: .\META-INF\container.xml. As it is a real nuisance to have to tell the reader IN TWO PLACES, where a file must be found, I am currently building a little program to automatically make an epub FROM JUST THE HTML AND CSS files. Nothing more, nothing less. If you make valid XHTML "pages" and adhere to some easy extra rules when writing the XHTML, you need not be concerned with difficulties like building an .opf or .ncx or even an TableOfContents.html file yourself. The idea behind the program will be: if you can write XHTML and CSS, you get an epub for free. I have Perl and ANT scripts that do just this, but i want to make a Windows program. That may be even easier to install. To get Perl, ANT and the XHTML/XML/CSS validation programs working is a little bit cumbersome for some. If there is any interest in the two scripts, I may publish them on my site. |
![]() |
![]() |
![]() |
#7 | |
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:
|
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedding fonts in EPUB? | Acey | Calibre | 19 | 11-06-2011 10:01 AM |
Embedding fonts | JaneFancher | Calibre | 14 | 04-10-2010 09:28 PM |
Legality of embedding fonts? | djgreedo | Workshop | 15 | 11-26-2009 02:14 AM |
Embedding Fonts with Indesign...... | brewt | ePub | 6 | 01-01-2009 10:07 PM |
Embedding fonts | jash | Calibre | 2 | 09-09-2008 05:05 PM |