Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.fonts
Class MultiByteFont

    java.lang.Object
      org.apache.fop.fonts.Typeface
          org.apache.fop.fonts.CustomFont
              org.apache.fop.fonts.CIDFont
                  org.apache.fop.fonts.MultiByteFont

All Implemented Interfaces:
  Positionable, Substitutable, FontDescriptor, FontMetrics, MutableFont

    public class MultiByteFont

extends CIDFont
implements Substitutable, Positionable

Generic MultiByte (CID) font

Field Summary

Fields inherited from class org.apache.fop.fonts.CIDFont
`width`

Fields inherited from class org.apache.fop.fonts.CustomFont
`cmap`

Fields inherited from class org.apache.fop.fonts.Typeface
`eventListener, NOT_FOUND`

Constructor Summary
`MultiByteFont()` Default constructor

Method Summary
`char[]` | `getCharsUsed()`
`CIDSubset` | `getCIDSubset()` Returns the subset information for this font.
`CIDFontType` | `getCIDType()` Returns the type of the CID font.
`int` | `getDefaultWidth()` Returns the default width for this font.
`java.lang.String` | `getEmbedFontName()` Returns the font name for font embedding (may include a prefix, Example: "1E28bcArialMT").
`java.lang.String` | `getEncodingName()` Get the encoding of the font.
`GlyphDefinitionTable` | `getGDEF()` Obtain glyph definition table.
`GlyphPositioningTable` | `getGPOS()` Obtain glyph positioning table.
`GlyphSubstitutionTable` | `getGSUB()` Obtain glyph substitution table.
`java.lang.String` | `getOrdering()` Returns a font name for use within a registry.
`java.lang.String` | `getRegistry()` Returns the name of the issuer of the font.
`int` | `getSupplement()` Returns the supplement number of the character collection.
`java.lang.String` | `getTTCName()` Returns the TrueType Collection Name.
`java.util.Map<java.lang.Integer,java.lang.Integer>` | `getUsedGlyphs()` Returns a Map of used Glyphs.
`int` | `getWidth(int i, int size)` Return the width (in 1/1000ths of point size) of the character at code point i.
`int[]` | `getWidths()` Return the array of widths.
`boolean` | `hasChar(char c)` Determines whether this font contains a particular character/glyph.
`boolean` | `isEmbeddable()` Indicates if this font may be embedded.
`boolean` | `isSubsetEmbedded()` Indicates whether this font is subset embedded.
`char` | `mapChar(char c)` Map a Unicode character to a code point in the font.
`int[][]` | `performPositioning(java.lang.CharSequence cs, java.lang.String script, java.lang.String language)` Perform glyph positioning using an implied font size.
`int[][]` | `performPositioning(java.lang.CharSequence cs, java.lang.String script, java.lang.String language, int fontSize)` Perform glyph positioning.
`boolean` | `performsPositioning()` Determines if font performs glyph positioning.
`boolean` | `performsSubstitution()` Determines if font performs glyph substitution.
`java.lang.CharSequence` | `performSubstitution(java.lang.CharSequence cs, java.lang.String script, java.lang.String language)` Perform substitutions on characters to effect glyph substitution.
`java.lang.CharSequence` | `reorderCombiningMarks(java.lang.CharSequence cs, int[][] gpa, java.lang.String script, java.lang.String language)` Reorder combining marks in character sequence so that they precede (within the sequence) the base character to which they are applied.
`void` | `setCIDType(CIDFontType cidType)` Sets the CIDType.
`void` | `setDefaultWidth(int defaultWidth)` Sets the defaultWidth.
`void` | `setGDEF(GlyphDefinitionTable gdef)` Establishes the glyph definition table.
`void` | `setGPOS(GlyphPositioningTable gpos)` Establishes the glyph positioning table.
`void` | `setGSUB(GlyphSubstitutionTable gsub)` Establishes the glyph substitution table.
`void` | `setTTCName(java.lang.String ttcName)` Sets the the TrueType Collection Name.
`void` | `setWidthArray(int[] wds)` Sets the width array.

Methods inherited from class org.apache.fop.fonts.CIDFont
`isMultiByte`

Methods inherited from class org.apache.fop.fonts.CustomFont
`getAscender, getAscender, getCapHeight, getCapHeight, getCMap, getDescender, getDescender, getEmbeddingMode, getEmbedFileName, getEmbedFileSource, getEmbedResourceName, getFamilyNames, getFirstChar, getFlags, getFontBBox, getFontName, getFontSubName, getFontType, getFullName, getItalicAngle, getKerningInfo, getLastChar, getMissingWidth, getStemV, getStrippedFontName, getWeight, getXHeight, hasKerningInfo, isAdvancedEnabled, isKerningEnabled, isSymbolicFont, putKerningEntry, replaceKerningMap, setAdvancedEnabled, setAscender, setCapHeight, setCMap, setDescender, setEmbeddingMode, setEmbedFileName, setEmbedResourceName, setFamilyNames, setFirstChar, setFlags, setFontBBox, setFontName, setFontSubFamilyName, setFontType, setFullName, setItalicAngle, setKerningEnabled, setLastChar, setMissingWidth, setResolver, setStemV, setWeight, setXHeight`

Methods inherited from class org.apache.fop.fonts.Typeface
`getMaxAscent, hadMappingOperations, notifyMapOperation, setEventListener, toString, warnMissingGlyph`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.apache.fop.fonts.FontMetrics
`getMaxAscent`

Constructor Detail

### MultiByteFont

    public MultiByteFont()

  Default constructor

Method Detail

### getDefaultWidth

    public int getDefaultWidth()

  Returns the default width for this font.

  Overrides:
    `getDefaultWidth` in class `CIDFont`
  Returns:
    the default width

### getRegistry

    public java.lang.String getRegistry()

  Returns the name of the issuer of the font.

  Specified by:
    `getRegistry` in class `CIDFont`
  Returns:
    a String identifying an issuer of character collections - for example, Adobe

### getOrdering

    public java.lang.String getOrdering()

  Returns a font name for use within a registry.

  Specified by:
    `getOrdering` in class `CIDFont`
  Returns:
    a String that uniquely names a character collection issued by a specific registry - for example, Japan1.

### getSupplement

    public int getSupplement()

  Returns the supplement number of the character collection.

  Specified by:
    `getSupplement` in class `CIDFont`
  Returns:
    the supplement number

### getCIDType

    public CIDFontType getCIDType()

  Returns the type of the CID font.

  Specified by:
    `getCIDType` in class `CIDFont`
  Returns:
    the type of the CID font

### setCIDType

    public void setCIDType(CIDFontType cidType)

  Sets the CIDType.

  Parameters:
    `cidType` - The cidType to set

### getEmbedFontName

    public java.lang.String getEmbedFontName()

  Returns the font name for font embedding (may include a prefix, Example: "1E28bcArialMT").

  Specified by:
    `getEmbedFontName` in interface `FontMetrics`
  Overrides:
    `getEmbedFontName` in class `CustomFont`
  Returns:
    the name for font embedding

### isEmbeddable

    public boolean isEmbeddable()

  Indicates if this font may be embedded.

  Specified by:
    `isEmbeddable` in interface `FontDescriptor`
  Returns:
    True, if embedding is possible/permitted

### isSubsetEmbedded

    public boolean isSubsetEmbedded()

  Description copied from interface: `FontDescriptor`
  Indicates whether this font is subset embedded.

  Specified by:
    `isSubsetEmbedded` in interface `FontDescriptor`
  Returns:
    true if this font is subset embedded

### getCIDSubset

    public CIDSubset getCIDSubset()

  Returns the subset information for this font.

  Specified by:
    `getCIDSubset` in class `CIDFont`
  Returns:
    the subset information

### getEncodingName

    public java.lang.String getEncodingName()

  Get the encoding of the font.

  Specified by:
    `getEncodingName` in class `Typeface`
  Returns:
    the encoding

### getWidth

    public int getWidth(int i,
                        int size)

  Return the width (in 1/1000ths of point size) of the character at code point i.

  Specified by:
    `getWidth` in interface `FontMetrics`
  Parameters:
    `i` - code point index
    `size` - font size
  Returns:
    the width of the character

### getWidths

    public int[] getWidths()

  Return the array of widths.

  This is used to get an array for inserting in an output format. It should not be used for lookup.

  Specified by:
    `getWidths` in interface `FontMetrics`
  Returns:
    an array of widths

### mapChar

    public char mapChar(char c)

  Map a Unicode character to a code point in the font.

  Specified by:
    `mapChar` in class `Typeface`
  Parameters:
    `c` - character to map
  Returns:
    the mapped character

### hasChar

    public boolean hasChar(char c)

  Determines whether this font contains a particular character/glyph.

  Specified by:
    `hasChar` in class `Typeface`
  Parameters:
    `c` - character to check
  Returns:
    True if the character is supported, Falso otherwise

### setDefaultWidth

    public void setDefaultWidth(int defaultWidth)

  Sets the defaultWidth.

  Parameters:
    `defaultWidth` - The defaultWidth to set

### getTTCName

    public java.lang.String getTTCName()

  Returns the TrueType Collection Name.

  Returns:
    the TrueType Collection Name

### setTTCName

    public void setTTCName(java.lang.String ttcName)

  Sets the the TrueType Collection Name.

  Parameters:
    `ttcName` - the TrueType Collection Name

### setWidthArray

    public void setWidthArray(int[] wds)

  Sets the width array.

  Parameters:
    `wds` - array of widths.

### getUsedGlyphs

    public java.util.Map<java.lang.Integer,java.lang.Integer> getUsedGlyphs()

  Returns a Map of used Glyphs.

  Returns:
    Map Map of used Glyphs

### getCharsUsed

    public char[] getCharsUsed()

  Returns:
    an array of the chars used

### setGDEF

    public void setGDEF(GlyphDefinitionTable gdef)

  Establishes the glyph definition table.

  Parameters:
    `gdef` - the glyph definition table to be used by this font

### getGDEF

    public GlyphDefinitionTable getGDEF()

  Obtain glyph definition table.

  Returns:
    glyph definition table or null if none is associated with font

### setGSUB

    public void setGSUB(GlyphSubstitutionTable gsub)

  Establishes the glyph substitution table.

  Parameters:
    `gsub` - the glyph substitution table to be used by this font

### getGSUB

    public GlyphSubstitutionTable getGSUB()

  Obtain glyph substitution table.

  Returns:
    glyph substitution table or null if none is associated with font

### setGPOS

    public void setGPOS(GlyphPositioningTable gpos)

  Establishes the glyph positioning table.

  Parameters:
    `gpos` - the glyph positioning table to be used by this font

### getGPOS

    public GlyphPositioningTable getGPOS()

  Obtain glyph positioning table.

  Returns:
    glyph positioning table or null if none is associated with font

### performsSubstitution

    public boolean performsSubstitution()

  Determines if font performs glyph substitution.

  Specified by:
    `performsSubstitution` in interface `Substitutable`
  Returns:
    true if performs substitution.

### performSubstitution

    public java.lang.CharSequence performSubstitution(java.lang.CharSequence cs,
                                                      java.lang.String script,
                                                      java.lang.String language)

  Perform substitutions on characters to effect glyph substitution. If some substitution is performed, it entails mapping from one or more input characters denoting textual character information to one or more output character codes denoting glyphs in this font, where the output character codes may make use of private character code values that have significance only for this font.

  Specified by:
    `performSubstitution` in interface `Substitutable`
  Parameters:
    `cs` - character sequence to map to output font encoding character sequence
    `script` - a script identifier
    `language` - a language identifier
  Returns:
    output sequence (represented as a character sequence, where each character in the returned sequence denotes "font characters", i.e., character codes that map directly (1-1) to their associated glyphs

### reorderCombiningMarks

    public java.lang.CharSequence reorderCombiningMarks(java.lang.CharSequence cs,
                                                        int[][] gpa,
                                                        java.lang.String script,
                                                        java.lang.String language)

  Reorder combining marks in character sequence so that they precede (within the sequence) the base character to which they are applied. N.B. In the case of LTR segments, marks are not reordered by this, method since when the segment is reversed by BIDI processing, marks are automatically reordered to precede their base character.

  Specified by:
    `reorderCombiningMarks` in interface `Substitutable`
  Parameters:
    `cs` - character sequence within which combining marks to be reordered
    `gpa` - associated glyph position adjustments (also reordered)
    `script` - a script identifier
    `language` - a language identifier
  Returns:
    output sequence containing reordered "font characters"

### performsPositioning

    public boolean performsPositioning()

  Determines if font performs glyph positioning.

  Specified by:
    `performsPositioning` in interface `Positionable`
  Returns:
    true if performs positioning

### performPositioning

    public int[][] performPositioning(java.lang.CharSequence cs,
                                      java.lang.String script,
                                      java.lang.String language,
                                      int fontSize)

  Perform glyph positioning.

  Specified by:
    `performPositioning` in interface `Positionable`
  Parameters:
    `cs` - character sequence to map to position offsets (advancement adjustments)
    `script` - a script identifier
    `language` - a language identifier
    `fontSize` - font size
  Returns:
    array (sequence) of 4-tuples of placement [PX,PY] and advance [AX,AY] adjustments, in that order, with one 4-tuple for each element of glyph sequence, or null if no non-zero adjustment applies

### performPositioning

    public int[][] performPositioning(java.lang.CharSequence cs,
                                      java.lang.String script,
                                      java.lang.String language)

  Perform glyph positioning using an implied font size.

  Specified by:
    `performPositioning` in interface `Positionable`
  Parameters:
    `cs` - character sequence to map to position offsets (advancement adjustments)
    `script` - a script identifier
    `language` - a language identifier
  Returns:
    array (sequence) of 4-tuples of placement [PX,PY] and advance [AX,AY] adjustments, in that order, with one 4-tuple for each element of glyph sequence, or null if no non-zero adjustment applies

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.