Mostly fix problem of offset with cursor positioning when using mouse
In order to get right the cursor position on text on mouse clicks it is needed to take into account text's subpixel positioning. This fix mostly corrects the problem but cursor positioning is still somewhat inaccurate for long lines due to repeated commands to draw a text along a line. Repeated draw text calls make the subpixel information lost and small errors will add-up.
This commit is contained in:
@@ -51,8 +51,6 @@ void FR_Blend_Glyph(FR_Renderer *font_renderer,
|
||||
const FR_Bitmap_Glyph_Metrics *glyph, FR_Color color);
|
||||
int FR_Subpixel_Scale(FR_Renderer *);
|
||||
|
||||
#define FR_XADVANCE_TO_PIXELS(x, scale) (((x) + (scale) / 2) / (scale))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user