-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
not 100% on this but when I attempted to use AddTextPrinterParameterized4
to shift letter spacing I found it didn't work it seemed the field was never used?
printer.letterSpacing = letterSpacing;
it gets passed to that field and then goes to AddTextPrinter function
within the function letter spacing isn't used instead minLetterSpacing is used
sTempTextPrinter.minLetterSpacing = 0;
which gets defaulted to zero.
No matter what value I set letterspacing to in AddTextPrinterParameterized4
it had no effect but changing minLetterSpacing did.
So my fix was assigning letter spacing to the field
sTempTextPrinter.minLetterSpacing = sTempTextPrinter.printerTemplate.letterSpacing;
I was working in fire red when I found this, but then saw it was the same in both emerald
and emerald expansion.
idk if this is the best fix or not, but its what worked for me and it seem right
as the RenderText function has a condition based on the value of minLetterSpacing
but by default the field is always 0.
if (textPrinter->minLetterSpacing)
{
textPrinter->printerTemplate.currentX += gGlyphInfo.width;
width = textPrinter->minLetterSpacing - gGlyphInfo.width;
if (width > 0)
{
ClearTextSpanDebug(textPrinter, width);
textPrinter->printerTemplate.currentX += width;
}
}