Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas fillText, input dir, etc. #28

Open
mapmeld opened this issue Jan 1, 2023 · 1 comment
Open

Canvas fillText, input dir, etc. #28

mapmeld opened this issue Jan 1, 2023 · 1 comment

Comments

@mapmeld
Copy link

mapmeld commented Jan 1, 2023

Hi ! I really like the RTL styling guide, شكرا for creating it

Ages ago I made a page on pieces I had picked up from working with Arabic text on a few projects ( https://mapmeld.com/rtl-guide/ )

Examples which I think would be worth adding into your list are:

  1. More about input dir="rtl" / dir="auto" - you have sections on form dir and dir="auto" but I didn't see a specific point about input dir="auto" accepting either-direction content in search elements etc.

  2. canvas element's ctx.fillText - the x value will refer to the left edge of the text. So if you were placing RTL text by the start / right-edge coordinate, it would be

textWidth = ctx.measureText(txtString).width;
ctx.fillText(txtString, xRight - textWidth, yVal);
  1. Numbered lists, such as
  1. Item one
  2. Item two

As a language learner, I had to see this ___ .1 format in real life to be confident that it was correct

  1. Example of a currency symbol
  2. Video players (i.e. playback is still left-to-right)
@shadeed
Copy link
Owner

shadeed commented Jan 1, 2023

Thanks a lot, glad you like it.

The mentioned points are all important. The canvas thing is totally new, good to know.

I will review them and amend to the current update. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants