java.lang.Object
com.adobe.fontengine.inlineformatting.infontformatting.InFontFormatter

public final class InFontFormatter extends Object
Interprets the styling constraints which are implement by in-font processing.
  • Field Details

    • scriptAttribute

      public static final ElementAttribute scriptAttribute
      the resolved Unicode script of an element. The value is a UScript, which is neither INHERITED nor COMMON.
  • Method Details

    • preFormat

      public static int preFormat(AttributedRun run, int start, int limit)
    • firstPass

      public static int firstPass(AttributedRun run, int start, int limit)
    • canRenderWithFont

      public static int canRenderWithFont(FontData font, AttributedRun run, int start, int limit) throws InvalidFontException, UnsupportedFontException, FontLoadingException
      Indentify a minimum character sequence and determine if it can be rendered using a given font. When rendering characters, some sequences of characters should be considered atomic, in the sense that it is not meaningfull to break the rendering of those sequences across fonts. For example, a combining sequence can hardly be rendered by rendering separately the base and the combining character(s). Similarly, a Hangul jamo sequence can hardly be rendered by handling separately the jamos. The first step of this method is to identify the atomic sequence which starts at start in the run, and extends at most to limit. The second step is to determine if that atomic sequence can be rendered without .notdef by font. If that is not possible, this method returns 0. If that is possible, this method return the number of characters in the atomic sequence. It may be necessary to determine the length of an atomic sequence, even if its rendering will produce one or more.notdef. To do this, set the notdefOK parameter to true. When this method is called, at least the element at index start must be a character. This method does not modify the run. In particular, it is up to the caller to put the ElementAttribute.font attribute if desired.
      Throws:
      InvalidFontException
      UnsupportedFontException
      FontLoadingException
    • canRenderWithNotdef

      public static int canRenderWithNotdef(AttributedRun run, int start, int limit) throws InvalidFontException, UnsupportedFontException, FontLoadingException
      Throws:
      InvalidFontException
      UnsupportedFontException
      FontLoadingException
    • format

      public static int format(AttributedRun run, int start, int limit, boolean shouldKern) throws InvalidFontException, UnsupportedFontException, FontLoadingException
      Format the run. The run can contain a mixture of characters and glyphs; the latter are not changed, but are positioned.
      Throws:
      InvalidFontException
      UnsupportedFontException
      FontLoadingException