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-05-2012, 06:10 PM   #1
mateo999
Junior Member
mateo999 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2012
Device: none
Embedded fonts not showing up in ADE

Hello,

I'm currently creating some epubs that use embedded fonts. My problem is that, while some fonts do show up in Adobe Digital Editions, others do not. I'm using the same code each time, just changing it for the appropriate font. The fonts themselves come from Google's Webfonts collection.

This is an example of my CSS:

Code:
@font-face {
				font-family : 'FanwoodItalic';
				src: url(../fonts/Fanwood/Fanwood-Italic-webfont.ttf);
				font-style: normal;
		}
		h2 {
			font-family: 'FanwoodItalic';
		}
This example doesn't work in ADE, although the fonts show up every time in iBooks.

What am I doing wrong???

Thanks,
mateo999 is offline   Reply With Quote
Advert
Old 02-06-2012, 10:00 PM   #2
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
As I recall, the name in the font-family line must be the same as the name specified in the font file - FontForge reports the name as 'Fanwood-Italic'

Try 'Fanwood-Italic' in the font-family lines and let us know if it works.
pholy is offline   Reply With Quote
Old 02-09-2012, 09:16 AM   #3
Keroberos
Zealot
Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.
 
Keroberos's Avatar
 
Posts: 127
Karma: 194002
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
Does the font's filename/path in the css and content.opf files match (i.e. capitalization, punctuation, spaces)?

Last edited by Keroberos; 02-09-2012 at 09:21 AM. Reason: Punctuation
Keroberos is offline   Reply With Quote
Old 02-13-2012, 01:45 PM   #4
mateo999
Junior Member
mateo999 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2012
Device: none
Updated: sample epub attached

Hello,

Thank you both for your responses. I've tried again with the font name provided as Fanwood-Italic. It doesn't seem to make a difference.

In all cases, however, the font is displayed correctly in ADE 1.8 Preview. It's only in ADE 1.7 (the current version) that the font is ignored. This happens however I name the font.

In any case, here's the relevant section of my updated CSS. This CSS file is in the styles/ directory:

Code:
		@font-face {
				font-family: 'Fanwood-Italic';
				src: url(../fonts/Fanwood/Fanwood-Italic-webfont.ttf);
				font-style: normal;
		}
		h2 {
			page-break-before: always;
			font-family: 'Fanwood-Italic';
			font-size: 1.4em;
			text-align: center;
			margin-top: 0em;
			margin-bottom: 1em;
		}
And this from the book.opf file. Please note that the book.opf file is in the root, whereas the style.css is in the style directory, hence the '../' in the CSS. Putting style.css in the root and changing the CSS accordingly still makes no difference:

Code:
	<manifest>
		<item id="coverPage" href="CoverPage.html" media-type="application/xhtml+xml" />
		<item id="coverImage" href="images/img_1329158139801.jpg" media-type="image/jpeg" />
		<item id="ncx" href="book.ncx" media-type="application/x-dtbncx+xml" />
		<item id="h1_font" href="fonts/Fanwood/Fanwood-Italic-webfont.ttf" media-type="application/x-font-ttf" />
		<item id="css_css1" href="styles/styles.css" media-type="text/css" />
		<item id="chapter1" href="Section1.html" media-type="application/xhtml+xml" />
		<item id="chapter2" href="Section2.html" media-type="application/xhtml+xml" />
		<item id="chapter3" href="Section3.html" media-type="application/xhtml+xml" />
	</manifest>
Grateful for any further suggestions!
Attached Files
File Type: epub ebk.epub (902.5 KB, 144 views)

Last edited by mateo999; 02-13-2012 at 02:08 PM. Reason: Attached ebook for testing
mateo999 is offline   Reply With Quote
Old 02-13-2012, 02:04 PM   #5
mateo999
Junior Member
mateo999 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2012
Device: none
Update: it seems that, irrespective of how I name the fonts, ADE 1.7.2 will display some fonts, but not others.

Droid Serif Regular displays correctly.

Whereas Fanwood Italic and Fanwood Regular (for example - they're not the only ones) are ignored.

Could it be that ADE 1.7.2 simply doesn't like some fonts? As mentioned in the previous post, ADE 1.8 preview appears to display all fonts correctly.
mateo999 is offline   Reply With Quote
Advert
Old 02-13-2012, 02:24 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 15,701
Karma: 83282878
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Could it be that ADE 1.7.2 simply doesn't like some fonts?
Very possible. I've seen reports of other fonts that ADE 1.7.2 just doesn't like for whatever reason. Wellrock Slab is one.

My guess is that if you try to validate the fonts with something like FontForge, you'll find that the fonts that ADE doesn't like do not pass all tests with flying colors. Perhaps ADE 1.8 has decided to be a little less picky about 100% compliant font-files.
DiapDealer is offline   Reply With Quote
Old 02-13-2012, 03:05 PM   #7
mateo999
Junior Member
mateo999 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2012
Device: none
Thanks for the suggestion. I'll try that.
mateo999 is offline   Reply With Quote
Old 02-13-2012, 06:06 PM   #8
Keroberos
Zealot
Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.
 
Keroberos's Avatar
 
Posts: 127
Karma: 194002
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
Yeah, I've seen ADE 1.7.2 choke on fonts that have errors in them.

Also, your sample ePUB does not have any fonts embedded in it.
Keroberos is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
embedded fonts Wally S Workshop 15 01-21-2012 03:57 PM
Embedded fonts dicknskip Sigil 27 12-01-2011 09:24 AM
Embedded fonts? Greenmantle Kobo Reader 66 07-27-2011 08:20 PM
Embedded fonts, Calibre, and choice of fonts AlexBell ePub 8 05-30-2010 06:00 AM
iPad Embedded Fonts JSWolf Apple Devices 24 04-26-2010 02:41 PM


All times are GMT -4. The time now is 07:05 PM.


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