Package-level declarations
Types
Represents the raw layout result from the native text engine (Rust). Contains positioning and sizing information for a block of text.
Represents the layout information for a single karaoke syllable. This includes the text layout from the native engine, as well as animation metadata.
Functions
Calculates line wrapping for syllables using a balanced (minimum raggedness) algorithm (Knuth-Plass inspired dynamic programming approach).
Calculates the final static layout positions for all syllables in the wrapped lines. Handles alignment (Left/Right/RTL), row positioning, and relative offsets within the line.
Draws a multi-row lyrics line into the canvas. Handles row wrapping, padding, and applying the karaoke progress gradient.
Get font bytes from FontFamily on Android. Supports:
Get font bytes from a FontFamily using platform-specific mechanisms.
Get font bytes from FontFamily on JVM/Desktop. Supports:
Get platform-specific context for font loading. Returns Context on Android, null on other platforms.
Get system fallback font files for missing glyphs. Returns fonts in priority order. Cached globally to avoid repeated IO and parsing.
Get system fallback font bytes for text that cannot be rendered with the primary font. Returns a system font that supports a wide range of characters (e.g., CJK).
Get system fallback fonts for missing glyphs on JVM/Desktop. Returns fonts in priority order, prioritizing CJK and wide Unicode coverage.
Get system fallback font files by parsing Android font configuration XML. This parses font_fallback.xml (modern) or fonts.xml (legacy) for reliable discovery. Much more reliable than SystemFonts API, especially for OEM systems (MIUI, etc).
Displays breathing dots animation during instrumental intros or interludes. The dots breathe/pulse and fade in/out to indicate progress during non-lyrical sections.
Renders a single karaoke line, capable of handling multi-row wrapping.
A comprehensive lyrics view that supports Karaoke and Synced lyrics with advanced rendering.
A container for a single line of lyrics, handling common interactions and animations. Features:
Measures all syllables in a line using the native text engine and determines appropriate animation strategies (simple fade/slide vs. complex bounce/swell).
Read font bytes from a Compose Multiplatform FontResource. Uses the public LocalResourceReader API.
Displays a simple lyrics line that is synced to a specific time but has no internal arithmetic/karaoke animation. Typically used for non-karaoke synced lyrics (LRC format).