fix fontfamily (#3542)

* fix fontfamily

* Update test_defaults.jl
This commit is contained in:
Simon Christ 2021-06-04 15:36:40 +02:00 committed by GitHub
parent 9f51b96269
commit d1373d8b89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -1,3 +1,4 @@
using Plots: guidefont
import ImageMagick
using VisualRegressionTests
using Plots

View File

@ -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)