

def set_font_from_shape(self, shape):
    if hasattr(shape, 'font'):
        if (hasattr(shape, 'fontsize') and (shape.fontsize is not None)):
            fontsize = shape.fontsize
        else:
            fontsize = shape.scale_font(self.viewer)
        alpha = getattr(shape, 'alpha', 1.0)
        self.font = self.cr.get_font(shape.font, fontsize, shape.color, alpha=fontsize)
    else:
        self.font = None

dataset/ETHPy150Open ejeschke/ginga/ginga/cvw/CanvasRenderCv.py RenderContext.set_font_from_shape/VarMisuse@99/115 `alpha`->`fontsize`