fontwhich: Determine fonts used to render text

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

Fontwhich is a commandline tool that used pango to determine which default fonts would be used to render some text, or which font would be used for a particular language script.


[Skip to Readme]

Properties

Versions 0.1.0, 0.1.0
Change log ChangeLog.md
Dependencies base (<5), bytestring, extra, gi-pango, gi-pangocairo, simple-cmd, simple-cmd-args, text [details]
License GPL-3.0-or-later
Copyright 2026 Jens Petersen <juhpetersen@gmail.com>
Author Jens Petersen <juhpetersen@gmail.com>
Maintainer Jens Petersen <juhpetersen@gmail.com>
Category Utility
Home page https://github.com/juhp/fontwhich
Bug tracker https://github.com/juhp/fontwhich/issues
Source repo head: git clone https://github.com/juhp/fontwhich.git
Uploaded by JensPetersen at 2026-02-27T05:54:56Z

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for fontwhich-0.1.0

[back to package description]

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: https://copr.fedorainfracloud.org/coprs/petersen/fontwhich/

Misc

Code was assisted with Gemini Pro 3.1.

The tool is related conceptually to https://github.com/sudipshil9862/whichfont (C codebase).

Collaborate

The code is distributed under GPLv3+.

Repository: https://github.com/juhp/fontwhich