Use of TextMeshPro

illustrate:

TextMeshPro is a third-party plug-in acquired by Unity, which is now automatically built into the editor, and will be automatically imported into the project as long as it is used once.

TextMesh Pro is the ultimate text solution for Unity. It is a perfect replacement for Unity's UI Text and Text Mesh.

Powerful and easy to use, TextMesh Pro uses advanced text rendering techniques, along with a suite of custom shaders; delivering substantial visual quality improvements while giving users incredible flexibility when it comes to text styling and textures.

TextMesh Pro offers improved control over text formatting and layout with features such as character, word, line and paragraph spacing, kerning, justified text, links, 30+ available rich text tags, support for multiple fonts and sprites, custom Style and other features.

Since the geometry created by TextMesh Pro uses the same two triangles per character as Unity's text component, this improved visual quality and flexibility comes at no additional performance cost.

Optimized for desktop and mobile devices, TextMesh Pro brings state-of-the-art text rendering to unity.

Install

Click window/PackageManger in the Unity navigation bar to install the TextMeshPro plugin

Next, open the Font Library Maker plugin

1. Select the font style of the font library

2. Modify the size of the font atlas and adjust it according to the number of fonts

3. Change the options, choose to open font text from file

4. Select the Chinese font library. Note here that the text information should use utf-8 format

5. Finally click generate font

Finally click save to save as LiberationSans SDF.asset

Next use the asset you just created

1. In Hierarchy, right click UI - Text - TextMeshPro, create a text

Set the property MainSettings on the right panel to the LiberationSans SDF.asset you just created

Guess you like

Origin blog.csdn.net/jiuzhouhi/article/details/131209251