freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proper way of rotating glyphs


From: Василий Троцкий
Subject: Proper way of rotating glyphs
Date: Fri, 06 May 2022 13:37:01 +0300

 
Hi evryone!

Now i am using FreeType library to fill texture atlas with font glyphs in order 
to render strings as a sprites with texture from atlas.
Then i want to add glyph rotation(and scaling) effects. But let's just talk 
about rotation now.
 
Should i just apply this transformations to my textured sprites(quads, pair of 
triangles...etc) OR rotate glyphs in "font coordinate system" using FreeyType's 
FT_Glyph_Transform()/FT_Set_Transform() then get transformed glyph bitmap using 
FT_Load_Char() with FT_LOAD_RENDER flag or FT_Glyph_To_Bitmap(), upload this 
rotated glyph bitmap to texture atlas and then render the sprite?

Confusing quote from freetype doc  
https://freetype.org/freetype2/docs/tutorial/step1.html
>The transformation is applied to every glyph that is loaded through 
>FT_Load_Glyph and  is completely independent of any hinting process. This 
>means that you won't get the same results if you load a glyph at the size of 
>24 pixels, or a glyph at the size of 12 pixels scaled by 2 through a 
>transformation, because the hints are computed differently (except if you have 
>disabled hints).
>Rotation usually disables hinting.

So, hinting is disabled, right?
Are there any image quality advantages expected then? May be i really should 
just rotate my sprite and don't bother?
 
 
--
Василий Троцкий
Отправлено из Почты  Mail.ru

reply via email to

[Prev in Thread] Current Thread [Next in Thread]