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 11-11-2012, 07:37 AM   #1
Starko
Zealot
Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 998177
Join Date: Aug 2010
Device: Kindle 3
Arrow * to Mobi: setting monospace font size

The issue is that when reading programmers books (converted from EPUB) on my Kindle the letter size of all code examples (displayed in a monospace font) are significantly larger than the rest of the books font. As result the code bloks are larger but it's especially ugly & annoing when code is part of the line of other text. Is there anything i can do about it? See in attachment for example.
Attached Thumbnails
Click image for larger version

Name:	screen_shot-41941.gif
Views:	152
Size:	29.2 KB
ID:	95932  

Last edited by Starko; 11-11-2012 at 07:59 AM.
Starko is offline   Reply With Quote
Old 11-11-2012, 07:50 AM   #2
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,630
Karma: 25186576
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
You could use the inspect function in calibre reader to find font size for the code and change it with tweak epub (select text and right click on it to inspect)

Helen
speakingtohe is offline   Reply With Quote
Old 11-11-2012, 07:56 AM   #3
Starko
Zealot
Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 998177
Join Date: Aug 2010
Device: Kindle 3
Thanks helen. I tried but i am not good at CSS and i see that there are a lot of inheritance there so i have no idea what the actual font size is and where i have to change it. That would also mean that i'd have to do it every time with every book i convert.
I was more thinking in terms of having a setting somewhere that makes <pre>, <tt> and other monosize fonts smaller during conversion to moby.
Starko is offline   Reply With Quote
Old 11-11-2012, 12:06 PM   #4
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: 26,432
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Covert to azw3 instead you should get nicer looking results with that.
kovidgoyal is online now   Reply With Quote
Old 11-11-2012, 05:02 PM   #5
Starko
Zealot
Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 998177
Join Date: Aug 2010
Device: Kindle 3
Thanks, i just tried it and it does look much better!
Starko is offline   Reply With Quote
Old 11-11-2012, 05:17 PM   #6
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,630
Karma: 25186576
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
Quote:
Originally Posted by Starko View Post
Thanks helen. I tried but i am not good at CSS and i see that there are a lot of inheritance there so i have no idea what the actual font size is and where i have to change it. That would also mean that i'd have to do it every time with every book i convert.
I was more thinking in terms of having a setting somewhere that makes <pre>, <tt> and other monosize fonts smaller during conversion to moby.
Probably Kovid's advice will fix it, but if not...

I know very little about CSS either dammit.

One easy solution to try is under conversion>look and feel>filter style information. Check/tick fonts box. I did not think the kindle 3 had seperate fonts so this probably will not work, but if it does work you could make it your conversion default.

As to the tweak option, it is a bit of a pain in the butt to have to change a lot of files. I have done over 500 I am sure and and generally do 10 or less at a time. But when they are done they are done.

I inspect a selected portion of the text in the calibre viewer. Usually the font size is listed. At this point I uncheck the box beside the font size to see if everything looks better. If it does I tweak the epub and remove all font size lines in stylesheet.css with that size. Or change them to the size I want. Worst case I just remove every font size reference. Notepad works although there are better programs. Adobe dreamweaver for one.

Once you have done one it takes about a minute per book which to me is better than being annoyed constantly every time you reference the book.

Helen

PS I ignore the inheritance and you have the choice to preview the book before you rebuild it.

Last edited by speakingtohe; 11-11-2012 at 05:20 PM.
speakingtohe is offline   Reply With Quote
Old 11-16-2012, 06:47 AM   #7
Starko
Zealot
Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.Starko ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 998177
Join Date: Aug 2010
Device: Kindle 3
Helen, thank you for such a detailed response!
I am a tinkerer too. This time though, i decided to find out whether there was something that could be done quickly. And if not, than how much effort would be needed to actually understand how kindle handles monosize fonts. For example, regular browsers ignore your direct attempts to set font size for <pre> tag.
I am sure that there there are or at some point will be some ways to influence conversion. But using AZW3 works well enough (ideally i'd like to have monosize fonts yet another point smaller) so i will not spend any more time on this.
Thanks again anyway
Starko is offline   Reply With Quote
Old 11-16-2012, 04:04 PM   #8
jackie_w
Wizard
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: 2,903
Karma: 4329385
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
If you're a tinkerer you could try editing the css file in your book. Wherever you see the styling
Code:
font-family: monospace;
you could also add the extra styling
Code:
font-size: 0.8em;
... or whatever size you think looks best.
jackie_w is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Solved - setting font size for optimum reading PodPeople Ectaco jetBook 3 05-05-2011 04:01 PM
0.7.58 Mobi Font Size problem Blossom Conversion 15 04-30-2011 10:27 PM
Setting optimum font size for Aluratek Libre PodPeople Conversion 0 02-28-2011 10:27 AM
Smallest font size in Mobi hkdorama Kindle Formats 0 07-26-2010 05:07 AM
LIT->LRF Conversion - Quirky Base Font Size Setting orion2001 Calibre 6 09-27-2009 01:10 AM


All times are GMT -4. The time now is 02:03 AM.


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