Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-29-2012, 08:44 AM   #1
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Question Font Rescaling Question

Just to show I have read the manual - the manual states:-

The base font size of a document is the most common font size in that document, i.e., the size of the bulk of text in that document. When you specify a Base font size, calibre automatically rescales all font sizes in the document proportionately, so that the most common font size becomes the specified base font size and other font sizes are rescaled appropriately.

I have been converting some HTML files to ePub with a specified Base of 18pt. (my eyesight is not as good as it was).

When the file is converted I find that in the CSS the "Calibre" class?/style? contains an 'em' size equivalent to 18pt and that the Body tag in the main files contain refer to "Calibre".

The problem is that the bulk of the text is controlled by a different class?/style? (e.g. "Calibre1") which is usually '1em'. I have been manually amending this font size but from the above quote this should not be necessary.

Following a tip I found in another thread I changed the Font size key values to 16pt, 16pt, 18pt, 20pt, 22pt 24pt. After converting another file and found no difference. I use the generic ereader profiles for input and output.

What have I missed and need to learn?
Thasaidon is offline   Reply With Quote
Old 10-29-2012, 11:34 PM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Thasaidon View Post
Following a tip I found in another thread I changed the Font size key values to 16pt, 16pt, 18pt, 20pt, 22pt 24pt. After converting another file and found no difference. I use the generic ereader profiles for input and output.

What have I missed and need to learn?
What you may have missed is that calibre remembers conversions settings per book. If you go to preferences - common options and change the settings these settings will be used for all future new conversions. Redoing old conversions may use old saved settings. When redoing an old conversion either drill down into the conversion and make the changes or click the "Restore defaults" button at the bottom of the conversion page, see attached.

Good Luck.
Attached Thumbnails
Click image for larger version

Name:	restore default.jpg
Views:	231
Size:	214.2 KB
ID:	95145  
DoctorOhh is offline   Reply With Quote
Old 10-30-2012, 05:04 AM   #3
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by DoctorOhh View Post
What you may have missed is that calibre remembers conversions settings per book. If you go to preferences - common options and change the settings Good Luck.
Thanks for the suggestion but I can say that is something I am aware of. I always click on "Restore Defaults" except whan I specifically want to retain where I have changed them.
Thasaidon is offline   Reply With Quote
Old 11-03-2012, 05:41 AM   #4
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
I have been doing a little investigation. Just to make things clear it is the first time I have converted the HTM files concerned.

Before converting the last file I stripped out all formatting excepr for <p> paragraphs and <h3> headings,

When I converted the file the bulk of the text was controlled by the "Calibre1" CSS element with a font size of 1em. The only other text was the headings.

Has the way the Font Rescaling changed is it broken or am I missing something?

Last edited by Thasaidon; 11-03-2012 at 05:43 AM. Reason: typos
Thasaidon is offline   Reply With Quote
Old 11-03-2012, 05:59 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Thasaidon View Post
Before converting the last file I stripped out all formatting excepr for <p> paragraphs and <h3> headings,

When I converted the file the bulk of the text was controlled by the "Calibre1" CSS element with a font size of 1em. The only other text was the headings.

Has the way the Font Rescaling changed is it broken or am I missing something?
I just checked and the font scale is working for me. After I convert a ePub my base font is 1.25em (15pt). I attached my settings.
Attached Thumbnails
Click image for larger version

Name:	fontscale.jpg
Views:	281
Size:	157.1 KB
ID:	95363  
DoctorOhh is offline   Reply With Quote
Old 11-03-2012, 08:21 PM   #6
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,199
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Thasaidon View Post
I have been doing a little investigation. Just to make things clear it is the first time I have converted the HTM files concerned.

Before converting the last file I stripped out all formatting excepr for <p> paragraphs and <h3> headings,

When I converted the file the bulk of the text was controlled by the "Calibre1" CSS element with a font size of 1em. The only other text was the headings.

Has the way the Font Rescaling changed is it broken or am I missing something?
If your converted epub's html looks something like:
Code:
<body class="calibre">
<h3 class="calibre2"Chapter 1</h3>
<p class="calibre1">This is the first main body paragraph.</p>
<p class="calibre1">This is the second main body paragraph.</p>
<p class="calibre3">Third para contains really small text.</p>
and its css file something like:
Code:
.calibre {font-size: 1.5em; ...}
.calibre1 {font-size: 1em; ...}
.calibre2 {font-size: 2em; ...}
.calibre3 {font-size: 0.5em; ...}
Then I would expect your epub to actually display as follows, because font-sizes of nested items are multiplicative:
  • Main body paragraphs: size = 1.5em x 1em = 1.5em, i.e. 18pt
  • h3 headings: size = 1.5em x 2em = 3em, i.e. 36pt
  • 3rd small para: size = 1.5em x 0.5em = 0.75em, i.e. 9pt

