.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.48)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\"
.\" Required to disable full justification in groff 1.23.0.
.if n .ds AD l
.\" ========================================================================
.\"
.IX Title "TTFFEATPARMS 1"
.TH TTFFEATPARMS 1 2026-10-03 "perl v5.44.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
ttfeatparms \- adds feature parameters to Opentype stylistic set or character variants features
.SH SYNOPSIS
.IX Header "SYNOPSIS"
ttffeatparms [\-d] [\-c control.xml] infile.ttf outfile.ttf
.PP
Opens infile.ttf for reading, deletes existing feature parameters and/or adds new ones based
on control file values, then writes the modified file to outfile.ttf.
.SH OPTIONS
.IX Header "OPTIONS"
.Vb 3
\& \-c file Specifies the xml control file to use
\& \-d Deletes all GSUB feature parameters from the font
\& \-h Help
.Ve
.PP
If both \-c and \-d are specified, all existing parameters are deleted prior to applying the
control file values.
.SH DESCRIPTION
.IX Header "DESCRIPTION"
ttffeatparms works with existing stylistic set or character variants features within a font. The
features themselves should have been previously added to the font. Where feature parameters point
to name strings, it will re\-use pre\-existing name strings in the font if they exist, or add the name
strings in if needed. If feature parameters already exist for a feature, they will be updated to the
values in the control file.
.PP
If there are multiple features with the same name, the same parameters will be used for all those
features, eg if there are two ss01 features (for different scripts and/or languages) they will both
have the same feature parameters.
.SH "Control file Format"
.IX Header "Control file Format"
The DTD for the control file is:
.PP
.Vb 2
\&
\&
\&
\&
\&
\&
\&
\&
\&
\&
\&
\&
\&
.Ve
.IP sset 4
.IX Item "sset"
name elements must be uilabel, which is the default
.IP cvar 4
.IX Item "cvar"
name elements can be uilabel, tooltip or sampletext
.Sp
npstrings, if supplied, are for named parameters. numparam is only used if no npstrings are supplied
.Sp
characters is a csv list. The character cound will be based on the number of characters supplied
.IP "name strings and name IDs" 4
.IX Item "name strings and name IDs"
For both nstring and npstring elements, if an id is specified (by either id or firstid) then that id
is used (without checking existing name strings for the id). If id and strings are supplied, then
any existing name strings will be replaced by those supplied.
.Sp
If no id is supplied, existing name strings will be reused if they match the supplied strings;
otherwise new name strings will be added to the name table.
.IP "name string languages" 4
.IX Item "name string languages"
English language strings must be supplied, and they are used for string matching purposes. If
other language strings are also supplied, they will be inserted using the same nameid of the
English string.
.SH "Sample Control File"
.IX Header "Sample Control File"
.Vb 1
\&
\&
\&
\&
\&
\& UI string for ss01
\&
\&
\&
\&
\& UI string for SS02
\& nom de ss02
\&
\&
\&
\&
\&
\&
\&
\&
\& Jha alternates
\& Tooltip for cv01
\& First named param for cv01
\& Second named param for cv01
\& Third named param for cv01
\& Premier paramètre nommé pour cv01
\& Deuxième paramètre nommé pour cv01
\& Troisième paramètre nommé pour cv01
\&
\&
\&
.Ve
.SH BUGS
.IX Header "BUGS"
Could share featureparam structure for the same cvxx/ssxx feature
in multiple languages or scripts, but instead builds separate structure
for each.
.SH AUTHOR
.IX Header "AUTHOR"
Martin Hosken .
(see CONTRIBUTORS for other authors).
.SH LICENSING
.IX Header "LICENSING"
Copyright (c) 1998\-2016, SIL International (http://www.sil.org)
.PP
This script is released under the terms of the Artistic License 2.0.
For details, see the full text of the license in the file LICENSE.