El otfcc es una biblioteca C y una utilidad utilizada para analizar y escribir archivos de fuentes OpenType.
GSUB , GPOS y GDEF ), CFF clave CID, métricas verticales y más.ttx en CFF OTF y 40 × en TTF.makeotf para construir un CFF OTF totalmente optimizado. Puede descargar los binarios prebuilt aquí.
Si tiene cebro casera, simplemente ejecute lo siguiente en su terminal.
brew tap caryll/tap
brew install otfcc-mac64 Nota: Se requiere una instalación completa de Xcode. Consulte las instrucciones aquí si ve un error relacionado con xcode-select .
De lo contrario, es posible que deba hacer clic en las "versiones" anteriores y descargar los archivos en él.
El paquete otfcc se puede encontrar aquí.
Vea abajo.
otfccdump : voltea un archivo de fuente OpenType en JSON otfccdump [OPTIONS] input.[otf|ttf|ttc]
-h, --help : Display this help message and exit.
-v, --version : Display version information and exit.
-o <file> : Set output file path to <file>. When absent the dump
will be written to STDOUT.
-n <n>, --ttc-index <n> : Use the <n>th subfont within the input font.
--pretty : Prettify the output JSON.
--ugly : Force uglify the output JSON.
--verbose : Show more information when building.
--ignore-glyph-order : Do not export glyph order information.
--glyph-name-prefix pfx : Add a prefix to the glyph names.
--ignore-hints : Do not export hinting information.
--decimal-cmap : Export 'cmap' keys as decimal number.
--name-by-hash : Name glyphs using its hash value.
--add-bom : Add BOM mark in the output. (It is default on Windows
when redirecting to another program. Use --no-bom to
turn it off.)
otfccbuild : cree un archivo de fuente OpenType desde JSON Usage : otfccbuild [OPTIONS] [input.json] -o output.[ttf|otf]
input.json : Path to input file. When absent the input will be
read from the STDIN.
-h, --help : Display this help message and exit.
-v, --version : Display version information and exit.
-o <file> : Set output file path to <file>.
-s, --dummy-dsig : Include an empty DSIG table in the font. For some
Microsoft applications, DSIG is required to enable
OpenType features.
-O<n> : Specify the level for optimization.
-O0 Turn off any optimization.
-O1 Default optimization.
-O2 More aggressive optimizations for web font. In this
level, the following options will be set:
--merge-features
--short-post
--subroutinize
-O3 The most aggressive opptimization strategy will be
used. In this level, these options will be set:
--force-cid
--ignore-glyph-order
--verbose : Show more information when building.
--ignore-hints : Ignore the hinting information in the input.
--keep-average-char-width : Keep the OS/2.xAvgCharWidth value from the input
instead of stating the average width of glyphs.
Useful when creating a monospaced font.
--keep-unicode-ranges : Keep the OS/2.ulUnicodeRange[1-4] as-is.
--keep-modified-time : Keep the head.modified time in the json, instead of
using current time.
--short-post : Don't export glyph names in the result font.
--ignore-glyph-order, -i : Ignore the glyph order information in the input.
--keep-glyph-order, -k : Keep the glyph order information in the input.
Use to preserve glyph order under -O2 and -O3.
--dont-ignore-glyph-order : Same as --keep-glyph-order.
--merge-features : Merge duplicate OpenType feature definitions.
--dont-merge-features : Keep duplicate OpenType feature definitions.
--merge-lookups : Merge duplicate OpenType lookups.
--dont-merge-lookups : Keep duplicate OpenType lookups.
--force-cid : Convert name-keyed CFF OTF into CID-keyed.
--subroutinize : Subroutinize CFF table.
--stub-cmap4 : Create a stub `cmap` format 4 subtable if format
12 subtable is present.
otfcc se puede construir en varias plataformas. Utiliza el sistema de compilación Premoke.
Fue desarrollado y optimizado para Clang/LLVM, por lo tanto, se recomienda compilar con Clang/LLVM, pero si eso no es posible GCC también es compatible, GCC versión 5.1 o posterior es la opción preferida para el rendimiento.
En Linux, se puede usar Clang/LLVM o GCC para construir otfcc .
premake5 gmake
cd build/gmake
make config=release_x64Si tiene Ninja instalado en su sistema, puede usar ninja:
premake5 ninja
cd build/ninja
ninja otfccdump_release_x64 otfccbuild_release_x64Cambie los objetivos anteriores cuando sea necesario.
En Windows, el edificio otfcc se prueba en las cadenas de herramientas que se enumeran a continuación. El premake5 vs2015 predeterminado producirá una solución de Visual Studio utilizando CLANG-CL como compilador.
GCC 5.1 incluido en TDM-GCC , o GCC 6.1.0 en MingW-W64. Ejecute lo siguiente desde la línea de comando (cambie la config cuando sea necesario):
premake5 gmake
cd build/gmake
make config=release_x64 Para usar ninja como ese en Linux, debe especificar el --os=linux cuando usa premake5 ninja .
Visual C ++ Building Tools (Mar 2016) con Clang/LLVM 3.9. Se prueba la compilación de la sola liberación. Ejecute lo siguiente desde el símbolo del sistema Visual C ++:
premake5 vs2015
msbuild buildvsotfcc.sln /property:Configuration=Release Premake5 (se puede instalar a través de brew install premake --devel , o se encuentra en el directorio dep/bin-osx ) proporciona la capacidad de producir proyectos de XCode. Correr
premake5 xcode4 Y luego puede abrir build/xcode/otfcc.xcworkspace y construir con XCode. Puede encontrar binarios construidos en bin/ .
Asegúrese de que el modo de desarrollador de Xcode esté habilitado.
Para construir binarios en su terminal, ejecute
xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccbuild -configuration Release
xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccdump -configuration Release