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

Default fonts are broken #171

Open
mihkeleidast opened this issue Apr 22, 2021 · 5 comments
Open

Default fonts are broken #171

mihkeleidast opened this issue Apr 22, 2021 · 5 comments

Comments

@mihkeleidast
Copy link

mihkeleidast commented Apr 22, 2021

Describe the bug
After updating from zenika/alpine-chrome:80 to a newer version (I've tried both zenika/alpine-chrome:81 and zenika/alpine-chrome:89 and both fail, zenika/alpine-chrome:77 and zenika/alpine-chrome:80 behave as expected), default fonts are not rendered correctly. E.g. it does not matter if I specify my font-family to be serif/sans-serif, the result is always the same. Additionally, bolds are not rendered at all.

We're using a tool to do visual regression testing and this is the diff image we're getting after upgrading:
heading-browser-tsx-heading-renders-correctly-1-diff

To Reproduce

Hard to give exact reproduction steps. Try setting the default font-family to serif/sans-serif and inspect that there is visually no difference.

What is the expected behavior?
I would have expected fonts to not change after upgrading.

What is the actual behavior?
Fonts have changed, bold are not rendered. serif/sans-serif setting in CSS is not respected.

Possible solution
I saw the custom fonts config here: https://github.com/Zenika/alpine-chrome/blob/master/local.conf#L8

I would expect that the "Main sans-serif font name goes here" text is a placeholder in the Alpine documentation and should really be set to an actual font family.

If my hunch is incorrect, however, I'm not sure what the issue is... or if it is even an issue with this image!

Versions

Software Version(s) How-to
Chromium 89.0.4389.72 docker container run -it --rm --entrypoint "" zenika/alpine-chrome:89 chromium-browser --version
Docker Engine 19.03.12 docker version
@mihkeleidast
Copy link
Author

After a bit of trial and error, I found a workaround for this issue. I need to add freesans to my CSS font stack before the default sans-serif final fallback. But having an extra family just for tests is not ideal.

@dloibl
Copy link

dloibl commented Apr 23, 2021

I have the same problem. Is there a different solution than fixing it in css as @mihkeleidast suggests?

@jlandure
Copy link
Member

Hi @mihkeleidast @dloibl 👋

Related to #106

We have to check what are the difference between the versions. Perhaps Alpine, Chrome, this repo has changed also the font to embed... We have to investigate!
Thanks for the issue 👍

@theJohnnyBrown
Copy link

Getting a similar issue here

@codingholt
Copy link

Same issue here, any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants