Hi everyone, I’m trying WFF to watch face, and I want to understand how to center the image + text dynamically.
Now I see that are independent and need to have a fixed width.
I want them to be centered relative to the parent group and change dynamically as the number of words in the text increases.
I saw the textLength() function in WFF, but it can’t calculate the actual width of the text. I’d like to ask if there is any way to achieve what I want, thank you.
My English is not good, hope you can understand what I mean.
I’m glad to hear that there is at least one other person using WFF directly! We could really do with a forum for WFF somewhere.
Unfortunately, I don’t think such centring would be possible even in naked WFF. You could probably get close using the textLength() function, but that doesn’t take the widths of individual characters into account. Users may not notice the difference.
I think you’re right. Earlier methods of watchface development were more powerful and flexible. Unfortunately all but WFF (and hence WFS) have been deprecated.
Extreme left-field idea: use a bitmap font for text and icon, so that it’s all just one string as far as WFS is concerned. Of course, this is only feasible if you don’t have many different types of icons. It’s probably not terribly efficient, either.