mirror of
https://github.com/zhigang1992/react-native-vector-icons.git
synced 2026-01-12 22:51:07 +08:00
Force font family/weight/style to avoid issues resolving font on android #283
This commit is contained in:
@@ -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 (<Text {...props}>{glyph}{this.props.children}</Text>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user