Skip to content

Add mappings for bold and italic cal font class #26419

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devRD
Copy link
Contributor

@devRD devRD commented Jul 31, 2023

PR summary

Fixes #22056

PR checklist

@devRD devRD marked this pull request as draft July 31, 2023 14:03
@devRD
Copy link
Contributor Author

devRD commented Jul 31, 2023

From the #22056 discussion, it seems using plt.rcParams['font.weight'] = 'bold' seems to be problematic. Using the \mathbfit command to fetch the bold calligraphy fonts could be a way forward (?)

fontsets = ["dejavusans", "dejavuserif", "cm", "stixsans", "stix"]
for x, fs in enumerate(fontsets):
    s = "$\mathrm{%s}: \mathcal{ABCDE} \mathbfit{\mathcal{ABCDE}}$" % (fs)
    ...

cal_bold

@devRD
Copy link
Contributor Author

devRD commented Aug 3, 2023

Hi @ksunden, I investigated further on this issue and listing my findings on this:

References:

  • From my understanding, I think neither DejaVu Sans nor Stix provides the bold mathcal Unicode. Although the Computer Modern font provides bold versions for mathcal from the cmbsy10 font listed here, integrating that results in the following:
    bold cal

However, it does not make much sense to add a new font just for Computer Modern, or to add the Euler-math font. So this issue could be closed as expected LaTeX behavior because default LaTeX does not seem to provide it simply either.
As a side note, I could add the cmbsy10 changes here as a reference for the user or maybe an example plot or something (?)

Some more useful references:
https://tug.org/TUGboat/tb33-3/tb105vieth.pdf
https://cs.brown.edu/about/system/managed/latex/doc/euler.pdf
https://tex.stackexchange.com/questions/580904/accessing-all-possible-math-styles-of-the-stix-font

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: \mathcal does not work when font.weight is "bold"
1 participant