'Set text properties'

def set(self, align='left', font='a', type='normal', width=1, height=1):

    if (align.upper() == 'CENTER'):
        self._raw(TXT_ALIGN_CT)
    elif (align.upper() == 'RIGHT'):
        self._raw(TXT_ALIGN_RT)
    elif (align.upper() == 'LEFT'):
        self._raw(TXT_ALIGN_LT)
    if (font.upper() == 'B'):
        self._raw(TXT_FONT_B)
    else:
        self._raw(TXT_FONT_A)
    if (type.upper() == 'B'):
        self._raw(TXT_BOLD_ON)
        self._raw(TXT_UNDERL_OFF)
    elif (type.upper() == 'U'):
        self._raw(TXT_BOLD_OFF)
        self._raw(TXT_UNDERL_ON)
    elif (type.upper() == 'U2'):
        self._raw(TXT_BOLD_OFF)
        self._raw(TXT_UNDERL2_ON)
    elif (type.upper() == 'BU'):
        self._raw(TXT_BOLD_ON)
        self._raw(TXT_UNDERL_ON)
    elif (type.upper() == 'BU2'):
        self._raw(TXT_BOLD_ON)
        self._raw(TXT_UNDERL2_ON)
    elif (type.upper == 'NORMAL'):
        self._raw(TXT_BOLD_OFF)
        self._raw(TXT_UNDERL_OFF)
    if ((width == 2) and (height != 2)):
        self._raw(TXT_NORMAL)
        self._raw(TXT_2WIDTH)
    elif ((height == 2) and (width != 2)):
        self._raw(TXT_NORMAL)
        self._raw(TXT_2HEIGHT)
    elif ((height == 2) and (width == 2)):
        self._raw(TXT_2WIDTH)
        self._raw(TXT_2HEIGHT)
    else:
        self._raw(TXT_NORMAL)
