Pebble cricket: long names
Long names may prove to be a problem.
I’ll have to find an algorithm for trimming that makes sense. I guess its based on sound groups?
What I’ve done for now is that if a name is longer than 10 characters, I use Cricinfo’s “popular name”, which is a heavily shortened version they use in graphs etc. For these, Jayawardene would become “DPMD” (his initials) and Sangakkara becomes “Sanga”. I don’t want to use it all the time because it seems really hit-and-miss, but its better than overruns.
(The worst overrun right now is the Indian bowler “Mohammed Shami” - that’s his entire name in the card. The popular name is just “Shami”, which works much better).
Limiting based on number of characters is a bit rubbish for a proportional font. There is a watch-side API for measuring the size of rendered text, but then I’d need to push that back to the phone-side code since it does the string processing. What I might do instead is write a little test phone app to measure the width of each character and dump them to the log, and then I’ll embed that in the phone-side code and use it for measuring the text. Its awesome the things you can do when you can rely on fixed-size fonts and screen resolution :)