Skip to content

Commit 32b3e7b

Browse files
authored
Merge pull request #64 from tomconroy/fix-jitter
Fix jitter
2 parents 8f5d09d + 53dd87a commit 32b3e7b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

dist/fitty.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fitty.module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ exports.default = function (w) {
117117
var style = w.getComputedStyle(f.element, null);
118118

119119
// get current font size in pixels (if we already calculated it, use the calculated version)
120-
f.currentFontSize = parseInt(style.getPropertyValue('font-size'), 10);
120+
f.currentFontSize = parseFloat(style.getPropertyValue('font-size'));
121121

122122
// get display type and wrap mode
123123
f.display = style.getPropertyValue('display');

src/fitty.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default ((w) => {
4949

5050
// we now determine which fitties should be redrawn
5151
const fittiesToRedraw = fitties.filter(shouldRedraw);
52-
52+
5353
// we calculate final styles for these fitties
5454
fittiesToRedraw.forEach(calculateStyles);
5555

@@ -102,7 +102,7 @@ export default ((w) => {
102102
const style = w.getComputedStyle(f.element, null);
103103

104104
// get current font size in pixels (if we already calculated it, use the calculated version)
105-
f.currentFontSize = parseInt(style.getPropertyValue('font-size'), 10);
105+
f.currentFontSize = parseFloat(style.getPropertyValue('font-size'));
106106

107107
// get display type and wrap mode
108108
f.display = style.getPropertyValue('display');

0 commit comments

Comments
 (0)