Thread: PRS-900 Epub and Justification
View Single Post
Old 05-05-2010, 06:57 PM   #5
dmapr
Addict
dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.dmapr composes epic poetry in binary.
 
Posts: 255
Karma: 90958
Join Date: Sep 2009
Device: PRS-950, Kobo Aura HD
Quote:
Originally Posted by jswinden View Post
I agree. The 900 defaults to justified text alignment unless the ePub CSS specifies another alignment.

If you prefer left justification, you can use the Python scripts ineptepub.py and ineptkey.py (use Google to find info) to strip the DRM and then use calibre to make whatever changes you desire.

Hint: You can copy the ePub file and rename it to a zip file, then extract the zip file and search for any .CSS files. For example: Copy MyBook.epub to MyBook.zip then extract MyBook.zip into the folder MyBook. The CSS will show any hardcoded formatting. Search the CSS file(s) for strings like text-align: justify; or text-align: left;. If one or more of these strings are found, then text alignment is hardcoded in the ePub. Calibre can be used to override any CSS, but you have to know to do it.
I am not so sure about defaulting to justify. I had to explicitly set text-align: justify on some of the EPUB books and I just double-checked the whole chain of the CSS — the left-alignment is not hard-coded anywhere. Since the default alignment is supposed to be left for LTR languages I would expect that to be the correct behavior.

I've never used Calibre to perform an EPUB to EPUB conversion, so I prefer to manually modify the included CSS.

EDIT: On the second thought, I have flashed mine with porkupan's firmware and did not provide any text-alignment defaults in my userStyle.css, so it's quite possible that the stock firmware does indeed set the default to justify. Don't know what the latest versions of the hack specify as the default.

Last edited by dmapr; 05-06-2010 at 09:04 AM.
dmapr is online now   Reply With Quote