ItalicText
A component that applies italic-style skewing to Text visuals.
This component simulates italic text by applying a horizontal skew transform to each glyph quad in a Text visual. This is useful when true italic fonts are not available or when a consistent italic angle is desired across different fonts.
Features
- Applies uniform skew to all glyphs
- Automatically updates when text content changes
- Configurable skew angle
Usage Example
var text = new Text();
text.content = "Hello World";
text.component(new ItalicText());
// Adjust italic angle (default is 10 degrees)
var italic = text.component<ItalicText>();
italic.skewX = 15; // More pronounced italic
Instance Members
The Text entity this component is attached to. Automatically set when the component is bound.
The horizontal skew angle in degrees to apply to each glyph. Positive values skew to the right (standard italic). Default is 10 degrees.
Private Members
Called when this component is bound to a Text entity. Sets up listeners to apply italic transform when glyphs change.
Applies the italic skew transform to all glyph quads in the text. Called automatically when text content or skewX changes.
Name | Type |
---|---|
entity |
ceramic.Entity |
Returns |
---|
ceramic.Entity |
Metadata
Name | Parameters |
---|---|
:build |
ceramic.macros.ComponentMacro.build() |
:autoBuild |
ceramic.macros.ComponentMacro.build() |
:build |
ceramic.macros.EntityMacro.buildForCompletion() |
:autoBuild |
ceramic.macros.EntityMacro.buildForCompletion() |
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |