Changeset 706

Show
Ignore:
Timestamp:
03/05/10 07:51:29 (5 months ago)
Author:
tal
Message:
Made the individual extraction function names format specific.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • packages/extractor/trunk/Lib/extractor/formats/opentype.py

    r705 r706  
    2222    source = TTFont(pathOrFile) 
    2323    if doInfo: 
    24         extractInfo(source, destination) 
     24        extractOpenTypeInfo(source, destination) 
    2525    if doGlyphs: 
    26         extractGlyphs(source, destination) 
     26        extractOpenTypeGlyphs(source, destination) 
    2727    if doKerning: 
    28         kerning, groups = extractKerning(source, destination) 
     28        kerning, groups = extractOpenTypeKerning(source, destination) 
    2929        destination.groups.update(groups) 
    3030        destination.kerning.clear() 
     
    3636# ---- 
    3737 
    38 def extractInfo(source, destination): 
     38def extractOpenTypeInfo(source, destination): 
    3939    info = RelaxedInfo(destination.info) 
    4040    _extractInfoHead(source, info) 
     
    252252# -------- 
    253253 
    254 def extractGlyphs(source, destination): 
     254def extractOpenTypeGlyphs(source, destination): 
    255255    # grab the cmap 
    256256    cmap = source["cmap"] 
     
    282282# ------- 
    283283 
    284 def extractKerning(source, destination, leftGroupPrefix="@KERN_LEFT_", rightGroupPrefix="@KERN_RIGHT_"): 
     284def extractOpenTypeKerning(source, destination, leftGroupPrefix="@KERN_LEFT_", rightGroupPrefix="@KERN_RIGHT_"): 
    285285    kerning = {} 
    286286    groups = {} 
    287287    if "GPOS" in source: 
    288         kerning, groups = _extractKerningFromGPOS(source, leftGroupPrefix, rightGroupPrefix) 
     288        kerning, groups = _extractOpenTypeKerningFromGPOS(source, leftGroupPrefix, rightGroupPrefix) 
    289289    elif "kern" in source: 
    290         kerning = _extractKerningFromKern(source) 
     290        kerning = _extractOpenTypeKerningFromKern(source) 
    291291        groups = {} 
    292292    return kerning, groups 
    293293 
    294 def _extractKerningFromGPOS(source, leftGroupPrefix, rightGroupPrefix): 
     294def _extractOpenTypeKerningFromGPOS(source, leftGroupPrefix, rightGroupPrefix): 
    295295    gpos = source["GPOS"].table 
    296296    # get an ordered list of scripts 
     
    650650    return classes 
    651651 
    652 def _extractKerningFromKern(source): 
     652def _extractOpenTypeKerningFromKern(source): 
    653653    kern = source["kern"] 
    654654    kerning = {}