by arookas » Tue Nov 23, 2021 11:23 pm
It looks to be improved, but it's unfortunately hard to tell with the filter enabled on the text.
The lengths appear to be correct, but the right-aligned scaled text overlaps the red line by one pixel. There is an offset font and non-offset font in the files, the former having an offset X of -1 on each glyph's texture. In theory, this offset should offset the text rendering over to the right by one pixel (multiplied by the draw scale) and should not affect the width of the glyphs. On the unscaled text, you can see the offset font and non-offset font start on the same column despite this. On the right-aligned scaled text, this is likely the cause of the overlap, but it's strange that the offset isn't scaled with the scale parameter.
Unrelated to this, when making this demo I noticed DI_ITEM_* flags do not actually change where the text renders and it is always anchored on the top-left (as you can see with the yellow squares).
It looks to be improved, but it's unfortunately hard to tell with the filter enabled on the text.
The lengths appear to be correct, but the right-aligned scaled text overlaps the red line by one pixel. There is an offset font and non-offset font in the files, the former having an offset X of -1 on each glyph's texture. In theory, this offset should offset the text rendering over to the right by one pixel (multiplied by the draw scale) and should not affect the width of the glyphs. On the unscaled text, you can see the offset font and non-offset font start on the same column despite this. On the right-aligned scaled text, this is likely the cause of the overlap, but it's strange that the offset isn't scaled with the scale parameter.
Unrelated to this, when making this demo I noticed DI_ITEM_* flags do not actually change where the text renders and it is always anchored on the top-left (as you can see with the yellow squares).