Interface TeXTextMeasurer

All Known Implementing Classes:
StringBounderTextMeasurer

public interface TeXTextMeasurer
Measures the text that no TeX font can draw (Chinese, Japanese, Korean, Arabic, ... or any character without a TeX symbol). The TeX fonts have the glyphs of the TeX alphabets only; the rest is drawn by the application that hosts the library, with its own font, through TeXGraphics.drawText(String, double).

The measure is given here because the layout of a formula needs the size of the text before anything is drawn. It is given to the layout by TeXFormula.TeXIconBuilder.setTextMeasurer(TeXTextMeasurer), not kept in a static field, so that formulas made at the same time in several threads can use different measurers.

  • Method Summary

    Modifier and Type
    Method
    Description
    float[]
     
  • Method Details

    • measure

      float[] measure(String text)
      Returns:
      the size of the text for a font size of 1 (so, in em): the width, the height above the baseline, and the depth below the baseline.