From a15eacea16a7086be7ffc503e6cc0eaf5612baa7 Mon Sep 17 00:00:00 2001 From: Joel Arvidsson Date: Thu, 27 Oct 2016 01:47:02 +0200 Subject: [PATCH] Force font family/weight/style to avoid issues resolving font on android #283 --- lib/create-icon-set.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/create-icon-set.js b/lib/create-icon-set.js index c8d5045..3e5d117 100644 --- a/lib/create-icon-set.js +++ b/lib/create-icon-set.js @@ -67,15 +67,17 @@ export default function createIconSet(glyphMap, fontFamily, fontFile) { const styleDefaults = { fontSize: size, - fontWeight: 'normal', - fontStyle: 'normal', color, }; - props.style = [styleDefaults, style]; - props.ref = this.handleRef; + const styleOverrides = { + fontFamily: fontReference, + fontWeight: 'normal', + fontStyle: 'normal', + }; - styleDefaults.fontFamily = fontReference; + props.style = [styleDefaults, style, styleOverrides]; + props.ref = this.handleRef; return ({glyph}{this.props.children}); }