Giter VIP home page Giter VIP logo

Comments (6)

mbloch avatar mbloch commented on June 12, 2024 2

I think I tracked down the reason for the inconsistent font sizing. It's an automatic font-resizing feature called Font Boost that was first added to Chrome for Android and later ported to webkit. It has caused problems in the past, you can read about it here:
https://bugs.webkit.org/show_bug.cgi?id=84186
http://stackoverflow.com/questions/5303263/fix-font-size-issue-on-mobile-safari-iphone-where-text-is-rendered-inconsisten

I saw two proposed CSS solutions: applying a large max-height or -webkit-text-size-adjust:100% to the affected containers. The second solution seemed to solve the problem on your page when I tested it in mobile Safari. Not sure if it works in other mobile browsers that support Font Boost.

I'll look into adding a fix to ai2html. Meanwhile, you can try adding -webkit-text-size-adjust: 100% to your affected pages.

from ai2html.

mbloch avatar mbloch commented on June 12, 2024 1

I looked into this a bit more... Ai2html has been setting the width of some text containers to be twice the width of the actual text. This appears to confuse some mobile browsers, making them boost the size of the text inside containers that exceed the width of the viewport. When I reduced the width of an affected container using the web inspector, the boost effect went away.

The current beta version (ai2html-beta.js) applies normal widths to text objects. I think this update would fix the problems on Bloomberg's site.

from ai2html.

cedricsam avatar cedricsam commented on June 12, 2024

Saw this again this week, on the last graphic of this, and only happens when opened in the mobile app's browser. The text becomes enlarged for the third and fourth item of the bar chart, on the app. Unlike the first time I saw this, error doesn't occur on mobile browsers.

from ai2html.

mbloch avatar mbloch commented on June 12, 2024

Hi Cedric,
I see the inconsistent text problem on the 2017-wef-global-risks page in portrait mode. I'll look into what might be causing it. Thanks for reporting this.

from ai2html.

cedricsam avatar cedricsam commented on June 12, 2024

Good to know that was something actually happening! Was it originally done to serve a purpose (like, if custom fonts were missing, or if readers had non-100% zoom levels)? Thanks, Matt!

from ai2html.

mbloch avatar mbloch commented on June 12, 2024

I think this is fixed now, we'll reopen if the problem recurs.

from ai2html.

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.