diff --git a/source b/source index 309eea911f7..c3641e4a082 100644 --- a/source +++ b/source @@ -3956,6 +3956,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
The following features are defined in CSS Text: CSSTEXT
context.lang [ = value ]
styles.lang [ = value ]
Returns the current language setting.
+ +Can be set to a BCP 47 language tag, the empty string, or "inherit
", to change the language used when
+ resolving fonts. "inherit
" takes the language
+ from the canvas
element's language, or the associated document
+ element when there is no canvas
element.
The default is "inherit
".
context.font [ = value ]
styles.font [ = value ]
Returns the current font settings.
Can be set, to change the font. The syntax is the same as for the CSS 'font' - property; values that cannot be parsed as CSS font values are ignored.
+ property; values that cannot be parsed as CSS font values are ignored. The default is "10px + sans-serif".Relative keywords and lengths are computed relative to the font of the canvas
element.
alphabetic
.
+ Objects that implement the CanvasTextDrawingStyles
interface have an associated
+ language value used to localize font
+ rendering. Valid values are a BCP 47 language tag, the empty string, or "inherit" where the language comes from the
+ canvas
element's language, or the associated document element when there
+ is no canvas
element. Initially, the language must be "inherit
".
The lang
getter steps are to return
+ this's language.
The lang
setter steps are to set this's
+ language to the given value.
The direction
IDL attribute, on getting, must return
the current value. On setting, the current value must be changed to the new value. When the object
@@ -67281,16 +67323,12 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
Treat input to the text preparation algorithm as right-to-left text.
inherit
- Default to the directionality of the canvas
element or Document
- as appropriate.
Use the process in the text preparation algorithm to obtain the text
+ direction from the canvas
element, placeholder canvas
element, or
+ document element.
The fontKerning
attribute's allowed keywords
@@ -67399,8 +67437,39 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
Let font be the current font of target, as given
by that object's font
attribute.
Let language be the target's language.
If language is "inherit
":
Let sourceObject be object's font style source + object
If sourceObject is a canvas
+ element, then set language to the sourceObject's
+ language.
Otherwise:
+ +Assert: sourceObject is an OffscreenCanvas
object.
Set language to the sourceObject's + inherited language.
If language is the empty string, then set language to + explicitly unknown.
Apply the appropriate step from the following list to determine the value of direction:
+Apply the appropriate step from the following list to determine the value of + direction:
Document
with a non-null document elementLet sourceObject be object's font style source + object
If sourceObject is a canvas
+ element, then let direction be sourceObject's
+ directionality.
Otherwise:
+Assert: sourceObject is an OffscreenCanvas
object.
Let direction be sourceObject's + inherited direction.
Form a hypothetical infinitely-wide CSS line box containing a single - inline box containing the text text, with its CSS properties set as + inline box containing the text text, with the CSS + content language set to language, and with its CSS properties set as follows: