Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3696530
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:45:00+00:00 2026-05-19T04:45:00+00:00

Hi random Stackoverflow visitor- Thanks for reading my question! Here is a minimal page

  • 0

Hi random Stackoverflow visitor- Thanks for reading my question!

Here is a minimal page that demonstrates my problem: http://lisperati.com/text_bug/text_bug.html

If you visit that page with Chrome/Chromium it will calculate the width of a div containing text, both immediately and after 1 second. On my machines I get two very different answers as to the width. Any chance you know the reason for why these two width calculations give different results?

My uneducated guess is that there is some weird delay in rendering font-face items, either because of the delay for loading the file or otherwise (Though my tests show evidence that this problem is not related to fetching the font file) As a rule, my understanding is that dynamic elements inserted into the DOM will be correctly laid out as soon as the insertion is complete and control is returned to the javascript code.

More important for me than understanding “why” this happens is to understand how to properly adjust for this issue. As you probably know, IMG elements have an “onload” event that can be used to find accurate dimensions of an image after it has been loaded. Is there some similar event that can be used for when a font-face element has been fully laid out, in order to adjust for this issue? Do you have any other advice for how to get an accurate width of an element styled with font-face without simply having an arbitrary 1 second delay?

Thanks so much for any tips on this glitch that’s holding up my work, fellow StackOverflow reader!

BTW- I asked a related question recently (http://stackoverflow.com/questions/4636079) but have narrowed down the issue much more, leading to this new, more specific question.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:45:01+00:00Added an answer on May 19, 2026 at 4:45 am

    Have you tried document.ready, window onload?

    Also if it’s related to refresh (F5) then it looks like a network issue, because a rendering issue would cause problems on every page load.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Random quick question. The System.Web.Cache class, at what level is the information stored? On
I have a pseudo random number generator (PRNG) class that I want to unit
Kind of a random question... What I'm looking for is a way to express
I need to generate random tokens so that when I see them later I
I want to generate random numbers manually. I know that every language have the
I'm getting a random unreproducible Error when initializing a JSplitPane in with JDK 1.5.0_08.
I want to put random output from my result set (about 1.5 mil rows)
For a random event generator I'm writing I need a simple algorithm to generate
When using a Random Number Generator, which is the better way to use it
I need to generate random text strings of a particular format. Would like some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.