'Text position. This is used e.g. to make superscript and subscript
This attribute can have one or two values.
The first value must be present and specifies the vertical
text position as a percentage that relates to the current font
height or it takes one of the values sub or super. Negative
percentages or the sub value place the text below the
baseline. Positive percentages or the super value place
the text above the baseline. If sub or super is specified,
the application can choose an appropriate text position.
The second value is optional and specifies the font height
as a percentage that relates to the current font-height. If
this value is not specified, an appropriate font height is
used. Although this value may change the font height that
is displayed, it never changes the current font height that
is used for additional calculations.'

def c_text_position(self, ruleset, sdict, rule, tp):

    textpos = tp.split('    ')
    if ((len(textpos) == 2) and (textpos[0] != '0%')):
        sdict['font-size'] = textpos[1]
    if (textpos[0] == 'super'):
        sdict['vertical-align'] = '33%'
    elif (textpos[0] == 'sub'):
        sdict['vertical-align'] = '-33%'
    else:
        sdict['vertical-align'] = textpos[0]
