10-29-2012, 08:44 AM | #1 |
Hedge Wizard
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
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? |
10-29-2012, 11:34 PM | #2 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Good Luck. |
|
Advert | |
|
10-30-2012, 05:04 AM | #3 |
Hedge Wizard
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
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.
|
11-03-2012, 05:41 AM | #4 |
Hedge Wizard
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 |
11-03-2012, 05:59 AM | #5 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
|
|
Advert | |
|
11-03-2012, 08:21 PM | #6 | |
Grand Sorcerer
Posts: 6,205
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
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> Code:
.calibre {font-size: 1.5em; ...} .calibre1 {font-size: 1em; ...} .calibre2 {font-size: 2em; ...} .calibre3 {font-size: 0.5em; ...}
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? |
|
11-04-2012, 05:56 AM | #7 | |
Hedge Wizard
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
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 |
|
11-10-2012, 01:27 AM | #8 |
Tech appreciator
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.
|
11-11-2012, 01:46 PM | #9 | |
Hedge Wizard
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
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. |
|
11-11-2012, 02:14 PM | #10 | |
Well trained by Cats
Posts: 29,768
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:
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 |
|
Tags |
font rescaling |
Thread Tools | Search this Thread |
|
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 |