2023-11-08 21:04:56 +03:00
|
|
|
#import <HTML/CanvasRenderingContext2D.idl>
|
|
|
|
|
2023-08-03 13:18:17 +03:00
|
|
|
// https://html.spec.whatwg.org/multipage/canvas.html#canvastextalign
|
|
|
|
// enum CanvasTextAlign { "start", "end", "left", "right", "center" };
|
|
|
|
// enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
|
|
|
|
enum CanvasDirection { "ltr", "rtl", "inherit" };
|
|
|
|
enum CanvasFontKerning { "auto", "normal", "none" };
|
|
|
|
enum CanvasFontStretch { "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" };
|
|
|
|
enum CanvasFontVariantCaps { "normal", "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps" };
|
|
|
|
enum CanvasTextRendering { "auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision" };
|
|
|
|
|
|
|
|
// https://html.spec.whatwg.org/multipage/canvas.html#canvastextdrawingstyles
|
|
|
|
interface mixin CanvasTextDrawingStyles {
|
2023-08-07 22:48:49 +03:00
|
|
|
attribute DOMString font; // (default 10px sans-serif)
|
2023-08-03 13:18:17 +03:00
|
|
|
attribute CanvasTextAlign textAlign; // (default: "start")
|
|
|
|
attribute CanvasTextBaseline textBaseline; // (default: "alphabetic")
|
|
|
|
// FIXME: attribute CanvasDirection direction; // (default: "inherit")
|
|
|
|
// FIXME: attribute DOMString letterSpacing; // (default: "0px")
|
|
|
|
// FIXME: attribute CanvasFontKerning fontKerning; // (default: "auto")
|
|
|
|
// FIXME: attribute CanvasFontStretch fontStretch; // (default: "normal")
|
|
|
|
// FIXME: attribute CanvasFontVariantCaps fontVariantCaps; // (default: "normal")
|
|
|
|
// FIXME: attribute CanvasTextRendering textRendering; // (default: "auto")
|
|
|
|
// FIXME: attribute DOMString wordSpacing; // (default: "0px")
|
|
|
|
};
|