def chars(self, font, block):
if font:<EOL><INDENT>font_files = self._getFont(font)<EOL><DEDENT>else:<EOL><INDENT>font_files = fc.query()<EOL><DEDENT>code_points = self._getFontChars(font_files)<EOL>if not block:<EOL><INDENT>blocks = all_blocks<EOL>ranges_column = map(itemgetter(<NUM_LIT:3>), blocks)<EOL>overlapped = Ranges(code_points).getOverlappedList(ranges_column)<EOL><DEDENT>else:<EOL><INDENT>blocks = [block]<EOL>overlapped = [Ranges(code_points).getOverlapped(block[<NUM_LIT:3>])]<EOL><DEDENT>if self._display['<STR_LIT>']:<EOL><INDENT>char_count = block_count = <NUM_LIT:0><EOL>for i, block in enumerate(blocks):<EOL><INDENT>o_count = len(overlapped[i])<EOL>if o_count:<EOL><INDENT>block_count += <NUM_LIT:1><EOL>char_count += o_count<EOL>total = sum(len(r) for r in block[<NUM_LIT:3>])<EOL>percent = <NUM_LIT:0> if total == <NUM_LIT:0> else o_count / total<EOL>print("<STR_LIT>".format(block[<NUM_LIT:0>], block[<NUM_LIT:2>], percent, o_count, total))<EOL>if self._display['<STR_LIT:list>']:<EOL><INDENT>for point in overlapped[i]:<EOL><INDENT>self._charInfo(point, padding=<NUM_LIT:9>)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>self._charSummary(char_count, block_count)<EOL><DEDENT>else:<EOL><INDENT>for point in code_points:<EOL><INDENT>self._charInfo(point, padding=<NUM_LIT:7>)<EOL><DEDENT>self._charSummary(len(code_points))<EOL><DEDENT>
Analyses characters in single font or all fonts.