Thread: PRS-350 Changing Fonts in PRS+
View Single Post
Old 11-06-2011, 06:43 PM   #29
pssquirrel
ebooknut
pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.pssquirrel ought to be getting tired of karma fortunes by now.
 
pssquirrel's Avatar
 
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
Another option that doesn't require duplicating/renaming font files, is to use the same source file for both normal and bold.

Spoiler:
Code:
@font-face { 
   font-family: serif; 
   font-weight: normal; 
   font-style: normal; 
   src: url(res:///Data/fonts/NimbusMod.ttf); 
} 

@font-face { 
   font-family: serif; 
   font-weight: bold; 
   font-style: normal; 
   src: url(res:///Data/fonts/NimbusMod.ttf); 
} 

@font-face { 
   font-family: serif; 
   font-weight: normal; 
   font-style: italic; 
   src: url(res:///Data/fonts/NimbusMod_I.ttf); 
} 

@font-face { 
   font-family: serif; 
   font-weight: bold; 
   font-style: italic; 
   src: url(res:///Data/fonts/NimbusMod_I.ttf); 
}
Then, to distinguish between normal and bold text when there's no bold font, you could add "text-decoration: underline" However, this only works when you know what tag the epub uses to call bold. In other words, if an epub uses <span class="bold"> or <b> to call for bold-faced text, you could add:

span.bold {text-decoration: underline; }
b {text-decoration: underline; }

Then all text that's supposed to be bold (but which can't be bold because there's no font) will be underlined instead.

Last edited by pssquirrel; 12-07-2011 at 12:18 AM. Reason: clarification
pssquirrel is offline   Reply With Quote