Ngui research-a bit boring text and text Mixing

Source: Internet
Author: User

Zookeeper

I recently studied ngui's text-and-text hybrid sorting tool and concluded that it is a bit difficult .. Let's take a look at my test procedure. I use the current ngui version 3.6.6.

When I am on open bitmapfont marker, the words assets/ngui/Editor/FreeType. dylib is missing appear on the interface. So I checked it, which probably means thatCopy FreeType. dylib/Usr/local/lib/FreeType. dylib path. The FreeType. dylib file is under the ngui/Editor directory. If you want to increase the speed of opening the interface, you can see why ngui research is too slow to open the interface.

First open the finder, and then enter/usr/in the input box to open the folder, as shown in command + Shift + G.

Next, copy the FreeType. dylib file, as shown in. If your computer does not have the local/lib folder, you can manually create one.

 

Right-click the project view and choose ngui> openbitmap font maker, as shown in figure. The font maker interface is displayed in unity, and then click the Source button, on the select a Font page on the right, select a font in your project.

There are four options on the font maker interface: Numeric ASCII Latin custom. I hope it can have another dynamic option .. Here we select Custom custom. As shown in, characters in the characters window are pre-packaged Texture Materials. Under the output Atlas select the Atlas atlas that you need to mix text and text. Click creat the font.

Next, we need to set the atals of the image in the text-and-image hybrid arrangement, as shown in. On the uifont, select an gallery and give it a name, here I have a Momo and RORO sub-names, that is, when the Momo and RORO strings appear in the text, they will be automatically replaced with images.

As shown in, we have completed the text-to-text mixing.

But you should never be too happy. I don't think ngui is suitable for Chinese projects. Why?

1. dynamic TTF text mixing is not supported. All text involved in the text mixing must be placed on a bitmap. This cannot be received in Chinese versions, because we must use TTF dynamic text.

2. There is a problem with ngui image-text mixing height calculation. Have you seen it? If the size of the two images involved in the text-to-text layout is different, the height will be calculated incorrectly if the text is wrapped in a line break ..

3. For example, if you want to set the first text to red, followed by an image, and followed by a green text, then it cannot be done ..

4. Adjust the horizontal and vertical distance between texts.

I thought about whether to mix ngui text or text.

Ngui research-a bit boring text and text Mixing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.