Hello, could anyone tell me how to make a transparent font, as it is on a digital watch, for example? Is this a font trick, or is it necessary to use a special font?
I only need to have numbers displayed this way.
Thank you for answer.
Hello, could anyone tell me how to make a transparent font, as it is on a digital watch, for example? Is this a font trick, or is it necessary to use a special font?
I only need to have numbers displayed this way.
Thank you for answer.
hi,
the trick is (for 10:08 for exemple)
you draw 88:88 in dark blue, then 10:08 in light blue, that is it ;)
And that's all? Thank you very much ;-)
Yes, that's it. For other interesting font tricks, see https://developer.garmin.com/connect-iq/connect-iq-faq/how-do-i-use-custom-fonts/#howdoiusecustomfonts
Doesn't this "trick" have the disadvantage that everything is drawn twice, so the battery will drain faster?
Unfortunately the only idea I can think of to mitigate it is to create the "complementer" of each digit and use that to draw the "background", but that has the disadvantage of producing bigger app, so it might be not a good option if your app is getting big.
I guess I don't get it, it will be the same? instead of drawing "88:88" you want to draw "CC:CC"?
(where C is your complementer), another idea is to import bmp but will take too much resources...
don't think this take too much battery, for sure not a lot of resources.
Make sure you only re-draw the area of the seconds if you have the seconds active, and not all the screen. Though this might only be possible on certain devices :(
Yes, my idea was to only draw the CC:CC in dark blue and then the 11:11 with the light blue. Maybe it doesn't matter much. You can always run some profiling with and without drawing the dark blue complementer and compare
Yes, what you said is only one extra drawText, where this watch face is doing a number for draws already, so the impact would be minor. I'd do the setColors, draw 88:88, setColors, draw HH:MM.
With this, you don't even need a separate font, as you can just use the 8.