The TextMetrics interface represents the dimensions of a piece
text in the canvas, as created by the CanvasRenderingContext2D.measureText()
The TextMetrics interface represents the dimensions of a piece text in the canvas, as created by the `CanvasRenderingContext2D.measureText()`
(actual-bounding-box-ascent this)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the top the bounding rectangle used to render the text, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the top the bounding rectangle used to render the text, in CSS pixels.
(actual-bounding-box-descent this)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the bottom the bounding rectangle used to render the text, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the bottom the bounding rectangle used to render the text, in CSS pixels.
(actual-bounding-box-left this)
Property.
Is a double giving the distance parallel to the baseline from alignment point given by the CanvasRenderingContext2D.textAlign to the left side of the bounding rectangle of the given text, CSS pixels.
Property. Is a double giving the distance parallel to the baseline from alignment point given by the CanvasRenderingContext2D.textAlign to the left side of the bounding rectangle of the given text, CSS pixels.
(actual-bounding-box-right this)
Property.
Is a double giving the distance parallel to the baseline from alignment point given by the CanvasRenderingContext2D.textAlign to the right side of the bounding rectangle of the given text, CSS pixels.
Property. Is a double giving the distance parallel to the baseline from alignment point given by the CanvasRenderingContext2D.textAlign to the right side of the bounding rectangle of the given text, CSS pixels.
(alphabetic-baseline this)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the alphabetic of the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the alphabetic of the line box, in CSS pixels.
(em-height-ascent this)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the top the em square in the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the top the em square in the line box, in CSS pixels.
(em-height-descent this)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the bottom the em square in the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the bottom the em square in the line box, in CSS pixels.
(font-bounding-box-ascent this)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the top the highest bounding rectangle of all the fonts used to render text, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the top the highest bounding rectangle of all the fonts used to render text, in CSS pixels.
(font-bounding-box-descent this)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the bottom the bounding rectangle of all the fonts used to render the text, CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the bottom the bounding rectangle of all the fonts used to render the text, CSS pixels.
(hanging-baseline this)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the hanging of the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the hanging of the line box, in CSS pixels.
(ideographic-baseline this)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the ideographic of the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the ideographic of the line box, in CSS pixels.
(set-actual-bounding-box-ascent! this val)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the top the bounding rectangle used to render the text, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the top the bounding rectangle used to render the text, in CSS pixels.
(set-actual-bounding-box-descent! this val)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the bottom the bounding rectangle used to render the text, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the bottom the bounding rectangle used to render the text, in CSS pixels.
(set-actual-bounding-box-left! this val)
Property.
Is a double giving the distance parallel to the baseline from alignment point given by the CanvasRenderingContext2D.textAlign to the left side of the bounding rectangle of the given text, CSS pixels.
Property. Is a double giving the distance parallel to the baseline from alignment point given by the CanvasRenderingContext2D.textAlign to the left side of the bounding rectangle of the given text, CSS pixels.
(set-actual-bounding-box-right! this val)
Property.
Is a double giving the distance parallel to the baseline from alignment point given by the CanvasRenderingContext2D.textAlign to the right side of the bounding rectangle of the given text, CSS pixels.
Property. Is a double giving the distance parallel to the baseline from alignment point given by the CanvasRenderingContext2D.textAlign to the right side of the bounding rectangle of the given text, CSS pixels.
(set-alphabetic-baseline! this val)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the alphabetic of the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the alphabetic of the line box, in CSS pixels.
(set-em-height-ascent! this val)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the top the em square in the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the top the em square in the line box, in CSS pixels.
(set-em-height-descent! this val)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the bottom the em square in the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the bottom the em square in the line box, in CSS pixels.
(set-font-bounding-box-ascent! this val)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the top the highest bounding rectangle of all the fonts used to render text, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the top the highest bounding rectangle of all the fonts used to render text, in CSS pixels.
(set-font-bounding-box-descent! this val)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the bottom the bounding rectangle of all the fonts used to render the text, CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline attribute to the bottom the bounding rectangle of all the fonts used to render the text, CSS pixels.
(set-hanging-baseline! this val)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the hanging of the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the hanging of the line box, in CSS pixels.
(set-ideographic-baseline! this val)
Property.
Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the ideographic of the line box, in CSS pixels.
Property. Is a double giving the distance from the horizontal line indicated the CanvasRenderingContext2D.textBaseline property to the ideographic of the line box, in CSS pixels.
(width this)
Property.
[Read Only]
The read-only width property of the web.canvas.TextMetrics
contains the text's advance width (the width of that inline box)
CSS pixels.
var width = metrics.width;
See also: https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/width
Property. [Read Only] The read-only width property of the `web.canvas.TextMetrics` contains the text's advance width (the width of that inline box) CSS pixels. `var width = metrics.width;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/width`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close