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.
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!