Text+|Custom fonts & advanced control

You have to explain what you want.

I already have line-breaking, but per-
haps you’re looking for this type.

I can re-explain what I suggested in a more simple form. This is just to fix a bug for the line-break. So basically what I think how the line-break works is depending on the first character the next word starts (or the next thing that comes after the space), then if that SINGULAR character doesn’t fit in the frame then it line-breaks.

This causes a problem and this could make some long-words past the frame (aka. the border), you should make it instead depend on the “word” instead of a singular character.

An example of a long-word clipping:
“I HEAR MATH THAT BAD” ← the end T at THAT is clipped, it should be
considered a line-break at THAT
image

It seems you think you have found a bug, which in fact does not exist.
Everything works perfectly fine.
Can you share me the place so that I can see what you did wrong?

Something I’ve considered myself before on some packages I made…

Why not just have it at a specific location, if the ModuleScript is being used as a configuration holder of a sort (I haven’t looked at it myself yet still so yeah)? Add some comments to the main thing, instructing users as to where to place it, or you could even have it as an attribute to the package directly as a string. Let’s say the attribute was given a directory “ReplicatedStorage.Modules.Shared.ModuleScriptName” as one of the attribute values, just make the script have a preset of prefixes for the first word found in the script, in this case, “ReplicatedStorage”, that is then used, separating all the dot operators, getting all the strings of the directory. Then use a loop to iterate in order through all the strings in order, running :FindFirstChild() or :WaitForChild() or what you want in order to retrieve each Instance.

I just thought this up on the spot, but yeah.

This might actually come in useful to me later now thinking about it.

(Self Note: come back to this post.)

There’s an issue with that idea.

You see, packages can’t be modified otherwise they won’t be able to auto-update — so you can’t let the user set attributes linking the module.

If you had to put it in the same location as the main module it would be restrictive.
Unfortunately I think there’s no good solution to this.

I’ve noted that. Packages have attributes for a reason. Modifying attributes to Packages created does not cause auto update to cease.

Oh thanks, I’ll note that.
But attributes don’t support instances, so you’d have to use a string which is not very intuitive.

It’s not, but hey, it’s a solution. I myself wish Roblox added ObjectValues as a type of attribute, I might put it in a feature request at some point if someone else hasn’t already. It’s only at play however remember at the start of a server’s initiation, I believe?

Yea it’s a shame and honestly just weird that they haven’t added an instance type for attributes.
Also we can’t post in feature request because you need a special “Trust Level” — they no longer grant the level for some reason.

Annoying Roblox, I’ve gotten used to it being that way. I just posted however in an existing feature request, which I hope people start noticing. Otherwise, yeah it is a shame you cannot get promoted any more. When can I make a feature request on bringing back DevForum promotions? LOL

1 Like

While this does seem like a super good system, I can’t render any of my text properly.

image
image

The first image’s text is “0123456789-”; font is FHWA Series D Minus 50.
The second image’s text is “CLIO AREA SCHOOLS”; font is FHWA Series BC Minus 40.

The code I used to create everything is:

local FM = require(game.Workspace.NewFontModule) 
local frame = Instance.new("Frame"); frame.Parent = game.Players.LocalPlayer.PlayerGui.testing

-- Text & Font Varied
local new = FM.Create( 	
    frame, 	
    "CLIO AREA SCHOOLS", 	
    { 		
        Font = FM.CustomFonts.SeriesBC30,
 		Size = 60,
 		Color = Color3.fromRGB(0, 0, 0)
 	}
 )

Any help would be appreciated!

The module works fine for everybody else, you so have to provide me your exact scenario.
Please share a place file.

TextIssues.rbxl (74.2 KB)
Run the “txt maker 2” script in the console.

I also tried to see if the UIGridLayout was messing things up, but it wasn’t.

I’m getting errors when trying to run your code (unrelated to Text+).

  • The script is not a LocalScript, so it can’t find LocalPlayer.
  • It seems some UI is missing because it can’t find Numbering in the testing ScreenGui.

Can you fix those and provide me the place file again?

Ah, apologies.
This is the proper script, it should be run through the console in playtest.

local FM = require(game.Workspace.NewFontModule)
local frame = Instance.new("Frame"); frame.Parent = game.Players.LocalPlayer.PlayerGui.testing
local new = FM.Create(
	frame,
	"0123456789-",
	{
		Font = FM.CustomFonts.SeriesD,
		Size = 60,
		Color = Color3.fromRGB(0, 0, 0),
	}
)

You’re inputting a - but it’s not apart of your custom fonts, so that’s why you see the question-mark-square-thingy.

As for the other characters, it seems to just be your font data that is incorrect.
I can’t tell you what exactly you did wrong, but try creating the font data again.

It seems like using the .XML version wasn’t accurate, as I imported it this time using .fnt and it works properly.
Thanks for your help!

1 Like

Really, I need to start using this lol. I’ll most likely get to using this once most of the game(s) I’m currently working on are at working stages, before beginning testing with this system that really has potential.

1 Like

Alexander, I know that you won’t probably go for the TextScaled property but your function on getting the text bounds might help, I’m not sure if that would help but maybe it could.