The <p> and <h3> are children of <body> so they inherit the 1.5em from body css multiplied by any font-size (if any) in their own <p> or <h3> class.

Is this clear as mud?
jackie_w is offline   Reply With Quote
Old 11-04-2012, 05:56 AM   #7
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by jackie_w View Post
If your converted epub's html looks something like:
[
Is this clear as mud?
Thanks for that it clarified my hazy ideas of how that worked.

Thanks also to DoctorOhh for your help.

In a day or so when I have a little time I will try another conversion being very careful to m,ake a note of the conditions before and the results after. If the results are the same I will post them up and you can then tell me what I am misunderstanding

Thanks again
Thasaidon is offline   Reply With Quote
Old 11-10-2012, 01:27 AM   #8
Barb-B
Tech appreciator
Barb-B began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jul 2012
Device: Onyx Boox Kepler Pro (wow I love this reader!)
You mentioned stripping out some of the markup. Does that mean you have Sigil? Or did you use some other tool? If you have Sigil, it should be pretty easy to edit the css styles to get your fonts bigger. If you don't have Sigil, I highly recommend it. I've found it much easier to get my files exactly the way I want them with it than by messing around with Calibre conversion settings. With a short period for learning curve, you can do all kinds of cool stuff to your files.
Barb-B is offline   Reply With Quote
Old 11-11-2012, 01:46 PM   #9
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by Barb-B View Post
You mentioned stripping out some of the markup. Does that mean you have Sigil? .
Thanks Barb-B, I am familiar with and do use Sigil but in this case I used Tag Stripper to strip a HTML file to its bare bones.

I thought Calibre was not behaving as described bu it was just ignorance about how CSS files worked on my part. Unfortunately until I retire next year I have only limited time to spend acquiring such knowledge.
Thasaidon is offline   Reply With Quote
Old 11-11-2012, 02:14 PM   #10
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: 29,763
Karma: 54401244
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 Thasaidon View Post
Thanks Barb-B, I am familiar with and do use Sigil but in this case I used Tag Stripper to strip a HTML file to its bare bones.

I thought Calibre was not behaving as described bu it was just ignorance about how CSS files worked on my part. Unfortunately until I retire next year I have only limited time to spend acquiring such knowledge.
CSS is fairly easy, when you think of it as moving all that long (repetitive) styling to a common place (the stylesheet) and using a shortname instead
The green, is my explanation and not to be included in a CSS as is.
Different calibre numbers may assigned for each conversion AND you can still use your own names in edits. Use a name (selector) i a document, then it should be in some linked CSS.

Code:
Make the first paragraph (used as a Sub title) after any H2: italic
h2 + p {
	font-style: italic;
	}
The standard document (body) style. You could change the name to body if there were no bony variants needed
.calibre {
    display: block;
    font-size: 1.2em;
    margin-bottom: 0;
    margin-left: 2pt;
    margin-right: 16pt;
    margin-top: 0;
    padding-left: 0;
    padding-right: 0;
    page-break-before: always
    }
The standard NON-indented Paragraph style
.calibre2 {
    display: block;
    margin-bottom: 0.5em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0.5em;
    text-align: justify;
    text-indent: 0
    }
The standard indented Paragraph style
.calibre3 {
    display: block;
    margin-bottom: 0.5em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0.5em;
    text-align: justify;
    text-indent: 2em
    }

The advantage of this, 1 change in a CSS fixes all the usage
theducks is online now   Reply With Quote
Reply

Tags
font rescaling

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about the font hack jdomingos76 Kindle Developer's Corner 2 03-17-2011 09:00 PM
font size rescaling doesn't danhi Conversion 5 02-05-2011 01:18 PM
txt to epub & font rescaling dhume01 Calibre 1 10-13-2010 02:49 AM
PRS-300 Font size question cromulent742 Sony Reader 6 07-25-2010 12:01 PM
Question about font jblitereader Ectaco jetBook 9 04-22-2010 03:55 PM


All times are GMT -4. The time now is 07:46 PM.


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