servo/components
bors-servo 1a7404e38c Auto merge of #15096 - vvuk:custom-font-files, r=emilio
Implement downloadable fonts on Windows

This PR implements downloadable font support for Servo.  It depends on new changes in webrender and dwrote, and adds a dependency on the `truetype` crate for pulling out basic font information.  The original DirectWrite API does not provide an easy way to query font information direct from a `FontFace` (which is what you create from a `FontFile`).  There are new DirectWrite APIs starting with Windows 10 that allow for this, but they are Win 10+ only, and `winapi-rs` does not yet have bindings for those versions of the interfaces (specificially, `IDirectWriteFontFace3`).  The way to do this with DW is to go through a lot of pain in creating a custom collection and enumerator, add your font to your custom collection, then query the collection for its properties.

Instead, we just parse the truetype tables directly to pull out the few bits of information that we need.  The `truetype` crate is ok, but I discovered some bugs (an update needs to get pushed to crates.io before this will build).  It might be more worthwhile to just implement the tiny bit of truetype parsing that we need ourselves in Servo.

I'm guessing there are existing tests for downloadable fonts...

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15096)
<!-- Reviewable:end -->
2017-01-18 16:09:51 -08:00
..
atoms Kill beforescriptexecute and afterscriptexecute (fixes #12446) 2017-01-14 16:16:53 +01:00
bluetooth Use tinyfiledialogs from crates.io 2017-01-05 16:59:44 -05:00
bluetooth_traits Update regex. 2017-01-16 13:11:16 +01:00
canvas Auto merge of #14917 - fkautz:pr_out_renaming_default_features_to_default_features_as_per_cargo_s_manifest_format, r=emilio 2017-01-09 07:35:28 -08:00
canvas_traits Auto merge of #14917 - fkautz:pr_out_renaming_default_features_to_default_features_as_per_cargo_s_manifest_format, r=emilio 2017-01-09 07:35:28 -08:00
compositing Auto merge of #14961 - Ms2ger:DevicePixel, r=nox 2017-01-11 11:31:15 -08:00
config Update regex. 2017-01-16 13:11:16 +01:00
constellation add methods to ensure frame state stays consistent 2017-01-17 22:30:51 -06:00
debugger Removed util. 2016-12-14 18:04:37 -06:00
devtools Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
devtools_traits Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
geometry Removed util. 2016-12-14 18:04:37 -06:00
gfx Implement downloadable fonts on Windows 2017-01-18 13:30:58 -05:00
gfx_traits Move DevicePixel to script_traits. 2017-01-11 15:27:14 +01:00
jstraceable_derive Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
layout Auto merge of #14839 - Permutatrix:iss-12939, r=emilio 2017-01-18 10:03:37 -08:00
layout_thread layout: Expose whether the element was rendered in content_box_query to script. 2017-01-17 13:55:08 +01:00
layout_traits Renaming default_features to default-features as per Cargo's Manifest Format 2017-01-08 19:24:19 -08:00
msg Renaming default_features to default-features as per Cargo's Manifest Format 2017-01-08 19:24:19 -08:00
net Renaming default_features to default-features as per Cargo's Manifest Format 2017-01-08 19:24:19 -08:00
net_traits Update image. 2017-01-11 14:37:17 +01:00
plugins Update regex. 2017-01-16 13:11:16 +01:00
profile Update regex. 2017-01-16 13:11:16 +01:00
profile_traits WebVR API Implementation, r=larsbergstrom 2017-01-09 12:44:39 +01:00
rand An in-memory RNG that shares its file descriptor. 2017-01-05 13:51:53 +00:00
range Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
remutex Removed util. 2016-12-14 18:04:37 -06:00
script Auto merge of #15053 - emilio:image-width, r=jdm 2017-01-18 08:43:19 -08:00
script_layout_interface layout: Expose whether the element was rendered in content_box_query to script. 2017-01-17 13:55:08 +01:00
script_traits Move DevicePixel to script_traits. 2017-01-11 15:27:14 +01:00
servo Remove browserhtml dependency from components/servo 2017-01-17 13:21:50 +01:00
style Auto merge of #15077 - emilio:stylo-medialist, r=heycam,Manishearth,upsuper 2017-01-18 05:39:57 -08:00
style_traits Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
url Omit the 'ServoUrl()' wrapping in ServoUrl's Debug implementation. 2017-01-18 15:43:29 +01:00
webdriver_server Update regex. 2017-01-16 13:11:16 +01:00
webvr WebVR API Implementation, r=larsbergstrom 2017-01-09 12:44:39 +01:00
webvr_traits WebVR API Implementation, r=larsbergstrom 2017-01-09 12:44:39 +01:00