Created
May 26, 2023 19:22
-
-
Save asinghvi17/ce7f706f80f20a915c4d300b4ce524ad to your computer and use it in GitHub Desktop.
Replacing the Makie latex rendering font
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_stix_fonts = Dict(:regular => "/System/Library/Fonts/Supplemental/STIXTwoMath.otf",#joinpath("NewComputerModern", "NewCMMath-Regular.otf"), | |
:italic => "/System/Library/Fonts/Supplemental/STIXTwoMath.otf",#joinpath("NewComputerModern", "NewCM10-Italic.otf"), | |
:bold => "/System/Library/Fonts/Supplemental/STIXTwoMath.otf",#joinpath("NewComputerModern", "NewCM10-Bold.otf"), | |
:bolditalic => "/System/Library/Fonts/Supplemental/STIXTwoMath.otf",#joinpath("NewComputerModern", "NewCM10-BoldItalic.otf"), | |
:math => "/System/Library/Fonts/Supplemental/STIXTwoMath.otf" | |
) | |
Makie.MathTeXEngine.default_font_families["STIX"] = Makie.MathTeXEngine.FontFamily( | |
_stix_fonts, | |
Makie.MathTeXEngine._default_font_mapping, | |
Makie.MathTeXEngine._default_font_modifiers, | |
Dict{Char, Tuple{String, Int64}}(),# Makie.MathTeXEngine._symbol_to_new_computer_modern, | |
13, | |
0.0375) | |
fig = Figure() | |
lab = Label(fig[1, 1], L"\nabla 3^\circ \partial L^3 \sum \lim_{l\to\infty} \varphi\phi\omega\pi\epsilon\varepsilon \mathbb{R} \sqrt{A + j + 2 + 3} \left|x^2\right|^3 = \sum_{k=1}^N \vec{v}_{\left(a'+\vec{a}\right)_k} + \sqrt{T}x! when \left[\sqrt{\frac{\Omega - 2}{a \left\langle c^\dagger \right\rangle b}}\right] < \int_0^{2\pi} |\sin(\mu x)| ~dx") | |
fig | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment