ucglib icon indicating copy to clipboard operation
ucglib copied to clipboard

Font Rendering Issue

Open a-v-s opened this issue 3 years ago • 1 comments

I am using an SD1331 display. When I draw a string there are additional pixels set over the text. I have traced the issue to an attempt to draw a line with length 0, which actually gets drawn as a pixel. I have resolved the issue by adding

if (len == 0) return;

to ucg_Draw90Line, skipping these zero length lines.

a-v-s avatar Aug 12 '21 10:08 a-v-s

Additional... using my first proposal to fix, everything is too wide, Another proposal would be

  ucg->arg.len--;
  ucg->arg.pixel.pos.x++;

right before the call into the driver.

I might have to test with a different display to see whether the Draw Line is even the place to be looking, rather then the driver drawing incorrectly. Also, getting a 0 length draw request, is suspicious.

a-v-s avatar Aug 12 '21 16:08 a-v-s