Custom Fonts Module [CFM]

You’d have to find another way to update the text, so you use methods that the server can also use

1 Like

Before I start this, is there the ability to actively change the font by controlling it from a screengui?

to change the font mid writing or after?

After it’s completely finished with the text generation, can you change it again to something else and get rid of the old text?

Yea but if im not mistaken, you will have to edit some of the code to check what font u want it to use next time

I plan to use the same font and it’s just basically changing the text and what it says only. that’s my goal and by what youre saying I assume it’d be possible?

oh yea it can be used as a dialogue system too!

Great module, however I happen to have a lot of issues with it…

  1. Sizing/positioning the text properly is a headache

I honestly don’t know what the “virtual resolution” part of the module is about… It seems so backwards to me. For the text to appear as intended for me I have to create a frame which is sized 1:1 to the virtual resolution, and if I wanted to use this in an actual UI, I’d have to deal with trying to fit this thing in. And it’s kind of weird that the only options for where text expands is either from the left or from the center, when a normal TextLabel gives you the full range of options via its TextLabel.TextXAlignment and TextLabel.TextYAlignment properties.

Positioning and sizing a normal TextLabel is relatively simple, but I really have to break my brain if I want to do it with this.

  1. The kerning on the letters is absolutely terrible, not sure where this originates from

Now, I don’t really know for sure whether it’s an issue on my part, like if something went wrong on the BMFont export stage, the plugin to modulescript conversion stage, or an issue with CFM’s text displaying capabilities itself. But the moment I displayed my first piece of text the letter were, like, all over the place… Some letters go in to the left far more than they need to, some have way too much space after them, and the Q wasn’t even sitting on the baseline.

Again, not sure if it was something to do with my BMFont export settings. It would be nice to check. But in any case when I use the font normally in an image editor the kerning is perfectly fine, but not when doing the process stated in the tutorial. Would like some advice for this.

  1. Modifying the text is glitchy

It’s all fine when new characters are being added onto the text, but when characters are removed from the text, there’s a weird flicker for about 1 or 2 frames before the text is repositioned. Weird.

  1. Limited functionality.

Comparing this module to a TextLabel, there is A LOT left to be desired. Rich text functionality, TextScaled, AutomaticSize, Text color, MaxVisibleGraphemes, text transparency, TextTruncate, so much more… All of these do not seem to be possible at the moment without forking the module. Which, I will say is not that big of a deal, but that’s still a lot of functionality that would come in handy in a lot of situations… I’m still most bummed about the sizing.

  1. [Edit:] New-lines

Inserting new lines (\n) into the text seems to break the module entirely. Along with trying to display any other symbol not in the character set.

Overall, sorry if this was harsh criticism, but I do believe if these issues are addressed I would be using this module in a lot of my games. Thanks for making this resource, as always. Take care!

3 Likes

Thank you for this post. This module was never really intended to become a Public Module, as it was made just for our project (and it was used as a dialogue system). So we didn’t really add features we didn’t need.

The module can definitely be rewritten/remade. We could probably make the features you requested and fix the ones you specified but it would definitely take time.

This defines the virtual resolution of the text screen. All text will scale relative to this resolution.
! This is NOT affected by the user’s screen size, as this is a virtual resolution
! The text canvas will scale fit with the user’s screen size.
This is only for defining a easy boundary for text positioning and scaling.

If you wanna position the text in custom position you can just do
{EB362053-43E9-4780-A047-88F7B9F6A6B5}

1 Like

Alright, thanks. I might end up writing my own font rendering module which is more general-purpose and addresses the issues I stated.

2 Likes

Planning to release it? So i could use some of the features in mine and make it better.

Looking out for it!

3 Likes

I am having difficulty.
I am trying to render Toki Pona via a custom font, but I cant seem to render characters such as 60928, which would be Toki Pona “a”.

Is this post exporting the bitmap? does it not work ingame?

i had to make it so I manually entered in the hex codes for each character, your API does NOT simply pass through characters that arn’t part of the Unicode module.