Skip to content

fixed ignore line spacing flag#661

Draft
ZERICO2005 wants to merge 1 commit intomasterfrom
fix_setfont
Draft

fixed ignore line spacing flag#661
ZERICO2005 wants to merge 1 commit intomasterfrom
fix_setfont

Conversation

@ZERICO2005
Copy link
Contributor

bool fontlib_SetFont(const fontlib_font_t *font_data, fontlib_load_options_t flags);
It looks like this code reads from font_data instead of flags. since the low byte of font_data will be non-zero 255/256 times, then I would assume that line spacing will almost always be treated as ignored

@ZERICO2005 ZERICO2005 requested a review from drdnar October 27, 2025 15:41
@adriweb
Copy link
Member

adriweb commented Nov 1, 2025

Can we add a test/example for this specifically?

@ZERICO2005
Copy link
Contributor Author

ZERICO2005 commented Dec 14, 2025

This is actually a bit worse than I thought. The space above and below will be ignored 99.6% (255/256, the chance that the lower byte of fontlib_font_t *font_data is zero) of the time, so most user code is probably made assuming space_above and space_below are both zero, even though it is not supposed to be

@ZERICO2005 ZERICO2005 added bug lib/fontlibc Issues related to the font rendering library labels Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug lib/fontlibc Issues related to the font rendering library

Development

Successfully merging this pull request may close these issues.

2 participants