Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent reftest failures due to font selection choices #23290

Open
jdm opened this issue Apr 29, 2019 · 9 comments
Open

Intermittent reftest failures due to font selection choices #23290

jdm opened this issue Apr 29, 2019 · 9 comments

Comments

@jdm
Copy link
Member Author

@jdm jdm commented May 10, 2019

Screen Shot 2019-05-09 at 11 02 43 PM

Screen Shot 2019-05-09 at 11 02 47 PM

@jdm
Copy link
Member Author

@jdm jdm commented May 13, 2019

This is a relatively common intermittent failure on taskcluster mac jobs; this will only get worse as we add more of them.

@jdm jdm added the B-high-value label May 13, 2019
@jdm
Copy link
Member Author

@jdm jdm commented May 15, 2019

The info added to #23375 has yielded interesting output like the following:

"[2019-05-14T23:50:05Z INFO  gfx::font] couldn't find font for 'T' (54) in families [FontGroupFamily { font_descriptor: FontDescriptor { template_descriptor: FontTemplateDescriptor { weight: FontWeight(400.0), stretch: FontStretch(NonNegative(Percentage(1.0))), style: Normal }, variant: Normal, pt_size: 16px }, family_descriptor: FontFamilyDescriptor { name: Generic(Atom('serif' type=static)), scope: Any }, loaded: true, font: None }]"

I find this highly suspect!

@jdm
Copy link
Member Author

@jdm jdm commented May 21, 2019

I have a theory that this occurs when the macos font backend's FontHandle::new_from_template is called with a None pt_size argument. This chooses 0.0 for a point size, then FontTemplateData::ctfont instantiates the font with a point size of 0.1, but all queries for the font use 0.0 and won't find it. This could explain why the fallback behaviour is triggered.

@jdm
Copy link
Member Author

@jdm jdm commented May 21, 2019

This can happen if FontTemplate::instantiate is called, rather than FontContext::create_font, which happens in FontContext::descriptor.

@jdm
Copy link
Member Author

@jdm jdm commented May 21, 2019

Theory busted - we store the unclamped point size in the hashmap, not the clamped one :(

@CYBAI CYBAI mentioned this issue Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.