/usr/share/doc/fonttools/html/subset.html is in python-fonttools-doc 3.21.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>subset — fontTools 3.10 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '3.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="t1Lib" href="t1Lib.html" />
<link rel="prev" title="perimeterPen" href="pens/perimeterPen.html" />
</head>
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="t1Lib.html" title="t1Lib"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="pens/perimeterPen.html" title="perimeterPen"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">fontTools 3.10 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-fontTools.subset">
<span id="subset"></span><h1>subset<a class="headerlink" href="#module-fontTools.subset" title="Permalink to this headline">¶</a></h1>
<p>pyftsubset – OpenType font subsetter and optimizer</p>
<blockquote>
<div><p>pyftsubset is an OpenType font subsetter and optimizer, based on fontTools.
It accepts any TT- or CFF-flavored OpenType (.otf or .ttf) or WOFF (.woff)
font file. The subsetted glyph set is based on the specified glyphs
or characters, and specified OpenType layout features.</p>
<p>The tool also performs some size-reducing optimizations, aimed for using
subset fonts as webfonts. Individual optimizations can be enabled or
disabled, and are enabled by default when they are safe.</p>
</div></blockquote>
<dl class="docutils">
<dt>Usage:</dt>
<dd><p class="first">pyftsubset font-file [glyph…] [–option=value]…</p>
<p class="last">At least one glyph or one of –gids, –gids-file, –glyphs, –glyphs-file,
–text, –text-file, –unicodes, or –unicodes-file, must be specified.</p>
</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>font-file</dt>
<dd>The input font file.</dd>
<dt>glyph</dt>
<dd>Specify one or more glyph identifiers to include in the subset. Must be
PS glyph names, or the special string ‘*’ to keep the entire glyph set.</dd>
</dl>
</dd>
<dt>Initial glyph set specification:</dt>
<dd><p class="first">These options populate the initial glyph set. Same option can appear
multiple times, and the results are accummulated.
–gids=<NNN>[,<NNN>…]</p>
<blockquote>
<div>Specify comma/whitespace-separated list of glyph IDs or ranges as
decimal numbers. For example, –gids=10-12,14 adds glyphs with
numbers 10, 11, 12, and 14.</div></blockquote>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--gids-file=<var><path></var></span></kbd></td>
</tr>
<tr><td> </td><td>Like –gids but reads from a file. Anything after a ‘#’ on any line
is ignored as comments.</td></tr>
</tbody>
</table>
<dl class="docutils">
<dt>–glyphs=<glyphname>[,<glyphname>…]</dt>
<dd>Specify comma/whitespace-separated PS glyph names to add to the subset.
Note that only PS glyph names are accepted, not gidNNN, U+XXXX, etc
that are accepted on the command line. The special string ‘*’ will keep
the entire glyph set.</dd>
</dl>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--glyphs-file=<var><path></var></span></kbd></td>
</tr>
<tr><td> </td><td>Like –glyphs but reads from a file. Anything after a ‘#’ on any line
is ignored as comments.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--text=<var><text></var></span></kbd></td>
<td>Specify characters to include in the subset, as UTF-8 string.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--text-file=<var><path></var></span></kbd></td>
</tr>
<tr><td> </td><td>Like –text but reads from a file. Newline character are not added to
the subset.</td></tr>
</tbody>
</table>
<dl class="docutils">
<dt>–unicodes=<XXXX>[,<XXXX>…]</dt>
<dd>Specify comma/whitespace-separated list of Unicode codepoints or
ranges as hex numbers, optionally prefixed with ‘U+’, ‘u’, etc.
For example, –unicodes=41-5a,61-7a adds ASCII letters, so does
the more verbose –unicodes=U+0041-005A,U+0061-007A.
The special strings ‘*’ will choose all Unicode characters mapped
by the font.</dd>
</dl>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--unicodes-file=<var><path></var></span></kbd></td>
</tr>
<tr><td> </td><td>Like –unicodes, but reads from a file. Anything after a ‘#’ on any
line in the file is ignored as comments.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--ignore-missing-glyphs</span></kbd></td>
</tr>
<tr><td> </td><td>Do not fail if some requested glyphs or gids are not available in
the font.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-ignore-missing-glyphs</span></kbd></td>
</tr>
<tr><td> </td><td>Stop and fail if some requested glyphs or gids are not available
in the font. [default]</td></tr>
</tbody>
</table>
<dl class="docutils">
<dt>–ignore-missing-unicodes [default]</dt>
<dd>Do not fail if some requested Unicode characters (including those
indirectly specified using –text or –text-file) are not available
in the font.</dd>
</dl>
<table class="last docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-ignore-missing-unicodes</span></kbd></td>
</tr>
<tr><td> </td><td>Stop and fail if some requested Unicode characters are not available
in the font.
Note the default discrepancy between ignoring missing glyphs versus
unicodes. This is for historical reasons and in the future
–no-ignore-missing-unicodes might become default.</td></tr>
</tbody>
</table>
</dd>
<dt>Other options:</dt>
<dd><p class="first">For the other options listed below, to see the current value of the option,
pass a value of ‘?’ to it, with or without a ‘=’.
Examples:</p>
<blockquote class="last">
<div>$ pyftsubset –glyph-names?
Current setting for ‘glyph-names’ is: False
$ ./pyftsubset –name-IDs=?
Current setting for ‘name-IDs’ is: [1, 2]
$ ./pyftsubset –hinting? –no-hinting –hinting?
Current setting for ‘hinting’ is: True
Current setting for ‘hinting’ is: False</div></blockquote>
</dd>
<dt>Output options:</dt>
<dd><table class="first last docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--output-file=<var><path></var></span></kbd></td>
</tr>
<tr><td> </td><td>The output font file. If not specified, the subsetted font
will be saved in as font-file.subset.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--flavor=<var><type></var></span></kbd></td>
</tr>
<tr><td> </td><td>Specify flavor of output font file. May be ‘woff’ or ‘woff2’.
Note that WOFF2 requires the Brotli Python extension, available
at <a class="reference external" href="https://github.com/google/brotli">https://github.com/google/brotli</a></td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-zopfli</span></kbd></td>
<td>Use the Google Zopfli algorithm to compress WOFF. The output is 3-8 %
smaller than pure zlib, but the compression speed is much slower.
The Zopfli Python bindings are available at:
<a class="reference external" href="https://pypi.python.org/pypi/zopfli">https://pypi.python.org/pypi/zopfli</a></td></tr>
</tbody>
</table>
</dd>
<dt>Glyph set expansion:</dt>
<dd><p class="first">These options control how additional glyphs are added to the subset.
–notdef-glyph</p>
<blockquote>
<div>Add the ‘.notdef’ glyph to the subset (ie, keep it). [default]</div></blockquote>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-notdef-glyph</span></kbd></td>
</tr>
<tr><td> </td><td>Drop the ‘.notdef’ glyph unless specified in the glyph set. This
saves a few bytes, but is not possible for Postscript-flavored
fonts, as those require ‘.notdef’. For TrueType-flavored fonts,
this works fine as long as no unsupported glyphs are requested
from the font.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--notdef-outline</span></kbd></td>
</tr>
<tr><td> </td><td>Keep the outline of ‘.notdef’ glyph. The ‘.notdef’ glyph outline is
used when glyphs not supported by the font are to be shown. It is not
needed otherwise.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-notdef-outline</span></kbd></td>
</tr>
<tr><td> </td><td>When including a ‘.notdef’ glyph, remove its outline. This saves
a few bytes. [default]</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--recommended-glyphs</span></kbd></td>
</tr>
<tr><td> </td><td>Add glyphs 0, 1, 2, and 3 to the subset, as recommended for
TrueType-flavored fonts: ‘.notdef’, ‘NULL’ or ‘.null’, ‘CR’, ‘space’.
Some legacy software might require this, but no modern system does.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-recommended-glyphs</span></kbd></td>
</tr>
<tr><td> </td><td>Do not add glyphs 0, 1, 2, and 3 to the subset, unless specified in
glyph set. [default]</td></tr>
</tbody>
</table>
<dl class="last docutils">
<dt>–layout-features[+|-]=<feature>[,<feature>…]</dt>
<dd><p class="first">Specify (=), add to (+=) or exclude from (-=) the comma-separated
set of OpenType layout feature tags that will be preserved.
Glyph variants used by the preserved features are added to the
specified subset glyph set. By default, ‘calt’, ‘ccmp’, ‘clig’, ‘curs’,
‘dnom’, ‘frac’, ‘kern’, ‘liga’, ‘locl’, ‘mark’, ‘mkmk’, ‘numr’, ‘rclt’,
‘rlig’, ‘rvrn’, and all features required for script shaping are
preserved. To see the full list, try ‘–layout-features=?’.
Use ‘*’ to keep all features.
Multiple –layout-features options can be provided if necessary.
Examples:</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>–layout-features+=onum,pnum,ss01</dt>
<dd><ul class="first last simple">
<li>Keep the default set of features and ‘onum’, ‘pnum’, ‘ss01’.</li>
</ul>
</dd>
<dt>–layout-features-=’mark’,’mkmk’</dt>
<dd><ul class="first last simple">
<li>Keep the default set of features but drop ‘mark’ and ‘mkmk’.</li>
</ul>
</dd>
<dt>–layout-features=’kern’</dt>
<dd><ul class="first last simple">
<li>Only keep the ‘kern’ feature, drop all others.</li>
</ul>
</dd>
<dt>–layout-features=’‘</dt>
<dd><ul class="first last simple">
<li>Drop all features.</li>
</ul>
</dd>
<dt>–layout-features=’*’</dt>
<dd><ul class="first last simple">
<li>Keep all features.</li>
</ul>
</dd>
<dt>–layout-features+=aalt –layout-features-=vrt2</dt>
<dd><ul class="first last simple">
<li>Keep default set of features plus ‘aalt’, but drop ‘vrt2’.</li>
</ul>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd>
<dt>Hinting options:</dt>
<dd><table class="first last docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">--hinting</span></kbd></td>
<td>Keep hinting [default]</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--no-hinting</span></kbd></td>
<td>Drop glyph-specific hinting and font-wide hinting tables, as well
as remove hinting-related bits and pieces from other tables (eg. GPOS).
See –hinting-tables for list of tables that are dropped by default.
Instructions and hints are stripped from ‘glyf’ and ‘CFF ‘ tables
respectively. This produces (sometimes up to 30%) smaller fonts that
are suitable for extremely high-resolution systems, like high-end
mobile devices and retina displays.</td></tr>
</tbody>
</table>
</dd>
<dt>Optimization options:</dt>
<dd><table class="first docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--desubroutinize</span></kbd></td>
</tr>
<tr><td> </td><td>Remove CFF use of subroutinizes. Subroutinization is a way to make CFF
fonts smaller. For small subsets however, desubroutinizing might make
the font smaller. It has even been reported that desubroutinized CFF
fonts compress better (produce smaller output) WOFF and WOFF2 fonts.
Also see note under –no-hinting.</td></tr>
</tbody>
</table>
<dl class="last docutils">
<dt>–no-desubroutinize [default]</dt>
<dd>Leave CFF subroutinizes as is, only throw away unused subroutinizes.</dd>
</dl>
</dd>
<dt>Font table options:</dt>
<dd><dl class="first docutils">
<dt>–drop-tables[+|-]=<table>[,<table>…]</dt>
<dd><p class="first">Specify (=), add to (+=) or exclude from (-=) the comma-separated
set of tables that will be be dropped.
By default, the following tables are dropped:
‘BASE’, ‘JSTF’, ‘DSIG’, ‘EBDT’, ‘EBLC’, ‘EBSC’, ‘SVG ‘, ‘PCLT’, ‘LTSH’
and Graphite tables: ‘Feat’, ‘Glat’, ‘Gloc’, ‘Silf’, ‘Sill’
and color tables: ‘CBLC’, ‘CBDT’, ‘sbix’.
The tool will attempt to subset the remaining tables.
Examples:</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>–drop-tables-=’SVG ‘</dt>
<dd><ul class="first last simple">
<li>Drop the default set of tables but keep ‘SVG ‘.</li>
</ul>
</dd>
<dt>–drop-tables+=GSUB</dt>
<dd><ul class="first last simple">
<li>Drop the default set of tables and ‘GSUB’.</li>
</ul>
</dd>
</dl>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--drop-tables=<var>DSIG</var></span></kbd></td>
</tr>
<tr><td> </td><td><ul class="first last simple">
<li>Only drop the ‘DSIG’ table, keep all others.</li>
</ul>
</td></tr>
</tbody>
</table>
<dl class="docutils">
<dt>–drop-tables=</dt>
<dd><ul class="first last simple">
<li>Keep all tables.</li>
</ul>
</dd>
</dl>
</div></blockquote>
</dd>
<dt>–no-subset-tables+=<table>[,<table>…]</dt>
<dd><p class="first">Add to the set of tables that will not be subsetted.
By default, the following tables are included in this list, as
they do not need subsetting (ignore the fact that ‘loca’ is listed
here): ‘gasp’, ‘head’, ‘hhea’, ‘maxp’, ‘vhea’, ‘OS/2’, ‘loca’,
‘name’, ‘cvt ‘, ‘fpgm’, ‘prep’, ‘VMDX’, ‘DSIG’, ‘CPAL’, ‘MVAR’, ‘STAT’.
By default, tables that the tool does not know how to subset and are not
specified here will be dropped from the font, unless –passthrough-tables
option is passed.
Example:</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>–no-subset-tables+=FFTM</dt>
<dd><ul class="first last simple">
<li>Keep ‘FFTM’ table in the font by preventing subsetting.</li>
</ul>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--passthrough-tables</span></kbd></td>
</tr>
<tr><td> </td><td>Do not drop tables that the tool does not know how to subset.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-passthrough-tables</span></kbd></td>
</tr>
<tr><td> </td><td>Tables that the tool does not know how to subset and are not specified
in –no-subset-tables will be dropped from the font. [default]</td></tr>
</tbody>
</table>
<dl class="docutils">
<dt>–hinting-tables[-]=<table>[,<table>…]</dt>
<dd><p class="first">Specify (=), add to (+=) or exclude from (-=) the list of font-wide
hinting tables that will be dropped if –no-hinting is specified,
Examples:</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>–hinting-tables-=’VDMX’</dt>
<dd><ul class="first last simple">
<li>Drop font-wide hinting tables except ‘VDMX’.</li>
</ul>
</dd>
<dt>–hinting-tables=’‘</dt>
<dd><ul class="first last simple">
<li>Keep all font-wide hinting tables (but strip hints from glyphs).</li>
</ul>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
<table class="last docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">--legacy-kern</span></kbd></td>
<td>Keep TrueType ‘kern’ table even when OpenType ‘GPOS’ is available.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-legacy-kern</span></kbd></td>
</tr>
<tr><td> </td><td>Drop TrueType ‘kern’ table if OpenType ‘GPOS’ is available. [default]</td></tr>
</tbody>
</table>
</dd>
<dt>Font naming options:</dt>
<dd><p class="first">These options control what is retained in the ‘name’ table. For numerical
codes, see: <a class="reference external" href="http://www.microsoft.com/typography/otspec/name.htm">http://www.microsoft.com/typography/otspec/name.htm</a>
–name-IDs[+|-]=<nameID>[,<nameID>…]</p>
<blockquote>
<div><p>Specify (=), add to (+=) or exclude from (-=) the set of ‘name’ table
entry nameIDs that will be preserved. By default only nameID 1 (Family)
and nameID 2 (Style) are preserved. Use ‘*’ to keep all entries.
Examples:</p>
<blockquote>
<div><dl class="docutils">
<dt>–name-IDs+=0,4,6</dt>
<dd><ul class="first last simple">
<li>Also keep Copyright, Full name and PostScript name entry.</li>
</ul>
</dd>
<dt>–name-IDs=’‘</dt>
<dd><ul class="first last simple">
<li>Drop all ‘name’ table entries.</li>
</ul>
</dd>
<dt>–name-IDs=’*’</dt>
<dd><ul class="first last simple">
<li>keep all ‘name’ table entries</li>
</ul>
</dd>
</dl>
</div></blockquote>
</div></blockquote>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">--name-legacy</span></kbd></td>
<td>Keep legacy (non-Unicode) ‘name’ table entries (0.x, 1.x etc.).
XXX Note: This might be needed for some fonts that have no Unicode name
entires for English. See: <a class="reference external" href="https://github.com/behdad/fonttools/issues/146">https://github.com/behdad/fonttools/issues/146</a></td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-name-legacy</span></kbd></td>
</tr>
<tr><td> </td><td>Drop legacy (non-Unicode) ‘name’ table entries [default]</td></tr>
</tbody>
</table>
<dl class="docutils">
<dt>–name-languages[+|-]=<langID>[,<langID>]</dt>
<dd>Specify (=), add to (+=) or exclude from (-=) the set of ‘name’ table
langIDs that will be preserved. By default only records with langID
0x0409 (English) are preserved. Use ‘*’ to keep all langIDs.</dd>
</dl>
<table class="last docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--obfuscate-names</span></kbd></td>
</tr>
<tr><td> </td><td>Make the font unusable as a system font by replacing name IDs 1, 2, 3, 4,
and 6 with dummy strings (it is still fully functional as webfont).</td></tr>
</tbody>
</table>
</dd>
<dt>Glyph naming and encoding options:</dt>
<dd><table class="first last docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">--glyph-names</span></kbd></td>
<td>Keep PS glyph names in TT-flavored fonts. In general glyph names are
not needed for correct use of the font. However, some PDF generators
and PDF viewers might rely on glyph names to extract Unicode text
from PDF documents.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-glyph-names</span></kbd></td>
</tr>
<tr><td> </td><td>Drop PS glyph names in TT-flavored fonts, by using ‘post’ table
version 3.0. [default]</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--legacy-cmap</span></kbd></td>
<td>Keep the legacy ‘cmap’ subtables (0.x, 1.x, 4.x etc.).</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-legacy-cmap</span></kbd></td>
</tr>
<tr><td> </td><td>Drop the legacy ‘cmap’ subtables. [default]</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--symbol-cmap</span></kbd></td>
<td>Keep the 3.0 symbol ‘cmap’.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-symbol-cmap</span></kbd></td>
</tr>
<tr><td> </td><td>Drop the 3.0 symbol ‘cmap’. [default]</td></tr>
</tbody>
</table>
</dd>
<dt>Other font-specific options:</dt>
<dd><table class="first last docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--recalc-bounds</span></kbd></td>
</tr>
<tr><td> </td><td>Recalculate font bounding boxes.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-recalc-bounds</span></kbd></td>
</tr>
<tr><td> </td><td>Keep original font bounding boxes. This is faster and still safe
for all practical purposes. [default]</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--recalc-timestamp</span></kbd></td>
</tr>
<tr><td> </td><td>Set font ‘modified’ timestamp to current time.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-recalc-timestamp</span></kbd></td>
</tr>
<tr><td> </td><td>Do not modify font ‘modified’ timestamp. [default]</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--canonical-order</span></kbd></td>
</tr>
<tr><td> </td><td>Order tables as recommended in the OpenType standard. This is not
required by the standard, nor by any known implementation.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-canonical-order</span></kbd></td>
</tr>
<tr><td> </td><td>Keep original order of font tables. This is faster. [default]</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--prune-unicode-ranges</span></kbd></td>
</tr>
<tr><td> </td><td>Update the ‘OS/2 ulUnicodeRange*’ bits after subsetting. The Unicode
ranges defined in the OpenType specification v1.7 are intersected with
the Unicode codepoints specified in the font’s Unicode ‘cmap’ subtables:
when no overlap is found, the bit will be switched off. However, it will
<em>not</em> be switched on if an intersection is found. [default]</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-prune-unicode-ranges</span></kbd></td>
</tr>
<tr><td> </td><td>Don’t change the ‘OS/2 ulUnicodeRange*’ bits.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--recalc-average-width</span></kbd></td>
</tr>
<tr><td> </td><td>Update the ‘OS/2 xAvgCharWidth’ field after subsetting.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--no-recalc-average-width</span></kbd></td>
</tr>
<tr><td> </td><td>Don’t change the ‘OS/2 xAvgCharWidth’ field. [default]</td></tr>
</tbody>
</table>
</dd>
<dt>Application options:</dt>
<dd><table class="first last docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">--verbose</span></kbd></td>
<td>Display verbose information of the subsetting process.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--timing</span></kbd></td>
<td>Display detailed timing information of the subsetting process.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--xml</span></kbd></td>
<td>Display the TTX XML representation of subsetted font.</td></tr>
</tbody>
</table>
</dd>
<dt>Example:</dt>
<dd><p class="first">Produce a subset containing the characters ‘ !”#$%’ without performing
size-reducing optimizations:</p>
<dl class="last docutils">
<dt>$ pyftsubset font.ttf –unicodes=”U+0020-0025” </dt>
<dd>–layout-features=’*’ –glyph-names –symbol-cmap –legacy-cmap –notdef-glyph –notdef-outline –recommended-glyphs –name-IDs=’*’ –name-legacy –name-languages=’*’</dd>
</dl>
</dd>
</dl>
<dl class="class">
<dt id="fontTools.subset.Options">
<em class="property">class </em><code class="descclassname">fontTools.subset.</code><code class="descname">Options</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#Options"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Options" title="Permalink to this definition">¶</a></dt>
<dd><dl class="exception">
<dt id="fontTools.subset.Options.OptionError">
<em class="property">exception </em><code class="descname">OptionError</code><a class="reference internal" href="_modules/fontTools/subset.html#Options.OptionError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Options.OptionError" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="exception">
<dt id="fontTools.subset.Options.UnknownOptionError">
<em class="property">exception </em><code class="descname">UnknownOptionError</code><a class="reference internal" href="_modules/fontTools/subset.html#Options.UnknownOptionError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Options.UnknownOptionError" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="fontTools.subset.Options.parse_opts">
<code class="descname">parse_opts</code><span class="sig-paren">(</span><em>argv</em>, <em>ignore_unknown=[]</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#Options.parse_opts"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Options.parse_opts" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="fontTools.subset.Options.set">
<code class="descname">set</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#Options.set"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Options.set" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="fontTools.subset.Subsetter">
<em class="property">class </em><code class="descclassname">fontTools.subset.</code><code class="descname">Subsetter</code><span class="sig-paren">(</span><em>options=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#Subsetter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Subsetter" title="Permalink to this definition">¶</a></dt>
<dd><dl class="exception">
<dt id="fontTools.subset.Subsetter.MissingGlyphsSubsettingError">
<em class="property">exception </em><code class="descname">MissingGlyphsSubsettingError</code><a class="reference internal" href="_modules/fontTools/subset.html#Subsetter.MissingGlyphsSubsettingError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Subsetter.MissingGlyphsSubsettingError" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="exception">
<dt id="fontTools.subset.Subsetter.MissingUnicodesSubsettingError">
<em class="property">exception </em><code class="descname">MissingUnicodesSubsettingError</code><a class="reference internal" href="_modules/fontTools/subset.html#Subsetter.MissingUnicodesSubsettingError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Subsetter.MissingUnicodesSubsettingError" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="exception">
<dt id="fontTools.subset.Subsetter.SubsettingError">
<em class="property">exception </em><code class="descname">SubsettingError</code><a class="reference internal" href="_modules/fontTools/subset.html#Subsetter.SubsettingError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Subsetter.SubsettingError" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="fontTools.subset.Subsetter.populate">
<code class="descname">populate</code><span class="sig-paren">(</span><em>glyphs=[]</em>, <em>gids=[]</em>, <em>unicodes=[]</em>, <em>text=''</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#Subsetter.populate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Subsetter.populate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="fontTools.subset.Subsetter.subset">
<code class="descname">subset</code><span class="sig-paren">(</span><em>font</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#Subsetter.subset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.Subsetter.subset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="fontTools.subset.load_font">
<code class="descclassname">fontTools.subset.</code><code class="descname">load_font</code><span class="sig-paren">(</span><em>fontFile</em>, <em>options</em>, <em>allowVID=False</em>, <em>checkChecksums=False</em>, <em>dontLoadGlyphNames=False</em>, <em>lazy=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#load_font"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.load_font" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="fontTools.subset.save_font">
<code class="descclassname">fontTools.subset.</code><code class="descname">save_font</code><span class="sig-paren">(</span><em>font</em>, <em>outfile</em>, <em>options</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#save_font"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.save_font" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="fontTools.subset.parse_gids">
<code class="descclassname">fontTools.subset.</code><code class="descname">parse_gids</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#parse_gids"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.parse_gids" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="fontTools.subset.parse_glyphs">
<code class="descclassname">fontTools.subset.</code><code class="descname">parse_glyphs</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#parse_glyphs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.parse_glyphs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="fontTools.subset.parse_unicodes">
<code class="descclassname">fontTools.subset.</code><code class="descname">parse_unicodes</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#parse_unicodes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.parse_unicodes" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="fontTools.subset.main">
<code class="descclassname">fontTools.subset.</code><code class="descname">main</code><span class="sig-paren">(</span><em>args=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fontTools/subset.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#fontTools.subset.main" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="pens/perimeterPen.html"
title="previous chapter">perimeterPen</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="t1Lib.html"
title="next chapter">t1Lib</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/subset.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="t1Lib.html" title="t1Lib"
>next</a> |</li>
<li class="right" >
<a href="pens/perimeterPen.html" title="perimeterPen"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">fontTools 3.10 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2018, Just van Rossum, Behdad Esfahbod et al..
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
</div>
</body>
</html>
|