Skip to main content

Using fontconfig,

> fc-list ':charset=<hex_code1> <hex_code2>' 

e.g.

> fc-list ':charset=2713 2717' 

will display any font filenames containing ✓ and ✗.

To get the codepoint corresponding to the character use (for example)

> printf "%x" \'✓ 2713> 

This uses a somewhat obscure feature of the POSIX printf utility:

If the leading character is a single-quote or double-quote, the value shall be the numeric value in the underlying codeset of the character following the single-quote or double-quote.

Taken together,

> printf '%x' \'✓ | xargs -I{} fc-list ":charset={}" 

This uses the xargs -I flag to replace {} with names from stdin. So this effectively boils down to:

> fc-list ":charset=2713" 

Using fontconfig,

> fc-list ':charset=<hex_code1> <hex_code2>' 

e.g.

> fc-list ':charset=2713 2717' 

will display any font filenames containing ✓ and ✗.

To get the codepoint corresponding to the character use (for example)

> printf "%x" \'✓ 

Taken together,

> printf '%x' \'✓ | xargs -I{} fc-list ":charset={}" 

Using fontconfig,

> fc-list ':charset=<hex_code1> <hex_code2>' 

e.g.

> fc-list ':charset=2713 2717' 

will display any font filenames containing ✓ and ✗.

To get the codepoint corresponding to the character use (for example)

> printf "%x" \'✓ 2713> 

This uses a somewhat obscure feature of the POSIX printf utility:

If the leading character is a single-quote or double-quote, the value shall be the numeric value in the underlying codeset of the character following the single-quote or double-quote.

Taken together,

> printf '%x' \'✓ | xargs -I{} fc-list ":charset={}" 

This uses the xargs -I flag to replace {} with names from stdin. So this effectively boils down to:

> fc-list ":charset=2713" 
Source Link

Using fontconfig,

> fc-list ':charset=<hex_code1> <hex_code2>' 

e.g.

> fc-list ':charset=2713 2717' 

will display any font filenames containing ✓ and ✗.

To get the codepoint corresponding to the character use (for example)

> printf "%x" \'✓ 

Taken together,

> printf '%x' \'✓ | xargs -I{} fc-list ":charset={}"