diff --git a/src/parsing/letterSpacing.js b/src/parsing/letterSpacing.js index df40f04..23ec1ef 100644 --- a/src/parsing/letterSpacing.js +++ b/src/parsing/letterSpacing.js @@ -5,6 +5,6 @@ export const parseLetterSpacing = (letterSpacing: string): number => { if (letterSpacing === 'normal') { return 0; } - const value = parseInt(letterSpacing, 10); + const value = parseFloat(letterSpacing); return isNaN(value) ? 0 : value; }; diff --git a/tests/reftests/text/text.html b/tests/reftests/text/text.html index f6d4194..b9fcf38 100644 --- a/tests/reftests/text/text.html +++ b/tests/reftests/text/text.html @@ -126,6 +126,7 @@
  • word-spacing:5px; (as each letter is rendered individually, the bounds will always be correct)
  • line-height:35px;
    (same goes for line-height)
  • letter-spacing:5px;
  • +
  • letter-spacing:0.9px;
  • text-align:right;width:300px;
  • font-variant:small-caps;