I’d love to give this a whirl, but I’m having some problems getting the tutorial example to work.
First, for some reason I cannot use the font used in the readme example, I get the following error:
font = MakieTypstEngine.MTEFont("TeXGyrePagella")
ERROR: SystemError: opening file "/home/jonas/.julia/packages/MathTeXEngine/8VxpV/assets/fonts/TeXGyrePagellaMTE/TeXGyrePagellaMTE-Regular.otf": No such file or directory
Stacktrace:
[1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
@ Base ./error.jl:176
[2] systemerror
@ ./error.jl:175 [inlined]
[3] open(fname::String; lock::Bool, read::Bool, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
@ Base ./iostream.jl:295
[4] open
@ ./iostream.jl:277 [inlined]
[5] open(fname::String, mode::String; lock::Bool)
@ Base ./iostream.jl:358
[6] open(fname::String, mode::String)
@ Base ./iostream.jl:357
[7] open(::FreeTypeAbstraction.var"#1#2", ::String, ::Vararg{String}; kwargs::@Kwargs{})
@ Base ./io.jl:408
[8] open
@ ./io.jl:407 [inlined]
[9] newface_mmapped(filepath::String, faceindex::Int64, ftlib::Vector{Ptr{FreeType.FT_LibraryRec_}})
@ FreeTypeAbstraction ~/.julia/packages/FreeTypeAbstraction/GGCCW/src/types.jl:34
[10] newface_mmapped
@ ~/.julia/packages/FreeTypeAbstraction/GGCCW/src/types.jl:34 [inlined]
[11] FTFont (repeats 2 times)
@ ~/.julia/packages/FreeTypeAbstraction/GGCCW/src/types.jl:163 [inlined]
[12] #8
@ ~/.julia/packages/MathTeXEngine/8VxpV/src/engine/fonts.jl:21 [inlined]
[13] get!(default::MathTeXEngine.var"#8#9"{String}, h::Dict{String, FreeTypeAbstraction.FTFont}, key::String)
@ Base ./dict.jl:458
[14] load_font
@ ~/.julia/packages/MathTeXEngine/8VxpV/src/engine/fonts.jl:20 [inlined]
[15] get_font
@ ~/.julia/packages/MathTeXEngine/8VxpV/src/engine/fonts.jl:224 [inlined]
[16] MTEFont(name::String, style::Symbol)
@ MakieTypstEngine ~/.julia/packages/MakieTypstEngine/z5zcV/src/font_resolve.jl:103
[17] MTEFont(name::String)
@ MakieTypstEngine ~/.julia/packages/MakieTypstEngine/z5zcV/src/font_resolve.jl:94
[18] top-level scope
@ REPL[3]:1
When I go look in that folder, there is clearly a file called “TexGyrePagellaMTE-Regular.otf”, however, running the following command in my Linux shell:
ls /home/jonas/.julia/packages/MathTeXEngine/8VxpV/assets/fonts/TeXGyrePagellaMTE/TeXGyrePagellaMTE-Regular.otf
also reports that the file cannot be found in spite of the fact that running
ls /home/jonas/.julia/packages/MathTeXEngine/8VxpV/assets/fonts/TeXGyrePagellaMTE/
results in this output:
LICENSE TexGyrePagellaMTE-Italic.otf
TexGyrePagellaMTE-BoldItalic.otf TexGyrePagellaMTE-Math.otf
TexGyrePagellaMTE-Bold.otf TexGyrePagellaMTE-Regular.otf
Is there some weird unicode-look-alike shenanigans going on here?
Second. I could successfully load another font, “LucioleMath”, but this then generates the following error:
Label(fig[1, 2], typst_string, fontsize = 20, tellheight = false)
ERROR: Failed to resolve arg1:
[ComputeEdge] arg1 = compute_identity((linesgments_shifted, ), changed, cached)
@ /home/jonas/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:737
[ComputeEdge] linesgments_shifted = (::MapFunctionWrapper(#2928))((linesegments, lineindices, preprojection, model_f32c, positions_transformed_f32c, model_clip_planes, space, ), changed, cached)
@ unknown method location
[ComputeEdge] glyphcollections, glyphindices, font_per_char, glyph_origins, glyph_extents, text_blocks, text_color, text_rotation, text_scales, text_strokewidth, text_strokecolor, linesegments, linewidths, linecolors, lineindices = #2906((input_text, fontsize, selected_font, align, rotation, justification, lineheight, word_wrap_width, offset, fonts, computed_color, strokecolor, strokewidth, ), changed, cached)
@ /home/jonas/.julia/packages/Makie/4JW9B/src/basic_recipes/text.jl:333
with edge inputs:
input_text = Typstry.TypstStrings.TypstString[Typstry.TypstStrings.TypstString(Typstry.TypstTexts.TypstText("this is an integral:\n\$ integral_0^t sin(x)^2 dif x \$\n"))]
fontsize = 20.0f0
selected_font = FTFont (family = TeX Gyre Heros Makie, style = Regular)
align = (:center, :center)
rotation = 1.0 + 0.0im + 0.0jm + 0.0km
justification = :center
lineheight = 1.0f0
word_wrap_width = -1.0f0
offset = Float32[0.0, 0.0, 0.0]
fonts = Attributes()
computed_color = RGBA{Float32}(0.0, 0.0, 0.0, 1.0)
strokecolor = RGBA{Float32}(0.0, 0.0, 0.0, 0.0)
strokewidth = 0.0f0
Triggered by update of:
position, text, arg1, fontsize, fonts, font, align, rotation, justification, lineheight, word_wrap_width, offset, fonts, color, colorscale, alpha, colorrange, colorscale, color, colorscale, alpha, colormap, alpha, nan_color, lowclip, colormap, alpha, highclip, colormap, alpha, colormap, alpha, strokecolor or strokewidth
Due to ERROR:
thread 'main' panicked at src/main.rs:40:10:
Compilation failed with error: TypstSource([SourceDiagnostic { severity: Error, span: Span(342140814152337), message: "current font does not support math", trace: [], hints: [] }])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] execute(cmd::Cmd; inputcmd::Cmd, path::String)
@ MakieTypstEngine ~/.julia/packages/MakieTypstEngine/z5zcV/src/rust_cli.jl:34
[3] execute
@ ~/.julia/packages/MakieTypstEngine/z5zcV/src/rust_cli.jl:20 [inlined]
[4] compile_string(str::String, additional_font_paths::Vector{AbstractString})
@ MakieTypstEngine ~/.julia/packages/MakieTypstEngine/z5zcV/src/rust_cli.jl:47
[5] generate_typst_elements(input_text::Typstry.TypstStrings.TypstString, preamble::String)
@ MakieTypstEngine ~/.julia/packages/MakieTypstEngine/z5zcV/src/render.jl:121
[6] typstelems_and_glyph_collection
@ ~/.julia/packages/MakieTypstEngine/z5zcV/src/render.jl:215 [inlined]
[7] convert_text_string!(outputs::@NamedTuple{…}, input_text::Typstry.TypstStrings.TypstString, i::Int64, N::Int64, fontsize::Float32, font::FreeTypeAbstraction.FTFont, align::Tuple{…}, rotation::Quaternionf, justification::Symbol, lineheight::Float32, word_wrap_width::Float32, offset::Vec{…}, fonts::Attributes, color::ColorTypes.RGBA{…}, strokecolor::ColorTypes.RGBA{…}, strokewidth::Float32)
@ MakieTypstEngine ~/.julia/packages/MakieTypstEngine/z5zcV/src/piracy.jl:26
[8] (::Makie.var"#2906#2907")(::@NamedTuple{…}, changed::@NamedTuple{…}, cached::Nothing)
@ Makie ~/.julia/packages/Makie/4JW9B/src/basic_recipes/text.jl:354
[9] ComputePipeline.TypedEdge(edge::ComputePipeline.ComputeEdge{…}, f::Makie.var"#2906#2907", inputs::@NamedTuple{…})
@ ComputePipeline ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:126
[10] #invokelatest#2
@ ./essentials.jl:1055 [inlined]
[11] invokelatest
@ ./essentials.jl:1052 [inlined]
[12] ComputePipeline.TypedEdge(edge::ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph})
@ ComputePipeline ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:120
[13] (::ComputePipeline.var"#52#54"{ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph}})()
@ ComputePipeline ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:664
[14] lock(f::ComputePipeline.var"#52#54"{ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph}}, l::ReentrantLock)
@ Base ./lock.jl:232
[15] resolve!(edge::ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph})
@ ComputePipeline ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:659
[16] _resolve!(computed::ComputePipeline.Computed)
@ ComputePipeline ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:652
[17] foreach
@ ./abstractarray.jl:3187 [inlined]
[18] (::ComputePipeline.var"#52#54"{ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph}})()
@ ComputePipeline ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:661
--- the above 5 lines are repeated 1 more time ---
[24] lock(f::ComputePipeline.var"#52#54"{ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph}}, l::ReentrantLock)
@ Base ./lock.jl:232
[25] resolve!(edge::ComputePipeline.ComputeEdge{ComputePipeline.ComputeGraph})
@ ComputePipeline ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:659
[26] _resolve!(computed::ComputePipeline.Computed)
@ ComputePipeline ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:652
[27] resolve!(computed::ComputePipeline.Computed)
@ ComputePipeline ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:644
[28] getindex
@ ~/.julia/packages/ComputePipeline/03tW7/src/ComputePipeline.jl:563 [inlined]
[29] #476
@ ~/.julia/packages/Makie/4JW9B/src/compute-plots.jl:403 [inlined]
[30] iterate
@ ./generator.jl:48 [inlined]
[31] _collect(c::Vector{…}, itr::Base.Generator{…}, ::Base.EltypeUnknown, isz::Base.HasShape{…})
@ Base ./array.jl:811
[32] collect_similar
@ ./array.jl:720 [inlined]
[33] map
@ ./abstractarray.jl:3371 [inlined]
[34] _register_expand_arguments!(::Type{…}, attr::ComputePipeline.ComputeGraph, inputs::Vector{…}, is_merged::Bool)
@ Makie ~/.julia/packages/Makie/4JW9B/src/compute-plots.jl:403
[35] _register_expand_arguments!
@ ~/.julia/packages/Makie/4JW9B/src/compute-plots.jl:399 [inlined]
[36] register_arguments!
@ ~/.julia/packages/Makie/4JW9B/src/compute-plots.jl:377 [inlined]
[37] (LineSegments)(user_args::Tuple{ComputePipeline.Computed}, user_attributes::Dict{Symbol, Any})
@ Makie ~/.julia/packages/Makie/4JW9B/src/compute-plots.jl:742
[38] _create_plot!(F::Function, attributes::Dict{Symbol, Any}, scene::Makie.Text{Tuple{…}}, args::ComputePipeline.Computed)
@ Makie ~/.julia/packages/Makie/4JW9B/src/figureplotting.jl:410
[39] linesegments!(::Makie.Text{…}, ::Vararg{…}; kw::@Kwargs{…})
@ Makie ~/.julia/packages/Makie/4JW9B/src/recipes.jl:521
[40] tex_linesegments!(plot::Makie.Text{Tuple{Vector{Point{3, Float32}}}})
@ Makie ~/.julia/packages/Makie/4JW9B/src/basic_recipes/text.jl:452
[41] calculated_attributes!
@ ~/.julia/packages/Makie/4JW9B/src/basic_recipes/text.jl:431 [inlined]
[42] connect_plot!(parent::Scene, plot::Makie.Text{Tuple{Vector{Point{3, Float32}}}})
@ Makie ~/.julia/packages/Makie/4JW9B/src/compute-plots.jl:805
[43] plot!(scene::Scene, plot::Makie.Text{Tuple{Vector{Point{3, Float32}}}})
@ Makie ~/.julia/packages/Makie/4JW9B/src/interfaces.jl:211
[44] _create_plot!(F::Function, attributes::Dict{Symbol, Any}, scene::Scene, args::Observable{Point{3, Float32}})
@ Makie ~/.julia/packages/Makie/4JW9B/src/figureplotting.jl:411
[45] #text!#64
@ ~/.julia/packages/Makie/4JW9B/src/recipes.jl:521 [inlined]
[46] text!
@ ~/.julia/packages/Makie/4JW9B/src/recipes.jl:519 [inlined]
[47] initialize_block!(l::Label)
@ Makie ~/.julia/packages/Makie/4JW9B/src/makielayout/blocks/label.jl:10
[48] _block(T::Type{…}, fig_or_scene::Figure, args::Vector{…}, kwdict::Dict{…}, bbox::Nothing; kwdict_complete::Bool)
@ Makie ~/.julia/packages/Makie/4JW9B/src/makielayout/blocks.jl:405
[49] _block
@ ~/.julia/packages/Makie/4JW9B/src/makielayout/blocks.jl:321 [inlined]
[50] #_block#1912
@ ~/.julia/packages/Makie/4JW9B/src/makielayout/blocks.jl:266 [inlined]
[51] _block(::Type{…}, ::GridPosition; kwargs::@Kwargs{…})
@ Makie ~/.julia/packages/Makie/4JW9B/src/makielayout/blocks.jl:260
[52] _block
@ ~/.julia/packages/Makie/4JW9B/src/makielayout/blocks.jl:251 [inlined]
[53] #_#1910
@ ~/.julia/packages/Makie/4JW9B/src/makielayout/blocks.jl:242 [inlined]
[54] Block
@ ~/.julia/packages/Makie/4JW9B/src/makielayout/blocks.jl:241 [inlined]
[55] #Label#2489
@ ~/.julia/packages/Makie/4JW9B/src/makielayout/blocks/label.jl:1 [inlined]
Some type information was truncated. Use `show(err)` to see complete types.
Here’s my versioninfo:
versioninfo()
Julia Version 1.11.7
Commit f2b3dbda30a (2025-09-08 12:10 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 12 Ă— Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)
Environment:
JULIA_EDITOR = code
JULIA_VSCODE_REPL = 1
``