tangrams / fontstash-es

Text rendering and text shaping for OpenGL ES
Other
58 stars 8 forks source link

Skew text perspectively #11

Open benstadin opened 9 years ago

benstadin commented 9 years ago

There is aglfonsProjection() API. Does this allow to skew text? If not, is it possible to skew text by other means?

Cheers Ben

karimnaaji commented 9 years ago

Hi @benstadin , The transformation given by glfonsProjection is the orthographic projection to viewport; maybe I misunderstand what you mean by skew but if you mean applying non-affine transform to text (perspective, non uniform scaling..), what you want is possible by either using another transform matrix (affecting all drawn text on screen), or by transforming the glyph vertices independently with this matrix, but nothing like that is implemented.