Bug 197003

Summary: Setting font-weight for @media print prevents font from rendering in print if the according font file has not been loaded before.
Product: WebKit Reporter: Andreas Zwettler <andzwettler>
Component: PrintingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Trivial CC: mmaxfield, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: Mac   
OS: macOS 10.14   

Description Andreas Zwettler 2019-04-17 04:37:00 PDT
.component {
  font-weight: bold;
}
@media only print {
  .component {
    font-weight: normal;
  }
}

If the font loaded is a network resource, the text of .component will not be rendered when opening the print dialog for the first time. Closing the dialog and re-opening it then shows the text.
My Assumption is, that the normal variant of the font is issued to load when opening the print dialog, but it does not wait until the font is loaded to render the file. When the dialog is opened the second time, the font file has loaded and the full text is rendered.
Comment 1 Radar WebKit Bug Importer 2019-04-18 09:55:07 PDT
<rdar://problem/50018913>