robofab.features
index
/code/projects/robofab/Lib/robofab/features/__init__.py

Directory for all feature like code.
 
 
Features should (for now) be stored in the 
font lib at the keys listed below.
 
 
SUBSTITUTION:
- lib key: org.robofab.features.substitute
- object type: dict
- required data:
        -'name': string value; the name of the feature.
        -'type': string value; the type of the lookup. refer to substitute.py for registered types.
        -'substitution': depends on type of lookup. refer to substitute.py for structure.
- optional data:
        -'on': bool value; the default status of the feature.
        
POSITION:
- lib key: org.robofab.features.position
- object type: dict
- required data:
        -'name': string value; the name of the feature.
        -'type': string value; the type of the lookup. refer to position.py for registered types.
        -'positioning': depends on type of lookup. refer to position.py for structure.
        -'positionsX': bool value; lookup does x coordinate positioning
        -'positionsY': bool value; lookup does y coordinate positioning
- optional data:
        -'on': bool value; the default status of the feature.

 
Package Contents
       
featureTools
position
substitute

 
Functions
       
readFeatures(aFont)
Read the features from a font.lib and (if any)
put them in an dict in the font.
writeFeatures(aFont)
Write the features in aFont.features back to the font.lib.

 
Data
        PAIR_OFFSET = 'pair_offset'
POS_LIB_KEY = 'org.robofab.features.positioning'
SUB_LIB_KEY = 'org.robofab.features.substitute'
optionalPositioningAttrs = ['on']
optionalSubstitutionAttrs = ['on']