servo / font-kit

A cross-platform font loading library written in Rust
Apache License 2.0
693 stars 104 forks source link

Add a FontTransform to allow arbitrary transformations on glyphs. #76

Closed jrmuizel closed 5 years ago

jrmuizel commented 5 years ago

Fixes #34

pcwalton commented 5 years ago

What do you think about replacing size with an affine transform instead?

pcwalton commented 5 years ago

Err, I mean a 2x2 transform.

pcwalton commented 5 years ago

Also I'm confused as to why font size needs to be different from scale…

jrmuizel commented 5 years ago

I'm not certain why, but all of the underlying system apis keep font size separate from the transform. I think it is probably wisest to just follow this convention.

pcwalton commented 5 years ago

Yeah, OK. I agree with wanting to follow the convention. @raphlinus Maybe you can shed some light on this?

pcwalton commented 5 years ago

This looks good when rebased, FWIW.

jrmuizel commented 5 years ago

Rebased. The test failure seems to be an intermittent.