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

Go Back   MobileRead Forums > E-Book Software > EPUBReader

Notices

Reply
 
Thread Tools Search this Thread
Old 03-01-2010, 07:29 PM   #1
b.tarde
Junior Member
b.tarde began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2010
Device: EPubReader
Another font embedding problem

This is driving me a little crazy. I've made an e-pub with embedded fonts, and it displays correctly in Calibre and ADE. I've read the thread from last December recommending testing by loading a page from the unzipped epub in FireFox: I've done that, and the font gets displayed correctly. The epub validates with epubcheck and the CSS validates as version 3 in the W3C validator. But the font does not get displayed in the FireFox EPubReader. So what can be going on? Here are the the @font-face declarations:

@font-face{font-family: JunWeb;
font-weight: normal;
font-style: normal;
src: url("JunWeb-Regular.ttf") format("truetype");}
@font-face{font-family: JunWeb;
font-weight: bold;
font-style: normal;
src: url("JunWeb-Bold.ttf") format("truetype");}
@font-face{font-family: JunWeb;
font-weight: normal;
font-style: italic;
src: url("JunWeb-Italic.ttf") format("truetype");}
@font-face{font-family: JunWeb;
font-weight: bold;
font-style: italic;
src: url("JunWeb-BoldItalic.ttf") format("truetype");}

And the invocation of the font:

body {font-family: JunWeb, serif;}

And in case anyone want to look at this in context, I've posted the whole epub here:

http://faculty.virginia.edu/OldEnglish/secret/oeg.epub

I'd hugely appreciate any advice here. EPubReader is a terrific add-on, and I'd like to get my files to work correctly with it!

Thanks,
Peter
b.tarde is offline   Reply With Quote
Old 03-02-2010, 06:03 AM   #2
mikelv
Developer of EPUBReader
mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.
 
Posts: 262
Karma: 1922
Join Date: Oct 2009
Device: none
Quote:
Originally Posted by b.tarde View Post
This is driving me a little crazy. I've made an e-pub with embedded fonts, and it displays correctly in Calibre and ADE. I've read the thread from last December recommending testing by loading a page from the unzipped epub in FireFox: I've done that, and the font gets displayed correctly. The epub validates with epubcheck and the CSS validates as version 3 in the W3C validator. But the font does not get displayed in the FireFox EPubReader. So what can be going on?
Hi Peter, thanks for your feedback!

I had a look at your ePub and must admit that I couldn't see a difference between loading it in EPUBReader and loading it in FF directly.

I guess you have checked the FF option for embedded fonts, because you say you can see the right font when you open it in FF directly.

Please post a screenshot from Calibre or ADE and from EPUBReader. Please mention additionally which page you opened.

Last edited by mikelv; 03-02-2010 at 06:06 AM.
mikelv is offline   Reply With Quote
Old 03-02-2010, 09:05 AM   #3
b.tarde
Junior Member
b.tarde began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2010
Device: EPubReader
Thanks for the quick reply. Here's ADE:



And here's Calibre:



Calibre has got issues of its own: this version does not display italics (an acknowledged bug), and it looks as if it may be having trouble with bold as well. But it is loading the embedded font(s).

The font is definitely embeddable (Open Source, etc.), but I've double-checked just to make sure.
b.tarde is offline   Reply With Quote
Old 03-02-2010, 09:48 AM   #4
mikelv
Developer of EPUBReader
mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.
 
Posts: 262
Karma: 1922
Join Date: Oct 2009
Device: none
Thanks for uploading.

Attached you find a screenshot how it looks like in EPBUReader. If I open the file directly in FF, I can see no difference. This would mean, if there is a problem, it's not a special EPUBReader problem, but a FF problem.

Okay, perhaps I'm blind, but I can't see a big difference between my screenshot and your screenshots . Where do you see a problem?
Attached Thumbnails
Click image for larger version

Name:	oeg.jpg
Views:	260
Size:	28.3 KB
ID:	46897  
mikelv is offline   Reply With Quote
Old 03-02-2010, 10:12 AM   #5
b.tarde
Junior Member
b.tarde began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2010
Device: EPubReader
You're not blind: you are definitely seeing the correct font. And I'm completely flummoxed, for I am definitely *not* seeing the correct font in FF 3.6/Mac or FF 3.5.x/Linux. Here's what I'm seeing (sorry I haven't figured out that neat thumbnail thing):



Definitely Times. My copy of FF is set to allow pages to choose their own fonts: and they do! I suppose there must be a difference in my configuration directory somewhere. But where?
b.tarde is offline   Reply With Quote
Old 03-02-2010, 12:23 PM   #6
b.tarde
Junior Member
b.tarde began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2010
Device: EPubReader
Further notes:

I've tried this with other Open Source fonts (Gentium, DejaVu): no dice.

I've cleaned out the Mac font cache and restarted the computer: no dice.

I've tried it out in a new, clean user account: no luck.

I am completely flummoxed.
b.tarde is offline   Reply With Quote
Old 03-02-2010, 01:12 PM   #7
mikelv
Developer of EPUBReader
mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.
 
Posts: 262
Karma: 1922
Join Date: Oct 2009
Device: none
I think I found the reason for the problem. Because the font you use seems to be very similar to Times, I didn't see that the pages in EPUBReader look different than the one directly in FF .

It is probably caused by this statement in EPUBReader's css-file:

"font-family: parent !important;"

This statement is used for "body, div, span, p". The css is applied to the pages of the epub-file. I've added this line because the users should be able to change the font of the epub. If the users want to have "arial", "parent" is replaced by "arial" and everything works fine.

"parent" is used, when the font defined in the book should be used. Obviously seems "parent" not the right value to reach this goal. Any idea which is the right value?

Sorry for the headache this may have caused .
mikelv is offline   Reply With Quote
Old 03-02-2010, 02:34 PM   #8
b.tarde
Junior Member
b.tarde began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2010
Device: EPubReader
I'm glad if my little problem ends up contributing to an improvement in EPubReader. But unfortunately my CSS is not nearly advanced enough to understand the issue, let alone help to solve it.

I'll hope for a fix in the next release.
b.tarde is offline   Reply With Quote
Old 03-03-2010, 05:26 AM   #9
wdonne
ISV
wdonne began at the beginning.
 
wdonne's Avatar
 
Posts: 19
Karma: 10
Join Date: Feb 2010
Location: Belgium
Device: iPhone
The oeb-page-head and oeb-page-foot display values

Hello,

Those values are not supported, in which case they should be treated as "none". In understand Firefox doesn't understand it and hence uses the default display type, which is "inline". A simply way to implement this is to scan all CSS-files and replace those values with "none". You don't even need a proper CSS-parser for this.

Best regards,

Werner.
wdonne is offline   Reply With Quote
Old 03-09-2010, 09:18 AM   #10
vizca
Junior Member
vizca began at the beginning.
 
vizca's Avatar
 
Posts: 1
Karma: 10
Join Date: Mar 2010
Device: Inves-600
Hi, sorry, i forget my inglish, but i will try

Don't use embebed fonts.

The philosophy of epubs is that can be readed in all platforms. If you embebed the font, the first problem is the doc size, and the permissions to reproduce asociated to this font (© or whatever)... ADE work properly in this cases if you did' correctly, but i think it's just the one program that can do it. Calibre ignore this fonts and use the fonts that you selected on preferences: one kind of font for serif and one for non-serif.

The first way:

If you want use fonts on epubs, try to use opentype fonts, actually are usefull than truetype. Never use postscript fonts.

I can't download your epub, so i don't know if you add the fonts nut i can read your template and i think where is the problem
Try to put a folder inside the OEBPS folder and name it “Fonts” (obviously...) and ad this lines on the template.css:
@font-face {
font-family: "Adobe Garamond Pro";
font-style: normal;
font-weight: normal;
src:url(Fonts/AGaramondPro-Regular.otf);
}

@font-face {
font-family: "Adobe Garamond Pro";
font-style: italic;
src:url(Fonts/AGaramondPro-Italic.otf);
}

@font-face {
font-family: "Adobe Garamond Pro";
font-weight: bold;
src:url(Fonts/AGaramondPro-Semibold.otf);
}

@font-face {
font-family: "Adobe Garamond Pro";
font-style: italic;
font-weight: bold;
src:url(Fonts/AGaramondPro-SemiboldItalic.otf);
}
I have used Adobe Garamond Pro for this example. Look at this line:
src:url(Fonts/AGaramondPro-SemiboldItalic.otf);

in the url camp must wirte the corect route to the FONTS folder, just the folder place inside OEBPS.

If you need a example, write me a pm and i will send you a complet epub...

Second way:

Maybe the problem is that you only want to use italics and bolds fonts.

How to explain?... i'll try to resume.

Use character stiles on your program (i use Indesign) for bold and italic; use paragraph styles to try to mantein the paragraph structure. Them export the doc like ADE including the styles like template.

You will lose all the styles, but everything (paragraphs and characters) are marked now. Open the template in Dreamwaver, Coda or oxygen and change the span like this:
span.italic {
font-style:italic;
}
span.bold-italic{
font-weight:bold;
font-style:italic;
}
span.bold{
font-weight:bold;
}
Look that i named the span like the style but you can use span.anothername but is the same name used on the character/paragraph styles Indesign palettes

Save, close, and compress the MIMETYPE, META-INF and OEBPS in zip format. rename the extension with epub and voila!

Finally always try the epub in other system or ereader hardware.

I know that this methods are less friendly, but is the way that report better results. Maybe you do something similar

Espero que te sea de ayuda (I hope that help you)

Un saludo.
vizca is offline   Reply With Quote
Old 03-09-2010, 10:27 AM   #11
b.tarde
Junior Member
b.tarde began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2010
Device: EPubReader
Thanks for the feedback. I've read in various places that it's bad form to embed fonts, but in some cases it's unavoidable. My book uses phonetic characters and other odd things that aren't found on all systems. ADE in particular is infamous for its extremely limited character set: it won't even display Eastern European languages properly. It's often pointed out that Math and science texts need embedded fonts.

I can't help wondering where the recommendation that epubs use .otf fonts comes from. I've seen it in the Adobe specs, and that's no surprise, since that's what Adobe sells; but my TrueType font works well in ADE and (mostly) Calibre. Does anyone know why it's so often stated that .otf fonts are preferable in epubs? i don't get it.

I tried various directory arrangements while working with this problem, on the theory that EPubReader or Firefox was being picky about their locations: nothing made any difference. And it seems pretty well established now that there's a problem in the CSS that ships with EPubReader.

Finally I'll just say that if our excellent developer wants any help testing a fix, I'll be more than glad to help!
b.tarde is offline   Reply With Quote
Old 03-11-2010, 08:51 AM   #12
mikelv
Developer of EPUBReader
mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.
 
Posts: 262
Karma: 1922
Join Date: Oct 2009
Device: none
Quote:
Originally Posted by b.tarde View Post
Finally I'll just say that if our excellent developer wants any help testing a fix, I'll be more than glad to help!
I've created a special version which doesn't change the font in the EPUBReader css. If you still don't see your font with this version, it's not a problem caused by EPUBReader. If you like to try it, please send me a private message with your emailaddress.
mikelv is offline   Reply With Quote
Old 03-11-2010, 02:40 PM   #13
mikelv
Developer of EPUBReader
mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.mikelv once ate a cherry pie in a record 7 seconds.
 
Posts: 262
Karma: 1922
Join Date: Oct 2009
Device: none
Quote:
Originally Posted by mikelv View Post
I've created a special version which doesn't change the font in the EPUBReader css. If you still don't see your font with this version, it's not a problem caused by EPUBReader. If you like to try it, please send me a private message with your emailaddress.
Peter made some tests with this version and the problem seems to be fixed. The fix will be available in the next official version.
mikelv 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
Embedding .symbol font? Kivgaen Sigil 23 06-24-2010 10:13 PM
Directionality, font-embedding and ADE lecteur9 ePub 6 12-04-2009 07:26 AM
Automatic font embedding - or something else? pepak Calibre 4 06-01-2009 04:38 PM
Font embedding/enryption/obfuscation ckirchho ePub 5 03-14-2009 11:28 AM
Font embedding error Peto Calibre 2 08-05-2008 11:40 AM


All times are GMT -4. The time now is 06:04 AM.


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