More Details on Text Display
Utage provides a variety of functionality for displaying text for novels.
About Line Feeds
You can add line feeds in Excel cells by entering “Alt+Enter”. You can also input \n to add a line feed. Line feeds can also be used together with text tags as mentioned later on.
Automatic Line Feeds and Japanese Line Breaking
Utage can add line feeds automatically based on the size of the message window. When adding line feeds automatically, it performs Japanese line breaking.
Japanese line breaking refers to rules that prevent it from adding line feeds where a separation would be inappropriate.
It adds line feeds ensuring that commas and full stops are not placed at the beginning of a line, and that opening quotes and brackets are not placed at the end of the line.
In addition, it also performs word wrapping so that a line feed is not inserted half way through an English word.
For more details on the concept of Japanese line breaking, please click here (Utage does not necessarily apply all the rules described in this link).
You can use TextSettings to configure more detailed settings on the prohibited characters for Japanese line breaking.
Special Characters to be Ignored
There is a setting for ignoring the blank spaces between characters when the same character is displayed consecutively like in “……”
The characters to be ignored can also be configured in TextSettings.
UguiNovelText and UguiNovelTextGenerator
Utage provides functionality for text display for novels. To implement this, you can use the UguiNovelText component, which is an expansion of Unity’s standard Text component, in order to display message windows, etc.
The configurable data items in UguiNovelText are the same as in Unity’s standard Text component. Utage’s own settings can be changed from the UguiNovelTextGenerator.
|Space||If the space size is -1, it uses the size configured in the font file|
|Letter Space Size||Size between characters|
|Word Wrap||Method of inserting automatic line feeds|
|Length Of View||Number of characters to be displayed. Set it to -1 to draw the whole text. It is primarily used for character spacing so most of the time it is changed automatically.|
|Text Settings||Detailed text settings for prohibited characters for Japanese line breaking, etc.|
|Ruby Size Scale||Magnification setting that specifies the size of ruby characters when compared to normal characters. Normally set to 0.5.|
|Sup or Sub Size Scale||Magnification setting that specifies the size of characters with superscript or subscript tags, when compared to normal characters. Normally set to 0.5|
|Emoji Data||Emoji data|
Settings for “Japanese line breaking” and “Characters that do not leave spaces” can be configured in a TextSettings object, which is configured in the UguiNovelTextGenerator component.
Rather than changing the settings in each object’s inspector, you can configure a ScriptableObject so that it can be used as a common setting across the whole project.
|Word Wrap Separator||Separator characters for English words other than the space|
|KinsokuTop||Characters prohibited from being placed at the beginning of a line when inserting automatic line feeds|
|KinsokuEnd||Characters prohibited from being placed at the end of a line when inserting automatic line feeds|
|Ignore Letter Space||Characters where spaces between similar ones should be ignored (primarily used for characters such as “……”)|
|Auto Indentation||Automatic indentation. If this character is found at the beginning of the line, the second line onward is automatically indented by the width of that character.|
Auto Indentation example:
How to Create a TextSettings Object
A TextSettings object needs to be created manually for projects made using Utage 2.11 or earlier.
On the other hand, the object is created automatically when the project is created using version 2.12 or later. However, if you want to configure multiple text display methods, you can do this by creating the objects manually.
Create a TextSettings object by going to Create Project View > Create > Utage > TextSettings.