| Summary: | Using SDL_ttf Outline, TTF_GlyphMetrics won't report updated values | ||
|---|---|---|---|
| Product: | SDL_ttf | Reporter: | Sylvain <sylvain.becker> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
patch
test case |
||
|
Description
Sylvain
2018-10-29 20:04:42 UTC
Created attachment 3413 [details]
patch
Here's a patch.
In fact, the outline feature is spread in several function only to get rendering working.
It's easier to group that.
Parameters that are glyph related can be updated in Load_Glyph(CACHE_METRIC).
Parameters that are font related cannot be updated in openfont(), because the outline has not been set yet. That part needs to be put in a separate function so that a refresh is possible. It's the purpose of TTF_initFontMetrics().
Created attachment 3414 [details]
test case
Here's a test-case that set outlines and try all styles and rendering, and pattern.
the patch still have the same output (pixel perfect).
except for the width that may be different by a few pixels (not cropped!).
This patch is in, thanks! https://hg.libsdl.org/SDL_ttf/rev/ff81ac6d76c4 |