From bc8115fff46bdd9083f8ae47a3df4af27d175264 Mon Sep 17 00:00:00 2001 From: Liu Date: Sat, 10 Feb 2024 19:16:56 +0800 Subject: [PATCH] fixup! feat(pandagl): calculate baseline position based on Ascender and BBox --- lib/pandagl/src/font/bitmap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/pandagl/src/font/bitmap.c b/lib/pandagl/src/font/bitmap.c index 746cbf202..a3e3dcca8 100644 --- a/lib/pandagl/src/font/bitmap.c +++ b/lib/pandagl/src/font/bitmap.c @@ -94,6 +94,18 @@ int pd_canvas_mix_font_bitmap(pd_canvas_t *graph, pd_pos_t pos, pd_canvas_t write_slot; pd_rect_t r_rect, w_rect; + if (pos.x > 0) { + logger_debug("pos.x\n"); + } + if (pos.y > 0) { + logger_debug("pos.y\n"); + } + if (pos.x > (int)graph->width) { + logger_debug("width\n"); + } + if (pos.y > (int)graph->height) { + logger_debug("height\n"); + } if (pos.x > (int)graph->width || pos.y > (int)graph->height) { return -2; }