New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 770003 link

Starred by 6 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Flash of disappearing text with custom font

Project Member Reported by malteubl@google.com, Sep 29 2017

Issue description

Chrome currently makes text that has already been displayed invisible when a stylesheet loads that provides a font for that text.

Simple example. Try http://output.jsbin.com/qonelib/quiet with cache disabled and network throttling to see the effect.

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    
    <title>Flash on disappearing text</title>
    <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
    <style>
      body {
        font-family: "IM Fell DW Pica", serif;
        padding: 3rem;
        line-height: 1.3rem;
      }
    </style>
  </head>
  <body>
    <h1>Some text</h1>
  </body>
  <script>
    var url = 'https://fonts.googleapis.com/css?family=IM+Fell+DW+Pica&x='+Math.random();
    var l = document.createElement('link');
    l.rel = 'stylesheet';
    l.href = url;

    setTimeout(function() {
      document.head.appendChild(l);
    }, 2000)
  </script>
</html>
    

##############################

Chrome should never make text invisible that has previously been painted as visible.
 
Cc: dvallet@chromium.org
 Issue 766009  has been merged into this issue.
Cc: kinuko@chromium.org
Would your use case be solved if font-display was available for third party fonts via @font-feature-values?

https://bugs.chromium.org/p/chromium/issues/detail?id=777846

Sakamoto said that trying to change the current behavior would be a lot of work and might not be spec compliant. We would rather use this as a motivation to prioritize 777846. What do you think?

Comment 3 by malteubl@google.com, Dec 14 2017

It would help in that one could set the value to swap to fix this bug.

I think we should still fix the spec if it would not be compliant. We
should never hide text that the user was already able to read.
Components: Blink>WebFonts

Sign in to add a comment