Skip to content

Commit

Permalink
Add font.get_glyph_name to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-arista committed Nov 17, 2023
1 parent 1a7d36e commit cb9f192
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ positions = buf.glyph_positions

for info, pos in zip(infos, positions):
gid = info.codepoint
glyph_name = font.get_glyph_name(gid)
cluster = info.cluster
x_advance = pos.x_advance
x_offset = pos.x_offset
y_offset = pos.y_offset
print(f"gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}")
print(f"{glyph_name} gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}")
```


Expand Down

0 comments on commit cb9f192

Please sign in to comment.