Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Variable width "custom font" png glyphs

Dumb question (new to FitbitOS/Javascript):

 

If I want to render some numbers in a variable width font that I've prepared pngs of the glyphs and a table of widths, I assume the correct process is:

 

One SVG IMG element for each glyph like the SDK lcd clock example;

 

Move the x coordinate of each IMG element according to the glyph width.

 

?

 

Just checking there wasn't a more elegant way. And yes, I know I won't be able to get perfect kerning without a lot of extra effort.

 

Cheers - Tim

Best Answer
0 Votes
1 REPLY 1

Oh - and do I need a widths table - or when loading a fresh PNG, can I read the width back from the IMG element?

Best Answer
0 Votes