Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glyph background causing vertical line (fillheight) with custom font #1812

Closed
MomePP opened this issue May 3, 2022 · 2 comments
Closed

glyph background causing vertical line (fillheight) with custom font #1812

MomePP opened this issue May 3, 2022 · 2 comments

Comments

@MomePP
Copy link

MomePP commented May 3, 2022

Hi,
I got an issue while trying to padding text as a picture below. It creates black verical line after setTextPadding() is being used (_fillbg is set). I've try to debugging with PADDING_DEBUG flag.

image

Currently, I found out that a variable fillheight was declared as unsigned int16. In my case, this value goes negative and fill rect with height 65535, so it appears as vertical line.

image

image

After changed the variable to int16_t, it's fixed my issue. I'm not sure, it supposed to changed this variable type or it's fault from a custom font that being used.

uint16_t fillheight = 0;

BTW, a custom font that i used is Baloo2 regular with font size 12, I've created by using your pde script.
Here is my converted font baloo2_regular_12.h.zip
I notice that there was only some characters such as f or i that cause the issue. (gdY more than maxAscent 😵‍💫)

Dev. environment

  • PlatformIO
  • ESP32 with arduino-esp32 master branch
  • TFT_eSPI version 2.4.61
  • ST7735 1.8" with SPI interface, no touch controller

Thank you in advance.

@Bodmer Bodmer closed this as completed in 1f7ce88 May 3, 2022
@Bodmer
Copy link
Owner

Bodmer commented May 3, 2022

Thanks for reporting this and finding the bug, yes the result can be negative so your solution is correct.

I have updated the master library.

@MikeyMoMo
Copy link

2.4.61 fixed my issue. Thanks for the quick work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants