Generated by
JDiff

java.awt.font Documentation Differences

This file contains all the changes in documentation in the package java.awt.font as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class FontRenderContext

The FontRenderContext class is a container for the information needed to correctly measure text. The measurement of text can vary because of rules that map outlines to pixels and rendering hints provided by an application.

One such piece of information is a transform that scales typographical points to pixels. (A point is defined to be exactly 1/72 of an inch which is slightly different than the traditional mechanical measurement of a point.) A character that is rendered at 12pt on a 600dpi device might have a different size than the same character rendered at 12pt on a 72dpi device because of such factors as rounding to pixel boundaries and hints that the font designer may have specified.

Anti-aliasing and Fractional-metrics specified by an application can also affect the size of a character because of rounding to pixel boundaries.

Typically instances of FontRenderContext are obtained from a Graphics2D object. A FontRenderContext which is directly constructed will most likely not represent any actual graphics device and may lead to unexpected or incorrect results.

@see java.awt.RenderingHints#KEY_TEXT_ANTIALIASING @see java.awt.RenderingHints#KEY_FRACTIONALMETRICS @see java.awt.Graphics2D#getFontRenderContext @see java.awt.font.LineMetrics

Class FontRenderContext, constructor FontRenderContext(AffineTransform, boolean, boolean)

Constructs a FontRenderContext object from an optional AffineTransform and two boolean values that determine if the newly constructed object has anti-aliasing or fractional metrics. @param tx the optionaltransform which is used to scale typographical points to pixels in this AffineTransformFontRenderContext. If null an identity tranform is used. @param isAntiAliased determines if the newly contructed object has anti-aliasing @param usesFractionalMetrics determines if the newly constructed object uses fractional metrics

Class GlyphJustificationInfo, constructor GlyphJustificationInfo(float, boolean, int, float, float, boolean, int, float, float)

Constructs information about the justification properties of a glyph. @param weight the weight of this glyph when allocating space. Must be non-negative. @param growAbsorb if true this glyph absorbs all extra space at this priority and lower priority levels when it grows @param growPriority the priority level of this glyph when it grows @param growLeftLimit the maximum amount by which the left side of this glyph can grow. Must be non-negative. @param growRightLimit the maximum amount by which the right side of this glyph can grow. Must be non-negative. @param shrinkAbsorb if true this glyph absorbs all remaining shrinkage at this and lower priority levels when it shrinks @param shrinkPriority the priority level of this glyph when it shrinks @param shrinkLeftLimit the maximum amount by which the left side of this glyph can shrink. (aMust positivebe number)non-negative. @param shrinkRightLimit the maximum amount by which the right side of this glyph can shrink. (aMust postivebe number)non-negative.

Class GlyphVector, int[] getGlyphCodes(int, int, int[])

Returns an array of glyphcodes for the specified glyphs. The contents of this return value are meaningless to anything other than a Font and can be used to ask the Font about the existence of ligatures and other context sensitive information. This method is used for convenience and performance when processing glyphcodes. If no array is passed in an array is created. @param beginGlyphIndex the index into this GlyphVector at which to start retrieving glyphcodes for the corresponding glyphs @param numEntries the offset from beginGlyphIndexnumber at whichof glyphs to stop retrieving glyphcodesretrieve @param codeReturn the array that receives the glyphcodes and is then returned @return an array of glyphcodes for the specified glyphs. @throws IllegalArgumentException if numEntries is less than 0 @throws IndexOutOfBoundsException if beginGlyphIndex is less than 0 @throws IndexOutOfBoundsException if the sum of beginGlyphIndex and numEntries is greater than the number of glyphs in this GlyphVector
Class GlyphVector, float[] getGlyphPositions(int, int, float[])

Returns an array of glyph positions for the specified glyphs. The position of each glyph corresponds to the leading edge of the baseline for that glyph. This method is used for convenience and performance when processing glyph positions. If no array is passed in a new array is created. Even numbered array entries beginning with position zero are the X coordinates of the glyph numbered beginGlyphIndex + position/2. Odd numbered array entries beginning with position one are the Y coordinates of the glyph numbered beginGlyphIndex + (position-1)/2. If beginGlyphIndex equals the number of of glyphs in this GlyphVector this method gets the position after the last glyph and this position is used to define the advance of the entire GlyphVector. @param beginGlyphIndex the index at which to begin retrieving glyph positions @param numEntries the offset from beginGlyphIndexnumber at whichof glyphs to stop retrieving glyph positionsretrieve @param positionReturn the array that receives the glyph positions and is then returned. @return an array of glyph positions specified by beginGlyphIndex and numEntries. @throws IllegalArgumentException if numEntries is less than 0 @throws IndexOutOfBoundsException if beginGlyphIndex is less than 0 @throws IndexOutOfBoundsException if the sum of beginGlyphIndex and numEntries is greater than the number of glyphs in this GlyphVector plus one

Class LineBreakMeasurer, constructor LineBreakMeasurer(AttributedCharacterIterator, BreakIterator, FontRenderContext)

