Of course you can, as long as you follow the format.
The thing is, I’m not sure why you’d ever want to do that manually.
Alright, by the way when I looked forward into the ScaleSize property, it probably was the most useful thing in the module! I’m glad you put a small guide on how to use that property.
Also the module works nicely on SurfaceGuis which is good, hopefully you can add the TextScaled property soon.
My example on a SurfaceGui (perfect):
It’s very complicated, so it might not be worth adding to the module. It would be a lot of work just to make the code way less readable.
I believe ScaleSize
can make up for it, even though it’s not the same thing.
Yeah, I can totally agree that it’s super complicated. It’s probably going to make it a little less optimized which we dont want here in this module.
I’m having some wacky issues with how the text is being rendered for my health bar UI.
- The yellow area represents the entire size of the frame that’s housing the health bar, the player’s display name, and the player’s health in numbers (rendered in a custom font).
- The red area represents where I want the custom rendered text to be positioned relative to the health bar — the far right of that red area. I’ve even specified that I want to use that exact frame object to parent the rendered text to.
As one can clearly see, the rendered text isn’t even near where I want it to be. I think the ancestor frame (the yellow area) is influencing its positioning to an undesirable degree. I’ve even set the XAlignment
and YAlignment
custom properties to Right
and Center
respectively, but I might as well treat them as if they weren’t specified to begin with.
Is there any way you can fix this?
can tweenservice be used on this? i want to animate my custom font text but tbh i’m stuck.
Is it possible for you to send me a place file?
That way I can try to reproduce the issue.
Yes, TweenService can of course be used with this.
One of the main points of this is the ability to animate individual characters.
Refer to the Fine-control
section of the tutorial to learn more.
I have the same problem too, when I resize my screen smaller it becomes more obvious that the text isn’t positioned correctly.
My example is that mine’s meant to be in the center although it’s more down than center:
I figured out his problem, but yours might not be the same. Are you using a UIGridLayout
?
Nope I am not, It’s probably depending on the text itself. I am not sure how this would happen though.
If you want to have my place then I can send it to you.
If you send me your place file, I’ll figure it out.
I’ll simplify it so it’s more focused on the issue, I’ll send it to you in about 10-15 minutes.
Alright I sent it to you Alexander.
Version 1.9.0
New features:
- Added
Pixelated
customization option for custom fonts. - Added
ShadowTransparency
customization option. - Added
StrokeTransparency
customization option.
Changes & fixes:
-
ScaleSize
now supports SurfaceGuis. - Absolute size calculation now takes into account
UIGridLayout
instances, fixing unwanted misalignments. - The
GetCharacters
function now returns an iterator instead of a table, which is way more optimized. - Strokes now default to main text transparency.
- Now has a ‘missing’ character, that is used when a character is not found in the custom font.
-
ScaleSize
now takesSize
as a percentage instead of a decimal fraction, which nicely keepsSize
in about the same range for both types of sizing (scale-size and pixel-size). - Removed maximum for
LineHeight
andCharacterSpacing
, because there’s really no reason to limit it even though TextLabels do. - Removed
100
size maximum for custom fonts, because it is only intended for Roblox fonts. - Removed
0.001
size minimum for scale-sizing, because there’s a minimum of1
after calculation. - Avoided indexing
ShadowColor
when the features isn’t enabled. - Avoided indexing
StrokeColor
when using custom fonts. - Changed structure for minimum size logic, getting rid of an if statement.
- Comment changes and additions.
- Minor spacing changes.
i’m back again
i’m loving this module so much, you should definitely make an example place for these showcases tho:
u did a great job!
Great updates!
I’m still getting the same exact issue I described to you earlier. I imported the updated code, implemented shadow transparency options on the text, and play tested. The issue persists.
Edit 1: Changing the XAlignment
and YAlignment
properties aren’t fixing it, either. If anything, the former doesn’t work at all, and the latter…I’m not entirely sure how to describe what’s happening with that.
Edit 2: I changed the frame that renders the text to have its size in the X direction to be 0 for both scale and offset. That sorta fixed it, but that isn’t how I’d want to go about it.
How did you alter the code on your end to fix it?
Hi there.
I see that in your case it still doesn’t work as intended.
Thankfully, I figured out the issue.
I will let you know when it is fixed.
Honestly I’m absolutely impressed with this resource. I’ll be trying it out at some point!
Brilliant job!