Skip to content

Commit

Permalink
Add font.glyph_to_string to README.md (#178)
Browse files Browse the repository at this point in the history
* Add `font.glyph_to_string` to README.md
  • Loading branch information
roberto-arista authored Nov 17, 2023
1 parent 1a7d36e commit 28ff0cb
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.glyph_to_string(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 28ff0cb

Please sign in to comment.