|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.font.format.Panose
public final class Panose
A PANOSE-1 classification number.
References:
Nested Class Summary | |
---|---|
static class |
Panose.Field
Enumeration of the fields that comprise a PANOSE description. |
Method Summary | |
---|---|
long |
difference(Panose otherPanose,
byte[] weights)
Computes the weighted "closeness" of another Panose to this value. |
static Panose |
forceInstance(byte[] panoseArray)
Creates a new Panose instance without any error checking. |
Panose |
getBold()
Returns the bold version of this Panose instance. |
byte |
getElement(int index)
Returns a given element from the underlying Panose array. |
byte |
getElement(Panose.Field field)
Returns a given element from the underlying Panose array. |
Panose |
getItalic()
Returns the italic version of this Panose instance. |
byte[] |
getPanoseArray()
Returns a clone of the the array of bytes representing the PANOSE number. |
static Panose |
makeInstance(byte[] panoseArray)
Creates a new Panose instance, first checking it for validity. |
String |
toString()
|
static String |
validPanose(byte[] panoseDescription)
Tests the validity of a panose description. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static Panose makeInstance(byte[] panoseArray) throws org.axsl.font.FontException
panoseArray
- The array of bytes recording the PANOSE
classification.
org.axsl.font.FontException
- If panoseArray
contains an illegal value.forceInstance(byte[])
public static Panose forceInstance(byte[] panoseArray)
panoseArray
- The array of bytes recording the PANOSE classification.
makeInstance(byte[])
public byte[] getPanoseArray()
getElement(int)
to obtain the
value of individual elements in the array.
public byte getElement(int index)
index
- The index to the element desired.
index
.public byte getElement(Panose.Field field)
field
- The field for which the value is desired.
field
.public long difference(Panose otherPanose, byte[] weights)
otherPanose
- Another Panose instance which is being compared to this.weights
- 10-element byte array of weights that should be used for each of the elements
in the comparison.
Values in this array must be between 0 and 127 inclusive.
(This constant is documented at http://www.w3.org/Fonts/Panose/pan2.html#StaticDigits).
Use null if all elements are to be weighted equally.
public static String validPanose(byte[] panoseDescription)
panoseDescription
- The panose values to be tested.
public String toString()
toString
in class Object
public Panose getBold()
public Panose getItalic()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |