script: add skeleton implementation of FontFace API (#35262)

This patch implements the `FontFace` interface, but with some caveats

1. The interface is only exposed on `Window`. Support for Workers will
   be handled in the future.
2. The concept of `css-connected` `FontFace` is not implemented, so
   `@font-face` rules in stylesheets will not be represented in the DOM.
3. The constructor only supports using `url()` strings as source
   and `ArrayBuffer` and `ArrayBufferView` are not supported yet.

A skeleton implementation of the `load` method of `FontFaceSet` is also
implemented in this patch. The intention is to support some web pages
that don't load without this method.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan 2025-02-19 11:20:01 +05:30 committed by GitHub
parent 29e0fad21e
commit 56840e0a35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 1160 additions and 551 deletions

View file

@ -1,16 +1,4 @@
[format-specifiers-variations.html]
[Load Ahem with format woff]
expected: FAIL
[Load Ahem with format truetype]
expected: FAIL
[Load Ahem with format opentype]
expected: FAIL
[Load Ahem with format woff2]
expected: FAIL
[Load Ahem with format woff-variations]
expected: FAIL
@ -22,123 +10,3 @@
[Load Ahem with format woff2-variations]
expected: FAIL
[Do not load Ahem with format xyzwoff]
expected: FAIL
[Do not load Ahem with format xyztruetype]
expected: FAIL
[Do not load Ahem with format xyzopentype]
expected: FAIL
[Do not load Ahem with format xyzwoff2]
expected: FAIL
[Do not load Ahem with format xyzwoff-variations]
expected: FAIL
[Do not load Ahem with format xyztruetype-variations]
expected: FAIL
[Do not load Ahem with format xyzopentype-variations]
expected: FAIL
[Do not load Ahem with format xyzwoff2-variations]
expected: FAIL
[Do not load Ahem with format woffxyz]
expected: FAIL
[Do not load Ahem with format truetypexyz]
expected: FAIL
[Do not load Ahem with format opentypexyz]
expected: FAIL
[Do not load Ahem with format woff2xyz]
expected: FAIL
[Do not load Ahem with format woff-variationsxyz]
expected: FAIL
[Do not load Ahem with format truetype-variationsxyz]
expected: FAIL
[Do not load Ahem with format opentype-variationsxyz]
expected: FAIL
[Do not load Ahem with format woff2-variationsxyz]
expected: FAIL
[Do not load Ahem with format wo]
expected: FAIL
[Do not load Ahem with format truety]
expected: FAIL
[Do not load Ahem with format openty]
expected: FAIL
[Do not load Ahem with format wof]
expected: FAIL
[Do not load Ahem with format woff-variatio]
expected: FAIL
[Do not load Ahem with format truetype-variatio]
expected: FAIL
[Do not load Ahem with format opentype-variatio]
expected: FAIL
[Do not load Ahem with format woff2-variatio]
expected: FAIL
[Do not load Ahem with format ff]
expected: FAIL
[Do not load Ahem with format uetype]
expected: FAIL
[Do not load Ahem with format entype]
expected: FAIL
[Do not load Ahem with format ff2]
expected: FAIL
[Do not load Ahem with format ff-variations]
expected: FAIL
[Do not load Ahem with format uetype-variations]
expected: FAIL
[Do not load Ahem with format entype-variations]
expected: FAIL
[Do not load Ahem with format ff2-variations]
expected: FAIL
[Do not load Ahem with format wff]
expected: FAIL
[Do not load Ahem with format tretype]
expected: FAIL
[Do not load Ahem with format opntype]
expected: FAIL
[Do not load Ahem with format wff2]
expected: FAIL
[Do not load Ahem with format woff-ariations]
expected: FAIL
[Do not load Ahem with format truetye-variations]
expected: FAIL
[Do not load Ahem with format opentye-variations]
expected: FAIL
[Do not load Ahem with format woff2variations]
expected: FAIL