Sounds like a great idea!
Do note that there’s already a detailed guide on how you use the module, so don’t skip that!
Sounds like a great idea!
Do note that there’s already a detailed guide on how you use the module, so don’t skip that!
Just stumbled upon this resource, and I gotta say — this is looking very promising! I’m mainly excited for the fact that this allows me to use custom fonts for my project.
Roblox’s choice of fonts is…meh. They’re fine as is, but the limitations set in place really grinds my gears. It also doesn’t help the fact that we’ve heard no further confirmations of new fonts being added as of now.
Can’t wait to try this out~
Thanks for this resource.
How did you do the effects and the typewriting effect?, sorry if it’s kinda obvious
edit : actually i see it’s explained, but a showcase place would be cool
Alright. Some immediate thoughts on this resource after giving it a go:
I had to adjust the size of my custom font in the CustomFonts
module so that it would actually be centered inside the frame (XAlignment = Enum.TextXAlignment.Center
and YAlignment = Enum.TextYAlignment.Center
were applied).
I think this may be dependent on the typeface and the settings I used when creating the necessary assets for it, so I’m not sure if this is a universal thing for everyone else. Still, kind of annoying to deal with, but it’s not too major.
Before (Size = 100
)
After (Size = 128
)
--<< Code to display text
textPlus.Create(
text_frame_obj,
"Some text here",
{
Font = Font.new(
"Manrope",
Enum.FontWeight.ExtraBold,
Enum.FontStyle.Normal
),
Size = 50,
Color = Color3.fromRGB(255, 255, 255),
XAlignment = Enum.TextXAlignment.Center,
YAlignment = Enum.TextYAlignment.Center,
}
)
Firstly, it would’ve been nice if there were customization options to include text strokes (outlines on the text), especially on custom fonts. I know it’d be somewhat complicated to implement with custom fonts, so I don’t expect much in this area, but still — it’d be nice to have.
Secondly, I had to create a separate Frame
object to act as the text shadow for the main text: adjusted the positioning and ZIndex
of it to display beneath the main text, then I copied and pasted the code to display the main text for the shadow text with slightly differences. It’d be nice to have all of this extra work consolidated into the same block of code used to display the main text as custom options for shadow text.
These are what’s stood out to me as I was testing this resource. If there’s anything else I discover, I’ll follow through with another reply.
Still, this resource is quite ingenious~ I intend to further test it and see if it’s a good fit for my project.
Thanks for the constructive criticism, this is what I’m looking for!
I think this may be dependent on the typeface and the settings I used when creating the necessary assets for it, so I’m not sure if this is a universal thing for everyone else
I’ve not experienced this. Like you say, it might be to do with your typeface — some typefaces are just “janky”, having really huge line heights etc.
If you’re able to find any further information for this, perhaps a clue that it’s not the typeface, let me know!
Firstly, it would’ve been nice if there were customization options to include text strokes (outlines on the text), especially on custom fonts. I know it’d be somewhat complicated to implement with custom fonts, so I don’t expect much in this area, but still — it’d be nice to have.
I’ll definitely add this for built-in fonts.
As for custom fonts, it will be way more advanced to add strokes. I would have to use EditableImage instances, using a lot of math to draw pixels the right places — likely having to use another open-source module just for drawing the pixels — while technically not impossible, it’s a big task, complicating the module a whole lot more than needed, not at all performant. TLDR: not worth it.
Thanks for the appreciation of this resource! I’ve put a lot of work into it, and positive comments are what keeps me going.
New features:
TextPlus.GetTextBounds()
.Stroke
customization option — uses UIStroke instances — only works for built-in fonts.Changes & improvements:
Shouldn’t this be the complete opposite? Built-in fonts should use the default textstroke option, and custom fonts should use UIstroke?
No? Custom fonts consist of ImageLabels. You can’t add strokes to images as of now in Roblox Studio — you can, but it will simply be the border of the image container, it will not respect any alpha of the actual image.
Oh, well I feel stupid. Why use UIstroke over Textstroke though?
The stroke effect property directly in TextLabels is deprecated — this means its likely slower and won’t get maintained.
While creating UIStroke instances does require creating another instance, I’d say I prefer not using a deprecated feauture.
I didn’t even know this. I looked it up, it seems that the documentation says it isn’t deprecated, UIstrokes just provide a way to use Gradients.
Thanks for pointing this out. I don’t know how I was confident I saw it was deprecated.
I can’t seem to find the property for changing the text stroke size in the TextLabel. Any idea where it is and what it’s called?
Oh. I guess that’s the downside. I always remembered there being an option to adjust the stroke size, strange.
You can search in the properties window, and I’ve had no luck finding it with any keyword like size
, stroke
etc.
Weird, yea, I sure do remember there being a size option too.
I guess, for now, I’ll stick with UIStrokes. Let me know if you find this size control, and I’ll be sure to change it!
Just a few suggestions;
If you haven’t already, you should add a way to utilize the UIStroke to add gradients to the stroke. This should probably happen automatically if StrokeColor is passed in as a number sequence.
Same thing for text color as well.
Ability to merge text so we can use less instances for things like stroke. Sure, this removes some functionality like having a letter fade in effect, but it’s fully up to the developer. Preferrably this can be possible within the string itself using certain tags? It can also easily create other unique effects such as a specific word fading in whole instead of each of the letters separately. (as an example)
If you haven’t already, you should add a way to utilize the UIStroke to add gradients to the stroke. This should probably happen automatically if StrokeColor is passed in as a number sequence.
That’s a great idea, I will include that in the next update.
Ability to merge text so we can use less instances for things like stroke. Sure, this removes some functionality like having a letter fade in effect, but it’s fully up to the developer. Preferrably this can be possible within the string itself using certain tags? It can also easily create other unique effects such as a specific word fading in whole instead of each of the letters separately. (as an example)
Do you realize that you can already achieve all sorts of custom effects? That’s the whole purpose of this plugin. You can sort by characters, word and lines. You can loop through in any way you want. Did I miss anything?
Not really, but I don’t know if it’s the best idea to have a UIStroke for every single character in the string.
Sometimes, a creator may want a whole word to have a basic stroke instead of doing some effect with it, and if that’s the case I don’t know if creating a whole new UIstroke for every character in the word is really the best idea.
Unless UIstrokes under folders apply to every textlabel in it, that’s also an option.
Well they can simply loop through that specific word and apply the stroke like this:
-- Requires to have only word sorting.
for _, character in ipairs(frame["4"]) do -- Will go through 4th word. do
local uiStroke = Instance.new("UIStroke")
uiStroke.Thickness = 6
uiStroke.Color = Color3.fromRGB(255, 255, 255)
uiStroke.Parent = character
end
This module is not supposed to cover all cases with built-in functions. It’s supposed to open up for creativity, while still preserving the intuitive, quick customization properties when creating basic text.
This applies a UIstroke for every character in the word.
I’m suggesting that there should be a way to use a single UIstroke for a full word, but it’s fine if you don’t wanna implement that.
I’m confused. You can’t create a stroke for multiple characters using only one UIStroke instance.
As far as I know, that’s not possible.