MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / makeFont

Function makeFont

libs/echarts/echarts.simple.js:8264–8275  ·  view source on GitHub ↗
(style)

Source from the content-addressed store, hash-verified

8262}
8263
8264function makeFont(style) {
8265 // FIXME in node-canvas fontWeight is before fontStyle
8266 // Use `fontSize` `fontFamily` to check whether font properties are defined.
8267 var font = (style.fontSize || style.fontFamily) && [
8268 style.fontStyle,
8269 style.fontWeight,
8270 (style.fontSize || 12) + 'px',
8271 // If font properties are defined, `fontFamily` should not be ignored.
8272 style.fontFamily || 'sans-serif'
8273 ].join(' ');
8274 return font && trim(font) || style.textFont || style.font;
8275}
8276
8277/**
8278 * @param {Object} ctx

Callers 1

normalizeStyleFunction · 0.70

Calls 1

trimFunction · 0.70

Tested by

no test coverage detected