Thread: PRS-T1 Modified Sony home screen
View Single Post
Old 07-04-2012, 07:28 PM   #312
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by JSWolf View Post
Would it be possible to also put in font styles for smallcaps as well in the CSS for the fonts we want to have smallcaps?
You can, I've been doing this for a couple of years with all my Sonys. However, it's not quite as straightforward because you cannot use the @font-face {... font-variant: small-caps; ...} option, at least not on any existing Sonys.

What you can do is, if you only have a single smallcaps font (e.g. Fontin SmallCaps), define the smallcaps font in your Sony css file something like
Code:
@font-face {font-family: "SCfont"; src: url(res:///... .../fonts/Fontin-SmallCaps.ttf)}
If you can find a smallcaps font with all 4 variants (reg, italic, bold, boldit) you can setup 4 @font-faces in the normal way.


In addition, you also have to do either one or the other of the following:
  1. find the relevant css style in each epub's css file and change it from
    .scname {font-variant: small-caps} to
    .scname {font-family: "SCfont"} (matching the label in your @font-face)
  2. add an extra line into your Sony css file something like
    Code:
    small, .smallcaps, .smallcaps1, .smallcaps2, .small-caps, .sc, .fsc, .smallCaps, .Smallcaps, .SmallCaps {
        font-family: "SCfont", serif;
        font-variant: normal}

Option 1 - will always work, but is tedious because you would have to change every epub where you want smallcaps.

Option 2 - can be set once in your Sony css file(s) but means you need guesswork to try and catch every .scname the epub creators may decide to use -- but you'll probably never guess them all It works perfectly if you are creating your own html file to convert to epub.
jackie_w is offline