Closed aliciahogue closed 3 years ago
Hi @aliciahogue ,
yes, in v0.12 all this separate options was merged into single textFont
like in OpenLayers font
option for ol/style/Text
. https://openlayers.org/en/latest/apidoc/module-ol_style_Text-Text.html
So just you need font description string yourself as you need like in CSS. https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font https://developer.mozilla.org/en-US/docs/Web/CSS/font
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The properties are listed, but the style.js is missing the portion that handles it otherwise.
-- from v11 which is missing in v12
let fontSize = '10px' if (vlStyle.textFontSize) { fontSize = isNumber(vlStyle.textFontSize) ? vlStyle.textFontSize + 'px' : vlStyle.textFontSize } let fontName = vlStyle.textFont || 'sans-serif' const font = [vlStyle.textFontWeight, fontSize, fontName].filter(x => !!x).join(' ')