Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-03-2014, 03:28 PM   #1
Chris_Snow
Zealot
Chris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipse
 
Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
Font Size in Silgil Different between two Books

Greetings,

I'm a css noob, but have been tweaking my ebooks for some time for consistancy.

I have noticed that sometimes Sigil will show fonts at different sizes. For example, one book has the stylesheet set to 1em font size (my preferred size), while another has the font-size as 0.75em. When I change 0.75em to 1em, it looks huge in Sigil - almost bold as well.

Then line-height seems to be a reflection of the font size, and even though I set it to 1.4em (my preferred height), 0.75em font size CSS isn't the same as the stylesheet with the 1em font size (1em font-size has more space between lines).

Why is this? Nothing in the css seems to indicate a difference and under Sigil appearances, everything seems to be identical.

Here are the two SS

0.75em One

Code:
.calibre {
    display: block;
    font-size: 0.75em;
    line-height: 1.4;
    orphans: 0;
    padding-left: 0;
    padding-right: 0;
    text-align: justify;
    widows: 0;
    margin: 0 5pt
    }
.calibre1 {
    display: block
    }
.calibre2 {
    display: block;
    orphans: 0;
    widows: 0;
    margin: 0 0
    }
.calibre3 {
    height: auto;
    width: auto
    }
.calibre10 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    orphans: 0;
    text-align: justify;
    text-indent: 1em;
    widows: 0
    }
.chapter-number {
    display: block;
    font-size: 1.3em;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1em;
    text-align: center
    }
.chapter-title {
    display: block;
    font-size: 1.3em;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 2em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    text-align: center
    }
.none {
    font-size: 2.22222em;
    font-style: normal;
    font-variant: normal;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none
    }
.none1 {
    font-size: 1.33333em;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 1.2;
    text-decoration: none
    }
.none2 {
    font-size: 1.33333em;
    font-style: italic;
    font-variant: normal;
    font-weight: normal;
    line-height: 1.2;
    text-decoration: none
    }
.none3 {
    font-size: 1.33333em;
    font-style: normal;
    font-variant: normal;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none
    }
.s {
    display: block;
    padding-left: 0;
    padding-right: 0;
    padding-top: 4pt;
    text-align: center;
    text-indent: 1em
    }
.s1 {
    display: block;
    padding-left: 0;
    padding-right: 0;
    padding-top: 4pt;
    text-align: justify;
    text-indent: 1em
    }
1em one
Code:
.bold {
    font-weight: bold;
    line-height: 1.2
    }
.bold1 {
    font-weight: bold
    }
.calibre {
    display: block;
    font-size: 1em;
    line-height: 1.4;
    margin-bottom: 0;
    margin-left: 5pt;
    margin-right: 5pt;
    margin-top: 0;
    orphans: 0;
    padding-left: 0;
    padding-right: 0;
    text-align: justify;
    widows: 0
    }
.calibre1 {
    display: block;
    font-size: 1.66667em;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 0.67em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 256px;
    text-align: right;
    text-indent: 0
    }
.calibre10 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    orphans: 0;
    text-align: justify;
    text-indent: 1em;
    widows: 0
    }
.calibre11 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 24px;
    orphans: 0;
    text-align: justify;
    text-indent: 0;
    widows: 0
    }
.calibre15 {
    display: block;
    font-size: 1.66667em;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 0.67em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 32px;
    text-align: center;
    text-indent: 0
    }
.calibre16 {
    display: block;
    font-size: 1.29167em;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 0.83em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 16px;
    text-align: center;
    text-indent: 0
    }
.calibre17 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 8px;
    orphans: 0;
    text-align: center;
    text-indent: 0;
    widows: 0
    }
.calibre18 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    orphans: 0;
    text-align: justify;
    text-indent: 0;
    widows: 0
    }
.calibre19 {
    font-size: 0.75em
    }
.calibre2 {
    font-size: 0.775em;
    line-height: 1.2
    }
.calibre20 {
    display: block;
    height: 8px
    }
.calibre3 {
    display: block
    }
.calibre4 {
    display: block;
    font-size: 1.29167em;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 0.83em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 32px;
    text-align: center;
    text-indent: 0
    }
.calibre5 {
    font-size: 1em;
    line-height: 1.2
    }
.calibre7 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 16px;
    orphans: 0;
    text-align: center;
    text-indent: 0;
    widows: 0
    }
.calibre8 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 32px;
    orphans: 0;
    text-align: justify;
    text-indent: 0;
    widows: 0
    }
.calibre9 {
    font-size: 1.29167em;
    line-height: 1.2
    }
.italic {
    font-style: italic;
    line-height: 1.2
    }
.chapter-number {
    display: block;
    font-size: 1.2em;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1em;
    text-align: center
    }
.chapter-title {
    display: block;
    font-size: 1.2em;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 2em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    text-align: center
    }
.mbppagebreak {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0
    }
Chris_Snow is offline   Reply With Quote
Old 03-03-2014, 03:33 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,909
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
In the body of the first CSS
font-size: .75

