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

Go Back   MobileRead Forums > E-Book Formats > ePub

Welcome to the MobileRead Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community today, you will have fewer ads, access to post topics, communicate privately with other members, respond to polls, upload content and access many other special features.

If you have any problems with the registration process or your account login, please contact us.

Hint: Don't have time to visit us daily? Subscribe to our main RSS feed to receive our frontpage posts at your convenience.

Notices

ePub ePub (or OEBPS) is an open e-book standard by the IDPF

Reply
 
Thread Tools Search this Thread Display Modes
Old 09-14-2009, 11:00 PM   #1
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,784
Karma: 5035584
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
User Stylesheet for Adobe Digital Editions

In What's the default ADE font?, Peter Sorotokin mentioned that device manufacturers can override the default font (or even make it user-selectable) through a user stylesheet.

In Changing paragraph spacing in DRMed epub?, Who are you? provided instructions for where to put a userStyle.css for the (Windows) Sony eBook Library viewer. It seems that something similar could (should) be available for all versions of ADE. However, so far only the Sony viewer is known to work this way.

In a recent post, which I can't find (so please provide a reference), someone mentioned that a @font-face can override one of the three default font-families (serif, san-serif, monospace). This provides a particularly simple application of a User Stylesheet.

I enclose the following userStyle.css:
Code:
@font-face {
  font-family: "Liberation Sans", sans-serif;
  font-weight: normal;
  font-style:  normal;
  src: url(res:///adobe/fonts/LiberationSans-Regular.ttf);
}
@font-face {
  font-family: "Liberation Sans", sans-serif;
  font-weight: bold;
  font-style:  normal;
  src: url(res:///adobe/fonts/LiberationSans-Bold.ttf);
}
@font-face {
  font-family: "Liberation Sans", sans-serif;
  font-weight: normal;
  font-style:  italic;
  src: url(res:///adobe/fonts/LiberationSans-Italic.ttf);
}
@font-face {
  font-family: "Liberation Sans", sans-serif;
  font-weight: bold;
  font-style:  italic;
  src: url(res:///adobe/fonts/LiberationSans-BoldItalic.ttf);
}
@font-face {
  font-family: "Liberation Serif", serif;
  font-weight: normal;
  font-style:  normal;
  src: url(res:///adobe/fonts/LiberationSerif-Regular.ttf);
}
@font-face {
  font-family: "Liberation Serif", serif;
  font-weight: bold;
  font-style:  normal;
  src: url(res:///adobe/fonts/LiberationSerif-Bold.ttf);
}
@font-face {
  font-family: "Liberation Serif", serif;
  font-weight: normal;
  font-style:  italic;
  src: url(res:///adobe/fonts/LiberationSerif-Italic.ttf);
}
@font-face {
  font-family: "Liberation Serif", serif;
  font-weight: bold;
  font-style:  italic;
  src: url(res:///adobe/fonts/LiberationSerif-BoldItalic.ttf);
}
@font-face {
  font-family: "Liberation Mono", monospace;
  font-weight: normal;
  font-style:  normal;
  src: url(res:///adobe/fonts/LiberationMono-Regular.ttf);
}
@font-face {
  font-family: "Liberation Mono", monospace;
  font-weight: bold;
  font-style:  normal;
  src: url(res:///adobe/fonts/LiberationMono-Bold.ttf);
}
@font-face {
  font-family: "Liberation Mono", monospace;
  font-weight: normal;
  font-style:  italic;
  src: url(res:///adobe/fonts/LiberationMono-Italic.ttf);
}
@font-face {
  font-family: "Liberation Mono", monospace;
  font-weight: bold;
  font-style:  italic;
  src: url(res:///adobe/fonts/LiberationMono-BoldItalic.ttf);
}
Go to C:\Program Files\Sony\Reader\Data\bin and create the path adobe\pxf\ there and put userStyle.css in there to override default epub styles. In this case only the default fonts are redefined, and all 12 .ttf files need to go in C:\Program Files\Sony\Reader\Data\bin\adobe\fonts. I got the fonts from https://fedorahosted.org/releases/l/...1.20090721.zip. You can obviously use any fonts you have legal access to. Also, you don't need to provide bold, italic, and bolditalic versions if they are not available (or you don't want to).

The attached screenshots show TEST_defaultfonts.epub with this userStyle.css active. Unlike with the original default fonts, the Liberation fonts have explicit bold, italic, and bolditalic versions which are being correctly displayed here.

There is obviously other things that can go into userStyle.css, which has the advantage that it can be applied to all DRMed ePubs. In my opinion, all implementations of ADE should allow and document the addition of userStyle.css and user-defined fonts.
Attached Thumbnails
Click image for larger version

Name:	Sony_font5.jpg
Views:	377
Size:	142.4 KB
ID:	35880   Click image for larger version

Name:	Sony_font6.jpg
Views:	328
Size:	146.2 KB
ID:	35881   Click image for larger version

Name:	Sony_font7.jpg
Views:	301
Size:	150.2 KB
ID:	35882   Click image for larger version

Name:	Sony_font8.jpg
Views:	304
Size:	157.0 KB
ID:	35883  
Attached Files
File Type: zip userStyle.css.zip (369 Bytes, 195 views)
wallcraft is offline   Reply With Quote
 
Enthusiast
Old 09-15-2009, 08:10 AM   #2
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,784
Karma: 5035584
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
It is also easy to switch to a sans-serif default font by using the same font for serif and sans-serif. For example, the userStyle.css:
Code:
@font-face {
  font-family: "Arial Black", serif, sans-serif;
  font-weight: normal;
  font-style:  normal;
  src: url(res:///adobe/fonts/Arial-Black.ttf);
}
will use Arial Black for any ePub without embedded fonts.
Attached Thumbnails
Click image for larger version

Name:	Sony_font9.jpg
Views:	230
Size:	163.5 KB
ID:	35907  
wallcraft is offline   Reply With Quote
Old 09-15-2009, 02:05 PM   #3
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,975
Karma: 345347
Join Date: Feb 2008
Device: Sony Reader PRS 505
This is very useful information. Thanks for posting it.
Valloric is offline   Reply With Quote
Old 09-15-2009, 02:12 PM   #4
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,832
Karma: 385996
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
excellent !! thank you, this is really great ! i'm going to do it right now.
__________________
blog.ex-elibris.fr : les liseuses, les ebooks, nos lectures, la technologie…

I don't want none of that mischief on my eels! - pdurrant

since i would never want to disappoint wde and vr, we are thrilled to present the next exciting avatar in zelda's wardrobe, by vivaldirules himself.
zelda_pinwheel is offline   Reply With Quote
Old 09-15-2009, 02:27 PM   #5
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,832
Karma: 385996
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
any chance this user style sheet can be added directly to the sony device, as well ?
__________________
blog.ex-elibris.fr : les liseuses, les ebooks, nos lectures, la technologie…

I don't want none of that mischief on my eels! - pdurrant

since i would never want to disappoint wde and vr, we are thrilled to present the next exciting avatar in zelda's wardrobe, by vivaldirules himself.
zelda_pinwheel is offline   Reply With Quote
Old 09-15-2009, 03:52 PM   #6
salty-horse
Member
salty-horse began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Sep 2008
Device: Sony PRS-505
Zelda, I asked the same question here in the PRS-505 forum
salty-horse is offline   Reply With Quote
Old 09-15-2009, 03:53 PM   #7
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,832
Karma: 385996
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
thanks salty-horse ! i hope we'll get an answer.
__________________
blog.ex-elibris.fr : les liseuses, les ebooks, nos lectures, la technologie…

I don't want none of that mischief on my eels! - pdurrant

since i would never want to disappoint wde and vr, we are thrilled to present the next exciting avatar in zelda's wardrobe, by vivaldirules himself.
zelda_pinwheel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloading Adobe Ebook pdf files crashes Adobe Digital Editions .... Zevs Sony Reader 2 09-17-2010 12:25 PM
New verions of Adobe Digital Editions - Digital Editions 1.7.2 kennyc ePub 0 02-12-2010 06:21 AM
Adobe has new hope for e-books with Adobe Digital Editions Alexander Turcic News 82 01-05-2010 07:14 PM
Adobe Digital Editions and DX? Diligently Me Amazon Kindle 1 09-25-2009 04:32 PM
Adobe Digital Editions igsy Sony Reader 4 09-24-2009 08:52 AM


All times are GMT -5. The time now is 11:05 PM.


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