Correct way to parse and draw glyph data #47
Unanswered
prashant-saxena
asked this question in
Q&A
Replies: 2 comments 6 replies
-
Possibly as const Glyph &glyph = font->gdata[*text-32];
float x0 = xpos + glyph.pleft * 20; // since you multiply advance by 20
float y0 = ypos + glyph.ptop * 20;
float x1 = xpos + glyph.pright * 20;
float y1 = ypos + glyph.pbottom * 20; |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have exported the font data(CSV format) and texture into external files and using the code below to build vertex buffers but was not able to calculate offset_x and offset_y. Here is the code, please let me know if anyone finds any other mistake in the code.
Beta Was this translation helpful? Give feedback.
All reactions