Skip to content

sample single_glyph problem for j #248

@joyhope

Description

@joyhope

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions