harfbuzzjs
    Preparing search index...

    Function shapeWithTrace

    • Shape a buffer with a given font, returning a JSON trace of the shaping process.

      This function supports "partial shaping", where the shaping process is terminated after a given lookup ID is reached.

      Parameters

      • font: Font

        The Font to shape with.

      • buffer: Buffer

        The Buffer containing text to shape, suitably prepared.

      • features: string

        A string of comma-separated OpenType features to apply.

      • stop_at: number

        A lookup ID at which to terminate shaping.

      • stop_phase: TracePhase

        The TracePhase at which to stop shaping.

      Returns TraceEntry[]

      An array of trace entries, each with a message, serialized glyphs, and phase info.