Skip to content

Commit d736193

Browse files
authored
Fix setting of FONTCONFIG_FILE (#1)
Fix setting of FONTCONFIG_FILE
2 parents d9f2184 + 20fe525 commit d736193

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ version = "0.7.0"
66
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
77
Cairo_jll = "83423d85-b0ee-5818-9007-b63ccbeb887a"
88
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
9+
Fontconfig_jll = "a3f928ae-7b40-5064-980b-68af3947d34b"
910
Glib_jll = "7746bdde-850d-59dc-9ae8-88ece973131d"
1011
Graphics = "a2bd30eb-e257-5431-a919-1863eab51364"
1112
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

src/Cairo.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ using Cairo_jll
88
using Pango_jll
99
# For libgobject
1010
using Glib_jll
11+
# We only need the path of libfontconfig
12+
using Fontconfig_jll
1113

1214
# Deprecate old library variables
1315
Base.@deprecate_binding _jl_libcairo Cairo.libcairo false
@@ -16,12 +18,9 @@ Base.@deprecate_binding _jl_libpango Cairo.libpango false
1618
Base.@deprecate_binding _jl_libpangocairo Cairo.libpango false
1719

1820
function __init__()
19-
# On Linux and FreeBSD we use FontConfig. Set FONTCONFIG_PATH only if none
20-
# of FONTCONFIG_PATH or FONTCONFIG_FILE is set.
21-
if !(Sys.isapple() || Sys.iswindows()) && get(ENV, "FONTCONFIG_PATH", "") == "" &&
22-
get(ENV, "FONTCONFIG_FILE", "") == ""
23-
ENV["FONTCONFIG_PATH"] = joinpath(dirname(libcairo), "..", "etc", "fonts")
24-
end
21+
# Set FONTCONFIG_FILE to the config file we provide.
22+
ENV["FONTCONFIG_FILE"] = joinpath(dirname(Fontconfig_jll.libfontconfig_path),
23+
"..", "etc", "fonts", "fonts.conf")
2524
end
2625

2726
using Colors

0 commit comments

Comments
 (0)