servo / webrender

A GPU-based renderer for the web
https://doc.servo.org/webrender/
Mozilla Public License 2.0
3.13k stars 279 forks source link

Implement -webkit-text-stroke (yes really) #1756

Open Gankra opened 7 years ago

Gankra commented 7 years ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1403262

https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-stroke

Gankra commented 7 years ago

We should block this on Pathfinder, as it would probably be a ton of work to implement otherwise, and it's not a huge tragedy to ship with this being provided via fallback. (iirc it's only "required" to make some mobile websites look right)

glennw commented 7 years ago

I had (probably naively) assumed this would be a case of using the platform font APIs slightly differently, and a small amount of work in WR. Do you think there's a lot more to it than that? Anyway, more than happy to drop the priority of this if we don't need it for MVP!

jrmuizel commented 7 years ago

The platform font APIs don't support stroking. In Gecko we generate a path of the glyph and then stroke it with the usual 2D graphics API.

glennw commented 7 years ago

Ah, makes sense. Thanks.

glennw commented 7 years ago

So, I guess if/when we do want to support this, we could expand the blob interfaces to support stroking a path we extract from the font platform APIs?