Changeset 706
- Timestamp:
- 03/05/10 07:51:29 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
packages/extractor/trunk/Lib/extractor/formats/opentype.py
r705 r706 22 22 source = TTFont(pathOrFile) 23 23 if doInfo: 24 extract Info(source, destination)24 extractOpenTypeInfo(source, destination) 25 25 if doGlyphs: 26 extract Glyphs(source, destination)26 extractOpenTypeGlyphs(source, destination) 27 27 if doKerning: 28 kerning, groups = extract Kerning(source, destination)28 kerning, groups = extractOpenTypeKerning(source, destination) 29 29 destination.groups.update(groups) 30 30 destination.kerning.clear() … … 36 36 # ---- 37 37 38 def extract Info(source, destination):38 def extractOpenTypeInfo(source, destination): 39 39 info = RelaxedInfo(destination.info) 40 40 _extractInfoHead(source, info) … … 252 252 # -------- 253 253 254 def extract Glyphs(source, destination):254 def extractOpenTypeGlyphs(source, destination): 255 255 # grab the cmap 256 256 cmap = source["cmap"] … … 282 282 # ------- 283 283 284 def extract Kerning(source, destination, leftGroupPrefix="@KERN_LEFT_", rightGroupPrefix="@KERN_RIGHT_"):284 def extractOpenTypeKerning(source, destination, leftGroupPrefix="@KERN_LEFT_", rightGroupPrefix="@KERN_RIGHT_"): 285 285 kerning = {} 286 286 groups = {} 287 287 if "GPOS" in source: 288 kerning, groups = _extract KerningFromGPOS(source, leftGroupPrefix, rightGroupPrefix)288 kerning, groups = _extractOpenTypeKerningFromGPOS(source, leftGroupPrefix, rightGroupPrefix) 289 289 elif "kern" in source: 290 kerning = _extract KerningFromKern(source)290 kerning = _extractOpenTypeKerningFromKern(source) 291 291 groups = {} 292 292 return kerning, groups 293 293 294 def _extract KerningFromGPOS(source, leftGroupPrefix, rightGroupPrefix):294 def _extractOpenTypeKerningFromGPOS(source, leftGroupPrefix, rightGroupPrefix): 295 295 gpos = source["GPOS"].table 296 296 # get an ordered list of scripts … … 650 650 return classes 651 651 652 def _extract KerningFromKern(source):652 def _extractOpenTypeKerningFromKern(source): 653 653 kern = source["kern"] 654 654 kerning = {}
