MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Basic CSS For Sony Reader (https://www.mobileread.com/forums/showthread.php?t=71530)

ExiledV20 01-28-2010 06:20 AM

Basic CSS For Sony Reader
 
Has anyone attempted to develop a CSS that mimics the default styling of LRF files?

DoctorOhh 01-28-2010 07:33 AM

Quote:

Originally Posted by ExiledV20 (Post 760305)
Has anyone attempted to develop a CSS that mimics the default styling of LRF files?

????:blink:????

porkupan 01-28-2010 04:53 PM

Like this? The trouble with this approach is that you won't have italics or bold. To get those you need to have italic or bold fonts in the reader.

JSWolf 01-28-2010 05:09 PM

Quote:

Originally Posted by ExiledV20 (Post 760305)
Has anyone attempted to develop a CSS that mimics the default styling of LRF files?

ADE by default already does that by simulating bold & italics.

porkupan 01-28-2010 05:22 PM

Quote:

Originally Posted by JSWolf (Post 761311)
ADE by default already does that by simulating bold & italics.

Actually, Adobe module doesn't simulate bold and italics, it uses a very limited built-in set of fonts, which are utilized by default when no CSS is present, and no font resources are added. Adobe module doesn't appear to have an internal capability to simulate bold and italics on a regular font, like the LRF and RTF modules do.

JSWolf 01-28-2010 05:27 PM

Quote:

Originally Posted by porkupan (Post 761333)
Actually, Adobe module doesn't simulate bold and italics, it uses a very limited built-in set of fonts, which are utilized by default when no CSS is present, and no font resources are added. Adobe module doesn't appear to have an internal capability to simulate bold and italics on a regular font, like the LRF and RTF modules do.

When you do not embed any fonts, italic and bold are indeed simulated.

DoctorOhh 01-29-2010 01:40 AM

Quote:

Originally Posted by porkupan (Post 761280)
Like this? The trouble with this approach is that you won't have italics or bold. To get those you need to have italic or bold fonts in the reader.

My ignorance knows no bounds, so the following may not apply. I have a 505 and currently use PRSplus. PRSplus has allowed me to place fonts and a style.css file on my reader. I have placed the free fontin fonts on my reader and my css is:

Code:

@font-face {
  font-family: "Fontin";
  font-weight: normal;
  font-style: normal;
  src: url(res:///Data/fonts/Fontin-Regular.ttf);
}
@font-face {
  font-family: "Fontin";
  font-weight: bold;
  font-style: normal;
  src: url(res:///Data/fonts/Fontin-Bold.ttf);
}
@font-face {
  font-family: "Fontin";
  font-weight: normal;
  font-style: italic;
  src: url(res:///Data/fonts/Fontin-Italic.ttf);
}

body {
  font-family: "Fontin", serif;
  widows: 0;
  orphans: 0;
}

p {
text-indent:1.1em
}

/*
  To increase ePub font size Remove rem slashes
  surrounding the paragraph and division statements below.
  Then adjust percentage higher, try 110% to start.
*/

/*
p {font-size:110%}

div {font-size:110%}
*/

/*
  To increase ePub line height Remove rem slashes
  surrounding the paragraph and division statements below.
  Then adjust percentage higher, try 110% to start.
*/

/*

p {line-height: 110%}

div {line-height: 110%}

*/

This setup causes all epub files (including DRM'd) I read to use this font. It obviously doesn't mimic lrf files but it is how I have set my reader up. I think this setup would work with any fonts I chose.

JSWolf 02-05-2010 03:38 AM

Quote:

Originally Posted by dwanthny (Post 761942)
My ignorance knows no bounds, so the following may not apply. I have a 505 and currently use PRSplus. PRSplus has allowed me to place fonts and a style.css file on my reader. I have placed the free fontin fonts on my reader and my css is:

Code:

@font-face {
  font-family: "Fontin";
  font-weight: normal;
  font-style: normal;
  src: url(res:///Data/fonts/Fontin-Regular.ttf);
}
@font-face {
  font-family: "Fontin";
  font-weight: bold;
  font-style: normal;
  src: url(res:///Data/fonts/Fontin-Bold.ttf);
}
@font-face {
  font-family: "Fontin";
  font-weight: normal;
  font-style: italic;
  src: url(res:///Data/fonts/Fontin-Italic.ttf);
}

body {
  font-family: "Fontin", serif;
  widows: 0;
  orphans: 0;
}

p {
text-indent:1.1em
}

/*
  To increase ePub font size Remove rem slashes
  surrounding the paragraph and division statements below.
  Then adjust percentage higher, try 110% to start.
*/

/*
p {font-size:110%}

div {font-size:110%}
*/

/*
  To increase ePub line height Remove rem slashes
  surrounding the paragraph and division statements below.
  Then adjust percentage higher, try 110% to start.
*/

/*

p {line-height: 110%}

div {line-height: 110%}

*/

This setup causes all epub files (including DRM'd) I read to use this font. It obviously doesn't mimic lrf files but it is how I have set my reader up. I think this setup would work with any fonts I chose.

But the problem is that this overrides any code in the CSS of the ePub. So if you want to use specific embedded fonts, it won't work. That is a problem and I don't know if there is a solution.


All times are GMT -4. The time now is 06:36 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.