Skip to content

Commit d04c01f

Browse files
committed
add windows user font folder
1 parent 4e8feac commit d04c01f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/findfonts.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ if Sys.isapple()
77
]
88
end
99
elseif Sys.iswindows()
10-
_font_paths() = [joinpath(get(ENV, "SYSTEMROOT", "C:\\Windows"), "Fonts")]
10+
_font_paths() = [
11+
joinpath(get(ENV, "SYSTEMROOT", "C:\\Windows"), "Fonts"),
12+
joinpath(homedir(), "AppData", "Local", "Microsoft", "Windows", "Fonts"),
13+
]
1114
else
1215
function add_recursive(result, path)
1316
for p in readdir(path)
@@ -130,8 +133,6 @@ function findfont(
130133
# \W splits at all groups of non-word characters (like space, -, ., etc)
131134
searchparts = unique(split(lowercase(searchstring), r"\W+", keepempty=false))
132135

133-
candidates = Pair{FTFont, Tuple{Int, Int}}[]
134-
135136
best_score_so_far = (0, 0, false, typemin(Int))
136137
best_font = nothing
137138

0 commit comments

Comments
 (0)