Minimal Win32 font platform implementation.

This uses a (very simple) Win32 API call to enumerate font
families available, and load them as byte buffers.

The font rasterization itself is done by freetype.

This gets Servo + WR + Windows working, but should be improved
by adding a proper implementation that matches fonts correctly
and also uses DirectWrite (or GDI) to handle font rasterization.
This commit is contained in:
Glenn Watson 2016-10-04 16:49:56 +10:00
parent 19a5a30113
commit 0849607239
7 changed files with 195 additions and 13 deletions

View file

@ -796,6 +796,7 @@ dependencies = [
"fnv 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"fontsan 0.3.2 (git+https://github.com/servo/fontsan)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"harfbuzz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
@ -827,6 +828,7 @@ dependencies = [
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"webrender_traits 0.5.1 (git+https://github.com/servo/webrender)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"xi-unicode 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]