amber.type.server
Class FontCharacteristics

java.lang.Object
  |
  +--amber.type.server.FontCharacteristics

public class FontCharacteristics
extends java.lang.Object

This class contains a variety of the information gleaned from the remote client relating to the font characteristics of the client font.

Version:
1.0.0
Author:
Dr. David J. Knowles
See Also:
ComponentHandler

Field Summary
protected  int leading
          The leading for the font.
protected  int maxAdvance
          The maximum amount the pointer would move to render any character for the font.
protected  int maxAscent
          The maximum ascent for the font.
protected  int maxDescent
          The maximum descent for the font.
protected  int stringWidth
          The amount that the specified string occupies horizontally.
 
Constructor Summary
FontCharacteristics()
          Default Constructor.
FontCharacteristics(int maxAscent, int maxDescent, int leading, int maxAdvance, int stringWidth)
          Initialising Constructor.
 
Method Summary
 int getLeading()
          Gets the data in the following variable: The leading for the font.
 int getMaxAdvance()
          Gets the data in the following variable: The maximum amount the pointer would move to render any character for the font.
 int getMaxAscent()
          Gets the data in the following variable: The maximum ascent for the font.
 int getMaxDescent()
          Gets the data in the following variable: The maximum descent for the font.
 int getMaxHeight()
          Gets the data in the following variable: The maximum amount of vertical space any character would occupy.
 int getStringWidth()
          Gets the data in the following variable: The amount that the specified string occupies horizontally.
 void setLeading(int data)
          Sets the data in the following variable: The leading for the font.
 void setMaxAdvance(int data)
          Sets the data in the following variable: The maximum amount the pointer would move to render any character for the font.
 void setMaxAscent(int data)
          Sets the data in the following variable: The maximum ascent for the font.
 void setMaxDescent(int data)
          Sets the data in the following variable: The maximum descent for the font.
 void setStringWidth(int data)
          Sets the data in the following variable: The amount that the specified string occupies horizontally.
 java.lang.String toString()
          This function returns the String form of the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

maxAscent

protected int maxAscent
The maximum ascent for the font. This is the distance from the font's baseline to the top of the character.

maxDescent

protected int maxDescent
The maximum descent for the font. This is the distance from the font's baseline to the bottom of the character.

leading

protected int leading
The leading for the font. This is the logical amount of space reserved between the descent of one line and the ascent of the next line.

maxAdvance

protected int maxAdvance
The maximum amount the pointer would move to render any character for the font.

stringWidth

protected int stringWidth
The amount that the specified string occupies horizontally.
Constructor Detail

FontCharacteristics

public FontCharacteristics()
Default Constructor.

FontCharacteristics

public FontCharacteristics(int maxAscent,
                           int maxDescent,
                           int leading,
                           int maxAdvance,
                           int stringWidth)
Initialising Constructor.
Parameters:
maxAscent - The maximum ascent for the font. This is the distance from the font's baseline to the top of the character.
maxDescent - The maximum descent for the font. This is the distance from the font's baseline to the bottom of the character.
leading - The leading for the font. This is the logical amount of space reserved between the descent of one line and the ascent of the next line.
maxAdvance - The maximum amount the pointer would move to render any character for the font.
stringWidth - The amount that the specified string occupies horizontally.
Method Detail

getMaxAscent

public int getMaxAscent()
Gets the data in the following variable: The maximum ascent for the font. This is the distance from the font's baseline to the top of the character.
Returns:
int containing the required information.

getMaxDescent

public int getMaxDescent()
Gets the data in the following variable: The maximum descent for the font. This is the distance from the font's baseline to the bottom of the character.
Returns:
int containing the required information.

getLeading

public int getLeading()
Gets the data in the following variable: The leading for the font. This is the logical amount of space reserved between the descent of one line and the ascent of the next line.
Returns:
int containing the required information.

getMaxAdvance

public int getMaxAdvance()
Gets the data in the following variable: The maximum amount the pointer would move to render any character for the font.
Returns:
int containing the required information.

getMaxHeight

public int getMaxHeight()
Gets the data in the following variable: The maximum amount of vertical space any character would occupy.
Returns:
int containing the required information.

getStringWidth

public int getStringWidth()
Gets the data in the following variable: The amount that the specified string occupies horizontally.
Returns:
int containing the required information.

setMaxAscent

public void setMaxAscent(int data)
Sets the data in the following variable: The maximum ascent for the font. This is the distance from the font's baseline to the top of the character.
Parameters:
data - int containing the data to set the variable to.

setMaxDescent

public void setMaxDescent(int data)
Sets the data in the following variable: The maximum descent for the font. This is the distance from the font's baseline to the bottom of the character.
Parameters:
data - int containing the data to set the variable to.

setLeading

public void setLeading(int data)
Sets the data in the following variable: The leading for the font. This is the logical amount of space reserved between the descent of one line and the ascent of the next line.
Parameters:
data - int containing the data to set the variable to.

setMaxAdvance

public void setMaxAdvance(int data)
Sets the data in the following variable: The maximum amount the pointer would move to render any character for the font.
Parameters:
data - int containing the data to set the variable to.

setStringWidth

public void setStringWidth(int data)
Sets the data in the following variable: The amount that the specified string occupies horizontally.
Parameters:
data - int containing the data to set the variable to.

toString

public java.lang.String toString()
This function returns the String form of the data.
Overrides:
toString in class java.lang.Object
Returns:
String containing the string version of this class.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.