Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/ftdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def Print_Charmaps( face ):
charcode, gindex = face.get_first_char()
while ( gindex ):
print( " 0x%04lx => %d" % (charcode, gindex) )
charcode, gindex = face.get_next_char( charcode, gindex )
charcode, gindex = face.get_next_char( charcode )



Expand Down
8 changes: 4 additions & 4 deletions freetype/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ def get_chars( self ):
charcode, agindex = self.get_first_char()
yield charcode, agindex
while agindex != 0:
charcode, agindex = self.get_next_char(charcode, 0)
charcode, agindex = self.get_next_char(charcode)
yield charcode, agindex

def get_first_char( self ):
Expand All @@ -1419,15 +1419,15 @@ def get_first_char( self ):
charcode = FT_Get_First_Char( self._FT_Face, byref(agindex) )
return charcode, agindex.value

def get_next_char( self, charcode, agindex ):
def get_next_char( self, charcode ):
'''
This function is used to return the next character code in the current
charmap of a given face following the value 'charcode', as well as the
corresponding glyph index.

:param charcode: The starting character code.

:param agindex: Glyph index of next character code. 0 if charmap is empty.
:return: next character code, glyph index of next character code or 0 if charmap is empty.

**Note**:

Expand All @@ -1438,7 +1438,7 @@ def get_next_char( self, charcode, agindex ):
Note that 'agindex' is set to 0 when there are no more codes in the
charmap.
'''
agindex = FT_UInt( 0 ) #agindex )
agindex = FT_UInt()
charcode = FT_Get_Next_Char( self._FT_Face, charcode, byref(agindex) )
return charcode, agindex.value

Expand Down
Loading