8000 small-caps doesn't seem to work · Issue #8552 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

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

Closed
geib7592 opened this issue Apr 30, 2017 · 10 comments
Closed

small-caps doesn't seem to work #8552

geib7592 opened this issue Apr 30, 2017 · 10 comments
Labels
status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. status: inactive Marked by the “Stale” Github Action topic: text

Comments

@geib7592
Copy link
Contributor

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.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Apr 30, 2017
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Sep 24, 2017
@coderforlife
Copy link

This is still true.

@jklymak jklymak modified the milestones: needs sorting, v3.4.1 Feb 7, 2021
@anntzer
Copy link
Contributor
anntzer commented Feb 7, 2021

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.

@jklymak
Copy link
Member
jklymak commented Feb 7, 2021

It seems regenerating the images is the only hold up for harfbuzz?

@anntzer
Copy link
Contributor
anntzer commented Feb 7, 2021

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...

@jklymak
Copy link
Member
jklymak commented Feb 7, 2021

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.

@anntzer
Copy link
Contributor
anntzer commented Feb 7, 2021

#16447

@anntzer anntzer modified the milestones: v3.4.1, unassigned Feb 15, 2021
@story645 story645 modified the milestones: unassigned, needs sorting Oct 6, 2022
@github-actions
Copy link
github-actions bot commented Oct 9, 2023

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!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Oct 9, 2023
@github-actions github-actions bot added the status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. label Nov 8, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
@AWildridge
Copy link

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.

@oscargus
Copy link
Member

@AWildridge it should work if you use usetex=True as that will use standard LaTeX to generate the text, see https://matplotlib.org/stable/users/explain/text/usetex.html

(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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. status: inactive Marked by the “Stale” Github Action topic: text
Projects
None yet
Development

No branches or pull requests

8 participants
0