First letterSpacing implementation attempt

This commit is contained in:
Mikael Sand
2017-06-20 22:04:41 +03:00
parent a168a2ae6d
commit dac969b944
5 changed files with 47 additions and 7 deletions
+3 -1
View File
@@ -23,7 +23,9 @@ function fontDiffer(a, b) {
return a.fontSize !== b.fontSize ||
a.fontFamily !== b.fontFamily ||
a.fontStyle !== b.fontStyle ||
a.fontWeight !== b.fontWeight;
a.fontWeight !== b.fontWeight ||
a.kerning !== b.kerning ||
a.letterSpacing !== b.letterSpacing;
}
const ViewBoxAttributes = {
+3 -1
View File
@@ -55,7 +55,9 @@ export function extractFont(props) {
fontFamily: extractSingleFontFamily(props.fontFamily),
fontSize: isNaN(fontSize) ? null : fontSize,
fontWeight: props.fontWeight,
fontStyle: props.fontStyle
fontStyle: props.fontStyle,
kerning: props.kerning,
letterSpacing: props.letterSpacing,
};
if (typeof props.font === 'string') {
+2
View File
@@ -53,6 +53,8 @@ const fontProps = {
fontSize: numberProp,
fontWeight: numberProp,
fontStyle: PropTypes.string,
letterSpacing: PropTypes.string,
kerning: PropTypes.string,
font: PropTypes.object
};