mirror of
https://github.com/servo/servo.git
synced 2025-09-16 01:48:22 +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
42
tests/wpt/meta/css/css-fonts/generic-family-keywords-003.html.ini
vendored
Normal file
42
tests/wpt/meta/css/css-fonts/generic-family-keywords-003.html.ini
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
[generic-family-keywords-003.html]
|
||||
[@font-face matching for quoted and unquoted math (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted ui-serif (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted ui-sans-serif (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted ui-monospace (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted ui-rounded (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted sans-serif (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted cursive (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted fantasy (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted monospace (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted system-ui (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted generic(fangsong) (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted generic(kai) (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted generic(khmer-mul) (drawing text in a canvas)]
|
||||
expected: FAIL
|
||||
|
||||
[@font-face matching for quoted and unquoted generic(nastaliq) (drawing text in a canvas)]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue