otfcc هي مكتبة C وفائدة تستخدم لتحليل وكتابة ملفات خطوط Opentype.
GSUB ، GPOS و GDEF ) ، CID-keyed CFF ، المقاييس الرأسية ، وأكثر من ذلك.ttx على CFF OTF ، و 40 × على TTF.makeotf لبناء CFF OTF محسّنة بالكامل. يمكنك تنزيل الثنائيات المسبقة هنا.
إذا كان لديك Homebrew ، فما عليك سوى تشغيل ما يلي في المحطة الخاصة بك.
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 : بناء ملف خط Opentype من 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 على عدد من المنصات. ويستخدم نظام البناء premake.
تم تطويره وتحسينه لـ Clang/LLVM ، لذلك يوصى بشدة بالتجميع باستخدام Clang/LLVM ، ولكن إذا لم يكن ذلك ممكنًا مدعومًا بـ GCC ، فإن إصدار GCC 5.1 أو لاحقًا هو الخيار المفضل للأداء.
على Linux ، يمكن استخدام Clang/LLVM أو GCC لبناء otfcc .
premake5 gmake
cd build/gmake
make config=release_x64إذا كان لديك نينجا مثبتة على نظامك ، فيمكنك استخدام Ninja أيضًا:
premake5 ninja
cd build/ninja
ninja otfccdump_release_x64 otfccbuild_release_x64تغيير الأهداف أعلاه عند الضرورة.
على Windows ، يتم اختبار إنشاء otfcc ضمن أدوات الأدوات المذكورة أدناه. ستنتج premake5 vs2015 الافتراضي حل Visual Studio باستخدام Clang-Cl كمترجم لها.
GCC 5.1 المدرجة في TDM-GCC ، أو GCC 6.1.0 في MINGW-W64. قم بتشغيل ما يلي من سطر الأوامر (قم بتغيير config عند الضرورة):
premake5 gmake
cd build/gmake
make config=release_x64 لاستخدام النينجا مثل ذلك في Linux ، تحتاج إلى تحديد --os=linux عند استخدام premake5 ninja .
أدوات بناء C ++ المرئية (مارس 2016) مع Clang/LLVM 3.9. تم اختبار بناء الإصدار فقط. قم بتشغيل ما يلي من موجه أوامر 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