-
Notifications
You must be signed in to change notification settings - Fork 19
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
Lower case Greek should be italic #26
Comments
gives something like this Here it appears that It seems that instead greek is not leaning, while some math characters are leaning. |
Note that computer modern is not correctly rendered using the current implementation. It should look like this https://tug.org/FontCatalogue/computermodern/ whereas I get, e.g. The integral seems to have survived intact, but |
I would be happy to have a go at fixing this... any pointers on how to get started? |
Thanks for the detailed report ! There are several things going on here.
So point 3 and 5 require a fix. For the latter, the starting point is this function MathTeXEngine.jl/src/engine/texelements.jl Line 121 in 88b62d1
It is given a If you'd like to contribute and have any question about the internal, I'm happy to help. |
How does LaTeXStrings.jl approach compare to the two approaches outlined in point 5? Is it doing a version of the matplotlib lookup? I ask this because LaTeXStrings seems to produce consistently good output in my limited usage |
|
On closer inspection it seems to me that all lower case Greek has not had the conventional slant applied. Could this be fixed in the pipeline logic? Lower case Greek is always slanted/italic by convention. Presumably this wouldn't auto-fix in a different font until the logic is updated... or have I misunderstood the issue? |
So I should at least hunt down an example of italicised lower case greek, and figure out whether |
how would I go about changing the default lower case greek to be italic? |
@Kolaru do you think there is a way forward using NCM, or does this require deeper surgery? |
The glyphs are definitely there already. Here I used the Font Preview vscode extension to read the otf files in MathTeXEngine.jl: Can I just set the font that MathTeXEngine would use globally to italic? I mean I would much rather specify a few roman cases using \textrm{ } than have nonitalic defaults. In fact that is the normal situation (italic defaults on everything) I think... Is the font used for math set at the Makie level, or MathTeXEngine? How do I tell Makie to tell MathTeXEngine to use NewCM10-italic? Or set the default font in MathTeXEngine? |
mmm. Fonts are confusing. No italic math file for NewCM. Yet, the "Math example" here https://tug.org/FontCatalogue/newcomputermodernroman/ is italic. I don't get this. What is going on here? |
Sorry for the late answer I was quite busy recently.
Yes they can do the job, they are not the glyphs used in the math example you linked below for some reason that eludes me as well. But we could use them anyway.
Unfortunately things are a bit more complicated. Currently we separate between symbols and normal characters. Glyphs for symbols are taken from the math font and glyphs for normal character from the italic font. The catch is that greek letters are parsed as
The fonts are set in MathTexEngine there: MathTeXEngine.jl/src/engine/fonts.jl Lines 28 to 44 in 32ce8c4
The first dict define the default fonts with an identifiers (e.g.
Patching NCM is possible, but once I have more time I will look into the options in more details nonetheless. |
awesome! I will give a test drive ! |
I guess MakieOrg/Makie.jl#1952 basically fixes this, apart from (so far) this new issue with backslash that will impact axis labels MakieOrg/Makie.jl#1967 |
Not sure if this is a deliberate font choice, but there are some strange italicization results for greek versus roman characters in Makie. Is this a MathTeXEngine problem, or Makie?
more examples at this issue MakieOrg/Makie.jl#1245
The text was updated successfully, but these errors were encountered: