Package: opentype-feature-freezer
OpenType Feature FreezerWithOpenType Feature Freezer, you can “freeze” some OpenType features into a font.These features are then “on by default”, so characters previously accessible through OpenType features only (such as smallcaps, oldstyle numerals or localized forms) will now be accessible even in apps that don’t support OpenType features, such as LibreOffice, OpenOffice, or in apps that don’t support a particular feature, such as Microsoft Office in case of smallcaps.Note: This tool actually remaps thecmaptable of the font by applying the specifiedGSUBfeatures. It will not work for substitutions where neither glyph has anycmapentries. Only single and alternate substitutions are supported.This tool comes in two versions:OTFeatureFreezer: a simple GUI (graphical) app for macOS and Windows that you can download and run without any special perparations, andpyftfeatfreeze: a CLI (command-line) app that required Python 3.6 or newer to be installed on your computer.Current version:1.32Download and installDocumentationSource codeIssuesfor problem reportingInstallationInstall the OTFeatureFreezer GUI app for macOSDownload DMG for macOSOnmacOS, click theDownloadlink above.Ctrl+clickthe downloaded DMG, chooseOpen, thenOpenagain.Drag theOTFeatureFreezer.appicon to your/Applicationsfolder.When yourun the app for the first time,Ctrl+clicktheOTFeatureFreezer.app, chooseOpen, then clickOpen.Later, you can just double-click the icon to run the app. If the app does not run, double-click again.See theDocumentationfor info about how to use the GUI app. The GUI corresponds to the command-line options.Install the OTFeatureFreezer GUI app for Windows (64-bit)Download ZIP for WindowsYou need a64-bitversion ofWindows, 7 or newer. 32-bit Windows is not supported.Click theDownloadlink above.Unzip the downloaded ZIP.Double-click thesetup_featfreeze.exeicon to install the app.RunOTFeatureFreezerfrom your Start menu.See theDocumentationfor info about how to use the GUI app. The GUI corresponds to the command-line options.Install the pyftfeatfreeze CLI appThis tool requires Python 3.6 or above to be installed first. Get it fromhttps://www.python.orgor your package manager.RecommendedWe recommend usingpipxto install Python command line tools. Pipx tucks them away neatly on your computer and gives you an easy way to add, update and remove Python tools on all platforms, without leaving a mess in your Python installation.pipx install opentype-feature-freezerOther methodsInstall it withpip, as any other Python package.# This is best done inside a virtual environment, so you don't pollute
# your Python installation and need no special privileges to install anything.

pip install --upgrade opentype-feature-freezerIf this does not work, try:python3 -m pip install --user --upgrade opentype-feature-freezerDevelopment versionpip install --upgrade git+https://github.com/twardoch/fonttools-opentype-feature-freezerIf this does not work, use:python3 -m pip install --user --upgrade git+https://github.com/twardoch/fonttools-opentype-feature-freezerYou may need to dopip install --upgrade configparserbefore installingDocumentationExamplesLet’s say you have the fontCharisSIL-R.ttf(with the menu name “Charis SIL”), and this font includes true smallcaps accessible via the OpenType Layout featuresc2sc(for uppercase) andsmcp(for lowercase). Let’s say that you’d like to make a second font where thetrue smallcapsare available by default. Just run:pyftfeatfreeze -f 'c2sc,smcp' -S -U SC -R 'Charis SIL/Charix,CharisSIL/Charix' CharisSIL-R.ttf CharixSC-R.ttfYou’ll get a new fontCharisSIL-R.ttf(with the menu name “Charix SC”). This font will have smallcaps instead of the lowercase and uppercase letters, available in all apps.Since the “Charis SIL” font is licensed under the OFL, and uses the Reserved Font Names “Charis” and “SIL”, I’ve specified the-Roption to replace the name stringsCharis SILandCharisSILwithCharix. This way, the modified font is compliant with the OFL and I can distribute it.The following example remaps the font so that theBulgarian localized formsare available by default in all apps (the suffix “BG” will be added to the menu name):pyftfeatfreeze -f 'locl' -s 'cyrl' -l 'BGR ' -S -U BG SomeFont.ttf SomeFontBG.ttfNote: To remap features from multiple scripts or languagesystems, run the tool multiple times (taking the previous run’s output as input). Use the-Soption only on the final run.The following replaces the stringLatobyOtalin all internal font names (in thenameandCFFtables), without doing any “feature freezing”. This can be used to quickly change some internal font names:pyftfeatfreeze -R 'Lato/Otal' Lato-Regular.ttf Otal-Regular.ttfCommand-line syntaxusage: pyftfeatfreeze [-h] [-f FEATURES] [-s SCRIPT] [-l LANG] [-z] [-S]
                      [-U USESUFFIX] [-R REPLACENAMES] [-i] [-r] [-n] [-v]
                      [-V]
                      inpath [outpath]

