Text Layer Description
Text Editor
At the level of animation design, PAG mainly exists as an animation template. After designers have created the animation in AE, they can export the PAG files. Developers can dynamically edit the text or replace the placeholder images during use. If a function similar to a text editor is required, as PAG aligns with AE, it is recommended to use text components on each platform for implementation.
Language Adaptation
At the level of language adaptation, PAG only supports languages that are typesetting from left to right. For languages that are arranged from right to left, such as Arabic, PAG currently does not support it. A compromise is to display the typesetting of text through system controls, take a screenshot of the text display content, and use it in the PAG by filling placeholder images.
Text Font Display:
Font files are not included in the PAG file because of their large size, but the display of text content depends on font files.
If a specific font needs to be displayed, regardless of which platform, font registration is required. Please refer to the relevant methods of PAGFont for related interfaces of font registration. The RegisterFont method is used to register fonts, and SetFallbackFontPaths is used to set the font fallback list. When the font of the input text cannot be matched, the font in the fallback list will be used.
On Android, iOS, macOS and Windows platforms, we have internally registered some system fonts as fallback fonts. So even if there are no registered fonts, text fonts that do not match can still be fallback to some system fonts. However, there is no logic to register the default font as a fallback font on the Linux platform, so the text cannot be displayed normally without registering a font.
Since the desktop preview tool PAGViewer does not provide the function of injecting external fonts, the display effect may not be consistent with that in AE if the font in the PAG file is set with a special font. However, this does not affect the use of the terminal. The terminal can achieve the same effect as in AE by injecting fonts.