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

sample single_glyph problem for j #248

Open
joyhope opened this issue May 4, 2022 · 0 comments
Open

sample single_glyph problem for j #248

joyhope opened this issue May 4, 2022 · 0 comments

Comments

@joyhope
Copy link

joyhope commented May 4, 2022

run command
cargo run --example single_glyph examples/assets/FiraSans-Regular.ttf j

The problem meets.

bitmap_left() is possible <0

let x = if glyph.bitmap_left() > 0 {glyph.bitmap_left() as usize } else {(-glyph.bitmap_left()) as usize};

j is a little special case. But I did not know how to make the sample better for get correct gylyph height and width. It seems bitmap_xxx api is not get the outline of the character. bbox may be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant