View Single Post
Old 03-24-2018, 11:44 AM   #10
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,737
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
One last question ... what about calibre? Does it support rtl text in epub2 and if so is it done via CSS?
Based on my limited tests, both Calibre E-book viewer and Calibre editor support epub2 books in which RTL text was marked via css or dir attributes. I don't know whether @kovidgoyal used any special css for this, because, AFAIK, Webkit natively supports RTL text with the exception of final sentence punctuation characters.

You can test this with this sample sentence:

a) without dir and lang attributes:

Code:
<p>أنا قادر على أكل الزجاج وهذا لا يؤلمني.</p>
b) with dir and lang attributes.

Code:
<p xml:lang="ar" dir="rtl">أنا قادر على أكل الزجاج وهذا لا يؤلمني.</p>
If you copy both paragraphs into an empty epub and look at them in the Preview/Book View window, both sentences will look pretty much identical, because all characters are automatically correctly shaped and all words are displayed in the correct order. However, if you look real close you'll see that in the first example the final period is displayed on the right side (as in LTR text) and in the second example it's displayed on the left side (as it should be).

Last edited by Doitsu; 03-24-2018 at 11:48 AM.
Doitsu is offline   Reply With Quote