Coder Social home page Coder Social logo

Comments (5)

wearetelescopic avatar wearetelescopic commented on September 28, 2024 4

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

from bigtext.

timrwood avatar timrwood commented on September 28, 2024

I ran into issues with negative sizes as well.

The starting font-size must be small enough to guarantee that each individual line is not wrapping pre-BigText. If the line is too long, BigText will not size it correctly.

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.

from bigtext.

zachleat avatar zachleat commented on September 28, 2024

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!

from bigtext.

riseink avatar riseink commented on September 28, 2024

wearetelescopic's post fixed this for me

from bigtext.

JayAhrDe avatar JayAhrDe commented on September 28, 2024

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:
https://jsfiddle.net/70d2caze/1/

Set autoGuessSubtraction = 10 and it will look neat and tidy.

from bigtext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.