Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-12-2009, 11:42 AM   #166
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by dpierron View Post
I may be able to help if you want, feel free to send me a private message so we can arrange for a transfer of your example file.
Thank you so much.

This is the sample ebook. Please unpack the attached zip package. There are 3 files:
1. "sample_embed_font.epub" is the ebook with embedded font and it's ok in ADE.
2. "sample_without_font.epub" is the ebook without embedded font and I made it to look for font in the same directory where the epub file resides. In ADE, every glyph of the ebook is "?".
3. "WenQuanYiZenHei.ttf" is the font to be used by "sample_without_font.epub".
Please put all the three files in the same dir.
Both the ebook contents and font are freely distributeable.
Attached Files
File Type: zip sample.zip (9.07 MB, 439 views)

Last edited by ericshliao; 10-12-2009 at 11:56 AM.
ericshliao is offline   Reply With Quote
Old 10-12-2009, 01:44 PM   #167
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
Okay, I'll have a look !

Dave.
dpierron is offline   Reply With Quote
Old 10-12-2009, 01:49 PM   #168
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
So, it's after hours, and I'm home in front of my iMac ; this means I don't have Windows at hand, so I'll finish testing tomorrow.

But, the first thing I can tell you is that your 'without font' file, with this code, works perfectly :

Code:
@font-face {
  font-family : MyFont;
  font-weight : normal;
  font-style: normal;
  src : url(res:///Users/david/Downloads/sample/WenQuanYiZenHei.ttf);
}
Of course, I expanded everything in /Users/david/Downloads/sample

Tomorrow, I'll test and confirm wether it's a Windows problem or something else...

Hope this helps,
David.
dpierron is offline   Reply With Quote
Old 10-12-2009, 02:01 PM   #169
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by dpierron View Post
I expanded everything in /Users/david/Downloads/sample
David,

Thanx for your help.

I want to investigate into how to set font path, both relative and absolute, in Windows XP. In "sample_without_font.epub", I use relative path because I don't know where you would like to put the font file.
In Windows XP, absolute path will start with a drive letter, such as C:. That makes it different from those unix family. How to set it properly bothers me very much.
ericshliao is offline   Reply With Quote
Old 10-12-2009, 02:31 PM   #170
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Quote:
Originally Posted by wallcraft View Post
I tried on my EZ Reader (Hanlin V3) and it does not accept fonts in /Data or /home.
Tamzilla worked out how to do this on Hanlins (use res:///abook for the root of the SD card), see Fonts and Epub - What works on Sony, Works for Pocket Pro too!.
wallcraft is offline   Reply With Quote
Old 10-13-2009, 05:41 AM   #171
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
Well, I tested with Windows XP and ADE and it definitively comes from an ADE bug. Let me explain...
I expanded the ePub file into a folder, edited the CSS file, setting an absolute path for the font resource and then opened the HTML file with Firefox ; guess what, it worked out of the box.
When I did the exact same thing directly in the ePub file (same edit) and opened it with ADE, it didn't work (showing question marks instead of asiatic-looking thingies).
So, it has something to do with ADE ; either it's a bug, or it's an obscure point of the ePub standard that ADE enforces ? I can't tell...

Hope this helps,
David.
dpierron is offline   Reply With Quote
Old 10-13-2009, 08:33 AM   #172
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
David,
Thanx for your test and advice. I have tried various combination of url strings that I thought correct, but ADE just don't accept them. I've never thought it's fault of ADE. Now I know the problem may come from ADE, not from my url strings.
ericshliao is offline   Reply With Quote
Old 10-13-2009, 09:50 AM   #173
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
Not really from ADE itself, but from ADE in Windows ; the Mac version of ADE eats externalized font resources at every breakfast
dpierron is offline   Reply With Quote
Old 10-13-2009, 10:09 AM   #174
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Quote:
Originally Posted by dpierron View Post
Well, I tested with Windows XP and ADE and it definitively comes from an ADE bug. Let me explain...
I expanded the ePub file into a folder, edited the CSS file, setting an absolute path for the font resource and then opened the HTML file with Firefox ; guess what, it worked out of the box.
When I did the exact same thing directly in the ePub file (same edit) and opened it with ADE, it didn't work (showing question marks instead of asiatic-looking thingies).
So, it has something to do with ADE ; either it's a bug, or it's an obscure point of the ePub standard that ADE enforces ? I can't tell.
I don't think this is complicated. If ADE (or a web browser for that matter) fails to find the referenced font then it uses the default font, and hence the question marks. The "res://" is with respect to the app's root directory, but that does not have to be the system's root directory. So, the Mac ADE has the expected root but the Window's ADE has some other root - which we don't know (or I guess it could have no root at all, for "security" reasons).

There are a couple of examples of this with mobile ADE:

The Windows Sony ebook library reader has a root of C:\Program Files\Sony\Reader\Data\bin.

It isn't clear what the Hanlin's (V3 and V5) root is, but it isn't the root of the system filesystem because so far only the SD card appears to be visible (at res:///abook) and not the user-accessible internal memory.

Under Linux (or Unix, e.g. on the Mac), softlinks can probably be used to build whatever kind of access restrictions for "res://" the app developer wants. I don't think this is as easy under Windows, or on Windows-like filesystems.
wallcraft is offline   Reply With Quote
Old 10-13-2009, 10:21 AM   #175
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
Interesting !
dpierron is offline   Reply With Quote
Old 10-13-2009, 11:04 AM   #176
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by wallcraft View Post
I don't think this is complicated. If ADE (or a web browser for that matter) fails to find the referenced font then it uses the default font, and hence the question marks. The "res://" is with respect to the app's root directory, but that does not have to be the system's root directory.
That's quite reasonable. I will have some test. Thanx for the tips.
ericshliao is offline   Reply With Quote
Old 10-13-2009, 06:10 PM   #177
yekim54
What the Dog Saw
yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.
 
yekim54's Avatar
 
Posts: 311
Karma: 981684
Join Date: Jul 2008
Location: Dunn Loring
Device: Sony PRS-650, Surface3
Quote:
Originally Posted by wallcraft View Post
The Windows Sony ebook library reader has a root of C:\Program Files\Sony\Reader\Data\bin.
Thank you so much for this bit of information. You've solved one of the problems that's been vexing me for weeks.
yekim54 is offline   Reply With Quote
Old 10-13-2009, 06:30 PM   #178
gregcd
Connoisseur
gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!gregcd rocks like Gibraltar!
 
gregcd's Avatar
 
Posts: 90
Karma: 100000
Join Date: Jan 2009
Location: New Zealand
Device: prs-t1, prs-650 to sell
I've had a coulpe months with caecilia and felt its time for a change. This is a slab serif that has some modern flair:


{pic}

It's Museo 300. Three different weights are available free at http://new.myfonts.com/fonts/exljbris/museo/
Attached Thumbnails
Click image for larger version

Name:	img-X141004-0001.jpg
Views:	635
Size:	176.5 KB
ID:	37384  
gregcd is offline   Reply With Quote
Old 10-13-2009, 07:31 PM   #179
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
Quote:
Originally Posted by gregcd View Post
I've had a coulpe months with caecilia and felt its time for a change. This is a slab serif that has some modern flair:


{pic}

It's Museo 300. Three different weights are available free at http://new.myfonts.com/fonts/exljbris/museo/
There's hardly anything slabby about that serif (and it barely comes across as a serif, too). I could see it working pretty well as a display typeface in certain situations, but it'd drive me crazy to see it used as a body font. But to each his own...
Abecedary is offline   Reply With Quote
Old 10-15-2009, 09:36 AM   #180
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,931
Karma: 128903250
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 gregcd View Post
I've had a coulpe months with caecilia and felt its time for a change. This is a slab serif that has some modern flair:


{pic}

It's Museo 300. Three different weights are available free at http://new.myfonts.com/fonts/exljbris/museo/
Not bad, but what I see is an issue is that's not ePub you are showing and the font does not have italics or bold italics from the link you posted. So it really doesn't work as a true font family. The screen shot is LRF. And LRF simulates bold, italic, and bold/italic. In order to be useful for the main body text in an ePub eBook, it has to be a complete font family.
JSWolf is offline   Reply With Quote
Reply

Tags
epub, fonts


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Reader With Custom Fonts and Full Justification? Loose_Appeal Which one should I buy? 2 07-16-2010 07:16 AM
ePub with custom .css on a 505 dicknskip Sony Reader Dev Corner 3 06-09-2010 11:34 PM
Custom TTF fonts in MOBI books? jpt Astak EZReader 21 11-21-2009 08:24 AM
Test for custom entities in ePUB Jellby ePub 9 05-27-2009 06:45 AM


All times are GMT -4. The time now is 03:58 AM.


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