Auto merge of #26697 - utsavoza:ugo/issue-11681/22-05-2020, r=jdm

Implement CanvasRenderingContext2d.fillText

The PR consists of broadly two main changes:
- Implementation of Canvas2dRenderingContext.font
- Basic implementation of Canvas2dRenderingContext.fillText

Although I am not fully sure about the long term goals for the canvas backend in Servo, I assumed limited scope for font and text handling (should support simple text drawing with font selection) in the current implementation as I believe a more complete implementation would eventually be brought in as a part of #22957.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #11681
- [x] There are tests for these changes
This commit is contained in:
bors-servo 2020-06-12 13:43:51 -04:00 committed by GitHub
commit 721271dcd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 928 additions and 183 deletions

6
Cargo.lock generated
View file

@ -504,6 +504,8 @@ dependencies = [
"cssparser",
"euclid",
"fnv",
"font-kit",
"gfx",
"gleam 0.11.0",
"half",
"ipc-channel",
@ -512,8 +514,10 @@ dependencies = [
"num-traits",
"pixels",
"raqote",
"servo_arc",
"servo_config",
"sparkle",
"style",
"surfman",
"surfman-chains",
"surfman-chains-api",
@ -541,6 +545,7 @@ dependencies = [
"serde_bytes",
"servo_config",
"sparkle",
"style",
"time",
"webrender_api",
"webxr-api",
@ -5429,6 +5434,7 @@ dependencies = [
"encoding_rs",
"euclid",
"fallible",
"font-kit",
"fxhash",
"hashglobe",
"html5ever",