Re: metric for block coverage

From: Adam Borowski via Unicode <unicode_at_unicode.org>
Date: Sun, 18 Feb 2018 13:05:29 +0100

On Sun, Feb 18, 2018 at 02:14:46AM -0800, James Kass wrote:
> Adam Borowski wrote,
> > I'm looking for a way to determine a font's coverage of available scripts.
> > It's probably reasonable to do this per Unicode block. Also, it's a safe
> > assumption that a font which doesn't know a codepoint can do no complex
> > shaping of such a glyph, thus looking at just codepoints should be adequate
> > for our purposes.
>
> You probably already know that basic script coverage information is
> stored internally in OpenType fonts in the OS/2 table.
>
> https://docs.microsoft.com/en-us/typography/opentype/spec/os2

It's only a single bit without a meaning beyond "range is considered
functional". No "basic coverage" vs "good coverage" vs "full coverage".

On the other hand, listing raw codepoints in an universal way is as simple
as:
.----
#!/usr/bin/perl -w
use Font::FreeType;
$#ARGV==0 or die "Usage: $0 <font>\n";
Font::FreeType->new->face($ARGV[0])->foreach_char(sub {
    printf("%04X\n", $_->char_code);
});
`----

These codepoints can then be grouped by block -- but interpreting such lists
is what's unobvious.

ᛗᛖᛟᚹ!

-- 
⢀⣴⠾⠻⢶⣦⠀ I've read an article about how lively happy music boosts
⣾⠁⢰⠒⠀⣿⡁ productivity.  You can read it, too, you just need the
⢿⡄⠘⠷⠚⠋⠀ right music while doing so.  I recommend Skepticism
⠈⠳⣄⠀⠀⠀⠀ (funeral doom metal).
Received on Sun Feb 18 2018 - 06:05:44 CST

This archive was generated by hypermail 2.2.0 : Sun Feb 18 2018 - 06:05:44 CST