UnifiedLabel: fix clipping descenders (#36793)

* fix

* can also do this

* but then y is off. this is from font_scale I think

* fix

* cmt
This commit is contained in:
Shane Smiskol
2025-12-05 18:18:58 -08:00
committed by GitHub
parent 0965650f61
commit d4d6134d3b
+2 -1
View File
@@ -712,8 +712,9 @@ class UnifiedLabel(Widget):
start_y = self._rect.y + (self._rect.height - total_visible_height) / 2
# Only scissor when we know there is a single scrolling line
# Pad a little since descenders like g or j may overflow below rect from font_scale
if self._needs_scroll:
rl.begin_scissor_mode(int(self._rect.x), int(self._rect.y), int(self._rect.width), int(self._rect.height))
rl.begin_scissor_mode(int(self._rect.x), int(self._rect.y - self._font_size / 2), int(self._rect.width), int(self._rect.height + self._font_size))
# Render each line
current_y = start_y