From eba506c96f8fe9abe96db35818c60fe8b66ef547 Mon Sep 17 00:00:00 2001
From: Stephen Chenney Returns the current language setting. Can be set, to change the language used when resolving fonts. The syntax and valid values
+ are the same as those for the lang element attribute. Values
+ that are not valid are ignored. The default is the lang of the shadowOffsetY, shadowBlur, lang, font, textAlign, textBaseline,
Notice that the font is only loaded inside the worker, and not in the document context.Text styles
+
context.lang [ = value ]styles.lang [ = value ]canvas element
+ or the unknown language when there is no canvas element.context.font [ = value ]styles.font [ = value ]
The choice of fonts and glyphs within a font may vary according to the lang
+ IDL attribute. On setting, lang must be
+ a valid BCP 47 language tag or the string "inherit".
+ To determine the used value
+ for lang, use the following steps:
If object's lang value is
+ "inherit", then
If object's font style source object is a canvas
+ element, then return the element's lang atribute
+ value.
Otherwise, object's font style source object is an
+ OffscreenCanvas object:
Let global be object's relevant global + object.
If global is a Window object, then return the
+ lang attribute from global's
+ associated Document.
Otherwise, return a user-agent-defined default lang.
Otherwise, the used value is the lang
+ value.
The lang IDL attribute, on getting, must return
+ the current value.
The font IDL attribute, on setting, must be parsed as a CSS <'font'> value (but
without supporting property-independent style sheet syntax like 'inherit'), and the resulting font
- must be assigned to the context, with the 'line-height' component forced to 'normal',
- with the 'font-size' component converted to CSS pixels,
- and with system fonts being computed to explicit values. If the new value is syntactically
- incorrect (including using property-independent style sheet syntax like 'inherit' or 'initial'),
- then it must be ignored, without assigning a new font value. CSS
lang, with the 'line-height'
+ component forced to 'normal', with the 'font-size' component converted to CSS pixels, and with system fonts being computed to explicit values. If the
+ new value is syntactically incorrect (including using property-independent style sheet syntax
+ like 'inherit' or 'initial'), then it must be ignored, without assigning a new font value.
+ CSS
Font family names must be interpreted in the context of the font style source
object when the font is to be used; any fonts embedded using Default to the directionality of the Use the following process to determine which direction to treat input to the text preparation algorithm If object's font style source object is a If dir attribute of the element is
+ Otherwise, use the value of the dir attribute of the element
+ as the direction. Otherwise, object's font style source object is an
+ Let global be object's relevant global
+ object. If global is a Let Document be the global's
+ associated If the value of the dir attribute from
+ Document is Otherwise, use the value of the dir attribute from
+ Document as the direction. Otherwise, treat input to the text preparation algorithm as left-to-right text. The Returns the current language setting. Can be set, to change the language used when resolving fonts. The syntax and valid values
- are the same as those for the lang element attribute. Values
- that are not valid are ignored. The default is the lang of the The default is "inherit", which uses the lang of the
+ Can be set, to change the language used when resolving fonts. The syntax and valid values
are the same as those for the lang element attribute, or the
- value "inherit".
inherit
- canvas element or Document
- as appropriate.
+
+ canvas
+ element:
+
+
+ auto then use the element's computed value of
+ 'direction' as the direction.OffscreenCanvas object:
+
+ Window object:
+
+ Document.auto then use the
+ Document's computed value of 'direction'
+ as the direction.fontKerning attribute's allowed keywords
@@ -146511,6 +146608,7 @@ INSERT INTERFACES HERE
Ştefan Vargyas,
Stefan Weiss,
Steffen Meschkat,
+ Stephen Chenney,
Stephen Ma,
Stephen Stewart,
Stephen White,
From 488b95b63d487a309a726ff6f55c40efa296a4bf Mon Sep 17 00:00:00 2001
From: Stephen Chenney canvas element
- or the unknown language when there is no canvas element.canvas element, or the Document associated with a Worker when there is no
+ canvas element, or a user-agent default language when neither source exists.context.font [ = value ]inherit" which is described
+ below.
The default is "inherit", which uses the lang of the
- canvas element, or the Document associated with a Worker when there is no
- canvas element, or a user-agent default language when neither source exists.
The default is "inherit".
context.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.
lang
IDL attribute. On setting, lang must be
a valid BCP 47 language tag or the string "inherit".
- To determine the used value
- for lang, use the following steps:
+ To determine the language for the font from
+ the lang IDL attribute, use the following steps:
If object's lang value is
"inherit", then
If object's font style source object is a canvas
- element, then return the element's lang atribute
- value.
lang attribute is
+ set to "inherit" (not on all changes to the element's language).Otherwise, if object's font style source object is an
+ OffscreenCanvas object created via transferControlToOffscreen,
+ then set the language for the font to
+ the source canvas element's language. The source
+ canvas's language should be snapshot at the time of transfer and the value used
+ whenever the lang value is "inherit".
Otherwise, object's font style source object is an
OffscreenCanvas object:
Let global be object's relevant global object.
If global is a Window object, then return the
- lang attribute from global's
- associated Document.
Otherwise, return a user-agent-defined default lang.
If global is a Window object, then set the language for the font to the
+ language from global's
+ associated Document.
+ The associated Document's
+ language should be snapshot when the OffscreenCanvas is
+ created and the value used whenever the lang
+ value is "inherit".
Otherwise, the language for the + font is explicitly unknown.
Otherwise, the used value is the lang
- value.
Otherwise, the language for the font is the lang value.
The lang IDL attribute, on getting, must return
@@ -66752,9 +66768,8 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
data-x="dom-context-2d-font">font IDL attribute, on setting, must be parsed as a CSS <'font'> value (but
without supporting property-independent style sheet syntax like 'inherit'), and the resulting font
- must be assigned to the context, with the primary language set to the used-value for lang, with the 'line-height'
+ must be assigned to the context, with the language
+ for the font as determined above, with the 'line-height'
component forced to 'normal', with the 'font-size' component converted to CSS pixels, and with system fonts being computed to explicit values. If the
new value is syntactically incorrect (including using property-independent style sheet syntax
@@ -66957,53 +66972,50 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
Treat input to the text preparation algorithm as right-to-left text.
inherit
- Use the following process to determine which direction to treat input to the text preparation algorithm
+Use the following process to determine the value for the
+ inherited direction referred to in the text preparation algorithm
If object's font style source object is a canvas
element:
If dir attribute of the element is
- auto then use the element's computed value of
- 'direction' as the direction.
If the element has a computed value for + 'direction' use that as the inherited direction.
Otherwise, use the value of the dir attribute of the element - as the direction.
Otherwise, use the directionality + of the element as the inherited direction.
Otherwise, object's font style source object is an
- OffscreenCanvas object:
OffscreenCanvas object, set the
+ inherited direction when
+ the OffscreenCanvas is created and use the same value through the
+ life of the OffscreenCanvas:
Let global be object's relevant global - object.
If the OffscreenCanvas was created via transferControlToOffscreen,
+ then set the inherited direction
+ to that of source canvas element's as described in the case above.
If global is a Window object:
Otherwise, if global is a Window object:
Let Document be the global's
associated Document.
If the value of the dir attribute from
- Document is auto then use the
- Document's computed value of 'direction'
- as the direction.
Otherwise, use the value of the dir attribute from - Document as the direction.
Use the directionality of the + Document as the inherited direction.
Otherwise, treat input to the text preparation algorithm as left-to-right text.
Otherwise, set the inherited direction to + "ltr".
Document with a non-null document elementSet this canvas element's context
mode to placeholder.
Set the inherited language of
+ offscreenCanvas to the language of this
+ canvas element.
Set the inherited direction of
+ offscreenCanvas to the directionality of this
+ canvas element.
Return offscreenCanvas.
If object's font style source object is a canvas
element, then set the language for the
- font to the element's language. The language for the font must be updated when the
- rendering context is created and each time the
- lang attribute is
- set to "inherit" (not on all changes to the element's language).
Otherwise, if object's font style source object is an
- OffscreenCanvas object created via transferControlToOffscreen,
- then set the language for the font to
- the source canvas element's language. The source
- canvas's language should be snapshot at the time of transfer and the value used
- whenever the lang value is "inherit".
Otherwise, object's font style source object is an
- OffscreenCanvas object:
Let global be object's relevant global - object.
If global is a Window object, then set the language for the font to the
- language from global's
- associated Document.
- The associated Document's
- language should be snapshot when the OffscreenCanvas is
- created and the value used whenever the lang
- value is "inherit".
Otherwise, the language for the - font is explicitly unknown.
Otherwise, object's font style source object is an
+ OffscreenCanvas object/ Set the
+ language for the font to the OffscreenCanvas's internal
+ inherited language.
Otherwise, the language for the font is the lang value.
If object's font style source object is a canvas
element:
If the element has a computed value for 'direction' use that as the inherited direction.
Otherwise, object's font style source object is an
- OffscreenCanvas object, set the
- inherited direction when
- the OffscreenCanvas is created and use the same value through the
- life of the OffscreenCanvas:
If the OffscreenCanvas was created via transferControlToOffscreen,
- then set the inherited direction
- to that of source canvas element's as described in the case above.
Otherwise, if global is a Window object:
Let Document be the global's
- associated Document.
Use the directionality of the - Document as the inherited direction.
Otherwise, set the inherited direction to - "ltr".
Otherwise, object's font style source object is an
+ OffscreenCanvas object. Set the inherited direction to the
+ OffscreenCanvas's internal inherited
+ direction.
OffscreenCanvas
object. Initially, all the bitmap's pixels are transparent black.
+ An OffscreenCanvas object has an internal inherited language and inherited direction set when
+ the OffscreenCanvas is created.
An OffscreenCanvas object can have a rendering context bound to it. Initially,
it does not have a bound rendering context. To keep track of whether it has a rendering context
or not, and what kind of rendering context it is, an OffscreenCanvas object also
@@ -71377,9 +71337,35 @@ interface OffscreenCanvas : EventTarget {
array of transparent black pixels of the dimensions specified by width and
height; and its width and height attributes initialized to width and
- height respectively.
Let global be the OffscreenCanvas's relevant global
+ object.
If global is a Window object:
Let Document be the global's
+ associated Document.
Set the inherited language + to the Document's language.
Set the inherited direction + to the Document's directionality.
Otherwise:
+Set the inherited language + to explicitly unknown.
Set the inherited direction + to "ltr".
OffscreenCanvas objects are transferable. Their transfer steps, given value and
From 60a59711005d2ba6888ef91bb545a7af7d4076c0 Mon Sep 17 00:00:00 2001
From: Stephen Chenney
The choice of fonts and glyphs within a font may vary according to the lang
- IDL attribute. On setting, lang must be
- a valid BCP 47 language tag or the string "inherit".
- To determine the language for the font from
- the lang IDL attribute, use the following steps:
Objects that implement the CanvasTextDrawingStyles interface have a lang attribute
+ that controls localization of the font. The lang IDL
+ attribute, on getting, must return the current value. The lang setter steps are:
If object's lang value is
- "inherit", then
If object's font style source object is a canvas
- element, then set the language for the
- font to the element's language.
Otherwise, object's font style source object is an
- OffscreenCanvas object/ Set the
- language for the font to the OffscreenCanvas's internal
- inherited language.
Otherwise, the language for the font is the lang value.
Change the current value to the new value.
Set the language for the font using the + following steps:
+If the value is "inherit", then
If object's font style source object is a canvas
+ element, then set the language for the
+ font to the element's language.
Otherwise, object's font style source object is an
+ OffscreenCanvas object/ Set the
+ language for the font to the OffscreenCanvas's internal
+ inherited language.
Otherwise, the language for the font + is the value.
The lang IDL attribute, on getting, must return
- the current value.
When the object implementing the CanvasTextDrawingStyles interface is created,
+ the lang attribute must initially have the value
+ "inherit" and the
+ language for the font must be set as above.
The font IDL attribute, on setting, must be
Date: Thu, 23 Jan 2025 17:46:19 -0500
Subject: [PATCH 06/19] Next round of edits.
---
source | 85 +++++++++++++++++++++++++++++++---------------------------
1 file changed, 45 insertions(+), 40 deletions(-)
diff --git a/source b/source
index 444a147871e..44958edf80c 100644
--- a/source
+++ b/source
@@ -65332,20 +65332,20 @@ callback BlobCallback = undefined (Blob? blob);
and height content attributes of this
canvas element.
Set the placeholder canvas
- element of offscreenCanvas to a weak reference to this canvas
- element.
Set the offscreenCanvas's placeholder canvas element of
+ offscreenCanvas to a weak reference to this canvas element.
Set this canvas element's context
mode to placeholder.
Set the inherited language of
- offscreenCanvas to the language of this
- canvas element.
Set the offscreenCanvas's inherited language to the language of this canvas element.
Set the inherited direction of
- offscreenCanvas to the directionality of this
- canvas element.
Set the offscreenCanvas's inherited direction to the directionality of this canvas element.
Return offscreenCanvas.
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. The default is "10px sans-serif".
+ 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.
Objects that implement the CanvasTextDrawingStyles interface have a lang attribute
- that controls localization of the font. The lang IDL
- attribute, on getting, must return the current value. The lang setter steps are:
font attribute.
+
+ The lang getter steps are to return the current
+ value.
The lang setter steps are:
Change the current value to the new value.
Set the language for the font using the - following steps:
+If the value is "inherit", then
If the value is "inherit", then
If object's font style source object is a canvas
- element, then set the language for the
- font to the element's language.
Otherwise, object's font style source object is an
- OffscreenCanvas object/ Set the
- language for the font to the OffscreenCanvas's internal
- inherited language.
Otherwise, the language for the font - is the value.
If object's font style source object is a canvas
+ element, then set the font
+ language to the element's language.
Otherwise, object's font style source object is an
+ OffscreenCanvas object. Set the
+ font language to the OffscreenCanvas's internal
+ inherited language.
Otherwise, the font + language is the value.
When the object implementing the CanvasTextDrawingStyles interface is created,
the lang attribute must initially have the value
"inherit" and the
- language for the font must be set as above.
The font IDL attribute, on setting, must be parsed as a CSS <'font'> value (but
without supporting property-independent style sheet syntax like 'inherit'), and the resulting font
- must be assigned to the context, with the language
- for the font as determined above, with the 'line-height'
- component forced to 'normal', with the 'font-size' component converted to CSS pixels, and with system fonts being computed to explicit values. If the
- new value is syntactically incorrect (including using property-independent style sheet syntax
- like 'inherit' or 'initial'), then it must be ignored, without assigning a new font value.
- CSS
Font family names must be interpreted in the context of the font style source
object when the font is to be used; any fonts embedded using Let Document be the global's
associated Set the inherited language
- to the Document's language. Set the Set the inherited direction
+ Set the OffscreenCanvas : EventTarget {
Document.OffscreenCanvas's inherited language to the
+ Document's language.OffscreenCanvas's inherited direction
to the Document's directionality.
Otherwise, the font - language is the value.
lang attribute.
When the object implementing the CanvasTextDrawingStyles interface is created,
@@ -71409,11 +71410,18 @@ interface OffscreenCanvas : EventTarget {
Let width and height be the dimensions of value's bitmap.
Let language and direction be the values of value's + inherited language and + inherited direction.
Unset value's bitmap.
Set dataHolder.[[Width]] to width and dataHolder.[[Height]] to height.
Set dataHolder.[[Language]] to language and + dataHolder.[[Direction]] to direction.
Set dataHolder.[[PlaceholderCanvas]] to be a weak reference to
value's placeholder canvas
element, if value has one, or null if it does not.
Set value's inherited + language to dataHolder.[[Language]] and inherited direction to + dataHolder.[[Direction]].
If dataHolder.[[PlaceholderCanvas]] is not null, set value's placeholder Can be set, to change the language used when resolving fonts. The syntax and valid values
are the same as those for the lang element attribute, or the
- value " The default is " Objects that implement the canvas element to
dataHolder.[[PlaceholderCanvas]] (while maintaining the weak reference
From 25efd43f4e15648911ce647ed0c6ae61640d0063 Mon Sep 17 00:00:00 2001
From: Stephen Chenney inherit" which is described
+ value "inherit" with meaning given
below.inherit".CanvasTextDrawingStyles interface have a lang attribute
that controls localization of the font. It is used to set the internal font language used when setting the
- font attribute.font.
The lang getter steps are to return the current
value.
lang setter steps,
with the 'line-height' component forced to 'normal', with the
'font-size' component converted to CSS pixels, and with
system fonts being computed to explicit values. If the new value is syntactically incorrect
From 369688c6713e4393291a34427a4018ee8bb734b8 Mon Sep 17 00:00:00 2001
From: Stephen Chenney Can be set, to change the language used when resolving fonts. The syntax and valid values
are the same as those for the lang element attribute, or the
- value "inherit" with meaning given
+ value "inherit" with meaning given
below.
The default is "inherit".
The default is "inherit".
context.font [ = value ]Objects that implement the CanvasTextDrawingStyles interface have a lang attribute
- that controls localization of the font. It is used to set the internal font language for localizing the
- font.
The lang getter steps are to return the current
- value.
The lang setter steps are:
Change the current value to the new value.
If the value is "inherit", then
If object's font style source object is a canvas
- element, then set the font
- language to the element's language.
Otherwise, object's font style source object is an
- OffscreenCanvas object. Set the
- font language to the OffscreenCanvas's internal
- inherited language.
Otherwise, the font
- language is the value, with the semantics of the global lang attribute.
When the object implementing the CanvasTextDrawingStyles interface is created,
- the lang attribute must initially have the value
- "inherit" and the
- font language must be set as
- above.
The font IDL attribute, on setting, must be parsed as a CSS <'font'> value (but
without supporting property-independent style sheet syntax like 'inherit'), and the resulting font
- must be assigned to the context, localized with the font language as determined by the
- lang setter steps,
- with the 'line-height' component forced to 'normal', with the
- 'font-size' component converted to CSS pixels, and with
- system fonts being computed to explicit values. If the new value is syntactically incorrect
- (including using property-independent style sheet syntax like 'inherit' or 'initial'), then it
- must be ignored, without assigning a new font value.CSS
Font family names must be interpreted in the context of the font style source
object when the font is to be used; any fonts embedded using
data-x="dom-context-2d-textBaseline">textBaseline attribute must initially have the value
alphabetic.
Objects that implement the CanvasTextDrawingStyles interface have a
+ lang
+ attribute to localize font rendering.
The lang IDL attribute, on getting, must return
+ the current value. On setting, the current value must be changed to the new value. When the object
+ implementing the CanvasTextDrawingStyles interface is created, the lang attribute must initially have the value
+ "inherit".
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
@@ -66966,6 +66937,27 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
The lang attribute's allowed values are either
+ a value that is valid for the lang element attribute, or the value
+ "inherit".
+
+
If the value is "inherit", use the
+ following process to determine the value for the inherited language referred to in the
+ text preparation algorithm:
If object's font style source object is a canvas
+ element, then set the inherited
+ language to the element's language.
Otherwise, object's font style source object is an
+ OffscreenCanvas object. Set the inherited language to the
+ OffscreenCanvas's internal
+ inherited language.
The direction attribute's allowed keywords are
as follows:
inherit
Use the following process to determine the value for the
- inherited direction referred to in the text preparation algorithm
inherited
+ direction referred to in the text preparation algorithm:
If object's font style source object is a canvas
@@ -67110,6 +67103,24 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
Let font be the current font of target, as given
by that object's font attribute.
Apply the appropriate step from the following list to determine the value of language:
+ +lang attribute has the value "inherit"lang attribute with the semantics of the lang element attribute.Apply the appropriate step from the following list to determine the value of direction:
@@ -67146,6 +67157,10 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]); +The following features are defined in CSS Text: CSSTEXT
canvas element.
Set the offscreenCanvas's placeholder canvas element of
- offscreenCanvas to a weak reference to this canvas element.
canvas element
+ to a weak reference to this canvas element.
Set this canvas element's context
mode to placeholder.
Set the offscreenCanvas's inherited language to the language of this canvas element.
canvas element.
Set the offscreenCanvas's inherited direction to the with the 'font-size' component converted to CSS pixels, and with system fonts being computed to explicit values. If the new value is syntactically incorrect (including using property-independent style sheet syntax like 'inherit' or 'initial'), - then it must be ignored, without assigning a new font value.CSS
+ then it must be ignored, without assigning a new font value. CSSFont family names must be interpreted in the context of the font style source
object when the font is to be used; any fonts embedded using Returns the current language setting. Can be set, to change the language used when resolving fonts. The syntax and valid values
- are the same as those for the lang element attribute, or the
- value "inherit" with meaning given
- below. Can be set to a BCP 47 language tag, the empty string, or "inherit", to change the language used when
+ resolving fonts. The "inherit" string
+ takes the lanugage from the canvas element's language, or the associated Document when there
+ is no canvas element. The default is "inherit".
Date: Fri, 21 Feb 2025 19:52:59 -0500
Subject: [PATCH 12/19] Next iteration
---
source | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/source b/source
index 8e53ebc14b5..1ad398cfaf8 100644
--- a/source
+++ b/source
@@ -66913,10 +66913,11 @@ transform. ack Shaun Morris. -->
data-x="dom-context-2d-textBaseline">textBaseline attribute must initially have the value
alphabetic.
Objects that implement the CanvasTextDrawingStyles interface have a
- lang
- attribute to localize font rendering.
Objects that implement the CanvasTextDrawingStyles interface have an
+ associated language value
+ which is a BCP 47 language tag, the empty string, or "inherit", used to localize font rendering.
+ Initially, the language must
+ be "inherit".
The lang IDL attribute, on getting, must return
- the current value. On setting, the current value must be changed to the new value. When the object
- implementing the CanvasTextDrawingStyles interface is created, the lang attribute must initially have the value
- "inherit".
The lang getter step is to return
+ this's language.
The lang setter step is to set this's
+ language to the string.
The direction IDL attribute, on getting, must return
@@ -67311,7 +67316,7 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
If the value is "inherit", use the
following process to determine the value for the inherited language referred to in the
- text preparation algorithm:
If object's font style source object is a 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. The "inherit" string
- takes the lanugage from the canvas element's language, or the associated Document when there
+ Can be set to a BCP 47 language tag, the empty string, or " The default is "inherit". The default is " Objects that implement the canvas
From bf760d78c0c0c03104e89fcead88cf9e6b859960 Mon Sep 17 00:00:00 2001
From: Stephen Chenney inherit", to change the language used when
+ resolving fonts. "inherit"
+ takes the language from the canvas element's language, or the associated Document when there
is no canvas element.inherit".context.font [ = value ]CanvasTextDrawingStyles interface have an
associated language value
- which is a BCP 47 language tag, the empty string, or "inherit", used to localize font rendering.
+ which is a BCP 47 language tag, the empty string, or "inherit", used to localize font rendering.
Initially, the language must
- be "inherit".inherit".
The lang getter step is to return
+ data-x="dom-context-2d-lang">lang getter steps are to return
this's language.
The lang setter step is to set this's
+
The lang setter steps are to set this's
language to the string.
The The If the value is "inherit", use the
- following process to determine the value for the If object's font style source object is a Otherwise, object's font style source object is an
-
lang attribute's allowed values are either
a value that is valid for the lang element attribute, or the value
- "inherit".
-
- inherited language referred to in the
- text preparation algorithm whenever that algorithm is run:
-
+ "inherit". If the value is "canvas
- element, then set the inherited
- language to the element's language.OffscreenCanvas object. Set the inherited language to the
- OffscreenCanvas's internal
- inherited language.inherit",
+ use the process in the text preparation algorithm to obtain the
+ language from the canvas element, placeholder canvas, or document.
The direction attribute's allowed keywords are
as follows:
inherit
- Use the following process to determine the value for the
- inherited
- direction referred to in the text preparation algorithm:
If object's font style source object is a canvas
- element:
If the element has a computed value for - 'direction' use that as the inherited direction.
Otherwise, use the directionality - of the element as the inherited direction.
Otherwise, object's font style source object is an
- OffscreenCanvas object. Set the inherited direction to the
- OffscreenCanvas's internal inherited
- direction.
Use the process in the text preparation algorithm to obtain the text + direction from the canvas element, placeholder canvas, or document.
The fontKerning attribute's allowed keywords
@@ -67481,13 +67446,26 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
lang attribute has the value "inherit"inherit"
+ If object's font style source object is a canvas
+ element, set language to the element's
+ language.
Otherwise, object's font style source object is an
+ OffscreenCanvas object. Set language to the
+ OffscreenCanvas's internal
+ inherited language.
Set language to the target's lang attribute with the semantics of the lang element attribute.direction attribute has the value "inherit"If object's font style source object is a canvas
+ element:
If the element has a computed value for + 'direction' set the direction to the element's + computed value
+Otherwise, set the direction to the directionality of the element.
+Otherwise, object's font style source object is an
+ OffscreenCanvas object. Set the direction to the
+ OffscreenCanvas's internal inherited direction.
Let global be the OffscreenCanvas's relevant global
- object.
If global is a Window object:
Let global be the OffscreenCanvas's relevant global
+ object.
If global is a Window object:
Let Document be the global's
associated Document.
Otherwise:
+Otherwise:
Set the inherited language to explicitly unknown.
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 when there
+ 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".
Objects that implement the CanvasTextDrawingStyles interface have an
associated language value
- which is a BCP 47 language tag, the empty string, or "inherit", used to localize font rendering.
- Initially, the language must
- be "inherit".
inherit".
The lang getter steps are to return
@@ -67309,13 +67310,6 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
The lang attribute's allowed values are either
- a value that is valid for the lang element attribute, or the value
- "inherit". If the value is "inherit",
- use the process in the text preparation algorithm to obtain the
- language from the canvas element, placeholder canvas, or document.
The direction attribute's allowed keywords are
as follows:
font attribute.Apply the appropriate step from the following list to determine the value of language:
+Apply the following algorithm to determine the value of language:
-Set language to the target's language.
+lang attribute has the value "inherit"If object's font style source object is a canvas
- element, set language to the element's
- language.
Otherwise, object's font style source object is an
- OffscreenCanvas object. Set language to the
- OffscreenCanvas's internal
- inherited language.
If language is "inherit":
lang attribute with the semantics of the lang element attribute.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 internal + inherited language.
+The constructor OffscreenCanvas(width,
- height), when invoked, must create a new OffscreenCanvas
- object with its bitmap initialized to a rectangular
- array of transparent black pixels of the dimensions specified by width and
- height; and its width and height attributes initialized to width and
- height respectively. The inherited
- language and inherited direction
- internal values must be set as follows:
When the OffscreenCanvas(width,
+ height) constructor is invoked, the user agent must run the following
+ steps:
Let global be the Let offscreen be a new OffscreenCanvas's relevant global
+ OffscreenCanvas object.
Initialize offscreen's bitmap + to a rectangular array of transparent black pixels of the dimensions specified + by width and height.
+Initialize offscreen's width to
+ width.
Initialize offscreen's height to
+ height.
Let global be the offscreen's relevant global object.
If global is a Window object:
Let Document be the global's
- associated Document.
Let Element be the document element of the
+ global's associated
+ Document.
Set the OffscreenCanvas's inherited language to the
- Document's language.
Initialize offscreen's inherited language to the + Element's language.
+Set the OffscreenCanvas's inherited direction
- to the Document's directionality.
Initialize offscreen's inherited direction + to the Element's directionality.
+Otherwise:
Set the inherited language - to explicitly unknown.
Set the inherited direction - to "ltr".
Initialize offscreen's inherited language to explicitly + unknown.
+Initialize offscreen's inherited direction to "ltr".
+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".
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
@@ -67325,7 +67325,7 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
inherit
Use the process in the text preparation algorithm to obtain the text - direction from the canvas element, placeholder canvas, or document.
The fontKerning attribute's allowed keywords
@@ -67434,43 +67434,23 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
Let font be the current font of target, as given
by that object's font attribute.
Apply the following algorithm to determine the value of language:
+Let language be the target's language.
If language is "inherit":
Set language to the target's language.
-Let sourceObject be object's font style source + object
If language is "inherit":
If sourceObject is a canvas
+ element, then set language to the sourceObject's
+ language.
Otherwise:
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 internal - inherited language.
-Assert: sourceObject is an OffscreenCanvas object.
Set language to the sourceObject's + inherited language.
direction attribute has the value "inherit"If object's font style source object is a canvas
- element:
Let sourceObject be object's font style source + object
If sourceObject is a canvas
+ element, then let direction be sourceObject's
+ directionality.
Otherwise:
If the element has a computed value for - 'direction' set the direction to the element's - computed value
-Otherwise, set the direction to the directionality of the element.
-Assert: sourceObject is an OffscreenCanvas object.
Let direction be sourceObject's + inherited direction.
Otherwise, object's font style source object is an
- OffscreenCanvas object. Set the direction to the
- OffscreenCanvas's internal 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:
| content language | -language | -
| 'direction' | direction | @@ -71764,65 +71735,47 @@ interface OffscreenCanvas : EventTarget { data-x="offscreencanvas-context-detached">detached by algorithms defined in this specification. -