-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
difflib
-generated HTML file does not use monospaced font
#131204
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
Comments
Shall we use the System Font Stack for better cross-platform support? font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; |
(I think we can consider it as a bugfix as it hinders readability) |
difflib
-generated HTML file does not use monospaced fontdifflib
-generated HTML file does not use monospaced font
hugovk
added a commit
that referenced
this issue
Mar 14, 2025
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This was referenced Mar 14, 2025
mikec9
pushed a commit
to mikec9/cpython
that referenced
this issue
Mar 14, 2025
… font (pythonGH-131221) (python#131243) (cherry picked from commit 7fd6160)
plashchynski
pushed a commit
to plashchynski/cpython
that referenced
this issue
Mar 17, 2025
…ython#131221) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
seehwan
pushed a commit
to seehwan/cpython
that referenced
this issue
Apr 16, 2025
…ython#131221) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
difflib.HtmlDiff.make_file
writes an HTML file with a CSS rule specifying Courier as the font to use. On systems which don't have it installed, browsers may fall back to the system default font, which likely won't be monospaced.On my system (which does not have Courier), the default font is Signika, which is what Firefox used to render the text.
I think is is sufficient to do:
and will follow up with a pull request soon.
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
difflib.HtmlDiff
may not use monospaced font #131221difflib.HtmlDiff
may not use monospaced font (GH-131221) #131242difflib.HtmlDiff
may not use monospaced font (GH-131221) #131243The text was updated successfully, but these errors were encountered: