mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
fonts: Use fontations
to read the OS/2 table of DirectWrite fonts (#38851)
Instead of copying the font table data in memory and parsing it with the `truetype` crate, use a non-copying API from DirectWrite to implement a `fontations` `TableProvider`. This has two benefits: - We remove the dependency on the `truetype` crate finally. - We do not have to make an in-memory copy of the table data when parsing the table. The hope is that the `TableProvider` will be more generally useful in the future. Testing: There are no automated tests for Windows, but I manually verified that the data retrived via `fontations` matched that retrived by `truetype`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
176e42d36d
commit
777373054f
5 changed files with 107 additions and 116 deletions
|
@ -74,7 +74,7 @@ xml-rs = "0.8"
|
|||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
dwrote = "0.11.4"
|
||||
truetype = { version = "0.47.3", features = ["ignore-invalid-language-ids"] }
|
||||
winapi = { workspace = true }
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ohos_mock)'] }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue