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

Monospace font isn't monospace on Android on Chrome. #1708

Closed
verhovsky opened this issue Dec 18, 2020 · 3 comments
Closed

Monospace font isn't monospace on Android on Chrome. #1708

verhovsky opened this issue Dec 18, 2020 · 3 comments

Comments

@verhovsky
Copy link

verhovsky commented Dec 18, 2020

If you open https://docs.python.org in Chrome on an Android phone, the code samples are in a sans-serif proportional font.

Screenshot_20201218-034914

Currently this is the font-family for code tags:

tt, code, pre {
    font-family: monospace, sans-serif;
    font-size: 96.5%;
}

monospace not working is a longstanding Android Chrome issue, see https://meta.stackexchange.com/questions/230878/code-blocks-dont-show-up-as-monospace-text-on-the-mobile-website-on-android for details. I think you have to specify fonts by name. If you're going to do this, please set Source Code Pro as the first one, it's the best monospace font in my opinion. Or you could use the font-family used for code samples on the CPython homepage:

    font-family: Consolas,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;

Smartphone:

  • Device: Pixel 5
  • OS: Android 11
  • Browser: Chrome
  • Version: 87.0.4280.101

(Firefox works fine)

@hugovk
Copy link
Member

hugovk commented Dec 18, 2020

Duplicate of python/devguide#581, see also python/python-docs-theme#55.

@verhovsky
Copy link
Author

This is finally fixed in Chrome Canary (Chrome 96)

Screenshot_20211001-154752.png

@hugovk
Copy link
Member

hugovk commented Oct 2, 2021

Thanks for the update!

Chrome 96 is in beta Oct 21 - Oct 28 and stable in 45 days (Nov 16).

https://www.chromestatus.com/features/schedule

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

No branches or pull requests

2 participants