Replies: 10 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 |
Beta Was this translation helpful? Give feedback.
-
@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 |
Beta Was this translation helpful? Give feedback.
-
That's more of a question for @jkrumbiegel and @Kolaru |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
@Kolaru I tried |
Beta Was this translation helpful? Give feedback.
-
When installed, you can use |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
True, but it might be enough for OP. |
Beta Was this translation helpful? Give feedback.
-
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) |
Beta Was this translation helpful? Give feedback.
-
Related: #1321 |
Beta Was this translation helpful? Give feedback.
-
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)?
Beta Was this translation helpful? Give feedback.
All reactions