Something wrong with italic fonts?
See original GitHub issueDescription
I was trying to display mathematical texts (specifically alpha
) with the matplotlib-supplied fonts but I couldn’t do it by setting pplt.rc['font.family'] = 'DejaVu Sans'
and pplt.rc['mathtext.default'] = 'it'
. Am I missing something here?
Aside from this behavior, personally, the default greek letters in proplot are not so pleasing. 'Fira Math'
looks better but it isn’t so pleasing when the italic font is used (as shown below). Can we improve this?
Steps to reproduce
When italic font is selected, all alpha look the same. Is this the expected behavior?
import proplot as pplt
pplt.rc['mathtext.default'] = 'it'
fig, axs = pplt.show_fonts()
The above italic font in 'DejaVu Sans'
looks different from the one in matplotlib.
import matplotlib.pyplot as plt
plt.rcParams['font.size'] = 18
fig, ax = plt.subplots()
ax.text(.2, .9, 'regular')
ax.text(.6, .9, 'italic')
ax.text(.3, .7, r'$\mathrm{\alpha}$')
ax.text(.7, .7, r'$\alpha$')
Proplot version
3.4.3 0.9.5
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
How To Easily Fix Google Chrome Italic Font Issue - YouTube
Are you facing the Google Chrome italic font issue? Are you annoyed by the Italic font style rendering of the text in Google...
Read more >Italic font problem - Microsoft Community
1. In search-box of Windows toolbar, type: Control Panel and open it. 2. Click in Programs > Uninstall a program, find Microsoft Office...
Read more >[Fix] Bold and Italic Font Problem in Windows - AskVG
Right-click on Desktop and select Personalize option. · Now apply default Windows theme. · Type fonts in RUN or start menu search box...
Read more >Why are italic fonts sometimes used in a plain text? - Quora
Most apps refrain from use of an italic font, because italic fonts sometimes render horribly on smaller displays. Unless you're using the default...
Read more >The case against banning italics - accessible digital documents
One of the study's conclusions was that, for people with dyslexia, “italic fonts decreased reading performance”.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And I finally remembered what I was thinking when I implemented this behavior: The idea was that the math text and string text should always be the same font, or else it could look “ugly”. So, users would be expected to change the plot-wide font to something more suitable for math if need-be, e.g. with
pplt.rc['font.name'] = 'Fira Math'
.However, as you’ve shown, this is kind of frustrating / unexpected – the “aesthetic” benefits of forcing everyone to use the same font set for math and non-math text are outweighed by the practical issue that new proplot users are getting ugly math equations out-of-the-box. So, I will indeed remove this behavior.
#323 sets
rc['mathtext.default'] = 'it'
and uses the currently active font for math text by default rather than the global sans-serif font (meaningrc['font.name] = 'font'
will also update the math text).