diff --git a/src/utils.jl b/src/utils.jl index 0fd11167..b0116564 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1004,6 +1004,33 @@ ignorenan_extrema(plt::Plot) = (xmin(plt), xmax(plt)) # --------------------------------------------------------------- # get fonts from objects: +plottitlefont(p::Plot) = font( + p[:plot_titlefontfamily], + p[:plot_titlefontsize], + p[:plot_titlefontvalign], + p[:plot_titlefonthalign], + p[:plot_titlefontrotation], + p[:plot_titlefontcolor], +) + +windowtitlefont(p::Plot) = font( + p[:window_titlefontfamily], + p[:window_titlefontsize], + p[:window_titlefontvalign], + p[:window_titlefonthalign], + p[:window_titlefontrotation], + p[:window_titlefontcolor], +) + +colorbartitlefont(sp::Subplot) = font( + sp[:colorbar_titlefontfamily], + sp[:colorbar_titlefontsize], + sp[:colorbar_titlefontvalign], + sp[:colorbar_titlefonthalign], + sp[:colorbar_titlefontrotation], + sp[:colorbar_titlefontcolor], +) + titlefont(sp::Subplot) = font( sp[:titlefontfamily], sp[:titlefontsize],