diff --git a/source b/source
index 13ac7862d0c..44958edf80c 100644
--- a/source
+++ b/source
@@ -65332,13 +65332,21 @@ 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 offscreenCanvas's inherited language to the language of this canvas
element.
Set the offscreenCanvas's inherited direction to the directionality of this canvas
element.
Return offscreenCanvas.
shadowOffsetY
, shadowBlur
, lang
, font
, textAlign
, textBaseline
,
Text styles
+ context.lang [ = value ]
+ styles.lang [ = value ]
+ -
+
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
" which is described
+ below.
+
+ 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.
@@ -66694,15 +66718,53 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
Notice that the font is only loaded inside the worker, and not in the document context.
+ 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 used when setting the
+ 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.
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.
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, 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 Treat input to the text preparation algorithm as right-to-left text. Use the following process to determine the value for the
+ If object's font style source object is a 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. Default to the directionality of the Otherwise, object's font style source object is an
+ The
data-x="dom-context-2d-direction-rtl">rtl"
inherited direction
referred to in the text preparation algorithminherit
+
+
+
canvas
+ element:
+
- canvas
element or Document
- as appropriate.OffscreenCanvas
object. Set the inherited direction to the
+ OffscreenCanvas
's internal inherited
+ direction.fontKerning
attribute's allowed keywords
@@ -67033,32 +67109,11 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
Document
with a non-null document elementOffscreenCanvas
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
@@ -71288,9 +71348,37 @@ 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 OffscreenCanvas
's inherited language to the
+ Document's language.
Set the OffscreenCanvas
's 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
@@ -146999,6 +147087,7 @@ INSERT INTERFACES HERE
Ştefan Vargyas,
Stefan Weiss,
Steffen Meschkat,
+ Stephen Chenney,
Stephen Ma,
Stephen Stewart,
Stephen White,