in the second CSS
font-size: 1




The first shrinks the default to 3/4

BUT you also need to know what the style for the paragraph does:

My standard is to set the Body font-size and remove any size line for NORMAL paragraphs

Last edited by theducks; 03-03-2014 at 03:35 PM. Reason: clarity
theducks is offline   Reply With Quote
Advert
Old 03-03-2014, 03:59 PM   #3
Chris_Snow
Zealot
Chris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipse
 
Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
Thx "The Ducks"

Not sure I was clear in my original post.

1em is my standard size. I change all my books to this size with a line-height of 1.4em.

However, in the book with the css set at 0.75em the text in sigil looks the same as the text in the book with the css set at 1em.

When I change the book with 0.75em to 1em (my default) the text in sigil now looks huge (compared to the one with a 1em font-size).

This doesn't happen with all books. Most of the books I change the text of in sigil, reflect it has per expectation, but in this case, the text is so much bigger. I can't understand why?
Chris_Snow is offline   Reply With Quote
Old 03-03-2014, 04:21 PM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It's nearly impossible to tell--without seeing the html files--how some of those other classes (that also set font-sizes, and are NOT identical in the two css files) might be being applied. Setting your preferred font-size in the calibre1 class (assuming that's the "body" class) would not stop other paragraph classes from overriding it.

Also, make sure there's not a "style" attribute in the html tag(s) that sets a font size. I see that more and more (especially with epubs that started life as a kindlebook).

Quote:
However, in the book with the css set at 0.75em the text in sigil looks the same as the text in the book with the css set at 1em.
Could it be that one of the "none1,2,3" classes is the standard paragraph class in that first (0.75em) one?

Last edited by DiapDealer; 03-03-2014 at 04:25 PM.
DiapDealer is offline   Reply With Quote
Old 03-03-2014, 04:53 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,909
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Chris_Snow View Post
Thx "The Ducks"

Not sure I was clear in my original post.

1em is my standard size. I change all my books to this size with a line-height of 1.4em.

However, in the book with the css set at 0.75em the text in sigil looks the same as the text in the book with the css set at 1em.

When I change the book with 0.75em to 1em (my default) the text in sigil now looks huge (compared to the one with a 1em font-size).

This doesn't happen with all books. Most of the books I change the text of in sigil, reflect it has per expectation, but in this case, the text is so much bigger. I can't understand why?
The style sizes are computed from the base;

so in #1 the base is .75
In the paragraph style it is 1.333. .75*1.333 = 1

while # 2 is a base of 1
and the paragraph is also 1 (or not set) 1*1 = 1
theducks is offline   Reply With Quote
Advert
Old 03-03-2014, 06:31 PM   #6
Chris_Snow
Zealot
Chris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipseChris_Snow can illuminate an eclipse
 
Posts: 148
Karma: 8170
Join Date: Jul 2013
Device: kobo glo
Thx for the help

I've realised one of my mistakes - to think of 1em as being a set size. I've realised it isn't. I found a good explanation online. Thx.

So my next question is...looking at the 0.75em code - what is the font size? The code only states an em size, so how does sigil (or the ebook reader) know what the font size is? Or is this based on the stock setting under appearances??

Diapdealer - here is the code for the book with 0.75em. I think you're right.

Code:
<body class="calibre">
  <div class="calibre1">
    <div class="s1">

<p class="calibre2"><span class="none1">the text</span></p>
Chris_Snow is offline   Reply With Quote
Old 03-03-2014, 07:38 PM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,909
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Chris_Snow View Post
Thx for the help

I've realised one of my mistakes - to think of 1em as being a set size. I've realised it isn't. I found a good explanation online. Thx.

So my next question is...looking at the 0.75em code - what is the font size? The code only states an em size, so how does sigil (or the ebook reader) know what the font size is? Or is this based on the stock setting under appearances??

Diapdealer - here is the code for the book with 0.75em. I think you're right.

Code:
<body class="calibre">
  <div class="calibre1">
    <div class="s1">

<p class="calibre2"><span class="none1">the text</span></p>
The DEVICE (and the viewer) has 'a' default. It really does not matter since you can zoom (reflow) the text.
Think more about relative proportion of the sizes, rather than exact.

On my 5" Astak, I use 1.2em for the body (my base) and a Zoom level 3 (1 being no change) on the device. This has an added benefit of leaving the Adobe, always there, block numbers tiny when compared to text.
Now, 3 is also about the same size a a mass market paperback
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem changing font size using font size key Waylander Conversion 0 10-02-2013 03:30 PM
Font Size on New Books Is Too Small! go4me77 General Discussions 2 04-24-2012 11:51 AM
PRS-300 Med font size too big, but small font size too small eli2k Sony Reader 4 05-28-2010 09:47 AM
books from sony store not changing font size on prs-900 rwe Sony Reader 2 04-20-2010 09:02 AM
Poll: Which font size do you use to read books? Zoot Amazon Kindle 0 11-25-2007 01:56 PM


All times are GMT -4. The time now is 12:27 AM.


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