tei-publisher-app
tei-publisher-app copied to clipboard
Support for right-to-left scripts in built-in ODDs
I am not sure this is the correct repository to raise this issue but I would deeply appreciate built-in support for right-to-left languages based on the @xml:lang
attribute. Currently, none of the built-in ODDs correctly renders Arabic as right-aligned. This could be done by a simple CSS instruction for all block-level XML elements that carry a limited range of values in their @xml:lang
attribute. The CSS would be something like
/* render Arabic, Ottoman, Persian, and Hebrew as rtl */
[lang = "ar"],
[lang = "ota"],
[lang = "fa"],
[lang = "he"],
[lang *="-Arab-AR"]{
direction:rtl;
text-align:right;
}
/* render languages in Latin script as ltr */
/* this is not strictly necessary as the behaviour defaults to ltr */
[lang = "en"],
[lang = "fr"],
[lang = "de"],
[lang = "it"],
[lang *="ar-Latn-"],
[lang *="ota-Latn-"]{
direction:ltr;
text-align:left;
}
In addition, it would make sense to change the default font based on the script family as the default fonts aren't very legible for Arabic script.