Closed sbrugman closed 3 years ago
Weird. is Consolas font installed on your system? Is it Intel or M1?
Consolas wasn't installed in my environment (Intel). The fallback font is "Dejavu Sans", which fails to display the code as seen above.
Advising users to install the font may involve recreating the environment etc. An alternative solution to consider is to explicitly specify a fallback font. This is much more user friendly in my opinion at nearly no burden on the package. For instance, "DejaVu Sans Mono" works well. This can be trivially achieved providing a sequence of font names:
agreed this is a good change. I guess your PR only sets the arg default, but there's no code to fall back to the indicated font. Font name is now a tuple by default, which is really a comment for the developer. Shouldn't there be logic to check for font installations and use one that works?
Matplotlib handles all that logic, this PR just changes the default:
WARNING:matplotlib.font_manager:findfont: Font family ('Consolas', 'Consolas Sans Mono') not found. Falling back to DejaVu Sans.
You are kidding me!? Wow. that's insane. You just took me to school!
By the way gotta use "Fixes #34" not "Fix for #34" to get autoclose. :)
Compare with courier new
Relevant code: