NAME

Config::Apple::Profile::Payload::Font - The Font payload type.

SYNOPSIS

use Config::Apple::Profile;
use Config::Apple::Profile::Payload::Font;
use File::Spec;

my $font_file_path = '/path/to/font.otf';

my $font = new Config::Apple::Profile::Payload::Font;
my $payload = $email->payload;

open my $font_file, '<', $font_file_path
    or die "Unable to open font $font_file_path: $!";
$payload->{Font} = $font_file;

my $profile = new Config::Apple::Profile::Profile;
push @{$profile->content}, $font;

print $profile->export;

DESCRIPTION

This class implements the Font payload, which is used to install new fonts on a device running iOS. This profile is not used by Mac OS X.

NOTE: No testing is performed of the Font data provided. The author is not aware of any Perl modules that can be used to test opening OpenType (.otf) files, except for Font::FreeType, which does not seem to be working.

PAYLOAD KEYS

All of the payload keys defined in Config::Apple::Profile::Payload::Common are used by this payload.

This payload has the following additional keys:

Name

Optional

A string. This is the name the user sees at the time the Font is installed. Once installed, the font's embedded PostScript name is what the user will see.

Font

Data. This is the TrueType (.ttf) or OpenType (.otf) font file.

NOTE: Font collections (.ttc or .otc) are not supported. Use separate payloads for each font.

NOTE: Each font installed must have a unique embedded PostScript name. If multiple fonts with the same embedded PostScript name are installed, only one will be displayed to the user; which one is actually used is undefined.

ACKNOWLEDGEMENTS

Refer to Config::Apple::Profile for acknowledgements.

AUTHOR

A. Karl Kornel, <karl at kornel.us>

COPYRIGHT AND LICENSE

Copyright © 2014 A. Karl Kornel.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.