![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
Font size changes when using rem (azw3 to epub)
I noticed a new book had a larger than usual base font size and thought that the original book was made like that. But when I compared (with Calibre viewer) the original azw3 the font size is smaller than for the converted epub.
After comparing and testing css's etc. it seems that the original has a base font size set to 0.83rem. This becomes 1.2rem in the converted epub resulting in the larger font size. Why is this? I have searched the forum and read the calibre manual without finding any clue. The "Disable font size rescaling" is on. I buy most of my books from Amazon and convert books regularly which almost always work fine. After checking some other books that had the same font size for azw3 and epub, I noticed that all those books have the base font set in em. The problematic book is set in rem. If I just change "rem" to "em", the converted epub uses the exact same value. (There is no font size set in html.) azw3 font-size: 0.83rem; becomes epub font-size: 1.2rem; azw3 font-size: 0.83em; becomes epub font-size: 0.83em; The css class is used in <body class="xxx". Not a big problem and easily changed, but I'm curious why this happens and what is the best way to get the same font size in the converted epub. |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,680
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Do not convert KF8 to ePub. That's not the best way to do it. Install the KindleUnpack and do a KF8 to ePub and KindleUnpack will shift the KF8 code to ePub. Then load the ePub into the Calibre Editor and check the eBook. Fix any errors that show and when the check shows no errors, you are done and you'll have an ePub that's just like the KF8.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,320
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I cannot reproduce, converting the following html
Code:
<!DOCTYPE html> <html> <head> <title>test</title> <meta charset="utf-8" /> </head> <body> <p style="font-size: 0.8rem">Hello i love yuou</p> </body> </html> Code:
.calibre { display: block; padding-left: 0; padding-right: 0; margin: 0 5pt } .calibre1 { display: block; font-size: 0.8rem; margin: 1em 0 } |
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
I do that sometimes but most of the time you get one huge xhtml-file which you may want to split in separate files which takes time, and Calibre-conversions seem to work almost always.
But I just tried doing it with this book, and the font-size in the resulting epub retained the same font size (0.83rem). But why did Calibre change it? Still curious... ![]() Thanks. ![]() |
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
Hmm, I just used the ScrambleEbook to send you a copy, but when I convert _that_ azw3 the resulting epub has the same font-size (0.83rem)...???
Is there something strange in my original azw3? |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,680
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
When you get a single HTML, it's usually a self-published eBook because a lot of self-published authors have no clue how to make an eBook. The real publishers use their ePub version as the source and those ePubs are already split.
I still suggest code shifting even if you have to split into the various chapters/parts. |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,320
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Impossible to say without access to the original azw3 -- the one thing to check is to make sure that font rescaling was actually turned off, look at the job log for the ocnversion and search for font_rescaling
|
![]() |
![]() |
![]() |
#8 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,710
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Conversion->Structure->Detect chapters at (XPath expression): to something other than '/', I use a slightly modified version of the default. BR
Conversion->Structure->Chapter mark: to pagebreak Conversion->EPUB Output->Do not split on page breaks : unchecked |
|
![]() |
![]() |
![]() |
#9 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
Thanks BetterRed.
I do get split files when I use the normal Calibre conversion. It is when I use kindleunpack I end up with the whole book in one single xhtml-file. It is then I want to split up the file, and doing an epub->epub Calibre conversion I assume would negative the point of using kindleunpack in the first place? (This is mostly a "problem" for me for one certain author-group that makes non-fiction books I like. It seems they start with Word and end up with an azw3 without any headers or internal toc. Since it's an non-fiction I tend to read every now and then and use the toc. Sometimes I have edited a book, changed all title headings to actual <h#> and created a toc. Maybe this can be done automatically by Calibre?) |
![]() |
![]() |
![]() |
#10 | ||
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,710
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() Quote:
BR |
||
![]() |
![]() |
![]() |
#11 | ||
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,680
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Azw3 to pdf: increase font size | bcbob | Conversion | 2 | 08-01-2016 04:14 PM |
Epub->AZW3 --- embedded font display is wonky | GrannyGrump | Conversion | 2 | 08-25-2015 06:54 AM |
Calibre: epub to azw3 generationg huge file size | zamana | Conversion | 12 | 01-09-2014 12:36 AM |
AZW3 font size help & Identifier question | SampleAndy | Conversion | 7 | 10-24-2013 09:20 PM |
Determine font and font size on incoming epub? | peaceridge | Calibre | 4 | 01-30-2012 03:35 PM |