=begin pod
=head1 NAME

B<NotoFonts-OT> - Provides an embedded collection of 10 of Google's Noto OpenType fonts for
use in Raku PDF creation.

The 10 fonts closely match 10 of the original Adobe Type 1 fonts but in OTF format, and
thousands of glyphs instead of only 256.

Tables 1 and 2 below list several ways to refer to the desired font
and get it in one of two forms: a PDF font object or a font path to its
location.

The fonts are accessed through exported subroutines as illustrated below.

Note that there are many more fonts available, and more
weight variations of the 10 fonts may be added here later. Please file an
issue if you are interested.
	
=head1 SYNOPSIS

=begin code :lang<raku>
use Test;
use PDF::Font::Loader::HarfBuzz;
use PDF::Font::Loader :load-font;
use PDF::Content;
use PDF::Content::FontObj;
use PDF::Lite;

use NotoFonts-OT;
use NotoFonts-OT::FontPaths; # This will not be needed after the next API change;

# Use the provided subroutines to create individual font objects
# of the desired font face:

# Select the Noto font 'NotoSerif-Regular' to be loaded
# as a PDF font object to be used to print text on a PDF page.
# Use a code reference from Table 1:
my $font = get-loaded-font 1;
isa-ok $font, PDF::Content::FontObj;
# OUTPUT:
ok 1 - The object is-a 'PDF::Content::FontObj'
1..1
=end code

That font object, C<$font>, should be able to be used by all the Raku
PDF modules requiring a font object. File an issue if you
find a problem.

=head1 DESCRIPTION

The following tables show the font family name, weight, and slant
of the 10 fonts approximating the original Adobe Type 1 fonts.
The desired font can be selected by using the appropriate
Name, Code, Code2, or Reference Number as the input to subroutine
C<get-loaded-font> which returns a PDF font object.

One can also get the font path by using subroutine C<get-font-path>.

=head2 Table 1

=begin table :caption<The Noto Fonts Collection>
Noto Font Name       | Code | Code2 | Reference No.
---------------------+------+-------+--------------
NotoSerif-Regular    | se   | t     | 1
NotoSerif-Bold       | seb  | tb    | 2
NotoSerif-Italic     | sei  | ti    | 3
NotoSerif-BoldItalic | sebi | tbi   | 4
NotoSans-Regular     | sa   | h     | 5
NotoSans-Bold        | sab  | hb    | 6
NotoSans-Italic      | sai  | ho    | 7
NotoSans-BoldItalic  | sabi | hbo   | 8
NotoSansMono-Regular | m    | c     | 9
NotoSansMono-Bold    | mb   | cb    | 10
=end table

=head2 Table 2

=begin table :caption<The Equivalent Adobe Type 1 Fonts>
Adobe Type 1 Name     | Code | Code2 | Reference No.
----------------------+------+-------+--------------
Times                 | se   | t     | 1
Times-Bold            | seb  | tb    | 2
Times-Italic          | sei  | ti    | 3
Times-BoldItalic      | sebi | tbi   | 4
Helvetica             | sa   | h     | 5
Helvetica-Bold        | sab  | hb    | 6
Helvetica-Oblique     | sai  | ho    | 7
Helvetica-BoldOblique | sabi | hbo   | 8
Courier               | m    | c     | 9
Courier-Bold          | mb   | cb    | 10
=end table

=head1 Font sources

The C</resouurces/fonts> directory contains the embedded fonts.
The C</resouurces/text> directory contains
a description of their original
source and a list of their sha256sums for authentication.
It also contains a file describing the SIL Open Font License (OFL) 
for the included fonts and a file with a large amount of
Frequently Asked Questions (FAQ) about the OFL.

In the C</sbin> directory is a Raku script to calculate
sha256sums of files.

=head1 Package C<App::FontSample>

Use that Raku package to produce font samples in various formats.

=head1 AUTHOR

Tom Browder <tbrowder@acm.org>

=head1 COPYRIGHT AND LICENSE

© 2026 Tom Browder

This library is free software; you may redistribute it or modify it under the Artistic License 2.0.

=end pod
