Enhancment for SmoothFonts (gradient) #2190
Unanswered
DrNeuroSurg
asked this question in
New processor/display support or capability request
Replies: 1 comment
-
Thank you for the suggestion. It is a nice solution to get vertical gradients in smooth fonts or stepped colour changes, where say top half of character is one colour and bottom half is another. Another approach is to render the characters into an 8 bit sprite and use it as an alpha mask, then any direction gradient could be applied. Your idea is much simpler to implement though. I will think on this further |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Great library - ...
There is a function "setCallback(getColorCallback getCol)" -
as I can see, this callback is only used for background drawing. Hmm.
So I modified (for testing)
the line
" if (getColor) bg = getColor(x + cx, y + cy);"
to
" if (getColor) fg = getColor(x + cx, y + cy);"
Now I can set a gradient for the TextColor (foreground) of the smooth font.
I think, it's an enhancement to add the possibility for a second (foreground) callback.
Beta Was this translation helpful? Give feedback.
All reactions