ReportMill 7.0 API

com.reportmill.text
Class RMFont

java.lang.Object
  extended bycom.reportmill.foundation.RMObject
      extended bycom.reportmill.text.RMFont
All Implemented Interfaces:
java.lang.Cloneable, com.reportmill.foundation.RMArchiver.Archiving

public class RMFont
extends com.reportmill.foundation.RMObject


Field Summary
static java.util.List _altFonts
           
static byte BOLD
           
static RMFont Helvetica10
           
static RMFont Helvetica12
           
static RMFont Helvetica14
           
static RMFont HelveticaBold12
           
static RMFont HelveticaBold14
           
static RMFont HelveticaBold20
           
static RMFont HelveticaBold24
           
static byte ITALIC
           
static byte PLAIN
           
 
Constructor Summary
RMFont()
          Creates an empty font (really only used for unarchival).
RMFont(com.reportmill.text.RMFontFile aFontFile, float aPointSize)
          Creates a font for the given font file and point size.
 
Method Summary
static java.util.List allFamilyNames()
           
static java.util.List allFontNames()
           
static java.util.List allFontNamesForFamilyName(java.lang.String aName)
           
static RMFont altFont(int anIndex)
           
static java.util.List altFonts()
           
 float ascender()
           
 java.awt.Font awt()
           
 RMFont boldVersion()
           
 RMRect bounds()
           
 boolean canDisplay(char aChar)
           
 float charAdvance(char aChar)
           
 RMRect charBounds(char aChar)
           
 float charKern(char aChar1, char aChar2)
           
 RMPath charPath(char c)
           
static RMFont defaultFont()
           
 float defaultLineHeight()
           
 RMFont deriveFont(float aPointSize)
           
 float descender()
           
 boolean equals(java.lang.Object obj)
           
 RMRect fontRect()
           
 RMRect fontRect(float fontScaleFactor)
           
 java.lang.Object fromXML(com.ribs.RXArchiver anArchiver, com.ribs.RXElement anElement)
          XML unarchival.
 java.lang.String getFamily()
           
 java.lang.String getFamilyEnglish()
           
static RMFont getFont(java.lang.String aName, float aSize)
          Returns the font for the given name and size (substitutes Arial if not found).
static RMFont getFont(java.lang.String aName, float aSize, boolean substitute)
          Returns the font for the given name and size (with an option to substitue Arial if not found).
 com.reportmill.text.RMFontFile getFontFile()
           
 java.lang.String getFontName()
           
 java.lang.String getFontNameEnglish()
           
 java.lang.String getPSName()
           
 float getSize2D()
           
 java.lang.Object initWithArchiver(com.reportmill.foundation.RMArchiver anArchiver)
          Legacy unarchival.
 boolean isBold()
           
 boolean isItalic()
           
 RMFont italicVersion()
           
 float lineGap()
           
 float maxY()
           
 float minY()
           
 float strikethroughPosition()
           
 float stringAdvance(java.lang.String aString)
           
 int style()
           
 java.lang.String toString()
           
 com.ribs.RXElement toXML(com.ribs.RXArchiver anArchiver)
          XML archival.
 float underlinePosition()
           
 float underlineThickness()
           
 
Methods inherited from class com.reportmill.foundation.RMObject
archiverClassName, clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLAIN

public static final byte PLAIN
See Also:
Constant Field Values

BOLD

public static final byte BOLD
See Also:
Constant Field Values

ITALIC

public static final byte ITALIC
See Also:
Constant Field Values

Helvetica10

public static RMFont Helvetica10

Helvetica12

public static RMFont Helvetica12

Helvetica14

public static RMFont Helvetica14

HelveticaBold12

public static RMFont HelveticaBold12

HelveticaBold14

public static RMFont HelveticaBold14

HelveticaBold20

public static RMFont HelveticaBold20

HelveticaBold24

public static RMFont HelveticaBold24

_altFonts

public static java.util.List _altFonts
Constructor Detail

RMFont

public RMFont()
Creates an empty font (really only used for unarchival).


RMFont

public RMFont(com.reportmill.text.RMFontFile aFontFile,
              float aPointSize)
Creates a font for the given font file and point size.

Method Detail

allFontNames

public static java.util.List allFontNames()

allFamilyNames

public static java.util.List allFamilyNames()

allFontNamesForFamilyName

public static java.util.List allFontNamesForFamilyName(java.lang.String aName)

getFont

public static RMFont getFont(java.lang.String aName,
                             float aSize)
Returns the font for the given name and size (substitutes Arial if not found).


getFont

public static RMFont getFont(java.lang.String aName,
                             float aSize,
                             boolean substitute)
Returns the font for the given name and size (with an option to substitue Arial if not found).


deriveFont

public RMFont deriveFont(float aPointSize)

defaultFont

public static RMFont defaultFont()

getFontName

public java.lang.String getFontName()

getFontNameEnglish

public java.lang.String getFontNameEnglish()

getSize2D

public float getSize2D()

getFamily

public java.lang.String getFamily()

getFamilyEnglish

public java.lang.String getFamilyEnglish()

getPSName

public java.lang.String getPSName()

getFontFile

public com.reportmill.text.RMFontFile getFontFile()

charAdvance

public float charAdvance(char aChar)

charKern

public float charKern(char aChar1,
                      char aChar2)

charPath

public RMPath charPath(char c)

charBounds

public RMRect charBounds(char aChar)

stringAdvance

public float stringAdvance(java.lang.String aString)

bounds

public RMRect bounds()

ascender

public float ascender()

descender

public float descender()

lineGap

public float lineGap()

minY

public float minY()

maxY

public float maxY()

defaultLineHeight

public float defaultLineHeight()

fontRect

public RMRect fontRect()

fontRect

public RMRect fontRect(float fontScaleFactor)

underlinePosition

public float underlinePosition()

underlineThickness

public float underlineThickness()

strikethroughPosition

public float strikethroughPosition()

isBold

public boolean isBold()

isItalic

public boolean isItalic()

style

public int style()

canDisplay

public boolean canDisplay(char aChar)

boldVersion

public RMFont boldVersion()

italicVersion

public RMFont italicVersion()

altFont

public static RMFont altFont(int anIndex)

altFonts

public static java.util.List altFonts()

equals

public boolean equals(java.lang.Object obj)

initWithArchiver

public java.lang.Object initWithArchiver(com.reportmill.foundation.RMArchiver anArchiver)
Legacy unarchival.


toXML

public com.ribs.RXElement toXML(com.ribs.RXArchiver anArchiver)
XML archival.


fromXML

public java.lang.Object fromXML(com.ribs.RXArchiver anArchiver,
                                com.ribs.RXElement anElement)
XML unarchival.


toString

public java.lang.String toString()

awt

public java.awt.Font awt()

ReportMill 7.0 API