Code Monkey home page Code Monkey logo

Comments (8)

r007 avatar r007 commented on June 3, 2024

Interesting that this bug only appears in Firefox, Chrome and Safari. In Opera and IE 10 it seems everything is working fine.

from ftcolumnflow.

jessedijkstra avatar jessedijkstra commented on June 3, 2024

I've tried several solutions and it seems the calculations that Javascript does are done before the custom fonts are actually loaded. So far it seems setting using the WebFont loader solves the issue. Still running tests though.

from ftcolumnflow.

jessedijkstra avatar jessedijkstra commented on June 3, 2024

@r007 Two things you have to keep in mind while using FTColumnFlow:

  • Apply the same fonts and styles to both the prerender area as the actually rendered columns
  • Use a font loader such as the Typekit webfont loader (https://github.com/typekit/webfontloader) to ensure the fonts are loaded before columnizing.

from ftcolumnflow.

jessedijkstra avatar jessedijkstra commented on June 3, 2024

A quick note btw, if you use selectors such as p + p { text-indent: 30px }; you need to change FTColumnFlow a bit to let the next column inherit the indentation. Will work on a pull request to suggest the change.

from ftcolumnflow.

jessedijkstra avatar jessedijkstra commented on June 3, 2024

@r007
We've worked with FTColumnFlow for a while now with custom fonts, using the webfont loader by Typekit/Google seems to fix the problem.

https://developers.google.com/fonts/docs/webfont_loader

Make sure you load all the fonts including the various variants/weights.

from ftcolumnflow.

topherreynoso avatar topherreynoso commented on June 3, 2024

Can you expound on the comment above regarding selectors? What changes need to occur? I am having the same problem above with lines being duplicated or lost even without the custom fonts and I'm trying to find what the problem is.

from ftcolumnflow.

georgecrawford avatar georgecrawford commented on June 3, 2024

Hi @jessedijkstra and @r007. Thanks for this discussion. I'll add a note to the documentation to raise this issue - any resources which might load after ColumnFlow runs could potentially cause lines to be missing or duplicated. The fix for fonts is to use webfontloader or similar to ensure the fonts are loaded.

from ftcolumnflow.

jessedijkstra avatar jessedijkstra commented on June 3, 2024

@georgecrawford @topherreynoso
If you use a fontloader to load the fonts before columnizing the issue won't occur.

Another issue that exists is the browsers native search, because it moves the columns down if a word can be found in the overflow.

from ftcolumnflow.

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.