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 09-10-2013, 06:22 PM   #16
alvareo
Member
alvareo began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2011
Device: Kindle Paperwhite
Hey there, I'm having this same problem except for an (old) mobi, yet gbm's solution (by converting to new mobi, exploding, repacking) didn't work for me. I thought it better to post about it in here instead of making a new thread, but I can make one if it'd be better. Would it help if I attached the problematic mobi?

Thanks.
alvareo is offline   Reply With Quote
Old 09-10-2013, 10:45 PM   #17
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: 25,377
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As of calibre 1.2 font sizes specified in rems are automatically converted to ems.
kovidgoyal is online now   Reply With Quote
Old 09-11-2013, 05:11 PM   #18
alvareo
Member
alvareo began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2011
Device: Kindle Paperwhite
Does this mean converting to any format should fix this problem? That didn't happen to me Converting also makes the TOC (not the one on the text itself, but the one the Kindle's interface gives me) disappear. Am I doing anything wrong? Thanks and sorry for the trouble.
alvareo is offline   Reply With Quote
Old 09-21-2013, 07:25 PM   #19
ryanuk
Junior Member
ryanuk began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: GPB
Hi Folks... +1 for this issue... I'm new to the whole process, but have managed to successfully move a number of azw files to ePub to use in Google Play Books.

There are just a few where the font size is teeny-tiny and unreadable, and cannot be adjusted.

I have tried to do what is suggested in this thread - exploding the azw file and changing the 'rem' to 'em' - but seemed to have no impact.

I've attached a screengrab of the exploded azw - I changed the 0001.css file in text editor doing a find/replace of 'rem' to 'em'.

I've also exploded the epub, and done the same in there - since once the epub comes in to existence, it then has a stylesheet.css. But again - doesn't work..

any guidance here would be appreciated... it's driving me bonkers =D

ryanuk is offline   Reply With Quote
Old 09-22-2013, 03:36 AM   #20
ryanuk
Junior Member
ryanuk began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: GPB
Unhappy

I have opened the exploded ePub in Sigil - as, like Bernie suggested, I was thinking it may just be that the font sizes are specified in rem in the stylesheets and all the component html parts (of which there are lots)..

But (like Kovid said), Calibre is changing over the rem to em in conversion, and when I look at the stylesheet for a random part (part0003.html), all the rems are indeed ems...

So I am really puzzled why Google Play Books displays the text in teeny-tiny mode and doesn't allow me to change? Calibre converted tons of azw to ePub that display *fine* in GPB - so why just these handful that are weird? (and of course they're the handful that I really want to read!) lol

ryanuk is offline   Reply With Quote
Old 09-22-2013, 10:13 AM   #21
davebell
Junior Member
davebell began at the beginning.
 
Posts: 3
Karma: 12
Join Date: Sep 2013
Device: nexus 7
I had the same problem converting AZW3 -> EPUB for use with Google Play. The issue was that after converting AZW3 -> EPUB (and EPUB -> EPUB) each individual part*.html file still had a font-size style applied to the html element which used rems, for example:

<html xmlns="http://www.w3.org/1999/xhtml" style="font-size:1.136rem;">

I replaced all of these with ems (using sed), rebuilt the book, uploaded to Google Play, and it works fine.

Dave
davebell is offline   Reply With Quote
Old 09-22-2013, 10:27 AM   #22
gbm
Guru
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: 617
Karma: 1243612
Join Date: Jun 2010
Device: Hisence Sero 7 Pro, Nook STR, jetbook lite
Quote:
Originally Posted by davebell View Post
I had the same problem converting AZW3 -> EPUB for use with Google Play. The issue was that after converting AZW3 -> EPUB (and EPUB -> EPUB) each individual part*.html file still had a font-size style applied to the html element which used rems, for example:

<html xmlns="http://www.w3.org/1999/xhtml" style="font-size:1.136rem;">

I replaced all of these with ems (using sed), rebuilt the book, uploaded to Google Play, and it works fine.

Dave
The best way is to delete or comment out the the hard coded font size in the html, so it does not over rule the css font size.