Constructs a LineBreakMeasurer for the specified text. @param text the text for which this LineBreakMeasurer produces TextLayout objects. The text must contain at least one character. If the text available through iter changes further calls to this LineBreakMeasurer instance are undefined (except in some cases when insertChar or deleteChar are invoked afterward - see below). @param breakIter the BreakIterator which defines line breaks @param frc thecontains FontRenderContextinformation inabout a graphics device which is needed to measure the text iscorrectly. Text measurements can vary slightly depending on the device measuredresolution and attributes such as antialiasing. This parameter does not specify a translation between the LineBreakMeasurer and user space. @see LineBreakMeasurer#insertChar @see LineBreakMeasurer#deleteChar
Class LineBreakMeasurer, constructor LineBreakMeasurer(AttributedCharacterIterator, FontRenderContext)

Constructs a LineBreakMeasurer for the specified text. @param text the text for which this LineBreakMeasurer produces TextLayout objects. The text must contain at least one character. If the text available through iter changes further calls to this LineBreakMeasurer instance are undefined (except in some cases when insertChar or deleteChar are invoked afterward - see below). @param frc thecontains FontRenderContextinformation inabout a graphics device which is needed to measure the text iscorrectly. Text measurements can vary slightly depending on the device resolution measuredand attributes such as antialiasing. This parameter does not specify a translation between the LineBreakMeasurer and user space. @see LineBreakMeasurer#insertChar @see LineBreakMeasurer#deleteChar
Class LineBreakMeasurer, void deleteChar(AttributedCharacterIterator, int)

Updates this LineBreakMeasurer after a single character is deleted from the text and sets the current position to the beginning of the paragraph. @param newParagraph the text after the deletion @param deletePos the position in the text at which the character is deleted @see #insertChar
Class LineBreakMeasurer, void insertChar(AttributedCharacterIterator, int)

Updates this LineBreakMeasurer after a single character is inserted into the text and sets the current position to the beginning of the paragraph. @param newParagraph the text after the insertion @param insertPos the position in the text at which the character is inserted @see #deleteChar
Class LineBreakMeasurer, TextLayout nextLayout(float)

Returns the next layout and updates the current position. @param maxAdvancewrappingWidth the maximum visible advance permitted for the text in the next layout @return a TextLayout beginning at the current position which represents the next line fitting within maxAdvancewrappingWidth.
Class LineBreakMeasurer, TextLayout nextLayout(float, int, boolean)

Returns the next layout and updates the current position. @param wrappingWidth the maximum visible advance permitted for the text in the next layout @param offsetLimit the first character that can not be included in the next layout even if the text after the limit would fit within the wrapping width. offsetLimit must be greater than the current position. @param requireNextWord if true and if the entire word at the current position does not fit within the wrapping width null is returned. If false a valid layout is returned that includes at least the character at the current position. @return a TextLayout beginning at the current position that represents the next line fitting within maxAdvancewrappingWidth. If the current position is at the end of the text used by this LineBreakMeasurer null is returned.
Class LineBreakMeasurer, int nextOffset(float)

Returns the position at the end of the next layout. Does NOT update the current position of this LineBreakMeasurer. @param maxAdvancewrappingWidth the maximum visible advance permitted for the text in the next layout @return an offset in the text representing the limit of the next TextLayout.

Class TextLayout, constructor TextLayout(AttributedCharacterIterator, FontRenderContext)

Constructs a TextLayout from an iterator over styled text.

The iterator must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm. @param text the styled text to display @param frc contains the information about a graphics device which is needed to correctly measure the text correctly. Text measurements can vary slightly depending on the device resolution and attributes such as antialiasing. This parameter does not specify a translation between the TextLayout and user space.

Class TextLayout, constructor TextLayout(String, Font, FontRenderContext)

Constructs a TextLayout from a String and a Font All the text is styled using the specified Font.

The String must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm. @param str the text to display @param font a Font used to style the text @param frc contains the information about a graphics device which is needed to correctly measure the text correctly. Text measurements can vary slightly depending on the device resolution and attributes such as antialiasing. This parameter does not specify a translation between the TextLayout and user space.

Class TextLayout, constructor TextLayout(String, Map, FontRenderContext)

Constructs a TextLayout from a String and an attribute set.

All the text is styled using the provided attributes.

string must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm. @param str the text to display @param attributes the attributes used to style the text @param frc contains the information about a graphics device which is needed to correctly measure the text correctly. Text measurements can vary slightly depending on the device resolution and attributes such as antialiasing. This parameter does not specify a translation between the TextLayout and user space.

Class TextLayout, float[] getCaretInfo(TextHitInfo, Rectangle2D)

Returns information about the caret corresponding to hit. The first element of the array is the intersection of the caret with the baseline. The second element of the array is the inverse slope (run/rise) of the caret.

This method is meant for informational use. To display carets it is better to use getCaretShapes. @param hit a hit on a character in this TextLayout @param bounds the bounds to which the caret info is constructed @return a two-element array containing the position and slope of the caret. @see #getCaretShapes(int Rectangle2D TextLayout.CaretPolicy) @see Font#getItalicAngle