Registry / devops / otfcc-ttcize

otfcc-ttcize

JSON →
library0.10.2jsnpmunverified

otfcc-ttcize is a command-line utility designed to bundle multiple TrueType (TTF) font files into a single TrueType Collection (TTC) file, with a focus on optimizing file size through glyph sharing. It is currently at version 0.10.2 and appears to be actively maintained as part of the broader otfcc toolchain, though specific release cadences are not explicitly stated. A key differentiator is its glyph sharing mechanism, which significantly reduces the final TTC file size by consolidating common glyphs across the bundled fonts. However, it's crucial to note that this glyph sharing functionality is *not* applicable to CFF (Compact Font Format) fonts, for which users are advised to consider `otf2otc` instead. The tool relies on external `otfcc` executables for its underlying font processing operations.

npm install otfcc-ttcize
INSTALL
IMPORT
SIG · OTFCC-TTCIZE
O
otfcc-ttcize
devopsjavascriptv0.10.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Demonstrates bundling multiple TrueType fonts into a TTC and using advanced options like gap mode and custom otfcc executable paths.

# First, ensure otfcc tools (otfccdump, otfccbuild) are installed and in your PATH. # For example, install otfcc via npm globally if it's a wrapper, or directly from source. # npm install -g otfcc # (If otfcc has a CLI npm package) # Example: Bundle two TrueType fonts into a single TTC file. # The output TTC will have shared glyph data where possible. otfcc-ttcize -o output.ttc input1.ttf input2.ttf input3.ttf # Example with gap mode for larger glyph sets and custom otfcc paths. # Note: Gap mode (-x) disables hint wrapping (-h). otfcc-ttcize \ -x \ --otfccdump-command="/opt/local/bin/otfccdump" \ --otfccbuild-command="/opt/local/bin/otfccbuild" \ -o large_output.ttc fontA.ttf fontB.ttf
otfcc-ttcize --version
Debug
Known issues
gotchaGlyph sharing, a core feature for size reduction, is explicitly stated not to work for CFF (Compact Font Format) fonts. Attempting to process CFF fonts may result in unexpected behavior or lack of optimization.
fix
For CFF font collections, consider using `otf2otc` instead of `otfcc-ttcize` if glyph sharing is desired, or convert CFF fonts to TrueType first if possible.
affects: >=0.1.0
breakingUsing the 'gap mode' (`-x` option) to support more than 65,535 glyph data in one TTC may cause compatibility issues with legacy software. This mode modifies how glyph data is stored.
fix
Avoid using the `-x` option if the target environment includes older operating systems or font rendering engines that might have compatibility issues. Test the output TTC thoroughly on target platforms.
affects: >=0.1.0
gotchaThe hint wrapping feature (`-h` option) is automatically disabled when 'gap mode' (`-x`) is enabled. This means you cannot have both optimizations simultaneously.
fix
Decide which optimization is more critical: increased glyph capacity via gap mode or preserved hint wrapping. If hint wrapping is essential, do not use gap mode.
affects: >=0.1.0
gotchaThe tool relies on external `otfccdump` and `otfccbuild` executables. If these are not found in the system's PATH, or if the specified paths are incorrect, `otfcc-ttcize` will fail to execute.
fix
Ensure that `otfcc` tools are properly installed and accessible. Either add their installation directory to your system's PATH environment variable or specify their exact paths using the `--otfccdump-command` and `--otfccbuild-command` options.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Command failed: otfccdump ...
The `otfccdump` or `otfccbuild` executable could not be found or executed by `otfcc-ttcize`.
fix
Verify that `otfcc` tools are installed and their executables are in your system's PATH, or use `--otfccdump-command=<path>` and `--otfccbuild-command=<path>` to specify their locations.
No input files specified.
The command was run without providing any TrueType font files as input.
fix
Provide one or more `.ttf` files as arguments before the output option: `otfcc-ttcize -o output.ttc font1.ttf font2.ttf`.
Error: 'output.ttc' already exists. Use --overwrite to force.
The specified output file name already exists, and the tool prevents overwriting by default.
fix
Choose a different output file name, or add the `--overwrite` option to explicitly allow overwriting the existing file.
Upgrade
Version history
0.10.2latest on npm
Audit
Dependencies
otfccrequiredRuntime dependency, otfcc-ttcize shells out to otfccdump and otfccbuild executables. These must be available in the system's PATH or specified via options.
Agent activity
4 hits · last 30 days
node
4
Resources
otfcc-ttcize — npm install otfcc-ttcize · libregistry