Metadata-Version: 1.1
Name: tensorfont
Version: 0.0.7
Summary: Turn font glyphs into numpy arrays
Home-page: https://github.com/simoncozens/tensorfont
Author: Simon Cozens
Author-email: simon@simon-cozens.org
License: MIT
Description: tensorfont
        ----------
        
        Tensorfont is a library to help those performing numerical analysis of
        font data, particular with reference to letterfitting and spacing.
        
        Here is an example session::
        
            >>> from tensorfont import Font
            >>> f = Font("../atospace/kern-dump/normal/MrsEavesOT-Bold.otf")
        
            >>> f.m_width
            828.0
            >>> f.baseline_ratio
            0.28835063437139563
        
            >>> f.pair_distance("A","V")
            -149
            >>> f.pair_kerning("A","V")
            -73
        
            >>> f.glyph("G").lsb
            71
        
            >>> m = f.glyph("G").as_matrix()
                .with_sidebearings()
                .crop_descender()
                .scale_to_height(50)
            >>> m.left_contour()
            array([25, 22, 20, 18, 16, 15, 14, 13, 12, 11, 10, 10,  9,  9,  8,  8,  7,
                    7,  7,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  7,  7,
                    7,  7,  8,  8,  9, 10, 10, 11, 12, 13, 13, 15, 16, 17, 19, 21])
            >>> plt.imgshow(m) ; plt.show()
            # The letter "G" is shown
        
        Full documentation is available at https://simoncozens.github.io/tensorfont/index.html
        
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 4 - Beta
