pybadges/precalculated_text_measurer.py
def from_json(f: TextIO) -> 'PrecalculatedTextMeasurer':
        """Return a PrecalculatedTextMeasurer given a JSON stream.

        See precalculate_text.py for details on the required format.
        """
        o = json.load(f)
        return PrecalculatedTextMeasurer(o['mean-character-length'],
                                         o['character-lengths'],
                                         o['kerning-pairs'])
def from_json(f: TextIO) -> 'PrecalculatedTextMeasurer':
        o = json.load(f)
        return PrecalculatedTextMeasurer(o['mean-character-length'],
                                         o['character-lengths'],
                                         o['kerning-pairs'])
def from_json ( f : TextIO ) -> 'PrecalculatedTextMeasurer' : o = json . load ( f ) return PrecalculatedTextMeasurer ( o [ 'mean-character-length' ] , o [ 'character-lengths' ] , o [ 'kerning-pairs' ] )
Return a PrecalculatedTextMeasurer given a JSON stream.

        See precalculate_text.py for details on the required format.
Return a PrecalculatedTextMeasurer given a JSON stream .