scalefontsize/scalefontsizes; closes #560
This commit is contained in:
parent
5ef7126a3a
commit
dfb89ef7f5
@ -226,7 +226,7 @@ end
|
|||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
immutable Font
|
type Font
|
||||||
family::AbstractString
|
family::AbstractString
|
||||||
pointsize::Int
|
pointsize::Int
|
||||||
halign::Symbol
|
halign::Symbol
|
||||||
@ -283,6 +283,17 @@ function font(args...)
|
|||||||
Font(family, pointsize, halign, valign, rotation, color)
|
Font(family, pointsize, halign, valign, rotation, color)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function scalefontsize(k::Symbol, factor::Number)
|
||||||
|
f = default(k)
|
||||||
|
f.pointsize = round(Int, factor * f.pointsize)
|
||||||
|
default(k, f)
|
||||||
|
end
|
||||||
|
function scalefontsizes(factor::Number)
|
||||||
|
for k in (:titlefont, :guidefont, :tickfont, :legendfont)
|
||||||
|
scalefontsize(k, factor)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
"Wrap a string with font info"
|
"Wrap a string with font info"
|
||||||
immutable PlotText
|
immutable PlotText
|
||||||
str::AbstractString
|
str::AbstractString
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user