Within this div element lies text styled with a custom font via CSS's @font-face attribute. The issue arises when the font hasn't loaded yet, causing a delay in updating the font style of the text within the div. As a result, taking measurements of the element's size immediately after it's added to the DOM results in inaccurate values before loading the specified font family in the CSS file. How can I detect this and re-measure the text once the font is fully loaded? One approach that comes to mind is utilizing the font loading API. By using the check method to determine if the font is ready or not, I can then listen for the readiness event to accurately measure the text again. Are there other, more effective ways to achieve this?