DON'T USE THIS!!! USE this font-discovery library!!!
cl-system-font is a simple accessor library for font configurations on your systems.
- GNU/Linux or POSIX systems: fontconfig
- tested on Ubuntu 22.04 LTS
- mac OS: CoreText API via a Swift script
- tested on macOS 13.5 Ventura
- Windows:
System.Drawing
API andSystem.Windows.Media
API via a PowerShell script- tested on Windows 10 with PowerShell 5.1
To get all fonst installed on your system, do this:
CL-USER> (sysfont:list-fonts)
...
Font infomation are includes these items:
- font file pathname
- font file format (as a string)
- font name string
- font families (this may be multiple values)
- font styles (this may be multiple values)
- if this font is monospaced?
- supported languages (this may be multiple values)
- UNIX/Linux: fontconfig
fc-list
's default format is%{=fclist}
fclist
is described herefclist
format is%{?file{%{file}: }}%{-file{%{=unparse}}}
unparse
is generated here
- MacOS: system_profiler
- https://apple.stackexchange.com/questions/35852/list-of-activated-fonts-with-shell-command-in-os-x
- cannot get font spacing and supported languages, in this way
- font styles maybe localized in system langauges
- Swift's CoreText interface may allow us to get more information
- https://apple.stackexchange.com/questions/35852/list-of-activated-fonts-with-shell-command-in-os-x
- Windows
- t-sin (shinichi.tanaka45@gmail.com)
MIT license