go-findfont
go-findfont copied to clipboard
A platform-agnostic go (golang) library to easily locate truetype font files in your system's user and system font directories
This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. This repository currently has no open or pending branches. ## Detected dependencies github-actions .github/workflows/go.yml...
To look for fonts, findfond [uses filepath.Walk()](https://github.com/flopp/go-findfont/blob/master/findfont.go#L42). The [documentation for filepath.Walk()](https://pkg.go.dev/path/filepath#Walk) says: > Walk does not follow symbolic links. This is a problem if fonts can be found only by...
- fc-list :lang=zh ``` /System/Library/Fonts/Hiragino Sans GB.ttc: Hiragino Sans GB,冬青黑體簡體中文,ヒラギノ角ゴ 簡体中文,冬青黑体简体中文,Hiragino Sans GB W6,冬青黑體簡體中文 W6,ヒラギノ角ゴ 簡体中文 W6,冬青黑体简体中文 W6:style=W6,Bold /System/Library/Fonts/PingFang.ttc: PingFang TC,蘋方\-繁,苹方\-繁:style=Semibold,中粗體,中粗体 /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3fcd72bc350b229eea0f818e5deecfc49585c02c.asset/AssetData/AppleLiSung-Light.ttf: Apple LiSung:style=Light,Fin,Mager,Chiaro,Licht,Fina,Ohut /System/Library/AssetsV2/com_apple_MobileAsset_Font7/e2d3f9277678ccbf64020abef4c0eb9a1de1bed3.asset/AssetData/Lantinghei.ttc: Lantinghei TC,蘭亭黑\-繁,兰亭黑\-繁:style=Extralight,纖黑,纤黑 ```
I think this library should use the `fc-match` command on Linux to find fonts. See e.g. https://unix.stackexchange.com/questions/123511/find-font-file-from-font-name-on-linux