Here are already questions:
I have many different fonts. Many of them are "ascii only", and i need to check what fonts contains several accented characters. (latin - unicode codepoints - texts are encoded as utf8) like: (áäčďéěíĺľňóôöőŕřšťúůüűýž)
Have mainly:
What is the usual (correct) way to do this with perl? (it is the only language what i know a bit and the above questions are for C). Asking before I start install all CPAN modules what contains "font":).
I'm on OS X (if this is matters, and can install any macports package - if it helps).
For .ttf files, you can use Font::TTF
and related modules:
use Font::TTF::Font;
my $font = Font::TTF::Font->open( "C:/Windows/Fonts/ariali.ttf" );
my @supported_codepoints = sort { $a <=> $b } $font->{cmap}->reverse;
I'm getting out of my depth, but there's also a Font::TTF::Ttc
module in the Font::TTF
distribution that you could poke around in and see if you can extract more information about supported code points.
(Font::TTF
suggestion came from here)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With