I’m making a simple tag expression to change my battery level text color with battery percentage. The tag expression works fine with syncing font to device, and a couple of other stock fonts in GWS. But some of the standard fonts in GWS don’t work, nor do custom imported fonts. What happens is that with those fonts the opacity isn’t set to zero when the tag expression is false.
Here are my tag expressions that I use to cycle 4 different colors, each applied to a different text/battery percentage:
[ba] >= 80? 100: 0
([ba] >= 41) * ([ba] <= 79)? 100: 0
([ba] >= 20) * ([ba] <= 40)? 100: 0
[ba] >= 20? 0: 100
So for example if I use sync to device, or a font such as Watch Applemint then the code works perfectly. If I load a custom .ttf or if I use a font such as WatchSNum-3L then the opacity isn’t set to 0 when condition is false, it just stays lit regardless of battery percentage.
There was this thread about it in the past. I have such problem with some of my added fonts too. I thought it settled with PC restart, but its still there. To me these fonts do not obey opacity setting, even when I try to set it directly with slider, not only by expressions. The one that is not working for you, works well for me. Did not try it on watch yet.
Sorry for the very late response, but I was just playing around with this again today. This is on GWS 2.0.0 beta and it’s the same if it’s a new project or if I’m updating an existing one. I’ve made sure I’m using TTF fonts. I’ve found that all of the stock fonts work, but the custom fonts I’ve imported do not work.
Also if I’m using a stock font that does work, if I adjust the opacity slider it seems this breaks something and then that stock font won’t work anymore and I have to delete and reload my custom complication.
Are you doing this on a watch or in GWS. BA can’t be zero but that is not the issue.
There is at least one complication that I know of that appears in the AOD watch when you add it to the Active Watch. Check and see if that is happening to your custom complication. If that is the case remove it and see if that matters.
It is really hard to tell if the complexity of your complication is a problem, or if there is an issue with GWS. It should work with the GWS Fonts.
Well that’s interesting. I am experiencing this in GWS, but I did not think to upload to the watch and check there. I just uploaded it and the complication seems to work on the watch even with a custom font, although it’s hard to test because I have to wait for the battery to change. But at least at 77% it’s showing as blue, which is correct in how I coded the complication. In GWS it just stays green no matter what the battery is reported at.
On GWS, as I mentioned before, the complication works just fine with the stock GWS fonts. It’s when I use custom fonts in TTF format that they don’t work, at least in the GWS program. If you want to test this then download a TTF file and apply it to my complication and see if the opacity doesn’t change.
Just curios as to what happens if you use the Battery % in the time line to show and hide the images instead of tag expressions. Does the custom fonts work then or is it the same behavior.
Yes I just discovered this ability today, making me realize my complication doesn’t even need to exist. Using the battery timeline it works perfectly with the custom fonts. Thanks for the help.