Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 04-07-2015, 03:41 PM   #1
pypo
Member
pypo began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jul 2014
Device: none
Getting a Font Size less than 1 em

Hi,

I'm using ePub format. I want to apply a font size of 0.8 em to a class. But the computed final style doesn't change. It only changes (gets bigger) when I make the font larger than 1 em, but never changes with I make it smaller than 1 em.

Right now the font computed final style is 22 px. I don't know where the 22 comes from either, since it is not in the stylesheet.

Thanks,
pypo is offline   Reply With Quote
Old 04-07-2015, 08:55 PM   #2
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,182
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by pypo View Post
Hi,

I'm using ePub format. I want to apply a font size of 0.8 em to a class. But the computed final style doesn't change. It only changes (gets bigger) when I make the font larger than 1 em, but never changes with I make it smaller than 1 em.

Right now the font computed final style is 22 px. I don't know where the 22 comes from either, since it is not in the stylesheet.

Thanks,
Go to this page for a conversation chart.

Spoiler:
This will give you a base font of 1em with different size fonts for each element. calibre is the body css.
Code:
This will give you a base font of 1em with different size fonts for each element.  calibre is the body css.
.calibre6 {
    display: block;
    font-size: 1em;
    line-height: 1.2;
    margin-bottom: 0;
    margin-left: 3pt;
    margin-right: 3pt;
    margin-top: 0;
    padding-left: 0;
    padding-right: 0;
    text-align: justify
    }
.calibre7 {
    height: auto;
    width: auto
    }
.calibre8 {
    display: block
    }
.calibre9 {
    font-weight: bold;
    line-height: 1.2
    }
.p {
    display: block;
    margin-bottom: 16px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 135px;
    text-align: center;
    text-indent: 0
    }
.p1 {
    display: block;
    margin-bottom: 16px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    text-align: center;
    text-indent: 0
    }
.p10 {
    display: block;
    font-size: 0.83333em;
    margin-bottom: 2px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    text-align: justify;
    text-indent: 0
    }
.p11 {
    display: block;
    font-size: 0.83333em;
    margin-bottom: 2px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    text-align: justify;
    text-indent: 8px
    }

bernie
gbm is offline   Reply With Quote
Advert
Old 04-07-2015, 09:37 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,717
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
It would help if you posted your CSS and some of your XML so we can see what's going on.
JSWolf is offline   Reply With Quote
Old 04-08-2015, 05:38 AM   #4
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Check for .8em or 0.8em w/o space between number and unit of measurement (don't forget ; at the end of line).

Last edited by Divingduck; 04-08-2015 at 05:40 AM.
Divingduck is offline   Reply With Quote
Old 04-08-2015, 10:51 AM   #5
pypo
Member
pypo began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jul 2014
Device: none
Pretty sure this has nothing to do with the CSS. For some reason the computed final style is 22. There is nothing in the stylesheet that would compute to 22. The template is a Calibre template not something I created. Somewhere the 22 is being set as equal to 1em. I can increase the size of the font anywhere in the CSS but cannot decrease it. That's why I think it may be a bug. Also, I don't find anywhere in the documentation which says where the default font size is set (to 22 in my case).
pypo is offline   Reply With Quote
Advert
Old 04-08-2015, 11:22 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://manual.calibre-ebook.com/conv...size-rescaling
kovidgoyal is online now   Reply With Quote
Old 04-08-2015, 12:44 PM   #7
pypo
Member
pypo began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jul 2014
Device: none
Thank you. I fixed issue this by going to:

Edit Book > Preferences > Preview Settings > Minimum Font Size
pypo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moon+ Reader your favorite font and font size? loodio Android Devices 6 01-30-2016 06:50 PM
Problem changing font size using font size key Waylander Conversion 0 10-02-2013 03:30 PM
Determine font and font size on incoming epub? peaceridge Calibre 4 01-30-2012 03:35 PM
PRS-300 Med font size too big, but small font size too small eli2k Sony Reader 4 05-28-2010 09:47 AM


All times are GMT -4. The time now is 09:54 AM.


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