i3wm-config/testfont.pl
2020-12-02 20:11:32 +03:00

13 lines
296 B
Perl

use strict;
use warnings;
use Font::FreeType;
my ($char) = @ARGV;
foreach my $font_def (`fc-list`) {
my ($file, $name) = split(/: /, $font_def);
my $face = Font::FreeType->new->face($file);
my $glyph = $face->glyph_from_char($char);
if ($glyph) {
print $font_def;
}
}