-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Bug]: Font kerning and font weight problems #30785
Comments
Would it be possible to provide a more minimal reproduction which we can run locally? Ideally without cloning/building the entire project.
Are you able to track it down which latest GitHub Action run was good and when it first started failing? Since from a quick look you are using package-lock.json - that doesn't seem like a Playwright bug, and the underlying host OS might have changed instead and causing these kind of issues. |
Unfortunately, it's the most minimum reproduction I have at the present time :( |
We've tried to switch browser ( (see letter |
@mxschmitt I realize it's hard to track, but we've tried a few wild shots before creating this issue ourselves and we're very confused. We have a huge UI components library and we were relying on hundreds of screenshot tests for years. We migrated from Cypress to Playwright several months ago and everything was going great, we have dependabot configured and keep everything up to date and suddenly everything broke down with no apparent trackable reason. We've created this issue not to blame Playwright but to ask for help and assistance because we're out of ideas why could this happen at all. Maybe you have some thoughts on directions for us to explore? It's very confusing how can it be that same screenshots are ran on one code and on another that hasn't really changed at all and fonts rendering is totally off. We tried rolling back Playwright, tried rolling back chromium version, tried switching to Firefox and no luck. |
I'll close the issue for now, since we have not enough information to act on it. In theory, browser screenshots should be reproducible, if they get created on the same Host (os/arch/version) and the DOM is stable. I recommend looking at build pipeline logs, maybe that will yield something, maybe the underlying OS version has changed etc. Feel free to re-file if you found out more and have evidence that its a bug on Playwright side. Thanks for understanding. |
Were about to close it ourselves 🙂 we figured it out — seems like for some reason critical CSS and fonts inlining in Angular worked differently in 2 environments being compared and we ended up loading |
@waterplea hi there, I have a fairly similar problem on one of the projects, can you please provide an example of the code (you can directly link to your repository) how did you do it? |
Add these lines to your custom await page.route('https://fonts.gstatic.com/**', async route =>
route.fulfill({path: `${__dirname}/../stubs/manrope-fonts.ttf`}),
); Explore our custom tuiGoto utility to get more details. |
@nsbarsukov thanks, appreciate it ! |
@nsbarsukov I just want to make sure that the type of request you are replacing (https://fonts.gstatic.com/**) is a fetch/document request? Because I’m trying to replace fonts in my project and I see in dev tools that their request type is fonts (on screenshot), I have a suspicion that in this case |
Use playwright UI mode (not browser dev tools) to check it: As for my case, it works – see body's decscription of the following PR: |
Version
1.44.0
Steps to reproduce
Use our repository of Open Source project – https://github.com/taiga-family/taiga-ui
Approximately 3 weeks ago (mid-April) our screenshot tests became too flaky.
The main problem – font rendering.
See some examples:
(probably, relates to [BUG] Incorrect font rendering by Webkit on Ubuntu #22429)
(probably, relates to [Question] Font kerning in WebKit #20203)
More examples see in this PR:
Expected behavior
Font renders in the same way for the same OS every time.
Actual behavior
Flaky render of fonts
Additional context
We've already:
1.44.0
=>1.38.0
)[WIP] chore(deps): another attempt to debug taiga-family/taiga-ui#7413
The problems still persist :(
Environment
The text was updated successfully, but these errors were encountered: