Typewriter issue, character spacing isn't correct

Hello, I’ve been working on a typewriter today and encountered an issue that I have no idea on how to fix.
Each letter is its own TextLabel as I want to have control over them separately.

The issue is that the letters somehow take up more than they should, you can see that in the image below gaps are made. Keep in mind that the actual TextLabels have no gaps between them, this is the letters having weird empty space in them.
image
The example above uses AutomaticSize, at first I was gonna use GetTextSize() but it resulted in the same thing happenning.

‘advanceOffset’ is the amount of pixels the TextLabel should be offset by (X axis).
(I also tried it with TextSize.X but it resulted in the same issue as before)

self._characterLabel = createTextLabel(self._currentCharacter, self.TextProperties)
self._characterLabel.Position = UDim2.fromOffset(self._advanceOffset, self._lineOffset)
self._characterLabel.Parent = self.Frame

self._advanceOffset += self._characterLabel.TextBounds.X

Every character is taken from a ‘characterTable’ which is the text split by each character.

self._characterTable = self.Text:split("")

Thanks in advance!

2 Likes

It seems like the weird character spacing is only happening to certain characters ("," “i” “e” “y”) maybe for these characters you could alter the offset amount? Sorry I’m not really good at scripting but this is something you can try if you want