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:
1 parent
913549a7b6
commit
9ff6a0325e
6 files changed
+61
-19
No files matched your search
@@ -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