With pyftfeatfreeze you can "freeze" some OpenType features into a font. These
features are then "on by default", even in apps that don't support OpenType
features. Internally, the tool remaps the "cmap" table of the font by applying
the specified GSUB features. Only single and alternate substitutions are
supported.

positional arguments:
  inpath                input .otf or .ttf font file
  outpath               output .otf or .ttf font file (optional)

optional arguments:
  -h, --help            show this help message and exit

options to control feature freezing:
  -f FEATURES, --features FEATURES
                        comma-separated list of OpenType feature tags, e.g.
                        'smcp,c2sc,onum'
  -s SCRIPT, --script SCRIPT
                        OpenType script tag, e.g. 'cyrl' (default: 'latn')
  -l LANG, --lang LANG  OpenType language tag, e.g. 'SRB ' (optional)
  -z, --zapnames        zap glyphnames from the font ('post' table version 3,
                        .ttf only)

options to control font renaming:
  -S, --suffix          add a suffix to the font family name (by default, the
                        suffix will be constructed from the OpenType feature
                        tags)
  -U USESUFFIX, --usesuffix USESUFFIX
                        use a custom suffix when --suffix is provided
  -R REPLACENAMES, --replacenames REPLACENAMES
                        search for strings in the font naming tables and
                        replace them, format is
                        'search1/replace1,search2/replace2,...'
  -i, --info            update font version string

reporting options:
  -r, --report          report languages, scripts and features in font
  -n, --names           output names of remapped glyphs during processing
  -v, --verbose         print additional information during processing
  -V, --version         show program's version number and exit

Examples: pyftfeatfreeze -f 'c2sc,smcp' -S -U SC OpenSans.ttf OpenSansSC.ttf
pyftfeatfreeze -R 'Lato/Otal' Lato-Regular.ttf Otal-Regular.ttfTip: the-noption outputs a space-separated list of “frozen” glyphs. If you redirect it to a file, you can use this list as input forpyftsubsetto create a small font that only includes the “frozen” glyphs.OtherProblem reportingTo report a problem, open anissue. You need a Github account.Software license and disclaimerThis tool is licensed “as is” under theApache License, Version 2.0. By using the tool, you accept all conditions of the license, including Disclaimer of Warranty and Limitation of Liability.If you use this tool, please consult if your font’s EULA allows modifications. If the font is licensed under the OFL and uses the Reserved Font Name, please use the-Roption to change the Reserved Font Name to something else.RequirementsThis tool is written for Python 3.6+, and usesfontTools/TTX.Changelog1.32: Changes the-s(script) option so that if it’s not provided, the remapping is in all scripts.1.31: Changes the-S(suffix) option so that if it’s not provided, no sufix is added, and added the GUI apps.Previously, this tool was published as a sub-tool in afonttools-utilsrepoThe other tools of thefonttools-utilsrepo are now atfonttools-ttxjsonandmac-os-x-system-font-replacerBuildingPythonTo build the Python package, installPoetry:pip install poetryorpython3 -m install --user --upgrade poetrythen in the main folder of the project run:poetry buildDMG & EXETo build the DMG & EXE, you need macOS. In theappsubfolder, run./macdeploy allCreditsCode byAdam Twardoch and others<script async defer src="https://buttons.github.io/buttons.js"></script>