FontConfig-raku

[Raku PDF Project] / [FontConfig Module] / FontConfig :: Match :: Series

class FontConfig::Match::Series

A sorted series of results from matching a FontConfig pattern

Synopsis

use FontConfig::Match::Series;
my $n = 0;
my $best = 10;
say "The $best best matching fonts are:";
for FontConfig::Match::Series.parse('Arial,sans:style<italic>', :$best) -> FontConfig::Match $match {
    say (++$n)~ $match.format(':%{fullname}: %{file} (%{fontformat})');
}

Description

This class returns a sequence of matches from a FontConfig pattern, ordered by best match first. This may be useful, if there are extra selection or sort critera, or the final selection is being performed interactively.