From 3d8e7ebb9c1ba4bf2df764f7f8a7d47ad47ca65b Mon Sep 17 00:00:00 2001 From: Haakon Ludvig Langeland Ervik <45243236+haakon-e@users.noreply.github.com> Date: Mon, 5 Dec 2022 15:52:13 -0800 Subject: [PATCH] fix compat for Makie --- src/utils.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 27768155..4a192ce9 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -228,10 +228,10 @@ function project_to_pixelspace(scene, points::AbstractVector{Point{N, T}}) where ) end -function text_bbox(textstring::AbstractString, fontsize::Union{AbstractVector, Number}, font, align, rotation, justification, lineheight) +function text_bbox(textstring::AbstractString, fontsize::Union{AbstractVector, Number}, font, fonts, align, rotation, justification, lineheight) glyph_collection = Makie.layout_text( textstring, fontsize, - font, align, rotation, justification, lineheight, + string(font), fonts, align, rotation, justification, lineheight, RGBAf(0,0,0,0), RGBAf(0,0,0,0), 0f0, 0f0 ) @@ -279,9 +279,10 @@ function directional_pad(scene, limits, tickcoord_in_inputspace, ticklabel::Abst normal_vec = Vec2f((dx, dy)./sqrt(dx^2 + dy^2)) # We have computed the normal vector - now we have to get tick extents + fonts = theme(scene, :fonts) extents = text_bbox( ticklabel, ticksize, - tickfont, Vec2f(0), tickrotation, + tickfont, fonts, Vec2f(0), tickrotation, 0.0, # Makie.to_value(Makie.theme(scene, :justification)), 0.0, # Makie.to_value(Makie.theme(scene, :lineheight)) )