Hi,
I think a small improvement could make styling of labels much better. Now we’re are stuck with the font family and many clients have asked bump up the weight of the labels.
The documentation defines a family property for Mapviewer.setPlaceName (or addPOI) function that we can use to affect the font of the labels. But how CSS font property syntax works and how the family is used in SDK it can only be used for the font family.
Obviously, if I have fonts weight and styles defined as separate web fonts then this should be fine but most of the time weights and styles are defined under single font family because that just works better on the web. Also, with the system fonts, it’s not any better. To bump up the font-weight only font I could quickly come up was “Arial Black”. And that is a quite horrible font.
Problematic code is in SDK private generateTextNoAtlas, generateTextOnAtlas and measureText functions. But fix should be simple. Just have a property in options for setting font properties before a font size. This could be a single property like below or multiple if you want to make sure that syntax doesn’t get broken.
ctx.font = options.style + size + "px " + options.family;
Hi Timo,
Copied this question here: https://my.visioglobe.com/support#ticket=208
Although this Q&A forum is still available, we now recommend using my.visioglobe.com because it helps us to better qualify and track client requests.