HTML5 Guidelines for Web Developers

(coco) #1
5.6 Text 133

Figure 5.18 presents the horizontal anchor points for writing with textflow ltr
(left to right) and rtl (right to left), demonstrating the effect of directionality on
the attributes start and end.


In the browser, the directionality of a document can be changed via the global
attribute document.dir:
document.dir = [ *ltr | rtl ]

NOTE

Figure 5.18 Horizontal anchor points with “textAlign”


5.6.3 Vertical Anchor Point


The vertical anchor point and therefore the baseline on which all glyphs are
aligned is determined by the third and last text attribute, textBaseline:


context.textBaseline = [
top | middle | *alphabetic | bottom | hanging | ideographic
]

Free download pdf