Implement wordSpacing in extractFont

This commit is contained in:
Mikael Sand
2017-07-23 08:30:28 +03:00
parent dea6d2e8f0
commit dff02c3dbb
3 changed files with 3 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ function fontDiffer(a, b) {
a.fontStyle !== b.fontStyle ||
a.fontWeight !== b.fontWeight ||
a.kerning !== b.kerning ||
a.wordSpacing !== b.wordSpacing ||
a.letterSpacing !== b.letterSpacing;
}

View File

@@ -60,6 +60,7 @@ export function extractFont(props) {
let ownedFont = {
fontFamily: extractSingleFontFamily(props.fontFamily),
letterSpacing: props.letterSpacing,
wordSpacing: props.wordSpacing,
fontWeight: props.fontWeight,
fontStyle: props.fontStyle,
fontSize: props.fontSize ? '' + props.fontSize : null,

View File

@@ -54,6 +54,7 @@ const fontProps = {
fontWeight: numberProp,
fontStyle: PropTypes.string,
letterSpacing: PropTypes.string,
wordSpacing: PropTypes.string,
kerning: PropTypes.string,
font: PropTypes.object
};