Temp read failed on Font.fromName

Hi there. I’m trying to loading a FontFace by it’s name (eg. “Mulish”). However, I keep getting a warning, telling me “temp read failed” and that the Font failed to load.

I’ve tried PreloadAsync on an asset containing the FontFace - although, this probably wasn’t my brightest idea… since the font failed to load.

This is the code where I load the font:

local atomicButtonTitle = Instance.new("TextLabel");
atomicButtonTitle.Text = "";
atomicButtonTitle.FontFace = Font.fromName(currentTheme.fontFamily.base, currentTheme.fontWeight.regular);
atomicButtonTitle.TextSize = currentTheme.fontSize.base3;
atomicButtonTitle.AutomaticSize = Enum.AutomaticSize.XY;
atomicButtonTitle.Size = UDim2.new(0, 0, 0, 20);
atomicButtonTitle.LayoutOrder = 2;
atomicButtonTitle.TextXAlignment = Enum.TextXAlignment.Center;
atomicButtonTitle.BackgroundTransparency = 1;
atomicButtonTitle.TextColor3 = Color3.fromHex("#424242");
atomicButtonTitle.Parent = atomicButtonContentContainer;

wherein:

local currentTheme = {
    fontFamily = {
        base = "Mulish";
    },
    fontWeight = {
        regular = Enum.FontWeight.Regular;
    };
};

The specific warning I receive is:
Font family rbxasset://fonts/families/Mulish.json failed to load: Temp read failed.

Any ideas would be appreciated.

Font.fromName refers to built-in fonts provided by Roblox. The error occurs because “Mulish” is not within the list. Officially, there is no way to add custom fonts, but there are workarounds.

You can upload a sprite sheet of your desired font to Roblox and then use the ImageRectOffset and ImageRectSize properties to display each character individually, or you can convert those UI elements into text images using an image editing application, upload them as assets to Roblox, and then display them in your game using ImageLabels or ImageButtons.

This post might explain about the Spritesheet method a lot better.

1 Like

So, why can I can do Font.fromName on Montserrat? That’s not a built-in font iirc.

Nvm - after looking at the Fonts, I see Montserrat was put in place of the old Gotham. Thank you!

There is a way, for custom fonts, you can create a textlabel with that fontfamily, print out it’s fontface, it will give the rbxassetid for the font, you can then change rbxassetid://fonts/families/Mulish.json to it’s id.

2 Likes

i tried this and it gave me a temp read failed warning, however by using the fromId method you can use the fonts id to get the font, you could probably use fromName but i havent tried it

1 Like

That warning usually means Roblox cant actually find the font family your asking for. The name you put into Font.fromName() has to be one of the fonts Roblox ships, and not every Google Font (like Mulish) is included!!

If the engine dosent have it, it falls back and shows the “temp read failed” message!


You can check the full list of supported fonts here: Fonts Reference

  • Font.fromName("Mulish", Enum.FontWeight.Regular) will only work if “Mulish” is one of the internal families! (if it isnt youll always get that warning)
  • If you want a custom font that Roblox dosent provide you need to upload it as a image. Thats the only way to bring in something outside the built-in list!

Unfortunately as i said you cant just drop in “Mulish” by name unless Roblox already supports it!!


Im not sure if Roblox will add this customisation in the future to upload TTF/OTF right now, but if you really want that font now youll need to import it as a custom asset!

Hope this helps!

1 Like