Skip to content

Commit

Permalink
[font_parser] Add explanation for glyph char limit
Browse files Browse the repository at this point in the history
  • Loading branch information
moi15moi committed Oct 8, 2023
1 parent 7f83c49 commit 5f2a9e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion font_collector/font_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,9 @@ def get_symbol_cmap_encoding(face: FT_Face) -> Optional[str]:
When Libass will add the logic with the track language, this method will be deprecated.
"""
font_glyph_names: Set[str] = set()
# This is a limit set by adobe: http://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#2fi-glyph-name
buffer_max = 64
for i in range(face.contents.num_glyphs):
buffer_max = 64
buffer = create_string_buffer(buffer_max)
error = FT_Get_Glyph_Name(face, c_uint(i), byref(buffer), c_uint(buffer_max))

Expand Down

0 comments on commit 5f2a9e0

Please sign in to comment.