03-05-2013, 08:53 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2013
Device: iPad
|
Font color not being converted correctly
I have an ebook in MOBI format that has coding samples in it which are color coded. When I use Calibre to convert it to ePub the font face and colors are not converted. How can I preserve fonts?
Here are examples (also screenshots attached): MOBI - main text is in Arial, but code segment is in Courier with grey background (I can't figure out how to show grey background here) The first thing you’ll notice is that Objective-C uses a completely different syntax for communicating between objects. For example, compare the method calling syntax of C# to the message sending syntax of Objective-C: person.sayHello(); // C# method calling. [person sayHello ]; // Objective-C message sending. EPUB - main text is in Arial, but code segment is in Arial with no highlight The first thing you’ll notice is that Objective-C uses a completely different syntax for communicating between objects. For example, compare the method calling syntax of C# to the message sending syntax of Objective-C:
person.sayHello(); // C# method calling. [person sayHello ]; // Objective-C message sending. |
03-05-2013, 09:44 PM | #2 |
creator of calibre
Posts: 43,896
Karma: 22666668
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
Advert | |
|
03-05-2013, 11:22 PM | #3 |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2013
Device: iPad
|
Source file
1. The book is copyrighted, but you can download the source book from here:
http://www.syncfusion.com/resources/...ks/objective-c 2. Go the the Introduction page and under the "The Objective-C Language" section and you will see the "code" shown in my message and in the screenshots attached to first message. 3. Now, convert it to EPUB using default settings (or for the iPad 3) 4. Open the EPUB version and go to the same page. The "code" will not have the same color formatting. It will all be black text. |
03-06-2013, 01:04 AM | #4 |
creator of calibre
Posts: 43,896
Karma: 22666668
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That book use @import rules inside <style> tags, this is not supported by the calibre conversion pipeline. I suggest you use the calibre tweak book feature, and change those to use normal <link> tags for the stylesheets, then convert and you will be fine.
Or wait for the next calibre release. |
03-06-2013, 01:15 AM | #5 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2013
Device: iPad
|
I appreciate your patience. Please forgive my ignorance, but I am not familiar with
Quote:
Also, when do you expect the next version to be available? |
|
Advert | |
|
03-06-2013, 07:28 AM | #6 |
Grand Sorcerer
Posts: 12,192
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
|
03-06-2013, 10:28 AM | #7 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
|
03-06-2013, 04:11 PM | #8 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2013
Device: iPad
|
Thanks, PeterT.
Quote:
Thank you both again! |
|
Tags |
calibre, epub, font colour, mobi |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gentium Book font (ttf) doesn't render correctly | therealjoeblow | Kobo Reader | 13 | 06-21-2015 09:24 AM |
Color Can a Russian jetbook color be converted to english? | gil | Ectaco jetBook | 3 | 03-24-2013 07:44 PM |
Am I using @font-face correctly? | phossler | Sigil | 12 | 11-30-2012 04:38 PM |
PRS-650 Font too small - Calibre converted | henders254 | Sony Reader | 14 | 06-09-2011 03:04 AM |
Converted ePub file displays correctly in Calibre Viewer, but not on Sony | library addict | Conversion | 6 | 03-24-2011 09:58 AM |