Re: Subpixel offset for glyphs rendering

2022-09-05 Thread Werner LEMBERG
> I'm using FT_Outline_Translate(), though I'm still not sure if I'm > supposed to pass the translation vector as pixels or font units. Pixels (in 26.6 format), since `FT_Load_Glyph` converts the glyph from the font space to the user device space (except if you specify `FT_LOAD_NO_SCALE`). >

Re: Subpixel offset for glyphs rendering

2022-09-03 Thread Valerio De Benedetto
> Sorry for the late reply. No problem. In the meanwhile, I managed to make it work. I'm using FT_Outline_Translate(), though I'm still not sure if I'm supposed to pass the translation vector as pixels or font units. For the moment I'm using pixels, and looks like it's working fine. (To whoever

Re: Subpixel offset for glyphs rendering

2022-09-03 Thread Werner LEMBERG
Sorry for the late reply. > Is there a way to make freetype rasterize a glyph offsetted by a > certain amount of pixels? Should I use the FT_Set_Transform() API, > in particular the delta parameter, before calling FT_Render_Glyph()? Yes, this should work. Werner

Subpixel offset for glyphs rendering

2022-08-28 Thread Valerio De Benedetto
Hi, I'm in the process of implementing subpixel positioning in my application. Since I'm using a glyph cache, I want to generate 4 different versions of the same glyph shifted by 1/4 pixel on the X axis, and then use the appropriate version at rendering time, depending on the final X position of