mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
Previously, we only supported very basic numbers and a single level of
text positioning support in the `x`, `y`, `dx` and `dy` attributes in
`<text>` and `<tspan>` SVG elements.
This improves our support for them in the following ways:
* Any `length-percentage` or `number` type value is accepted;
* Nested `<text>` and `<tspan>` use the 'current text position'
concept to determine where the next text run should go;
* We expose the attributes' values through the API.
Though we still do not support:
* Applying the `rotate` attribute;
* Applying transformations on a per-character basis.
* Proper horizontal and vertical glyph advancing (we just use the path
bounding box for now).
13 lines
592 B
Text
13 lines
592 B
Text
#import <SVG/SVGAnimatedLengthList.idl>
|
|
#import <SVG/SVGAnimatedNumberList.idl>
|
|
#import <SVG/SVGTextContentElement.idl>
|
|
|
|
// https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextPositioningElement
|
|
[Exposed=Window]
|
|
interface SVGTextPositioningElement : SVGTextContentElement {
|
|
[SameObject] readonly attribute SVGAnimatedLengthList x;
|
|
[SameObject] readonly attribute SVGAnimatedLengthList y;
|
|
[SameObject] readonly attribute SVGAnimatedLengthList dx;
|
|
[SameObject] readonly attribute SVGAnimatedLengthList dy;
|
|
[SameObject] readonly attribute SVGAnimatedNumberList rotate;
|
|
};
|