-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
small-caps doesn't seem to work #8552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact 8000 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
This is still true. |
This will basically not work (AFAICT) until we switch to using harfbuzz for font shaping (#14912). (Currently the way we detect small-caps fonts is just if their name is exactly (case-insensitively) either "capitals" or "small-caps", which of course fails to catch any relevant small caps font -- but it's not as if any simple regex on the font name would really be sufficient, see e.g. https://www.fontsc.com/font/tag/small-caps, https://www.fontsquirrel.com/fonts/list/tag/small%20caps.) Given that it seems unlikely we'll switch to harfbuzz any time soon (well, it depends on whether someone picks up #14912), I think we should simply just document "variant: small-caps" as unsupported and emit a warning when the user requests that. |
It seems regenerating the images is the only hold up for harfbuzz? |
Actually there's a bit more, e.g. figuring out whether we need static linking (especially the situation on non-linux), fixing a version, and all that stuff... |
Where are we tracking g the image comparison issue? I think we should just go low tech and have two repositories and let folks who want smaller downloads just limit the depth they pull off GitHub. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Are there any workarounds to get small caps fonts in text in matplotlib? Perhaps getting some LaTeX installation or something working with matplotlib? I would like to be able to use small caps as it is used a lot in high energy physics and our legends need to properly reflect the exact font formatting. |
@AWildridge it should work if you use (The problem here is primarily that our internal mathtext engine cannot handle it, but with the correct preamble etc, anything that can be done in LaTeX can be done in Matplotlib.) |
I noticed that even in the demo, the small-caps feature is not working. I tried switching fonts to STIXGeneral, and setting
variant='small-caps'
still had no effect.The text was updated successfully, but these errors were encountered: