Difference between textAlign Left and Start on a 2d canvas of context?

What is the difference between ctx.textAlign = 'start' and ctx.textAlign = 'left' when ctx is a 2d canvas context?

+4
source share
1 answer

The start value is aligned to the left when you use the LTR browser (from left to right). In RTL browsers, the start value is aligned to the right.

The start value is preferable for the content / text information, since it will be displayed in the preferred way for the reader (depending on browser settings). This is the default value for this attribute. It is preferable to align right or left only when you are sure that you will not introduce localization problems with rtl / lrt languages.

https://developer.mozilla.org/en-US/docs/Drawing_text_using_a_canvas

+7
source

Source: https://habr.com/ru/post/1495638/


All Articles