SetFont() not working properly
Closed, ResolvedPublic

Description

SetFont() should allow to choose from 4 different font sizes. (https://github.com/apertus-open-source-cinema/AXIOM-Remote/blob/dev/Firmware/UI/Painter/Painter.cpp#L29)

Currently no matter what size you select everything gets rendered with the smallest options (FreeSans9pt7b).
The debug painter does draw the correct bounding boxes though.

Testcase is provided on the mainpage with the latest commit: https://github.com/apertus-open-source-cinema/AXIOM-Remote/blob/dev/Firmware/UI/Screens/MainPage.cpp#L69

Research shows that this is a problem that only happens with or is caused by the debugpainter.

I think this is happening because in the MainPage.cpp file we first set the font size then draw the text but in the debugpainter file we're only drawing the text

I solved it, should I push?

I solved it, should I push?

great! of course!

We've discussed it and this is a workaround, but we need a proper fix, as i fear that future extensions will add more problems. Still debugging and thinking how to resolve.

We've discussed it and this is a workaround, but we need a proper fix, as i fear that future extensions will add more problems. Still debugging and thinking how to resolve.

Yes, we've discussed that the problem is with _currentFont

BAndiT1983 closed this task as Resolved.Apr 29 2020, 9:42 PM
BAndiT1983 claimed this task.

Fixed debug painter, now it is done through strategy pattern.