Interface RunHandler

    • Method Detail

      • beginLine

        void beginLine()
        Called when beginning a line.
      • runInfo

        void runInfo​(RunInfo info)
        Called once for each run in a line. Can compute baselines and offsets.
      • runOffset

        io.github.humbleui.types.Point runOffset​(RunInfo info)
        Called for each run in a line after commitRunInfo().
        Returns:
        an offset to add to every position
      • commitRun

        void commitRun​(RunInfo info,
                       short[] glyphs,
                       io.github.humbleui.types.Point[] positions,
                       int[] clusters)

        Called for each run in a line after runOffset(io.github.humbleui.skija.shaper.RunInfo).

        WARN positions are reported from the start of the line, not run, only in Shaper.makeCoreText https://bugs.chromium.org/p/skia/issues/detail?id=10898

        Parameters:
        positions - put glyphs[i] at positions[i]
        clusters - clusters[i] is an utf-16 offset starting run which produced glyphs[i]
      • commitLine

        void commitLine()
        Called when ending a line.