diff --git a/source b/source index fde2ad71cd3..2fe5602f959 100644 --- a/source +++ b/source @@ -61382,12 +61382,12 @@ interface mixin CanvasTextDrawingStyles { attribute CanvasTextAlign textAlign; // (default: "start") attribute CanvasTextBaseline textBaseline; // (default: "alphabetic") attribute CanvasDirection direction; // (default: "inherit") - attribute double letterSpacing; // (default: 0) + attribute DOMString letterSpacing; // (default: "0px") attribute CanvasFontKerning fontKerning; // (default: "auto") attribute CanvasFontStretch fontStretch; // (default: "normal") attribute CanvasFontVariantCaps fontVariantCaps; // (default: "normal") attribute CanvasTextRendering textRendering; // (default: "auto") - attribute double wordSpacing; // (default: 0) + attribute DOMString wordSpacing; // (default: "0px") }; interface mixin CanvasPath { @@ -61824,9 +61824,11 @@ context.fillRect(100,0,50,50); // only this square remains
strokeStyle
, fillStyle
, globalAlpha
, lineWidth
, lineCap
,
data-x="dom-context-2d-textAlign">textAlign
, textBaseline
, direction
, letterSpacing
, fontKerning
, fontStretch
, fontVariantCaps
, textRendering
, wordSpacing
, imageSmoothingEnabled
, imageSmoothingQuality
.Returns the current spacing between characters in the text.
-Can be set, to change spacing between characters. Positive values spreads characters further - apart, while negative values brings them closer together. The default is 0.
+Can be set, to change spacing between characters. Values that cannot be parsed as a CSS
+ <length> are ignored. The default is "0px
".
context.fontKerning [ = value ]
Returns the current spacing between words in the text.
-Can be set, to change spacing between words. Positive values spreads words further apart, - while negative values brings them closer together. The default is 0.
+Can be set, to change spacing between words. Values that cannot be parsed as a CSS
+ <length> are ignored. The default is "0px
".
inherit
".
- The letterSpacing
IDL attribute, on
- getting, must return the current value. On setting, the current value must be changed to the new
- value, where values may be positive or negative. When the object implementing the
- CanvasTextDrawingStyles
interface is created,
- the letterSpacing
attribute must
- initially have the value 0.
Objects implement the CanvasTextDrawingStyles
interface have attributes tha
+ control the spacing between letters and words. Such objects have associated letter spacing and word spacing values, which are CSS
+ <length> values. Initially, both must be the result of parsing "0px
" as a CSS
+ <length>.
The letterSpacing
getter steps
+ are to return the serialized form of
+ this's letter
+ spacing.
The letterSpacing
setter steps are:
Let parsed be the result of parsing the given value as a CSS <length>.
If parsed is failure, then return.
Set this's letter spacing to + parsed.
The wordSpacing
getter steps are
+ to return the serialized form of
+ this's word
+ spacing.
The wordSpacing
setter steps are:
Let parsed be the result of parsing the given value as a CSS <length>.
If parsed is failure, then return.
Set this's word + spacing to parsed.
The fontKerning
IDL attribute, on
@@ -62618,14 +62653,6 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
value. When the object implementing the CanvasTextDrawingStyles
interface is created,
the textRendering
attribute must
initially have the value "auto
".
The wordSpacing
IDL attribute, on
- getting, must return the current value. On setting, the current value must be changed to the new
- value, where values may be positive or negative. When the object implementing the
- CanvasTextDrawingStyles
interface is created,
- the wordSpacing
attribute must
- initially have the value 0.
The textAlign
attribute's allowed keywords are
@@ -62887,7 +62914,7 @@ worker.postMessage(offscreenCanvas, [offscreenCanvas]);
letterSpacing
wordSpacing