css-font-rendering icon indicating copy to clipboard operation
css-font-rendering copied to clipboard

Explainer doc on when browsers actually render a first frame

Open natduca opened this issue 10 years ago • 1 comments

A key challenge in this spec space is that its poking up against an unspecified, undocumented, generally unkwown-by-anyone problem in the web: when does a browser actually decide to render its first frame? What pieces go into that choice?

I think it'd be great for someone to write an explainer doc that pulls together all the heursitics and algorithms that browsers [or failing that, at least chrome] use to determine first painting. I think by explaining the space, and making the space visible, it would help elide some of the concerns around magic...

natduca avatar Apr 09 '15 16:04 natduca

The specific wording I'd like to see modified in the Font spec as a result of this work is the following...

In cases where textual content is loaded before downloadable fonts are available, user agents may render text as it would be rendered if downloadable font resources are not available or they may render text transparently with fallback fonts to avoid a flash of text using a fallback font. - font loading guidelines

Right now this text defers all control to the user agent. I want developers to have a say in this and be able to override the UA behavior. In other words, something like...

In cases where textual content is loaded before downloadable fonts are available, user agents must use the specified rendering policy, and if left unspecified may render text as it would be rendered if downloadable font resources are not available or they may render text transparently with fallback fonts to avoid a flash of text using a fallback font. - font loading guidelines

I think the above is mostly independent of the much larger "how browser paints" discussion... Yes, there is a subtree in that algorithm somewhere which invokes the above steps, but the issue here is specifically about giving developers control over this particular decision point.

igrigorik avatar Apr 09 '15 17:04 igrigorik