Bitmap font- hide leading zero

hi, im using bitmap font, png type to make the digital time that can change color. the problem is i cannot hide the background if i use no leading zero, (eg, 9:34am) in both 12h and 24h format. when i use leading zero(2 digit time format, eg 03:21pm), the backgound perfectly hide. what i need to do to hide that background. i dont want to use leading ‘0’/(2 digit time format).

I would suggest to split the time into minute part (:mm) and two hour parts (the hh and HH) In the hour parts make bitmaps for whole strings 00 to 23, same width like 2 digits, but without leading zero on them.

1 Like

yes… i can imagine now. thank you! will try that later.

Other way you can do this is by leaving it the way you have it (time in hh:mm and HH:mm format), but adding the covers for leading 0 through expressions.

You’d need to create images which precisely cover the leading 0 and blend with the background (square shape would do, although it depends on your design layout).
Add them both to the GWS, one will be for 12h and other for 24h format and apply following tag expressions for opacity:

For the 12h: 100*(([H]>=0)*([H]<10)+([H]>12)*([H]<22))
For the 24h: 100*(([H]>=0)*([H]<10))

1 Like

yes… this one also work like a charm. just need to edit 0 change to 1 for 12h. thank you very much