# Fontwhich
Fontwhich is a small CLI tool that uses pango to show
which default fonts are used to render some text.
It should work on any Linux distro with the Cairo and Pango libraries:
it requires the fonts to be available but not a graphical session.
## Usage
`$ fontwhich --help`
```
fontwhich
Usage: fontwhich [--version] [-f|--font FONT] [-l|--lang LANG] [-x|--hex] [TEXT]
Describes the fonts used to render text with pango
Available options:
-h,--help Show this help text
--version Show version
-f,--font FONT Base font [default: Sans]
-l,--lang LANG Language code
-x,--hex Output UTF-8 hex codes
```
`$ fontwhich Hello π World δΈη`
```
23 bytes
'Hello ' : Noto Sans
'π' : Noto Color Emoji
' World ' : Noto Sans
'δΈη' : Noto Sans CJK JP
```
`$ fontwhich -f Serif "γγγ«γ‘γ― π δΈη"`
```
27 bytes
'γγγ«γ‘γ― ' : Noto Serif CJK JP
'π' : Noto Color Emoji
' ' : Noto Serif CJK JP
'δΈη' : Noto Serif CJK JP
```
`$ fontwhich -l ja`
```
Primary font for ja is: "Noto Sans CJK JP"
```
`$ fontwhich --hex π`
```
4 bytes
'π' [f0 9f 8d 8a] : Noto Color Emoji
```
## Building and installation
On Fedora:
```
$ cabal-rpm builddep
$ cabal install
```
There is a copr repo:
## Misc
Code was assisted with Gemini Pro 3.1.
The tool is related conceptually to (C codebase).
## Collaborate
The code is distributed under GPLv3+.
Repository: