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

Summary: When rendering in BOLD, the surface created is a little too big.
Product: SDL_ttf Reporter: Sylvain <sylvain.becker>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86_64   
OS: Linux   
Attachments: test case
patch

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