Auto merge of #16034 - jonathandturner:fix_font, r=metajack

Fix Windows UI and font squishing

<!-- Please describe your changes on the following line: -->

This PR:

* updates the browserhtml dep (fixes https://github.com/servo/servo/issues/15255)
* updates the Windows font metric calculation (fixes https://github.com/servo/servo/issues/15698, based on codec-abc https://github.com/servo/servo/pull/15937#issuecomment-286513712)
* may address https://github.com/servo/servo/issues/15933.  With this PR, I was not able to repro

---
<!-- 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
- [X] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because change are to UI/visual results of font drawing

<!-- 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/16034)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-03-21 03:15:10 -07:00 committed by GitHub
commit cea1760eb7
2 changed files with 2 additions and 2 deletions

2
Cargo.lock generated
View file

@ -251,7 +251,7 @@ dependencies = [
[[package]]
name = "browserhtml"
version = "0.1.17"
source = "git+https://github.com/browserhtml/browserhtml?branch=crate#cd5374a970fd404377ab418ac1e4a358db47691f"
source = "git+https://github.com/browserhtml/browserhtml?branch=crate#7c66ae9a3e29d35230d5b9f16d19a562b1312c87"
[[package]]
name = "build-apk"

View file

@ -372,7 +372,7 @@ impl FontHandleMethods for FontHandle {
descent: au_from_du_s(dm.descent as i32),
max_advance: au_from_pt(0.0), // FIXME
average_advance: au_from_pt(0.0), // FIXME
line_gap: au_from_du(dm.lineGap as i32),
line_gap: au_from_du((dm.ascent + dm.descent + dm.lineGap as u16) as i32),
};
debug!("Font metrics (@{} pt): {:?}", self.em_size * 12., metrics);
metrics