|
1威望
有偿寻求高手,解决!
加本人Q:2 2 6 4 4 6 2942
https://github.com/montehurd/FontToSvgsToFont
我需要完善两方面:
1、makeSvgsFromFont.py(解包)
TTF转SVG格式时,生成的svg文件(实例:重新命名为4E34.svg)font.json文件,更加全面的font信息(具体以我们常用的字体信息为准,具体看下面)。
2、makeFontFromSvgs.py(打包)
该文件可以读取修改后的4E34.svg这种类型.SVG文件和font.json,生成字体。
<?xml version="1.0" encoding="ISO-8859-1"?><ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="2.3"> <GlyphOrder> <!-- The 'id' attribute is only for humans; it is ignored when parsed. --> <GlyphID id="0" name=".notdef"/> </GlyphOrder> <head> <!-- Most of this table will be recalculated by the compiler --> <tableVersion value="1.0"/> <fontRevision value="1.22"/> <checkSumAdjustment value="0x4d5a161a"/> <magicNumber value="0x5f0f3cf5"/> <flags value="00000000 00001011"/> <unitsPerEm value="2048"/> <created value="Wed May 22 20:00:43 2013"/> <modified value="Wed May 22 20:00:43 2013"/> <xMin value="0"/> <yMin value="-500"/> <xMax value="2550"/> <yMax value="2100"/> <macStyle value="00000000 00000000"/> <lowestRecPPEM value="8"/> <fontDirectionHint value="2"/> <indexToLocFormat value="0"/> <glyphDataFormat value="0"/> </head> <hhea> <tableVersion value="1.0"/> <ascent value="1900"/> <descent value="-500"/> <lineGap value="256"/> <advanceWidthMax value="2550"/> <minLeftSideBearing value="0"/> <minRightSideBearing value="0"/> <xMaxExtent value="2550"/> <caretSlopeRise value="1"/> <caretSlopeRun value="0"/> <caretOffset value="0"/> <reserved0 value="0"/> <reserved1 value="0"/> <reserved2 value="0"/> <reserved3 value="0"/> <metricDataFormat value="0"/> <numberOfHMetrics value="1"/> </hhea> <maxp> <!-- Most of this table will be recalculated by the compiler --> <tableVersion value="0x10000"/> <numGlyphs value="1"/> <maxPoints value="8"/> <maxContours value="2"/> <maxCompositePoints value="0"/> <maxCompositeContours value="0"/> <maxZones value="2"/> <maxTwilightPoints value="0"/> <maxStorage value="1"/> <maxFunctionDefs value="1"/> <maxInstructionDefs value="0"/> <maxStackElements value="64"/> <maxSizeOfInstructi** value="46"/> <maxComponentElements value="0"/> <maxComponentDepth value="0"/> </maxp> <OS_2> <version value="4"/> <xAvgCharWidth value="2550"/> <usWeightClass value="500"/> <usWidthClass value="5"/> <fsType value="00000000 00000000"/> <ySubscriptXSize value="1331"/> <ySubscriptYSize value="1433"/> <ySubscriptXOffset value="0"/> <ySubscriptYOffset value="286"/> <ySuperscriptXSize value="1331"/> <ySuperscriptYSize value="1433"/> <ySuperscriptXOffset value="0"/> <ySuperscriptYOffset value="983"/> <yStrikeoutSize value="102"/> <yStrikeoutPosition value="530"/> <sFamilyClass value="0"/> <panose> <bFamilyType value="2"/> <bSerifStyle value="0"/> <bWeight value="6"/> <bProportion value="9"/> <bContrast value="0"/> <bStrokeVariation value="0"/> <bArmStyle value="0"/> <bLetterForm value="0"/> <bMidline value="0"/> <bXHeight value="0"/> </panose> <ulUnicodeRange1 value="00000000 00000000 00000000 00000001"/> <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/> <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/> <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/> <achVendID value="GOOG"/> <fsSelection value="00000000 11000000"/> <fsFirstCharIndex value="0"/> <fsLastCharIndex value="90"/> <sTypoAscender value="1900"/> <sTypoDescender value="-500"/> <sTypoLineGap value="256"/> <usWinAscent value="1900"/> <usWinDescent value="500"/> <ulCodePageRange1 value="00000000 00000000 00000000 00000001"/> <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/> <sxHeight value="0"/> <sCapHeight value="1900"/> <usDefaultChar value="0"/> <usBreakChar value="32"/> <usMaxContex value="1"/> </OS_2> <hmtx> <mtx name=".notdef" width="2550" lsb="0"/> </hmtx> <cmap> <tableVersion version="0"/> <cmap_format_12 platformID="3" platEncID="10" language="0" format="12" reserved="0" length="1" nGroups="1"> <map code="0x0" name=".notdef"/><!-- <control> --> </cmap_format_12> </cmap> <name> <namerecord nameID="0" platformID="3" platEncID="1" langID="0x409"> Copyright 2015 Google Inc. </namerecord> <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409"> Noto Color Emoji SVG </namerecord> <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409"> Regular </namerecord> <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409"> Noto Color Emoji SVG </namerecord> <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409"> Noto Color Emoji SVG </namerecord> <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409"> Version 1.22 </namerecord> <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409"> NotoColorEmojiSVG </namerecord> <namerecord nameID="7" platformID="3" platEncID="1" langID="0x409"> Noto is a trademark of Google Inc. and may be registered in certain jurisdicti**. </namerecord> <namerecord nameID="11" platformID="3" platEncID="1" langID="0x409"> http://code.google.com/p/noto/ </namerecord> <namerecord nameID="13" platformID="3" platEncID="1" langID="0x409"> This Font Software is licensed under the SIL Open Font License, Version 1.1. This Font Software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITI** OF ANY KIND, either express or implied. See the SIL Open Font License for the specific language, permissi** and limitati** governing your use of this Font Software. </namerecord> <namerecord nameID="14" platformID="3" platEncID="1" langID="0x409"> http://scripts.sil.org/OFL </namerecord> </name> <post> <formatType value="3.0"/> <italicAngle value="0.0"/> <underlinePosition value="-1244"/> <underlineThickness value="131"/> <isFixedPitch value="1"/> <minMemType42 value="0"/> <maxMemType42 value="0"/> <minMemType1 value="0"/> <maxMemType1 value="0"/> </post> <loca> </loca> <glyf> <!-- The xMin, yMin, xMax and yMax values will be recalculated by the compiler. --> <TTGlyph name=".notdef" xMin="675" yMin="-269" xMax="1825" yMax="1731"> <contour> <pt x="817" y="1589" on="1"/> <pt x="817" y="-127" on="1"/> <pt x="1683" y="-127" on="1"/> <pt x="1683" y="1589" on="1"/> </contour> <contour> <pt x="675" y="-269" on="1"/> <pt x="675" y="1731" on="1"/> <pt x="1825" y="1731" on="1"/> <pt x="1825" y="-269" on="1"/> </contour> <instructi**><assembly> </assembly></instructi**> </TTGlyph> </glyf></ttFont>
|
|