From e492e6ea900dd855b501148ac8ed20dadc54a925 Mon Sep 17 00:00:00 2001 From: Liam Galvin Date: Mon, 2 Aug 2021 21:04:03 +0100 Subject: [PATCH] Update fontinfo to v0.1.1 (#305) --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/liamg/fontinfo/match.go | 11 ++++++++++- vendor/modules.txt | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index b17b0df..757c0da 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/d-tsuji/clipboard v0.0.3 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210727001814-0db043d8d5be // indirect github.com/hajimehoshi/ebiten/v2 v2.2.0-alpha.11.0.20210724070913-1706d9436a78 - github.com/liamg/fontinfo v0.1.1-0.20210518075346-15a4f7cd9383 + github.com/liamg/fontinfo v0.1.1 github.com/mvdan/xurls v1.1.0 // indirect github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.1.3 diff --git a/go.sum b/go.sum index 4992712..c7a6d54 100644 --- a/go.sum +++ b/go.sum @@ -198,8 +198,8 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/liamg/fontinfo v0.1.1-0.20210518075346-15a4f7cd9383 h1:UimfTA954V0lnPnh7X6baeyEG0daATQgQ7wWshI0S6s= -github.com/liamg/fontinfo v0.1.1-0.20210518075346-15a4f7cd9383/go.mod h1:6REdGXLC8yXmxpX31DDwjjzT06g1c7UcvY75AGf9sH4= +github.com/liamg/fontinfo v0.1.1 h1:NoDMyZGdur30O8Z97cBWRTBpTAoD3DQljsRbWPKv/kw= +github.com/liamg/fontinfo v0.1.1/go.mod h1:6REdGXLC8yXmxpX31DDwjjzT06g1c7UcvY75AGf9sH4= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lxn/walk v0.0.0-20191128110447-55ccb3a9f5c1 h1:/QwQcwWVOQXcoNuV9tHx30gQ3q7jCE/rKcGjwzsa5tg= diff --git a/vendor/github.com/liamg/fontinfo/match.go b/vendor/github.com/liamg/fontinfo/match.go index 0e5d8e0..ff762d7 100644 --- a/vendor/github.com/liamg/fontinfo/match.go +++ b/vendor/github.com/liamg/fontinfo/match.go @@ -25,7 +25,16 @@ var fontDirs = []string{ "/usr/local/share/fonts", "/usr/share/fonts", filepath.Join(os.Getenv("XDG_DATA_HOME"), "fonts"), - filepath.Join(os.Getenv("XDG_DATA_DIRS"), "fonts"), +} + +func init() { + dataDirs := strings.Split(os.Getenv("XDG_DATA_DIRS"), string(os.PathListSeparator)) + for _, dir := range dataDirs { + if dir == "" { + continue + } + fontDirs = append(fontDirs, filepath.Join(dir, "fonts")) + } } // Match finds all fonts installed on the system which match the provided matchers diff --git a/vendor/modules.txt b/vendor/modules.txt index c58e2bc..9faf654 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -60,7 +60,7 @@ github.com/hajimehoshi/ebiten/v2/internal/uidriver/mobile github.com/hajimehoshi/ebiten/v2/text # github.com/inconshreveable/mousetrap v1.0.0 github.com/inconshreveable/mousetrap -# github.com/liamg/fontinfo v0.1.1-0.20210518075346-15a4f7cd9383 +# github.com/liamg/fontinfo v0.1.1 ## explicit github.com/liamg/fontinfo # github.com/lxn/walk v0.0.0-20191128110447-55ccb3a9f5c1