Fundamentals 7 min read

Understanding Glyph Metrics and Text Layout in the Y‑tech Cangjie Engine

This article explains the core concepts of glyph metrics, horizontal and vertical text layout, kerning, line breaking, and alignment techniques used by the Y‑tech Cangjie engine to provide rich text effects for video editing applications.

Kuaishou Tech
Kuaishou Tech
Kuaishou Tech
Understanding Glyph Metrics and Text Layout in the Y‑tech Cangjie Engine

The Y‑tech Cangjie engine supplies a variety of text‑effect services for Kuaishou products, enabling creators to add static and dynamic text animations to videos.

It combines graphic‑image processing technology with text rendering, offering rich visual effects that enhance video editing workflows.

Key glyph metrics are introduced, including Baseline, Ascent, Descent, Left‑side bearing, Right‑side bearing, and Advance Width, which together define how characters are transformed from code points to visual shapes.

In horizontal layout, glyphs sit on the Baseline and are positioned using Origin points; the distance between adjacent Origins is the advance width. In vertical layout, the Origin is centered at the top of the glyph while still aligning to the Baseline.

Kerning (letter‑spacing) adjusts the space between glyphs beyond the default advance width, allowing fine‑tuned visual spacing.

Three line‑breaking methods are described: manual line‑break characters, automatic wrapping when text exceeds a predefined width (horizontal), and automatic wrapping when text exceeds a predefined height (vertical).

Text alignment is categorized into left, center, and right alignment, each aligning the text block relative to the display area, and visual examples illustrate the impact of these alignment choices.

The article concludes by noting that this text layout foundation is the second step of the Cangjie engine’s rendering pipeline, with future work planned on animation and special effects for creators.

RenderingalignmentTypographyglyph metricsText LayoutY‑tech
Kuaishou Tech
Written by

Kuaishou Tech

Official Kuaishou tech account, providing real-time updates on the latest Kuaishou technology practices.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.