measureSyllablesAndDetermineAnimation

fun measureSyllablesAndDetermineAnimation(syllables: List<ERROR CLASS: Symbol not found for KaraokeSyllable>, textMeasurer: ERROR CLASS: Symbol not found for TextMeasurer, style: ERROR CLASS: Symbol not found for TextStyle, isAccompanimentLine: Boolean, spaceWidth: Float, fontFamilyResolver: ERROR CLASS: Symbol not found for FontFamily.Resolver, density: ERROR CLASS: Symbol not found for Density, nativeEngine: NativeTextEngine, platformContext: Any? = null): List<SyllableLayout>

Measures all syllables in a line using the native text engine and determines appropriate animation strategies (simple fade/slide vs. complex bounce/swell).

It calculates:

  • Text layout for each syllable

  • Whether "Awesome" (complex) animation should be used based on duration and language.

  • Animation timing constraints.

Return

List of SyllableLayout with measurement and animation data.

Parameters

syllables

List of syllables to measure.

textMeasurer

Helper for measuring constraint spaces (space char).

style

Text style to use.

isAccompanimentLine

Whether this is a backing vocal line.

spaceWidth

Pre-measured width of a space character.

fontFamilyResolver

Resolver for fonts.

density

Screen density.

nativeEngine

The native text engine for layout.

platformContext

Platform context for font loading.