File: list-glyphs.pl

package info (click to toggle)
libfont-freetype-perl 0.16-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 872 kB
  • sloc: perl: 366; sh: 3; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 337 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl -w
use strict;
use Font::FreeType;

die "Usage: $0 font-filename\n"
  unless @ARGV == 1;
my ($filename) = @ARGV;

my $face = Font::FreeType->new->face($filename);

$face->foreach_glyph(sub {
    print join("\t", map { defined() ? ($_) : () } $_->char_code || "" , $_->name),
          "\n";
});

# vi:ts=4 sw=4 expandtab