Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 11-21-2015, 11:41 PM   #1
oberon567
Junior Member
oberon567 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2015
Device: none
Complex Font Conversion Problem

Hello,

I am in the process of converting various files from MS Word 2015 .docx format to ePub using Calibre.

I have run into various problems, many of which I have managed to fix one way or another. But here is one I cannot figure out.

The written Tibetan script does not have spaces. It has small dots between each syllable and occasional spaces between sentences. However, when encoded in proper UTF-8 encoding, neither these dots nor those spaces are breaking spaces (those spaces are not the traditional Unicode character of a space).

Most of the time the script is supposed to be fully justified, with the exception of headers or titles which are centered. To achieve this the easiest way using Word is to install the Thai language pack and then choose "Thai Justification" as the justification option. Obviously when converting to PDF and printing this is fine, but it is not so fine when making a file that can be used on various computers. Another option is to create a macro that automatically inserts zero-width breaks after every dot.

THE PROBLEM:
After converting to ePub, when the text has been justified using either of the methods above, the text refuses to render properly when viewed in an Android device (or at least the Android device I am using as my tester). When using an iPhone or other Apple device the justification seems to work fine. However, on the Android it always considers those spaces to be the only breaking points, and as such it causes a line break after every single space.

I have no idea what to change, since the same file is rendering fine on Apple devices but not on Android devices.

I am attaching an example. It has the Word file as well as the epub file. The epub file actually needs more formatting, I am still learning how to control relative font sizes using Calibre during the conversion process. However the relative font sizes are not the issue, it is the text wrapping and how that pertains to Android devices. Any input would be greatly appreciated!

PS - I have full rights to distribute the files attached, they are my own intellectual property and are (will be) freely distributed, with no license, once completed. I do not know if there is any other way I need to verify this...
Attached Files
File Type: zip Tibetan file help.zip (8.62 MB, 250 views)
oberon567 is offline   Reply With Quote
Old 11-21-2015, 11:47 PM   #2
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: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I dont see how this is a conversion problem. It appears to be a problem with whatever renderer you are testing with in android. As a workaround you can try replacing those space characters with some other unicode character that the android renderer does not treat as a break, the most obvious being the non-breaking space. Google for unicode space characters to get a list of suitable choices.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-22-2015, 11:34 AM   #3
jackie_w
Grand Sorcerer
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: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@oberon567,

It's worth pointing out that not all Android epub readers are created equal. Especially when it comes to honouring the epub's internal css file.

I don't think you mentioned which Android epub reading app you used to do your testing. In case it helps, I've found Mantano and Pocketbook to be pretty good with css but Moon+ to be less so.
jackie_w is offline   Reply With Quote
Old 11-22-2015, 12:07 PM   #4
oberon567
Junior Member
oberon567 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2015
Device: none
Thanks for the replies.

The character in the original Word document that appears as a space is non-breaking space, (Unicode character 00A0, as opposed to 0020), and that is why I was confused when the Android ePub renderer was treating it as if it were a breaking space (even though the iPhone renderer, iBooks, was treating it properly).

My confusion was whether it was a conversion problem or whether it was resultant from the ePub reader I was using. I have been using Moon+ as my tester, which jackie suggests isn't always true to the internal CSS. So I will try one of the alternatives and see what happens.

Is there any way to confirm what the actual Unicode character included in the final ePub CSS is? Can I be confident that the 00a0 character that was in the original Word document made it to the ePub, and any other error is on the part of the reader?
oberon567 is offline   Reply With Quote
Old 11-22-2015, 12:55 PM   #5
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: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Open the epub in the editor, position the cursor next to the space character in question and look in the lower right corner of the screent osee what character it is.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-22-2015, 02:33 PM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Moon+ completely ignores a book's CSS and imposes its own styling on the book, which is fine for the typical novel, but not good at all for your purpose. Have you tried something like KOReader or FBReader?
HarryT is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle font problem with EPUB to mobi conversion djstormer ePub 1 10-11-2012 12:08 PM
Multiple Font Conversion jgrauman Conversion 2 02-13-2012 12:52 AM
Conversion font Yoisdo Conversion 2 04-18-2011 08:20 PM
problem adding complex html file space4 Library Management 1 03-05-2011 01:45 PM
Font size after conversion draghetto Calibre 1 06-30-2010 11:57 AM


All times are GMT -4. The time now is 02:47 PM.


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