Allow style arrays to affect font properties

This commit is contained in:
Mikael Sand
2019-01-29 01:58:49 +02:00
parent 7177ae7528
commit 3a8ae840f6
+3 -2
View File
@@ -42,7 +42,8 @@ function parseFontString(font) {
}
export function extractFont(prop) {
const props = { ...prop.style, ...prop };
const style = prop.style;
const props = { ...(style && style.length ? Object.assign({}, ...style) : style), ...prop };
const {
fontData,
fontStyle,
@@ -97,7 +98,7 @@ function getChild(child) {
}
}
export default function extractText(props, container = false) {
export default function extractText(props, container) {
const {
x,
y,