bacon/font.py
def measure_string(self, str):
        '''Calculates the width of the given string in this font.

        :param str: the string to measure
        :return float: width of the string, in pixels
        '''
        style = bacon.text.Style(self)
        run = bacon.text.GlyphRun(style, str)
        glyph_layout = bacon.text.GlyphLayout([run], 0, 0)
        return glyph_layout.content_width
def measure_string(self, str):
        '''Calculates the width of the given string in this font.

        :param str: the string to measure
        :return float: width of the string, in pixels
        '''
        style = bacon.text.Style(self)
        run = bacon.text.GlyphRun(style, str)
        glyph_layout = bacon.text.GlyphLayout([run], 0, 0)
        return glyph_layout.content_width
def measure_string ( self , str ) : style = bacon . text . Style ( self ) run = bacon . text . GlyphRun ( style , str ) glyph_layout = bacon . text . GlyphLayout ( [ run ] , 0 , 0 ) return glyph_layout . content_width
Calculates the width of the given string in this font.

        :param str: the string to measure
        :return float: width of the string, in pixels
Calculates the width of the given string in this font .