robofab.tools.proof
index
/code/projects/robofab/Lib/robofab/tools/proof.py

This is the place for stuff that makes proofs and test text settings etc

 
Modules
       
string

 
Classes
       
IDTaggedText

 
class IDTaggedText
    Export a text as a XML tagged text file for InDesign (2.0?).
The tags can contain information about
        - family: font family i.e. "Times"
        - weight: font weight "Bold"
        - size: typesize in points
        - leading: leading in points
        - color:  a CMYK color, as a 4 tuple of floats between 0 and 1
        - insert special glyphs based on glyphindex
                (which is why it only makes sense if you use this in FontLab,
                otherwise there is no other way to get the indices)
 
  Methods defined here:
__init__(self, family, weight, size=36, leading=None)
add(self, text)
Method to add text to the file.
addGlyph(self, index)
Add a special glyph, index is the glyphIndex in an OpenType font.
addHeader(self)
Add the standard header.
addStyle(self, family=None, weight=None, size=None, leading=None, color=None)
Set the paragraph style for the following text.
charToGlyph(self, text)
replace(self, old, new)
Replace occurances of 'old' with 'new' in all content.
save(self, path)
Save the tagged text here.

 
Data
        autoLinespaceFactor = 1.2
idColor = r'<cColor:COLOR\:%(model)s\:Process\:%(c)f\,%(m)f\,%(y)f\,%(k)f>'
idGlyphStyle = '<cTypeface:%(weight)s><cSize:%(size)f><cLeading:%(leading)f><cFont:%(family)s>'
idHeader = '<ASCII-MAC>\n<Version:2.000000><FeatureSet:InDesi...MYK:Process:0.000000,0.000000,0.000000,1.000000>>'
idParaStyle = '<ParaStyle:><cTypeface:%(weight)s><cSize:%(size)f><cLeading:%(leading)f><cFont:%(family)s>'
seperator = ''