-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Negative font size on Mac OS X/iPad #54
Comments
I ran into issues with negative sizes as well.
After reading this line from the readme, I set the default font-size in my css to a much lower value and no longer saw negative font sizes. |
Thanks @timrwood, this is likely the issue. I’d like to fix this internally to BigText so I’ll leave this issue open to log it. Thanks! |
In case it helps anyone, the offending value in the code that causes a negative font size for small displays is line 211 var autoGuessSubtraction = 32, // font size in px this gets substracted and if the font is generally smaller, results in a negative number. So just setting this to lets say 10 fixes it: var autoGuessSubtraction = 10, // font size in px |
wearetelescopic's post fixed this for me |
Is there any reason for not changing this value in code? Would it break something else? The tip by @wearetelescopic actually helps, thanks a lot!, and is still needed: Set autoGuessSubtraction = 10 and it will look neat and tidy. |
For some reason this plugin was generating a negative font size for a long title which was causing it to instead use the default size (which was far too large).
I couldn't figure out where the calculation was going wrong, but I was able to fix it by modifying the generateCSS function so that the for loop instead reads (line 78):
(linesFontSizes[j] > 0 ? ' font-size: ' + linesFontSizes[j] + 'px;' : ' font-size: 25px;') +
I had to hardcode the min font size because "minFontSizes" seemed to be a boolean instead of a numeric value.
The text was updated successfully, but these errors were encountered: