Skip to content

Commit

Permalink
switch the default font to TeX Gyre Heros
Browse files Browse the repository at this point in the history
(freer than helvetica from mscorefonts, with distribution-friendly license)
  • Loading branch information
exaexa committed Jan 14, 2025
1 parent dd9768e commit 9332f16
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/marks/legend.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ function ζ(legend::Legend)::𝕋{Mark}
legendtitle =
S(
:fontWeight => "bold"
)TextMark(; text=title, anchor=titleplacement, fontfamily="Helvetica", fontsize=8)
)TextMark(; text=title, anchor=titleplacement, fontfamily="TeXGyreHeros", fontsize=8)
return aleft(legendmarks, legendtitle) * legendtitle + T(0, -15) * legendmarks
end
2 changes: 1 addition & 1 deletion src/marks/spec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function title_config(config)
title = get(config, :title, NilD())
if !(title isa Union{Mark,TMark})
title = Title(
TextMark(; text=title, fontfamily="Helvetica", fontsize=13, anchor=:e)
TextMark(; text=title, fontfamily="TeXGyreHeros", fontsize=13, anchor=:e)
)
elseif title isa Mark
title = title
Expand Down
4 changes: 2 additions & 2 deletions src/marks/textmark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ e | c | w
se s sw
```
"""
# TextMark(; text="", pos=[0, 0], fontsize=10, angle=0, anchor=:c, fontfamily="Helvetica") =
# TextMark(; text="", pos=[0, 0], fontsize=10, angle=0, anchor=:c, fontfamily="TeXGyreHeros") =
# TextMark(string(text), pos, fontsize, angle, anchor, fontfamily)

function TextMark(;
Expand All @@ -35,7 +35,7 @@ function TextMark(;
fontsize=10,
angle=0,
anchor=:c,
fontfamily="Helvetica",
fontfamily="TeXGyreHeros",
style=S(),
)
if text isa Number || text isa Symbol || text isa Char
Expand Down
2 changes: 1 addition & 1 deletion src/primitives/text.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ end

act(g::G, x::CovText) = CovText(x.text, g(x._1), g(x._2), x.fontfamily)

function TextGeom(; text="", pos=[0, 0], fontsize=12, θ=0, fontfamily="Helvetica")
function TextGeom(; text="", pos=[0, 0], fontsize=12, θ=0, fontfamily="TeXGyreHeros")
return TextGeom(text, pos, fontsize, θ, fontfamily)
end

Expand Down

0 comments on commit 9332f16

Please sign in to comment.