TWordInfoList

The TWordInfoList class encapsulates a list of individually formatted words or characters. This class greatly simplifies the building of custom text editors.

Commonly, this class is constructed and passed to FillWordList before being passed to TFontCache.GetTextOutline. Here's an abbreviated example of its use from the FMX2 sample application:

 wordList := TWordInfoList.Create;
  try
    FillWordList(essay, wordList, noto14Cache);
    pageMetrics := GetPageMetrics(RectWidth(essayRec), wordList);
    //calculate lines that will fit on left of image
    lineCnt := Trunc(RectHeight(essayRec) / noto14Cache.LineHeight);
    //now get the text glyph outlines and draw them
    txtPaths := noto14Cache.GetTextOutline(essayRec,
      wordList, pageMetrics, taJustify, 0, lineCnt);
    DrawPolygon(imgMain, txtPaths, frNonZero, clBlack32);
  finally
    wordList.Free;
  end;
      

See Also

TFontCache.GetTextOutline, FillWordList