fontQAtools
This module contains basic functions used by other tests.
This module contains basic functions used by other tests.
average(TheList)
Parameter
- TheList: (required) numeric values (non-numeric value will raise a type error)
- (Type: list)
Return
arithmetic mean over all values of the list
(Type: float)
variation(TheList)
Parameter
- TheList: (required) numeric values (non-numeric value will raise a type error)
- (Type: list)
Return
variation over all values of the list
(Type: float)
variance(TheList)
Parameter
- TheList: (required) numeric values (non-numeric value will raise a type error)
- (Type: list)
Return
variance over all values of the list
(Type: float)
variance(TheList) = variation(TheList) / len(TheList)
StdDeviation(TheList)
Parameter
- TheList: (required) numeric values (non-numeric value will raise a type error)
- (Type: list)
Return
standard deviation over all values of the list
(Type: float)
trueBBox(TheGlyph, [masterindex])
Parameter
- TheGlyph: (required)
- masterindex: (optional, default: 0)
Returns a Rect object enclosing all nodes
AND all components of 'TheGlyph'.
If 'masterindex' is omitted the boundingbox of
the first master is returned.
getLSB(TheGlyph, [masterindex])
Parameter
- TheGlyph: (required)
- masterindex: (optional, default: 0)
Returns left sidebearing of 'TheGlyph's master as integer.
If 'masterindex' is omitted the left sidebearing of
the first master is returned.
This function is Multiple Master - compatible!
getRSB(TheGlyph, [masterindex])
Parameter
- TheGlyph: (required)
- masterindex: (optional, default: 0)
Returns right sidebearing of 'TheGlyph's master as integer.
If 'masterindex' is omitted the right sidebearing of
the first master is returned.
This function is Multiple Master - compatible
trueFontBox(TheFont, [masterindex])
Parameter
- TheFont: (required) font
- (Type: FontLab Font object)
- masterindex: (optional, default: 0)
- (Type: integer)
Return
a rectangle enclosing all nodes AND all components of all glyphs in 'TheFont'.
(Type: FontLab Rect object)
formatUni(TheUnicode)
Parameter
- TheUnicode: (required)
Back to physical