diff --git a/src/components.jl b/src/components.jl index 7520ae77..51914ffa 100644 --- a/src/components.jl +++ b/src/components.jl @@ -288,7 +288,7 @@ function font(args...;kw...) for symbol in keys(kw) if symbol == :family - family = kw[:family] + family = string(kw[:family]) elseif symbol == :pointsize pointsize = kw[:pointsize] elseif symbol == :halign diff --git a/test/runtests.jl b/test/runtests.jl index d13ad4bb..2383a931 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,3 +1,4 @@ +using Plots: guidefont import ImageMagick using VisualRegressionTests using Plots diff --git a/test/test_defaults.jl b/test/test_defaults.jl index 96c0ac44..9ce50738 100644 --- a/test/test_defaults.jl +++ b/test/test_defaults.jl @@ -1,10 +1,12 @@ using Plots, Test -const PLOTS_DEFAULTS = Dict(:theme => :wong2) +const PLOTS_DEFAULTS = Dict(:theme => :wong2, :fontfamily => :palantino) Plots.__init__() @testset "Loading theme" begin - @test plot(1:5)[1][1][:seriescolor] == RGBA(colorant"black") + pl = plot(1:5) + @test pl[1][1][:seriescolor] == RGBA(colorant"black") + @test guidefont(pl[1][:xaxis]).family == "palantino" end empty!(PLOTS_DEFAULTS)