bernie
gbm is offline   Reply With Quote
Old 09-22-2013, 10:45 AM   #23
davebell
Junior Member
davebell began at the beginning.
 
Posts: 3
Karma: 12
Join Date: Sep 2013
Device: nexus 7
Quote:
Originally Posted by gbm View Post
The best way is to delete or comment out the the hard coded font size in the html, so it does not over rule the css font size.

bernie
Good point. I have a number of books with this issue, I'll try that next time.
davebell is offline   Reply With Quote
Old 09-22-2013, 11:33 AM   #24
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: 25,377
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...f235a6efe004a1
kovidgoyal is online now   Reply With Quote
Old 09-22-2013, 03:43 PM   #25
ryanuk
Junior Member
ryanuk began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: GPB
Quote:
Originally Posted by gbm View Post
The best way is to delete or comment out the the hard coded font size in the html, so it does not over rule the css font size.

bernie
Thanks Bernie; so, does that mean I need to edit each html 'part'? This particular book seems to have some 223 html parts to it... or is there some bulk way you can do it?

The code link you dropped Kovid; I assume that is some override code? Can I drop that somewhere?

Thanks guys

/R
ryanuk is offline   Reply With Quote
Old 09-22-2013, 03:52 PM   #26
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,022
Karma: 777817
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by ryanuk View Post
The code link you dropped Kovid; I assume that is some override code? Can I drop that somewhere?
That means it is now part of the Calibre source. If you run Calibre from source it is available immediately, and if not will be part of next Friday's release.
itimpi is offline   Reply With Quote
Old 09-22-2013, 03:55 PM   #27
ryanuk
Junior Member
ryanuk began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: GPB
Sorry - the other thing is I've exploded the ePub and looked at random html parts, and none have rem in at all (only ems from where I replaced them in the azw3 manually, and the same result when I let Calibre do it automagically on convert).

The html parts only have a Text>Partnnnn.html file, and Styles>page_styles.css and Styles>stylesheet.css content.

The page_Styles.css content is thus:

@page {
margin-bottom: 5pt;
margin-top: 5pt
}

and the stylesheet.css has 789 lines of code, but only ems and no rems referenced therein...

Still looks whacky in GPB - am I doing something wrong?
ryanuk is offline   Reply With Quote
Old 09-22-2013, 04:25 PM   #28
ryanuk
Junior Member
ryanuk began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2013
Device: GPB
Quote:
Originally Posted by itimpi View Post
...will be part of next Friday's release.
Excellent... I'll wait it out until Friday and give it all a try from scratch then

I think, ultimately, the problem must lie in the actual Android Play Books app, since the fonts adjust and look perfect on the reader via chrome on my laptop... it's only in the app on my Nexus/HTC phone where the font is tiny and won't adjust - so I dunno what the problem is - must be something to do with how it handles the html.

Anyway, I'll see if Kovids wizardry works on Fri!
ryanuk is offline   Reply With Quote
Old 09-22-2013, 06:11 PM   #29
davebell
Junior Member
davebell began at the beginning.
 
Posts: 3
Karma: 12
Join Date: Sep 2013
Device: nexus 7
Quote:
Originally Posted by kovidgoyal View Post
I tested from the latest source and it works perfectly. EPUBs can now be uploaded directly to GPB and font resizing works. Thank you!
davebell is offline   Reply With Quote
Old 09-23-2013, 01:02 PM   #30
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: 25,377
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You're welcome I was rather astonished to see style attributes on <html> elements, not something I had ever come across before.
kovidgoyal is online now   Reply With Quote
Reply

Tags
calibre conversion

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mobi to epub conversion - odd font size... richrock Conversion 3 03-06-2013 05:30 PM
Kindle font problem with EPUB to mobi conversion djstormer ePub 1 10-11-2012 12:08 PM
Hacks kindle 3.4 Font size enlarge dawniefitzgerald Amazon Kindle 0 10-05-2012 04:59 PM
How to enlarge font size of mobi dictionary redmayfair General Discussions 3 07-14-2012 05:07 AM
Small font size with epub in latest software. timt1961 HanLin eBook 7 09-21-2009 06:55 AM


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


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