コード例 #1
0
ファイル: woff.py プロジェクト: bitforks/extractor
def extractFontFromWOFF(pathOrFile, destination, doGlyphs=True, doInfo=True, doKerning=True, doGroups=True, doFeatures=True, doLib=True, customFunctions=[]):
    from woffTools import WOFFFont
    source = WOFFFont(pathOrFile)
    if doInfo:
        extractOpenTypeInfo(source, destination)
    if doGlyphs:
        extractOpenTypeGlyphs(source, destination)
    if doKerning:
        kerning, groups = extractOpenTypeKerning(source, destination)
        destination.groups.update(groups)
        destination.kerning.clear()
        destination.kerning.update(kerning)
    for function in customFunctions:
        function(source, destination)
    source.close()
コード例 #2
0
ファイル: ttx.py プロジェクト: bitforks/extractor
def extractFontFromTTX(pathOrFile, destination, doGlyphs=True, doInfo=True, doKerning=True, doGroups=True, doFeatures=True, doLib=True, customFunctions=[]):
    from fontTools.ttLib import TTFont, TTLibError
    source = TTFont()
    source.importXML(pathOrFile)
    if doInfo:
        extractOpenTypeInfo(source, destination)
    if doGlyphs:
        extractOpenTypeGlyphs(source, destination)
    if doKerning:
        kerning, groups = extractOpenTypeKerning(source, destination)
        destination.groups.update(groups)
        destination.kerning.clear()
        destination.kerning.update(kerning)
    for function in customFunctions:
        function(source, destination)
    source.close()   
コード例 #3
0
ファイル: ttx.py プロジェクト: AkCoding/Extract-characters
def extractFontFromTTX(pathOrFile,
                       destination,
                       doGlyphs=True,
                       doInfo=True,
                       doKerning=True,
                       customFunctions=[]):
    from fontTools.ttLib import TTFont, TTLibError
    source = TTFont()
    source.importXML(pathOrFile)
    if doInfo:
        extractOpenTypeInfo(source, destination)
    if doGlyphs:
        extractOpenTypeGlyphs(source, destination)
    if doKerning:
        kerning, groups = extractOpenTypeKerning(source, destination)
        destination.groups.update(groups)
        destination.kerning.clear()
        destination.kerning.update(kerning)
    for function in customFunctions:
        function(source, destination)
    source.close()
コード例 #4
0
ファイル: woff.py プロジェクト: adrientetar/extractor
def extractFontFromWOFF(pathOrFile,
                        destination,
                        doGlyphs=True,
                        doInfo=True,
                        doKerning=True,
                        doGroups=True,
                        doFeatures=True,
                        doLib=True,
                        customFunctions=[]):
    from woffTools import WOFFFont
    source = WOFFFont(pathOrFile)
    if doInfo:
        extractOpenTypeInfo(source, destination)
    if doGlyphs:
        extractOpenTypeGlyphs(source, destination)
    if doKerning:
        kerning, groups = extractOpenTypeKerning(source, destination)
        destination.groups.update(groups)
        destination.kerning.clear()
        destination.kerning.update(kerning)
    for function in customFunctions:
        function(source, destination)
    source.close()
コード例 #5
0
ファイル: woff.py プロジェクト: adrientetar/extractor
def extractWOFFGlyphs(source, destination):
    return extractOpenTypeGlyphs(source, destination)
コード例 #6
0
ファイル: woff.py プロジェクト: bitforks/extractor
def extractWOFFGlyphs(source, destination):
    return extractOpenTypeGlyphs(source, destination)