-
-
Notifications
You must be signed in to change notification settings - Fork 306
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Fonts of text in a mixed-mode L-string differs from a normal text #1560
Comments
Regular strings like I'm currently working on getting a different font working in MathTeXEngine, but with no success so far. The documentation of MathTeXEngine says
but there clearly is some modularity prepared to support other fonts. Here is what I did so far: utopia_dir = "/usr/local/texlive/2018/texmf-dist/fonts/type1/adobe/utopia"
utopia = Dict(
:regular => joinpath(utopia_dir, "putr8a.pfb"),
:italic => joinpath(utopia_dir, "putri8a.pfb"),
:bold => joinpath(utopia_dir, "putb8a.pfb"),
:bolditalic => joinpath(utopia_dir, "putbi8a.pfb"),
:math => joinpath(utopia_dir, "putri8a.pfb"), # italic
)
utopia_ff = Makie.MathTeXEngine.FontFamily(utopia)
Makie.MathTeXEngine.generate_tex_elements("a+b", utopia_ff) Currently, the values of the Is this something you have on the radar? If not, could you give me some pointers, please? Thanks in advance! I won't be able to work on this within the next month, though. 🙂 CC @Kolaru |
@SimonDanisch, did you have time to think about my comment above? If not, no rush. I'm just pinging you because I thought you are online, as you responded so quickly in #1296. I don't know how LaTeX deals with superscripts exactly, but at least |
That's more of a question for @jkrumbiegel and @Kolaru |
The way consistency of fonts is currently supported is only the other way around: you can get the fonts used by MathTeXEngine using The other way is not yet implemented, but now has its very own issue: Kolaru/MathTeXEngine.jl#55 @jonas-schulze You seem to be pretty close. The main problem you may face is that the math font is (for Computer Modern) a special font with special encoding, that requires some additional data (namely how to fetch the special character). If you get back to it before I can have a closer look (I will try to go through MathTeXEngine issues in the coming few weeks), please open an issue on MathTeXEngine. |
@Kolaru I tried |
That is correct. But it doesn't help in situations where a user e.g. prefers the default font of Makie, or wants to have the figure's font (or all its fonts) match the non-CMU font used in the document the figure should be embedded in. |
True, but it might be enough for OP. |
I have added a simple support for TeXGyreHeros (Makie default) in MathTeXEngine, and a hack to use it: just put the command Now this is still a hack, so maybe on the Makie side we would like to have a different interface to pass any FontFamily down to MathTeXEngine. (there is of course also a lot of work to get any font to get a proper layout, including TeXGyreHeros, but that's a different story) |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I expect that the font of "Time" is the same as "Price". However, it does not.
What should I do to make Makie render them with the same font (better by default)?
The text was updated successfully, but these errors were encountered: