mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
canvas: Move font selection and text shaping to script
(#38979)
Instead of doing font selection and text shaping in `canvas`, move this to `script`. This allows canvas to use the shared `Document` `FontContext`, which has access to web fonts. In addition, ensure that there is a font style accessible for `OffscreenCanvas` in workers. Testing: This causes a number of WPT tests to start to pass as web fonts are supported on canvas again. In addition, some start to fail as they expose other issues: - The lack of support for the `Context2D.fontStretch` property - Issues with zerosize gradient interpolation. - Differences between quoted and unquoted font family names. This seems like a timing issue with the way we are handling web fonts. The test seems to be expecting Local fonts to be available immediately (without waiting for them to load). This isn't how Servo works ATM. Seems like an issue with the test. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
91b27d98a2
commit
cb64def7e6
49 changed files with 604 additions and 809 deletions
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.align.center.html]
|
||||
[textAlign center is the center of the em squares (not the bounding box)]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.align.end.ltr.html]
|
||||
[textAlign end with ltr is the right edge]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.align.left.html]
|
||||
[textAlign left is the left of the first em square (not the bounding box)]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.align.right.html]
|
||||
[textAlign right is the right of the last em square (not the bounding box)]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.align.start.ltr.html]
|
||||
[textAlign start with ltr is the left edge]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.baseline.alphabetic.html]
|
||||
[Canvas test: 2d.text.draw.baseline.alphabetic]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.baseline.bottom.html]
|
||||
[textBaseline bottom is the bottom of the em square (not the bounding box)]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.baseline.middle.html]
|
||||
[textBaseline middle is the middle of the em square (not the bounding box)]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.baseline.top.html]
|
||||
[textBaseline top is the top of the em square (not the bounding box)]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.fill.maxWidth.bound.html]
|
||||
[fillText handles maxWidth based on line size, not bounding box size]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.fontface.html]
|
||||
[Canvas test: 2d.text.draw.fontface]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.fontface.notinpage.html]
|
||||
[@font-face fonts should work even if they are not used in the page]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.fontface.repeat.html]
|
||||
[Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.space.collapse.other.html]
|
||||
[Space characters are converted to U+0020, and are NOT collapsed]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.draw.space.collapse.space.html]
|
||||
[Space characters are converted to U+0020, and are NOT collapsed]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.measure.emHeights.html]
|
||||
[Testing emHeights]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.measure.fontBoundingBox.ahem.html]
|
||||
[Testing fontBoundingBox for font ahem]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[2d.text.measure.width.basic.html]
|
||||
[The width of character is same as font used]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue