typemytype/drawbot

Arabic type settings mixed with Latin characters looks to be wrong

Closed this issue · 9 comments

In Drawbot if the Arabic text starts with a Latin word, the Latin word appears at the wrong place, here on the left, but it should be on the right.
image
In text edit at first it behave the same

image but if we change the writing direction to right to left, then the text is correct image As far as I know, in Drawbot looks to be impossible to change the writing direction.

here the text Grtsk میتوان در بسیاری

Yes, maybe we need a writingDirection() function or something like it. I'm not sure how this should work internally.

Can this be part of our language() function, or do you think it's better to add a new API function?

well a writingDirection(direction) sound good and explicit...

with direction options:

  • None -> kCTWritingDirectionNatural (also the default)
  • "l2r" -> kCTWritingDirectionLeftToRight
  • "r2l" -> kCTWritingDirectionRightToLeft

It could possible be automated related to language('ar') but then we need to find out what the language direction is...

image

a quick PR is comming (no test yet)

@typemytype

It could possible be automated related to language('ar') but then we need to find out what the language direction is...

It is probably best not attempted as a single language can be written in two scripts with different directionality, e.g. Uzbek. But if you wanted contemporary defaults and used only the 2-letter codes, there are not that many…

true, @MrBrezina I prefer an explicit api, no magic guessing