otfcc 는 OpenType 글꼴 파일을 구문 분석하고 쓰는 데 사용되는 C 라이브러리 및 유틸리티입니다.
GSUB , GPOS 및 GDEF ), CID 키가있는 CFF, 수직 메트릭 등을 완전히 지원합니다.ttx 보다 4 × 빠르고 TTF에서는 40 × 더 빠릅니다.makeotf 보다 900 × 빠릅니다. 사전 제작 된 바이너리를 여기에서 다운로드 할 수 있습니다.
홈 브루가있는 경우 터미널에서 다음을 실행하십시오.
brew tap caryll/tap
brew install otfcc-mac64 참고 : 전체 Xcode 설치가 필요합니다. xcode-select 와 관련된 오류가 표시되면 여기에서 지침을 참조하십시오.
그렇지 않으면 위의 "릴리스"를 클릭하고 아카이브를 다운로드해야 할 수도 있습니다.
패키지 otfcc 여기에서 찾을 수 있습니다.
아래를 참조하십시오.
otfccdump : OpenType 글꼴 파일을 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 : JSON에서 OpenType 글꼴 파일을 빌드하십시오 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 여러 플랫폼을 구축 할 수 있습니다. 미사일 빌드 시스템을 사용합니다.
Clang/LLVM에 대해 개발되고 최적화되었으므로 Clang/LLVM을 컴파일하는 것이 좋습니다 . 그러나 가능하지 않은 경우 GCC 버전 5.1 이상이 성능에 선호되는 선택입니다.
Linux에서는 Clang/LLVM 또는 GCC를 사용하여 otfcc 구축 할 수 있습니다.
premake5 gmake
cd build/gmake
make config=release_x64시스템에 닌자를 설치 한 경우 닌자를 사용할 수 있습니다.
premake5 ninja
cd build/ninja
ninja otfccdump_release_x64 otfccbuild_release_x64필요한 경우 위의 대상을 변경하십시오.
Windows에서 Building otfcc 아래 나열된 툴체인에서 테스트됩니다. Default premake5 vs2015 Clang-Cl을 컴파일러로 사용하여 Visual Studio 솔루션을 생성합니다.
GCC 5.1은 TDM-GCC 또는 MINGW-W64에 GCC 6.1.0에 포함되어 있습니다. 명령 줄에서 다음을 실행합니다 (필요한 경우 config 변경) :
premake5 gmake
cd build/gmake
make config=release_x64 Linux에서 그런 닌자를 사용하려면 premake5 ninja 사용할 때 --os=linux 지정해야합니다.
Clang/LLVM 3.9를 사용한 시각적 C ++ 빌딩 도구 (2016 년 3 월). 릴리스 빌드 만 테스트됩니다. Visual C ++ 명령 프롬프트에서 다음을 실행하십시오.
premake5 vs2015
msbuild buildvsotfcc.sln /property:Configuration=Release Premake5 ( brew install premake --devel 통해 설치하거나 dep/bin-osx 디렉토리에서 찾을 수 있음)는 Xcode 프로젝트를 생성하는 기능을 제공합니다. 달리다
premake5 xcode4 그런 다음 build/xcode/otfcc.xcworkspace 열고 Xcode로 빌드 할 수 있습니다. bin/ 에서 제작 된 바이너리를 찾을 수 있습니다.
Xcode의 개발자 모드가 활성화되어 있는지 확인하십시오.
터미널에 바이너리를 만들려면 달리기를하십시오
xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccbuild -configuration Release
xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccdump -configuration Release