Class InFontFormatter
- java.lang.Object
-
- com.adobe.fontengine.inlineformatting.infontformatting.InFontFormatter
-
public final class InFontFormatter extends java.lang.Object
Interprets the styling constraints which are implement by in-font processing.
-
-
Field Summary
Fields Modifier and Type Field Description static ElementAttribute
scriptAttribute
the resolved Unicode script of an element.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
canRenderWithFont(FontData font, AttributedRun run, int start, int limit)
Indentify a minimum character sequence and determine if it can be rendered using a given font.static int
canRenderWithNotdef(AttributedRun run, int start, int limit)
static int
firstPass(AttributedRun run, int start, int limit)
static int
format(AttributedRun run, int start, int limit, boolean shouldKern)
Format the run.static int
preFormat(AttributedRun run, int start, int limit)
-
-
-
Field Detail
-
scriptAttribute
public static final ElementAttribute scriptAttribute
the resolved Unicode script of an element. The value is aUScript
, which is neither INHERITED nor COMMON.
-
-
Method Detail
-
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 atstart
in the run, and extends at most tolimit
. The second step is to determine if that atomic sequence can be rendered without .notdef byfont
. 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 thenotdefOK
parameter totrue
. When this method is called, at least the element at indexstart
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.
-
canRenderWithNotdef
public static int canRenderWithNotdef(AttributedRun run, int start, int limit) 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.
-
-