We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4337 - When rendering in BOLD, the surface created is a little too big.
Summary: When rendering in BOLD, the surface created is a little too big.
Status: RESOLVED FIXED
Alias: None
Product: SDL_ttf
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-28 17:24 UTC by Sylvain
Modified: 2018-10-28 21:35 UTC (History)
0 users

See Also:


Attachments
test case (4.52 KB, text/x-csrc)
2018-10-28 17:30 UTC, Sylvain
Details
patch (2.04 KB, patch)
2018-10-28 17:31 UTC, Sylvain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain 2018-10-28 17:24:45 UTC
When rendering in BOLD, computation of the size gives a surface a little too big (one more "overhang" is added to the width). 
Also the code recompute the glyph->advance and glyph->maxx each time. When it should be computed when the glyph is cached.
Comment 1 Sylvain 2018-10-28 17:30:36 UTC
Created attachment 3404 [details]
test case

test case
enable/disable BOLD to see the correct size.
use the patch & BOLD to see the fix
Comment 2 Sylvain 2018-10-28 17:31:58 UTC
Created attachment 3405 [details]
patch
Comment 3 Sam Lantinga 2018-10-28 21:35:00 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL_ttf/rev/2a7e89771fd0