(style)
| 8262 | } |
| 8263 | |
| 8264 | function 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 |
no test coverage detected