chordsheetjs
    Preparing search index...

    Class BaseMeasurerAbstract

    Base class for implementing measurers with common functionality

    Hierarchy (View Summary)

    Implements

    • Measurer
    Index

    Methods

    • Measures the dimensions of text with the given font configuration

      Parameters

      • text: string

        The text to measure

      • fontConfig: FontConfiguration

        The font configuration to apply

      Returns TextDimensions

      The dimensions of the text

    • Measures the height of text with the given font configuration

      Parameters

      • text: string

        The text to measure

      • fontConfig: FontConfiguration

        The font configuration to apply

      Returns number

      The height of the text

    • Measures the width of text with the given font configuration

      Parameters

      • text: string

        The text to measure

      • fontConfig: FontConfiguration

        The font configuration to apply

      Returns number

      The width of the text

    • Splits text into lines that fit within the given width

      Parameters

      • text: string

        The text to split

      • maxWidth: number

        The maximum width of each line

      • fontConfig: FontConfiguration

        The font configuration to apply

      Returns string[]

      The lines of text