Introduce subpixel text positioning within rencache
In order to fix the issue with cursor positioning a subpixel-aware draw text operation within rencache was required. With this modification the cursor positioning problem is completely resolved. A new function renderer.draw_text_subpixel is introduced to perform consecutive, inline, text drawings with subpixel accuracy.
This commit is contained in:
@@ -42,5 +42,6 @@ int ren_font_subpixel_round(int width, int subpixel_scale, int orientation);
|
||||
void ren_draw_rect(RenRect rect, RenColor color);
|
||||
void ren_draw_image(RenImage *image, RenRect *sub, int x, int y, RenColor color);
|
||||
void ren_draw_text(RenFont *font, const char *text, int x, int y, RenColor color);
|
||||
void ren_draw_text_subpixel(RenFont *font, const char *text, int x_subpixel, int y, RenColor color);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user