Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stb_truetype: Support vertical layout #1418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Cerallin
Copy link

@Cerallin Cerallin commented Dec 9, 2022

Users may sometimes want to typeset glyphs vertically (especially CJK), and that's what vhea and vmtx are for.

This PR adds 3 functions shown below to support vertical layouts.

STBTT_DEF void stbtt_GetFontHMetrics(const stbtt_fontinfo *info, int *vertTypoAscender, int *vertTypoDescender, int *vertTypoLineGap);
STBTT_DEF void stbtt_GetGlyphVMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceHeight, int *topSideBearing);
STBTT_DEF void stbtt_GetCodepointVMetrics(const stbtt_fontinfo *info, int codepoint, int *advanceHeight, int *topSideBearing);

@Cerallin Cerallin changed the title truetype: Support vertical layout of CJK stb_truetype: Support vertical layout Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants