Module org.htmlunit

Interface FontUtil

All Known Implementing Classes:
AwtFontUtil, NoOpFontUtil

public interface FontUtil
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
API for abstraction of font related stuff. This encapsulates awt font access to support android.
Author:
Ronald Brill
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    countLines(String content, int pixelWidth, String fontSize)
    INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
    Helper that layouts the text regarding the pixelWith and the fontSize and counts the resulting lines.
  • Method Details

    • countLines

      int countLines(String content, int pixelWidth, String fontSize)
      INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
      Helper that layouts the text regarding the pixelWith and the fontSize and counts the resulting lines.
      Parameters:
      content - the text to be layouted
      pixelWidth - the max width of the resulting text block
      fontSize - the font size to be used
      Returns:
      the number of lines the layouted text will have