Skip to content

Commit

Permalink
remove the font bundling, simply announce error in case the font is m…
Browse files Browse the repository at this point in the history
…issing

(most people should be able to load the default font)
  • Loading branch information
exaexa committed Jan 14, 2025
1 parent dd9768e commit 19d9b99
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Binary file removed assets/fonts/helvetica.ttf
Binary file not shown.
6 changes: 1 addition & 5 deletions src/primitives/envelopes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,7 @@ end

@memoize function load_font(fontfamily)
face = FreeTypeAbstraction.findfont(fontfamily)
if isnothing(face)
fontname = "helvetica.ttf"
fpath = joinpath(FONTS, fontname)
face = FreeTypeAbstraction.try_load(fpath)
end
isnothing(face) && throw(DomainError(fontfamily, "font family could not be loaded"))
return face
end

Expand Down

0 comments on commit 19d9b99

Please sign in to comment.