com.sap.ip.me.api.pios.printer
Interface PrinterFont

All Known Subinterfaces:
BitmappedFont, ScalableFont

public interface PrinterFont

The PrinterFont interface represents a font, which is used to render text to the page's printable area. A PrinterFont object will represent a logical font. The logical font will then be matched to an available printer font depending on the particular printer model. More fonts can be configured using the font configuration class.

Since:
MI 2.5
Author:
Abaco
See Also:
FontConfigurationManager, PrinterConnection

Field Summary
static int FONTTYPE_BITMAPPED
          Constant to indicate a BITMAPPED font type.
static int FONTTYPE_SCALABLE
          Constant to indicate a SCALABLE font type.
static long OPTION_ANY
          Constant to indicate any font option.
static long OPTION_BOLD
          Constant to indicate a bold font option.
static long OPTION_ITALIC
          Constant to indicate an italic font option.
static long OPTION_NORMAL
          Constant to indicate a normal font option.
static long OPTION_UNDERLINE
          Constant to indicate an underline font option.
 
Method Summary
 float getConfiguredSize()
          Returns the configured point size for this font.
 java.lang.String getDescription()
          Returns the description for this font.
 float getHeight()
          Returns the font height in points.
 Metrics getMetrics(java.lang.String text)
          Returns the metrics for a particular text.
 java.lang.String getName()
          Returns the name of the printer font.
 long getOptions()
          Returns the options mask.
 int getType()
          Returns the type for this font.
 

Field Detail

FONTTYPE_BITMAPPED

public static final int FONTTYPE_BITMAPPED
Constant to indicate a BITMAPPED font type.

See Also:
Constant Field Values

FONTTYPE_SCALABLE

public static final int FONTTYPE_SCALABLE
Constant to indicate a SCALABLE font type.

See Also:
Constant Field Values

OPTION_NORMAL

public static final long OPTION_NORMAL
Constant to indicate a normal font option.

See Also:
Constant Field Values

OPTION_ANY

public static final long OPTION_ANY
Constant to indicate any font option.

See Also:
Constant Field Values

OPTION_BOLD

public static final long OPTION_BOLD
Constant to indicate a bold font option.

See Also:
Constant Field Values

OPTION_ITALIC

public static final long OPTION_ITALIC
Constant to indicate an italic font option.

See Also:
Constant Field Values

OPTION_UNDERLINE

public static final long OPTION_UNDERLINE
Constant to indicate an underline font option.

See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
Returns the name of the printer font.

Returns:
The font name.

getDescription

public java.lang.String getDescription()
Returns the description for this font.

Returns:
The font description.

getConfiguredSize

public float getConfiguredSize()
Returns the configured point size for this font.

Returns:
The configured point size.

getType

public int getType()
Returns the type for this font.

Returns:
The font type.

getOptions

public long getOptions()
Returns the options mask.

Returns:
The options mask set for this font.

getHeight

public float getHeight()
                throws PrinterException
Returns the font height in points.

Returns:
The font height in points.
Throws:
PrinterException - thrown if unable to get font height

getMetrics

public Metrics getMetrics(java.lang.String text)
                   throws PrinterException
Returns the metrics for a particular text.

Parameters:
text - the text
Returns:
The Metrics for the text provided.
Throws:
PrinterException - thrown if unable to obtain text metrics


Copyright © 2005 SAP AG. All Rights Reserved.