Auto merge of #27548 - jdm:canvas-text-panic, r=pcwalton

Canvas text and macOS font fixes

These changes work around a source of panics by skipping glyphs that don't exist when drawing text to the canvas. Ideally we would have font fallback and/or tofu characters, but that's a larger project than I wanted to get into right now.

Relatedly, while investigating the non-panic errors observed in #27476, I realized that the underlying source of #24622 could be dealt with because we shouldn't actually need to open the CTFont by a file path to get the bytes, since we already have bytes available that we use to create the CTFont.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24622 and fix #27476 and fix the panic observed in #20445.
- [x] There are tests for these changes
This commit is contained in:
bors-servo 2020-08-10 15:00:00 -04:00 committed by GitHub
commit 3c426d7078
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 21 deletions

1
Cargo.lock generated
View file

@ -553,6 +553,7 @@ dependencies = [
"log",
"lyon_geom 0.14.1",
"num-traits",
"pathfinder_geometry",
"pixels",
"raqote",
"servo_arc",