beacon_aug/external/textflow/render.py
def list_charmap(self, verb=True):
        """
        list current charmap by index, code, and name
        :param verb: boolean, whether print the list
        :return: the charmap in terms of indices (array), codes (array), names (list)
        """
        if not self.face:
            return

        try:
            charmap_name = self.face.charmap.encoding_name
        except:
            logging.warning('No charmap selected!')
            return []
        else:
            chars = sorted([(c[1], c[0]) for c in self.face.get_chars()])
            if verb:
                print('***********************\n'
                      '******* Charmap *******\n'
                      '***********************')
                print('Current charmap: %s' % charmap_name)
                print('{:>10}{:>10}{:>10}'.format('Index', 'Code', 'Name'))
            indices, codes, names = [], [], []
            for char in chars:
                glyph_name = self.face.get_glyph_name(char[0]).decode()
                indices.append(char[0])
                codes.append(char[1])
                names.append(glyph_name)
                if verb:
                    print('{:>10}{:>10}{:6}{}'.format(indices[-1], codes[-1], '', names[-1]))
            return np.array(indices), np.array(codes), names

        list current charmap by index, code, and name
        :param verb: boolean, whether print the list
        :return: the charmap in terms of indices (array), codes (array), names (list)
        
list current charmap by index, code, and name
list current charmap by index code and name
def list_charmap(self, verb=True):
        if not self.face:
            return
        try:
            charmap_name = self.face.charmap.encoding_name
        except:
            logging.warning('No charmap selected!')
            return []
        else:
            chars = sorted([(c[1], c[0]) for c in self.face.get_chars()])
            if verb:
                print('***********************\n'
                      '******* Charmap *******\n'
                      '***********************')
                print('Current charmap: %s' % charmap_name)
                print('{:>10}{:>10}{:>10}'.format('Index', 'Code', 'Name'))
            indices, codes, names = [], [], []
            for char in chars:
                glyph_name = self.face.get_glyph_name(char[0]).decode()
                indices.append(char[0])
                codes.append(char[1])
                names.append(glyph_name)
                if verb:
                    print('{:>10}{:>10}{:6}{}'.format(indices[-1], codes[-1], '', names[-1]))
            return np.array(indices), np.array(codes), names
def list_charmap ( self , verb = True ) : if not self . face : return try : charmap_name = self . face . charmap . encoding_name except : logging . warning ( 'No charmap selected!' ) return [ ] else : chars = sorted ( [ ( c [ 1 ] , c [ 0 ] ) for c in self . face . get_chars ( ) ] ) if verb : print ( '***********************\n' '******* Charmap *******\n' '***********************' ) print ( 'Current charmap: %s' % charmap_name ) print ( '{:>10}{:>10}{:>10}' . format ( 'Index' , 'Code' , 'Name' ) ) indices , codes , names = [ ] , [ ] , [ ] for char in chars : glyph_name = self . face . get_glyph_name ( char [ 0 ] ) . decode ( ) indices . append ( char [ 0 ] ) codes . append ( char [ 1 ] ) names . append ( glyph_name ) if verb : print ( '{:>10}{:>10}{:6}{}' . format ( indices [ - 1 ] , codes [ - 1 ] , '' , names [ - 1 ] ) ) return np . array ( indices ) , np . array ( codes ) , names
list current charmap by index, code, and name
list current charmap by index code and name
"""
        list current charmap by index, code, and name
        :param verb: boolean, whether print the list
        :return: the charmap in terms of indices (array), codes (array), names (list)
        """
the charmap in terms of indices (array), codes (array), names (list)
the charmap in terms of indices ( array ) codes ( array ) names ( list )
self
verb
boolean, whether print the list
boolean whether print the list