#!/usr/bin/perl use Font::TTF::Font; use Data::Dumper; use strict; (my $font_name = shift) =~ s/\.ttf$//g; my $font = Font::TTF::Font->open("$font_name.ttf"); $font->{$_}->read for qw( post cmap ); #print Dumper $font->{post}{STRINGS}; #print Dumper $font->{cmap}{Tables}[0]{val}; my %cmap = reverse %{$font->{cmap}{Tables}[1]{val}}; my $count = 64; #print $cmap{82}; #exit; while (my ($name, $idx) = each %{$font->{post}{STRINGS}}) { last unless --$count; print <