Skip to content

Commit 83706fc

Browse files
committed
add test
1 parent 00b00a6 commit 83706fc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/findfonts.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function findfont(
129129
bold::Bool=false, # and this as well
130130
additional_fonts::String=""
131131
)
132-
(path_ft = get(FONT_CACHE, searchstring, nothing)) !== nothing && return path_ft
132+
(font = get(FONT_CACHE, searchstring, nothing)) !== nothing && return font
133133
font_folders = copy(fontpaths())
134134

135135
isempty(additional_fonts) || pushfirst!(font_folders, additional_fonts)

test/runtests.jl

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ face = FA.findfont("hack")
1919
@test :size in propertynames(face)
2020
@test repr(face) == "FTFont (family = Hack, style = Regular)"
2121
@test Broadcast.broadcastable(face)[] == face
22+
@test FA.get_path(face) == joinpath(@__DIR__, "hack_regular.ttf")
2223

2324
@test FA.ascender(face) isa Real
2425
@test FA.descender(face) isa Real

0 commit comments

Comments
 (0)