Text+
DevForum Topic
  • Welcome
  • Installation
  • Fundamentals
    • Introduction
    • Line breaks
    • Customization
      • Fonts
      • Scale-size
        • Minimum- and maximum-size
      • Truncation
      • Dynamic
      • Custom defaults
    • Modification
    • Text bounds
    • Signals
      • Update
  • Fine-control
    • Introduction
    • Full iteration
  • Specific access
  • Transform and style
  • Custom fonts
    • Introduction
    • Data module
    • Font to XML
    • XML to Lua
    • Upload font image
    • Import font data
Powered by GitBook
On this page
  1. Fundamentals
  2. Customization

Custom defaults

PreviousDynamicNextModification

Last updated 2 days ago

You can actually replace the default defaults with your own defaults of choice.

Simply create a new module and name it whatever you want — TextDefaults is recommended. It's crucial that you give it the TextDefaults, so that Text+ can identify it.

The module has to return a table, like this:

return {
	
}

It's crucial that you include all customization options in the defaults list.

Here's the default defaults:

return {
	Font = Font.new("rbxasset://fonts/families/SourceSansPro.json"),
	
	Size = 14,
	
	ScaleSize = nil,
	MinimumSize = nil,
	MaximumSize = nil,
	
	Color = Color3.fromRGB(0, 0, 0),
	Transparency = 0,
	
	Offset = Vector2.zero,
	Rotation = 0,
	
	StrokeSize = 5,
	StrokeColor = Color3.fromRGB(0, 0, 0),
	
	ShadowOffset = Vector2.new(0, 20),
	ShadowColor = Color3.fromRGB(50, 50, 50),
	
	LineHeight = 1,
	CharacterSpacing = 1,
	
	Truncate = false,
	
	XAlignment = "Left",
	YAlignment = "Top",
	
	WordSorting = false,
	LineSorting = false,
	
	Dynamic = false
}
tag