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

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > Astak EZReader

Notices

Reply
 
Thread Tools Search this Thread
Old 10-09-2009, 10:48 PM   #1
tamzilla
Zealot
tamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with others
 
tamzilla's Avatar
 
Posts: 109
Karma: 2781
Join Date: Sep 2009
Location: VA, USA
Device: nook, Ipod touch
Smile Fonts and Epub - What works on Sony, Works for Pocket Pro too!

I saw the following thread which had directions on how to change the font in ePub files on the Sony readers and thought that this would have to work on the Pocket Pro too:

http://www.mobileread.com/forums/showthread.php?t=36361

Well, after much teeth gnashing, I finally got an ePub file to use one of the fonts I had put in my /fonts directory instead of the default Times New Roman. This may work for the 6" EZReader too, since I got the directory information from the documentation included in the SDK for the Hanlin V3.

This will only work for unencrypted ePub files, since you have to edit the ePub's CSS file to make this work.

Add the following to the ePub's CSS file:

Code:
@font-face {
  font-family: "Constantia";
  font-weight: normal;
  font-style: normal;
  src: url(res:///abook/fonts/CONSTAN.TTF);
}
@font-face {
  font-family: "Constantia";
  font-weight: bold;
  font-style: normal;
  src: url(res:///abook/fonts/CONSTANBD.TTF);
}
@font-face {
  font-family: "Constantia";
  font-weight: normal;
  font-style: italic;
  src: url(res:///abook/fonts/CONSTANI.TTF);
}
@font-face {
  font-family: "Constantia";
  font-weight: bold;
  font-style: italic;
  src: url(res:///abook/fonts/CONSTANBI.TTF);
}

body { font-family: "Constantia", serif;}
Substitute the font you want to use for Constantia. The directory and file names are case sensitive, so make sure they match what is on your reader. If you use Calibre, you can add this in the extra CSS box and calibre will add it to the ePub's CSS file when you convert the file.

I noticed that one of the ePub files I did this to took longer than normal to load and took longer than normal to switch zoom sizes, but the page turn time was the same. I haven't read much in the ePub yet since I just got it working so I have no idea if it will make the file more susceptible to crashing. Try this at your own risk!!!
tamzilla is offline   Reply With Quote
Old 10-09-2009, 11:46 PM   #2
oncdoc
Addict
oncdoc has a complete set of Star Wars action figures.oncdoc has a complete set of Star Wars action figures.oncdoc has a complete set of Star Wars action figures.oncdoc has a complete set of Star Wars action figures.
 
Posts: 299
Karma: 300
Join Date: May 2009
Device: kindle, pocket pro
i will just wait for official epub book support.
oncdoc is offline   Reply With Quote
Old 10-10-2009, 03:00 AM   #3
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,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
Great detective work tamzilla.

This does not work for DRMed ePubs, obviously, but it does allow much smaller files than using embedded fonts in DRM-free ePubs. Also, the fonts directory probably needs to be on the SD card (not the internal memory).

Note that the simplest approach of all is to redefine the default fonts (serif, sans-serif, monospace) in the font-face. That way you don't even need a body over-ride. Also, the default font if none is specified is serif, but the serif and san-serif font can be the same (both san-serif) if you want. So an example of using Arial Black as the default would be
Code:
@font-face {
  font-family: "Arial Black", serif, sans-serif;
  font-weight: normal;
  font-style:  normal;
  src: url(res:///abook/fonts/Arial-Black.ttf);
}
One issue with the standard font is that it does not have custom bold and italic versions (they are faked from the standard version). Using font-face allows you to provide more fully defined fonts, like the Liberation fonts. The attached TEST_defaultfonts.epub illustrates the standard fonts and there are screenshots from the Windows Sony eBook Library viewer here. The EZ Readers seem to be identical, i.e. they are using the standard Adobe default fonts.

The attached TEST_defaultnewfonts.epub illustrates using font-face to refer to the SD fonts directory. For this to work you need all 12 Liberation .ttf files in the fonts folder on your SD card. I got the fonts from https://fedorahosted.org/releases/l/...1.20090721.zip. For screenshots from a similar ePub (only the location of the fonts changed) and the Windows Sony eBook Library viewer see User Stylesheet for Adobe Digital Editions. This is how TEST_defaultfonts.epub should look on an EZ Reader.
Attached Files
File Type: epub TEST_defaultfonts.epub (2.5 KB, 449 views)
File Type: epub TEST_defaultnewfonts.epub (2.7 KB, 395 views)
wallcraft is offline   Reply With Quote
Old 10-10-2009, 10:19 PM   #4
tamzilla
Zealot
tamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with others
 
tamzilla's Avatar
 
Posts: 109
Karma: 2781
Join Date: Sep 2009
Location: VA, USA
Device: nook, Ipod touch
Thanks Wallcraft!

Quote:
Originally Posted by wallcraft View Post
Also, the fonts directory probably needs to be on the SD card (not the internal memory).
That's correct. '/abook/' is the root for the SD Card on the EZReaders. I don't know what the root of the user accessible part of the internal memory is.

Quote:
Note that the simplest approach of all is to redefine the default fonts (serif, sans-serif, monospace) in the font-face. That way you don't even need a body over-ride. Also, the default font if none is specified is serif, but the serif and san-serif font can be the same (both san-serif) if you want.
This sounds like a better approach.
tamzilla is offline   Reply With Quote
Old 10-12-2009, 05:55 PM   #5
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
Wow, so the hanlin is the only device that supports epub custom fonts and justification?
gregcd is offline   Reply With Quote
Old 10-12-2009, 08:25 PM   #6
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: 37,777
Karma: 18492088
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
The Opus supports ePub and custom fonts. My guess is that since they both are using the SDK from Adobe for ADE that /abook/ would be the root of the SD card as well. Only way to know is if an Opus user tries it.

I do know that the the Sony Daily Edition will support justification as we've seen in the photos.
JSWolf is offline   Reply With Quote
Old 10-12-2009, 10:55 PM   #7
tamzilla
Zealot
tamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with others
 
tamzilla's Avatar
 
Posts: 109
Karma: 2781
Join Date: Sep 2009
Location: VA, USA
Device: nook, Ipod touch
Quote:
Originally Posted by gregcd View Post
Wow, so the hanlin is the only device that supports epub custom fonts and justification?
You should be able to use the same method on any reader that can read ePubs (for non DRM'ed ePubs only). I don't know a lot about ePub files, but I think this is similar to the way you would would define embedded fonts, but instead of specifying a location within the ePub file for the font file location, you are specifying a location outside of it. The tricky part is to discover what the root directory of the user accessible part of the file system is, since you have to specify the full path to the font file. '/data' seems to be typical for the various Sony readers. '/abook' should work for any Hanlin V3 or V5 clone. I don't think '/abook' will work for the Opus - the SDK I found the directory info in was from before Jinke included ADE in the firmware.

The Pocket Pro doesn't allow the user to change an ePub's justification. The default behavior seems to be full justification if no other is listed in the ePub's CSS. I you want to change that, you would have to modify the CSS file - which you can only do on non DRM'ed ePubs.
tamzilla is offline   Reply With Quote
Old 11-01-2009, 03:32 PM   #8
booknut
Zealot
booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'
 
Posts: 105
Karma: 42644
Join Date: Feb 2009
Device: PW1 + PW2, NOOK HD
Quotes around font name?

Hi, I have absolutely no idea what code goes into a CSS but the short example for the Arial Black looks like something I should be able to handle in calibre. But I was wondering if the quotes go around the name of the font as in the example? I have tried simply experimenting with different codes using the example as a template but it is rather tedious to shut down calibre, safely remove hardware, check result on reader, open up calibre, reformat book, etc. etc. I done that 5 times and then my PC balked...

I tried to look up CSS codes on the Internet and I am not sure what's the right format for the PocketPro. Also, if I am specifying a bold font such as BOOKOSB.TTF, do I need to put "bold" into the font weight code as well?

Thanks for any hints!
booknut

Last edited by booknut; 11-01-2009 at 03:36 PM.
booknut is offline   Reply With Quote
Old 11-01-2009, 08:03 PM   #9
tamzilla
Zealot
tamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with others
 
tamzilla's Avatar
 
Posts: 109
Karma: 2781
Join Date: Sep 2009
Location: VA, USA
Device: nook, Ipod touch
Quote:
Originally Posted by booknut View Post
Hi, I have absolutely no idea what code goes into a CSS but the short example for the Arial Black looks like something I should be able to handle in calibre. But I was wondering if the quotes go around the name of the font as in the example? I have tried simply experimenting with different codes using the example as a template but it is rather tedious to shut down calibre, safely remove hardware, check result on reader, open up calibre, reformat book, etc. etc. I done that 5 times and then my PC balked...
The font family name for whichever font you want to use goes in quotation marks. In windows, if you double click on the font file you will see this next to 'Typeface name' (see attached picture).

When I was trying to get this to work, I used a SD Card reader and just moved the card between my computer and the reader. It was a lot easier than connecting the reader to the computer each time I wanted to test the revision.

Quote:
I tried to look up CSS codes on the Internet and I am not sure what's the right format for the PocketPro. Also, if I am specifying a bold font such as BOOKOSB.TTF, do I need to put "bold" into the font weight code as well?

Thanks for any hints!
booknut
If you insert the code exactly like Wallcraft's example, it should work. Just replace the font family name with the name of the font you are using (it should be exactly what you see next to typeface name) and replace the file name of the font with that you put on the SD card in the fonts directory. Remember that the font file name is case sensitive, so make sure you type the file name exactly as it is on the device. If you want to specify a bold font, you will need to put 'bold' into the font weight code. You can look at my original post to see how to define the italic, bold and bold italic font faces. The only difference between my post and Wallcraft's revision is that in his the default serif and san-serif font is being redefined, so you don't have to add the body override that I show.

You can put this code in the extra CSS box in Calibre and then do a conversion and Calibre will add this for you in the epub's CSS. You can only do this for non-DRM'ed files.

I hope this helps!
Attached Thumbnails
Click image for larger version

Name:	arialblack.png
Views:	348
Size:	208.8 KB
ID:	38422  
tamzilla is offline   Reply With Quote
Old 11-03-2009, 11:04 AM   #10
booknut
Zealot
booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'booknut understands when you whisper 'The dog barks at midnight.'
 
Posts: 105
Karma: 42644
Join Date: Feb 2009
Device: PW1 + PW2, NOOK HD
Changing font for epub

What finally worked for me is this:
@font-face {
font-family: "PMN Caecilia", serif, sans-serif;
font-weight: normal;
font-style: normal;
src: url(res:///abook/fonts/lte50887.ttf); }

BUT, after many tries, I finally figured out I had to change the name of the font on the SD card to all small letters and no spaces or underscores, etc. The font above was originally named LTe50887.ttf and that did not work.

Now the font is just as dark on the Pocket Pro as on the Sony 505, as a matter of fact, I showed both to my husband and he actually preferred the Pocket Pro version (and so do I).
booknut is offline   Reply With Quote
Old 11-04-2009, 11:05 AM   #11
tamzilla
Zealot
tamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with others
 
tamzilla's Avatar
 
Posts: 109
Karma: 2781
Join Date: Sep 2009
Location: VA, USA
Device: nook, Ipod touch
I'm glad you got it working! I really don't like how the default Times font is displayed on the Pocket Pro - it doesn't have enough contrast for me.

I remember that in order to get custom fonts working for the mobi formats, the font names either had to be all in lowercase or all in caps. Looks like this may be true for all of the formats.
tamzilla is offline   Reply With Quote
Old 12-04-2009, 10:25 AM   #12
omro
Addict
omro is on a distinguished road
 
Posts: 322
Karma: 64
Join Date: Nov 2008
Location: Hamilton, On
Device: Broke both my ebook readers, and bought an iPad. Couldn't be happier.
Where is this CSS file?

Can system fonts be removed/replaced.
omro is offline   Reply With Quote
Old 12-04-2009, 01:13 PM   #13
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 9,725
Karma: 5072190
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
Quote:
Originally Posted by omro View Post
Where is this CSS file?

Can system fonts be removed/replaced.
for ePUB the CSS file is inside the file so you can only change it on a per book basis. System fonts can be replaced but not removed. They are in the firmware flash and do not take up user memory. Hopefully at some point Jinke will add support for user fonts on ePUB but today you can change it by editing the ePUB file itself so long as it is not DRM'd.

Dale
DaleDe is offline   Reply With Quote
Old 12-04-2009, 01:17 PM   #14
omro
Addict
omro is on a distinguished road
 
Posts: 322
Karma: 64
Join Date: Nov 2008
Location: Hamilton, On
Device: Broke both my ebook readers, and bought an iPad. Couldn't be happier.
Quote:
Originally Posted by DaleDe View Post
for ePUB the CSS file is inside the file so you can only change it on a per book basis. System fonts can be replaced but not removed. They are in the firmware flash and do not take up user memory. Hopefully at some point Jinke will add support for user fonts on ePUB but today you can change it by editing the ePUB file itself so long as it is not DRM'd.

Dale
And how do you break inside to change it?
omro is offline   Reply With Quote
Old 12-04-2009, 01:28 PM   #15
LoganK
Groupie
LoganK can name that song in three notesLoganK can name that song in three notesLoganK can name that song in three notesLoganK can name that song in three notesLoganK can name that song in three notesLoganK can name that song in three notesLoganK can name that song in three notesLoganK can name that song in three notesLoganK can name that song in three notesLoganK can name that song in three notesLoganK can name that song in three notes
 
Posts: 199
Karma: 24918
Join Date: May 2009
Device: PRS-505,nook,Nook Color,Android
Quote:
Originally Posted by omro View Post
And how do you break inside to change it?
.ePub files are really .zip files.

If the ePub files are encrypted, the CSS may be in the clear (in ePub, files are encrypted individually) for you to edit. I'm not sure what most publishers do since I don't buy DRM ePub.

Once you have access to the CSS, modifying the font is generally very easy (look for instructions on setting font-face with ePub on these forums).
LoganK 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
Classic Font and epub, what works on sony, now works on Nook too! ctos Barnes & Noble NOOK 26 07-25-2011 10:24 AM
Does the 550 unicode fonts hack works on 600/900? siulayhumga Sony Reader 2 12-25-2009 03:36 AM
What are the best fonts for the pocket pro? yportne Astak EZReader 36 10-21-2009 03:45 AM
pdf converted to epub file not working on my EZ Pocket Pro Pro luvshihtzu Astak EZReader 2 10-20-2009 08:30 PM
Validated Secure DE works on SONY (EPUB /PDF) =X= Sony Reader 11 11-01-2008 08:43 PM


All times are GMT -4. The time now is 12:09 PM.


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