panic and other errors when rendering with a pcf font
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 840
- Forks
- 137
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 1
Description
I tried the render-glyph example with some artwiz fonts with the following code:
//.select_by_postscript_name(&postscript_name)
.select_best_match(&[font_kit::family_name::FamilyName::Title("artwiz drift".to_owned())], &font_kit::properties::Properties::new())
.unwrap()
it gave me this error:
thread 'main' panicked at 'attempt to negate with overflow', src/loaders/freetype.rs:805:20
I tried to do
y: -(vector.y() as i64)
but then I got
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `23`,
right: `0`', src/loaders/freetype.rs:815:13
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the render-glyph example and the artwiz font selection shown in the issue, then inspect src/loaders/freetype.rs around lines 805 and 815. Reproduce the PCF-font failure and trace the overflow and assertion; the work is done when the example renders the font without either panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100