The FreeType Project - Bugs: bug #56404, 32bit build renders glyph with...
You are not allowed to post comments on this tracker with your current authentication level.
bug #56404: 32bit build renders glyph with coordinate overflow after varfont precision increase commit
Submitter: | Dominik Röttsches <drott> | ||
Submitted: | Tue 28 May 2019 11:02:25 AM UTC | ||
Severity: | 3 - Normal | Item Group: | None |
Status: | Fixed | Privacy: | Public |
Assigned to: | wl | Open/Closed: | Closed |
Planned Release: | 2.10.1 |
Jump to the original submission
Wed 29 May 2019 06:18:42 AM UTC, comment #6: |
Werner LEMBERG <wl> |
Wed 29 May 2019 04:41:13 AM UTC, comment #5: Now that I think about it, it's probably better for both FT_fixedToInt and FT_fixedToFdot6 to use signed (arithmetic) shifts since they're both right shifts and shouldn't run into the warning problems of signed left shifts. |
bungeman <bungeman> |
Tue 28 May 2019 09:02:49 PM UTC, comment #4: I was wondering why this wasn't happening in 64 bit builds, as the same logic should apply -- the resulting FT_Pos 'unrounded' should be missing some high sign bits and look like a (very) large positive number. I think what is happening is that due to FT_MULFIX_ASSEMBLER being set, FT_MulFix is casting its (FT_Long) parameter values to FT_Int32, which makes things work (there are enough sign bits still around that this truncation makes things work out). Awkwardly, if FT_MULFIX_ASSEMBLER isn't set on an architecture where long is 64 bit, there will currently be an issue similar to the one reported here, but the points will be really far off in space, since the portable code does not cast to FT_Int32. |
bungeman <bungeman> |
Tue 28 May 2019 08:38:19 PM UTC, comment #3: I looks like I managed to upload the wrong signed_shift.patch, note that the change to FT_fixedToInt isn't needed (as explained before). It's just FT_fixedToFdot6 that needs tweaking here. |
bungeman <bungeman> |
Tue 28 May 2019 08:23:32 PM UTC, comment #2: It turns out the issue is with the unsigned shifts on signed values.
|
bungeman <bungeman> |
Tue 28 May 2019 12:54:31 PM UTC, comment #1: An alternative is to apply deltas to scaled paths. |
Alexei Podtelezhnikov <podtelez> |
Tue 28 May 2019 11:02:25 AM UTC, original submission:
Steps to reproduce:
|
Dominik Röttsches <drott> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2019-05-29 | wl | Status | None | Fixed | |
Assigned to | None | wl | |||
Open/Closed | Open | Closed | |||
Planned Release | None | 2.10.1 | |||
2019-05-28 | bungeman | Attached File | - | Added signed_shift.patch, #46994 | |
2019-05-28 | drott | Carbon-Copy | - | Added -email is unavailable- | |
2019-05-28 | drott | Attached File | - | Added variabletest_matching.ttf, #46988 | |
Attached File | - | Added overflow_variable_matching_actual.png, #46989 | |||
Attached File | - | Added overflow_variable_matching_expected.png, #46990 |
Powered by Savane 3.13-4448.
Corresponding source code
Thanks a lot, Dominik and Ben, for the analysis and the fix! I've now removed the cast to unsigned completely.