ru.novosoft.dc.rtf.dom.objects
Class Panose

java.lang.Object
  |
  +--ru.novosoft.dc.rtf.dom.objects.Panose

public final class Panose
extends java.lang.Object

Panose-1 font classifier. The PANOSE system consists of a set of ten numbers that categorize the key attributes of a Latin typeface, a classification procedure for creating those numbers, and Mapper software that determines the closest possible font match given a set of typefaces. The system could, with modification, also be used for Greek and Cyrillic, but is not suitable for unicameral and ideographic scripts (Hebrew, Armenian, Arabic, Chinese/Japanese/Korean).

Two values, namely ANY and NO_FIT, are useful as values of every attribute. Other possible values depend on an attribute. They are described with specific constants of this class.


Field Summary
static byte ANY
          Allows any font with specified Panose-1 attribute.
static byte BENT_ARMS_DOUBLE_SERIF
          Arm Style - Nonstraight arms/double-serif
static byte BENT_ARMS_HORZ
          Arm Style - Nonstraight arms/horizontal
static byte BENT_ARMS_SINGLE_SERIF
          Arm Style - Nonstraight arms/single-serif
static byte BENT_ARMS_VERT
          Arm Style - Nonstraight arms/vertical
static byte BENT_ARMS_WEDGE
          Arm Style - Nonstraight arms/wedge
static byte CONTRAST_HIGH
          Contrast - High
static byte CONTRAST_LOW
          Contrast - Low
static byte CONTRAST_MEDIUM
          Contrast - Medium
static byte CONTRAST_MEDIUM_HIGH
          Contrast - Medium high
static byte CONTRAST_MEDIUM_LOW
          Contrast - Medium low
static byte CONTRAST_NONE
          Contrast - None
static byte CONTRAST_VERY_HIGH
          Contrast - Very high
static byte CONTRAST_VERY_LOW
          Contrast - Very low
static byte FAMILY_DECORATIVE
          Family type - Decorative
static byte FAMILY_PICTORIAL
          Family type - Pictorial
static byte FAMILY_SCRIPT
          Family type - Script
static byte FAMILY_TEXT_DISPLAY
          Family type - Text and display
static byte LETT_NORMAL_BOXED
          Letterform - Normal/boxed
static byte LETT_NORMAL_CONTACT
          Letterform - Normal/contact
static byte LETT_NORMAL_FLATTENED
          Letterform - Normal/flattened
static byte LETT_NORMAL_OFF_CENTER
          Letterform - Normal/off center
static byte LETT_NORMAL_ROUNDED
          Letterform - Normal/rounded
static byte LETT_NORMAL_SQUARE
          Letterform - Normal/square
static byte LETT_NORMAL_WEIGHTED
          Letterform - Normal/weighted
static byte LETT_OBLIQUE_BOXED
          Letterform - Oblique/boxed
static byte LETT_OBLIQUE_CONTACT
          Letterform - Oblique/contact
static byte LETT_OBLIQUE_FLATTENED
          Letterform - Oblique/flattened
static byte LETT_OBLIQUE_OFF_CENTER
          Letterform - Oblique/off center
static byte LETT_OBLIQUE_ROUNDED
          Letterform - Oblique/rounded
static byte LETT_OBLIQUE_SQUARE
          Letterform - Oblique/square
static byte LETT_OBLIQUE_WEIGHTED
          Letterform - Oblique/weighted
static byte MIDLINE_CONSTANT_POINTED
          Midline - Constant/pointed
static byte MIDLINE_CONSTANT_SERIFED
          Midline - Constant/serifed
static byte MIDLINE_CONSTANT_TRIMMED
          Midline - Constant/trimmed
static byte MIDLINE_HIGH_POINTED
          Midline - High/pointed
static byte MIDLINE_HIGH_SERIFED
          Midline - High/serifed
static byte MIDLINE_HIGH_TRIMMED
          Midline - High/trimmed
static byte MIDLINE_LOW_POINTED
          Midline - Low/pointed
static byte MIDLINE_LOW_SERIFED
          Midline - Low/serifed
static byte MIDLINE_LOW_TRIMMED
          Midline - Low/trimmed
static byte MIDLINE_STANDARD_POINTED
          Midline - Standard/pointed
static byte MIDLINE_STANDARD_SERIFED
          Midline - Standard/serifed
static byte MIDLINE_STANDARD_TRIMMED
          Midline - Standard/trimmed
static byte NO_FIT
          No fit in the specified Panose-1 attribute.
static byte PROP_CONDENSED
          Proportion - Condensed
static byte PROP_EVEN_WIDTH
          Proportion - Even width
static byte PROP_EXPANDED
          Proportion - Expanded
static byte PROP_MODERN
          Proportion - Modern
static byte PROP_MONOSPACED
          Proportion - Monospaced
static byte PROP_OLD_STYLE
          Proportion - Old style
static byte PROP_VERY_CONDENSED
          Proportion - Very condensed
static byte PROP_VERY_EXPANDED
          Proportion - Very expanded
static byte SERIF_BONE
          Serif style - Bone
static byte SERIF_COVE
          Serif style - Cove
static byte SERIF_EXAGGERATED
          Serif style - Exaggerated
static byte SERIF_FLARED
          Serif style - Flared
static byte SERIF_NORMAL_SANS
          Serif style - Normal sans serif
static byte SERIF_OBTUSE_COVE
          Serif style - Obtuse cove
static byte SERIF_OBTUSE_SANS
          Serif style - Obtuse sans serif
static byte SERIF_OBTUSE_SQUARE_COVE
          Serif style - Obtuse square cove
static byte SERIF_PERP_SANS
          Serif style - Perp sans serif
static byte SERIF_ROUNDED
          Serif style - Rounded
static byte SERIF_SQUARE
          Serif style - Square
static byte SERIF_SQUARE_COVE
          Serif style - Square cove
static byte SERIF_THIN
          Serif style - Thin
static byte SERIF_TRIANGLE
          Serif style - Triangle
static byte STRAIGHT_ARMS_DOUBLE_SERIF
          Arm Style - Straight arms/double-serif
static byte STRAIGHT_ARMS_HORZ
          Arm Style - Straight arms/horizontal
static byte STRAIGHT_ARMS_SINGLE_SERIF
          Arm Style - Straight arms/single-serif
static byte STRAIGHT_ARMS_VERT
          Arm Style - Straight arms/vertical
static byte STRAIGHT_ARMS_WEDGE
          Arm Style - Straight arms/wedge
static byte STROKE_GRADUAL_DIAG
          Stroke Variation - Gradual/diagonal
static byte STROKE_GRADUAL_HORZ
          Stroke Variation - Gradual/horizontal
static byte STROKE_GRADUAL_TRAN
          Stroke Variation - Gradual/transitional
static byte STROKE_GRADUAL_VERT
          Stroke Variation - Gradual/vertical
static byte STROKE_INSTANT_HORZ
          Stroke Variation - Instant/horizontal
static byte STROKE_INSTANT_VERT
          Stroke Variation - Instant/vertical
static byte STROKE_NO_VARIATION
          Stroke Variation - No variation
static byte STROKE_RAPID_HORZ
          Stroke Variation - Rapid/horizontal
static byte STROKE_RAPID_VERT
          Stroke Variation - Rapid/vertical
static byte WEIGHT_BLACK
          Weight - Black [900]
static byte WEIGHT_BOLD
          Weight - Bold [700] same as CSS1 'bold'
static byte WEIGHT_BOOK
          Weight - Book [400] same as CSS1 'normal'
static byte WEIGHT_DEMI
          Weight - Demibold [600]
static byte WEIGHT_HEAVY
          Weight - Heavy [800]
static byte WEIGHT_LIGHT
          Weight - Light [200]
static byte WEIGHT_MEDIUM
          Weight - Medium [500]
static byte WEIGHT_NORD
          Weight - Extra Black/Nord [900] force mapping to CSS1 100-900 scale
static byte WEIGHT_THIN
          Weight - Thin [300]
static byte WEIGHT_VERY_LIGHT
          Weight - Very light [100]
static byte XHEIGHT_CONSTANT_LARGE
          XHeight - Constant/large
static byte XHEIGHT_CONSTANT_SMALL
          XHeight - Constant/small
static byte XHEIGHT_CONSTANT_STD
          XHeight - Constant/standard
static byte XHEIGHT_DUCKING_LARGE
          XHeight - Ducking/large
static byte XHEIGHT_DUCKING_SMALL
          XHeight - Ducking/small
static byte XHEIGHT_DUCKING_STD
          XHeight - Ducking/standard
 
Constructor Summary
Panose(byte[] panose)
          Construct panose-1 classifier from array of 10 bytes.
Panose(java.lang.String hex)
          Construct panose-1 classifier from the hexadecimal representation consisting of 20 hexadecimal digits.
 
Method Summary
 int ArmStyle()
          Return the arm style attribute [6]
 int Contrast()
          Return the contrast attribute [4]
 boolean equals(java.lang.Object obj)
          Compare this object with another panose classifier and return true if they coinside.
 int FamilyType()
          Return the family type attribute [0]
 int Letterform()
          Return the letterform attribute [7]
 int Midline()
          Return the midline attribute [8]
 int Proportion()
          Return the proportion attribute [3]
 int SerifStyle()
          Return the serif style attribute [1]
 int StrokeVariation()
          Return the stroke variation attribute [5]
 byte[] toByteArray()
          Return panose-1 classifier in array of 10 bytes.
 java.lang.String toString()
          Return ansii representation of panose classifier in the form "N N N N N N N N N N".
 int Weight()
          Return the weight attribute [2]
 int XHeight()
          Return the x-height attribute [9]
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANY

public static final byte ANY
Allows any font with specified Panose-1 attribute.

NO_FIT

public static final byte NO_FIT
No fit in the specified Panose-1 attribute.

FAMILY_TEXT_DISPLAY

public static final byte FAMILY_TEXT_DISPLAY
Family type - Text and display

FAMILY_SCRIPT

public static final byte FAMILY_SCRIPT
Family type - Script

FAMILY_DECORATIVE

public static final byte FAMILY_DECORATIVE
Family type - Decorative

FAMILY_PICTORIAL

public static final byte FAMILY_PICTORIAL
Family type - Pictorial

SERIF_COVE

public static final byte SERIF_COVE
Serif style - Cove

SERIF_OBTUSE_COVE

public static final byte SERIF_OBTUSE_COVE
Serif style - Obtuse cove

SERIF_SQUARE_COVE

public static final byte SERIF_SQUARE_COVE
Serif style - Square cove

SERIF_OBTUSE_SQUARE_COVE

public static final byte SERIF_OBTUSE_SQUARE_COVE
Serif style - Obtuse square cove

SERIF_SQUARE

public static final byte SERIF_SQUARE
Serif style - Square

SERIF_THIN

public static final byte SERIF_THIN
Serif style - Thin

SERIF_BONE

public static final byte SERIF_BONE
Serif style - Bone

SERIF_EXAGGERATED

public static final byte SERIF_EXAGGERATED
Serif style - Exaggerated

SERIF_TRIANGLE

public static final byte SERIF_TRIANGLE
Serif style - Triangle

SERIF_NORMAL_SANS

public static final byte SERIF_NORMAL_SANS
Serif style - Normal sans serif

SERIF_OBTUSE_SANS

public static final byte SERIF_OBTUSE_SANS
Serif style - Obtuse sans serif

SERIF_PERP_SANS

public static final byte SERIF_PERP_SANS
Serif style - Perp sans serif

SERIF_FLARED

public static final byte SERIF_FLARED
Serif style - Flared

SERIF_ROUNDED

public static final byte SERIF_ROUNDED
Serif style - Rounded

WEIGHT_VERY_LIGHT

public static final byte WEIGHT_VERY_LIGHT
Weight - Very light [100]

WEIGHT_LIGHT

public static final byte WEIGHT_LIGHT
Weight - Light [200]

WEIGHT_THIN

public static final byte WEIGHT_THIN
Weight - Thin [300]

WEIGHT_BOOK

public static final byte WEIGHT_BOOK
Weight - Book [400] same as CSS1 'normal'

WEIGHT_MEDIUM

public static final byte WEIGHT_MEDIUM
Weight - Medium [500]

WEIGHT_DEMI

public static final byte WEIGHT_DEMI
Weight - Demibold [600]

WEIGHT_BOLD

public static final byte WEIGHT_BOLD
Weight - Bold [700] same as CSS1 'bold'

WEIGHT_HEAVY

public static final byte WEIGHT_HEAVY
Weight - Heavy [800]

WEIGHT_BLACK

public static final byte WEIGHT_BLACK
Weight - Black [900]

WEIGHT_NORD

public static final byte WEIGHT_NORD
Weight - Extra Black/Nord [900] force mapping to CSS1 100-900 scale

PROP_OLD_STYLE

public static final byte PROP_OLD_STYLE
Proportion - Old style

PROP_MODERN

public static final byte PROP_MODERN
Proportion - Modern

PROP_EVEN_WIDTH

public static final byte PROP_EVEN_WIDTH
Proportion - Even width

PROP_EXPANDED

public static final byte PROP_EXPANDED
Proportion - Expanded

PROP_CONDENSED

public static final byte PROP_CONDENSED
Proportion - Condensed

PROP_VERY_EXPANDED

public static final byte PROP_VERY_EXPANDED
Proportion - Very expanded

PROP_VERY_CONDENSED

public static final byte PROP_VERY_CONDENSED
Proportion - Very condensed

PROP_MONOSPACED

public static final byte PROP_MONOSPACED
Proportion - Monospaced

CONTRAST_NONE

public static final byte CONTRAST_NONE
Contrast - None

CONTRAST_VERY_LOW

public static final byte CONTRAST_VERY_LOW
Contrast - Very low

CONTRAST_LOW

public static final byte CONTRAST_LOW
Contrast - Low

CONTRAST_MEDIUM_LOW

public static final byte CONTRAST_MEDIUM_LOW
Contrast - Medium low

CONTRAST_MEDIUM

public static final byte CONTRAST_MEDIUM
Contrast - Medium

CONTRAST_MEDIUM_HIGH

public static final byte CONTRAST_MEDIUM_HIGH
Contrast - Medium high

CONTRAST_HIGH

public static final byte CONTRAST_HIGH
Contrast - High

CONTRAST_VERY_HIGH

public static final byte CONTRAST_VERY_HIGH
Contrast - Very high

STROKE_NO_VARIATION

public static final byte STROKE_NO_VARIATION
Stroke Variation - No variation

STROKE_GRADUAL_DIAG

public static final byte STROKE_GRADUAL_DIAG
Stroke Variation - Gradual/diagonal

STROKE_GRADUAL_TRAN

public static final byte STROKE_GRADUAL_TRAN
Stroke Variation - Gradual/transitional

STROKE_GRADUAL_VERT

public static final byte STROKE_GRADUAL_VERT
Stroke Variation - Gradual/vertical

STROKE_GRADUAL_HORZ

public static final byte STROKE_GRADUAL_HORZ
Stroke Variation - Gradual/horizontal

STROKE_RAPID_VERT

public static final byte STROKE_RAPID_VERT
Stroke Variation - Rapid/vertical

STROKE_RAPID_HORZ

public static final byte STROKE_RAPID_HORZ
Stroke Variation - Rapid/horizontal

STROKE_INSTANT_VERT

public static final byte STROKE_INSTANT_VERT
Stroke Variation - Instant/vertical

STROKE_INSTANT_HORZ

public static final byte STROKE_INSTANT_HORZ
Stroke Variation - Instant/horizontal

STRAIGHT_ARMS_HORZ

public static final byte STRAIGHT_ARMS_HORZ
Arm Style - Straight arms/horizontal

STRAIGHT_ARMS_WEDGE

public static final byte STRAIGHT_ARMS_WEDGE
Arm Style - Straight arms/wedge

STRAIGHT_ARMS_VERT

public static final byte STRAIGHT_ARMS_VERT
Arm Style - Straight arms/vertical

STRAIGHT_ARMS_SINGLE_SERIF

public static final byte STRAIGHT_ARMS_SINGLE_SERIF
Arm Style - Straight arms/single-serif

STRAIGHT_ARMS_DOUBLE_SERIF

public static final byte STRAIGHT_ARMS_DOUBLE_SERIF
Arm Style - Straight arms/double-serif

BENT_ARMS_HORZ

public static final byte BENT_ARMS_HORZ
Arm Style - Nonstraight arms/horizontal

BENT_ARMS_WEDGE

public static final byte BENT_ARMS_WEDGE
Arm Style - Nonstraight arms/wedge

BENT_ARMS_VERT

public static final byte BENT_ARMS_VERT
Arm Style - Nonstraight arms/vertical

BENT_ARMS_SINGLE_SERIF

public static final byte BENT_ARMS_SINGLE_SERIF
Arm Style - Nonstraight arms/single-serif

BENT_ARMS_DOUBLE_SERIF

public static final byte BENT_ARMS_DOUBLE_SERIF
Arm Style - Nonstraight arms/double-serif

LETT_NORMAL_CONTACT

public static final byte LETT_NORMAL_CONTACT
Letterform - Normal/contact

LETT_NORMAL_WEIGHTED

public static final byte LETT_NORMAL_WEIGHTED
Letterform - Normal/weighted

LETT_NORMAL_BOXED

public static final byte LETT_NORMAL_BOXED
Letterform - Normal/boxed

LETT_NORMAL_FLATTENED

public static final byte LETT_NORMAL_FLATTENED
Letterform - Normal/flattened

LETT_NORMAL_ROUNDED

public static final byte LETT_NORMAL_ROUNDED
Letterform - Normal/rounded

LETT_NORMAL_OFF_CENTER

public static final byte LETT_NORMAL_OFF_CENTER
Letterform - Normal/off center

LETT_NORMAL_SQUARE

public static final byte LETT_NORMAL_SQUARE
Letterform - Normal/square

LETT_OBLIQUE_CONTACT

public static final byte LETT_OBLIQUE_CONTACT
Letterform - Oblique/contact

LETT_OBLIQUE_WEIGHTED

public static final byte LETT_OBLIQUE_WEIGHTED
Letterform - Oblique/weighted

LETT_OBLIQUE_BOXED

public static final byte LETT_OBLIQUE_BOXED
Letterform - Oblique/boxed

LETT_OBLIQUE_FLATTENED

public static final byte LETT_OBLIQUE_FLATTENED
Letterform - Oblique/flattened

LETT_OBLIQUE_ROUNDED

public static final byte LETT_OBLIQUE_ROUNDED
Letterform - Oblique/rounded

LETT_OBLIQUE_OFF_CENTER

public static final byte LETT_OBLIQUE_OFF_CENTER
Letterform - Oblique/off center

LETT_OBLIQUE_SQUARE

public static final byte LETT_OBLIQUE_SQUARE
Letterform - Oblique/square

MIDLINE_STANDARD_TRIMMED

public static final byte MIDLINE_STANDARD_TRIMMED
Midline - Standard/trimmed

MIDLINE_STANDARD_POINTED

public static final byte MIDLINE_STANDARD_POINTED
Midline - Standard/pointed

MIDLINE_STANDARD_SERIFED

public static final byte MIDLINE_STANDARD_SERIFED
Midline - Standard/serifed

MIDLINE_HIGH_TRIMMED

public static final byte MIDLINE_HIGH_TRIMMED
Midline - High/trimmed

MIDLINE_HIGH_POINTED

public static final byte MIDLINE_HIGH_POINTED
Midline - High/pointed

MIDLINE_HIGH_SERIFED

public static final byte MIDLINE_HIGH_SERIFED
Midline - High/serifed

MIDLINE_CONSTANT_TRIMMED

public static final byte MIDLINE_CONSTANT_TRIMMED
Midline - Constant/trimmed

MIDLINE_CONSTANT_POINTED

public static final byte MIDLINE_CONSTANT_POINTED
Midline - Constant/pointed

MIDLINE_CONSTANT_SERIFED

public static final byte MIDLINE_CONSTANT_SERIFED
Midline - Constant/serifed

MIDLINE_LOW_TRIMMED

public static final byte MIDLINE_LOW_TRIMMED
Midline - Low/trimmed

MIDLINE_LOW_POINTED

public static final byte MIDLINE_LOW_POINTED
Midline - Low/pointed

MIDLINE_LOW_SERIFED

public static final byte MIDLINE_LOW_SERIFED
Midline - Low/serifed

XHEIGHT_CONSTANT_SMALL

public static final byte XHEIGHT_CONSTANT_SMALL
XHeight - Constant/small

XHEIGHT_CONSTANT_STD

public static final byte XHEIGHT_CONSTANT_STD
XHeight - Constant/standard

XHEIGHT_CONSTANT_LARGE

public static final byte XHEIGHT_CONSTANT_LARGE
XHeight - Constant/large

XHEIGHT_DUCKING_SMALL

public static final byte XHEIGHT_DUCKING_SMALL
XHeight - Ducking/small

XHEIGHT_DUCKING_STD

public static final byte XHEIGHT_DUCKING_STD
XHeight - Ducking/standard

XHEIGHT_DUCKING_LARGE

public static final byte XHEIGHT_DUCKING_LARGE
XHeight - Ducking/large
Constructor Detail

Panose

public Panose(byte[] panose)
Construct panose-1 classifier from array of 10 bytes. On error, the IllegalArgumentException is thrown.

Panose

public Panose(java.lang.String hex)
Construct panose-1 classifier from the hexadecimal representation consisting of 20 hexadecimal digits. On error, the IllegalArgumentException is thrown.
Method Detail

FamilyType

public final int FamilyType()
Return the family type attribute [0]

SerifStyle

public final int SerifStyle()
Return the serif style attribute [1]

Weight

public final int Weight()
Return the weight attribute [2]

Proportion

public final int Proportion()
Return the proportion attribute [3]

Contrast

public final int Contrast()
Return the contrast attribute [4]

StrokeVariation

public final int StrokeVariation()
Return the stroke variation attribute [5]

ArmStyle

public final int ArmStyle()
Return the arm style attribute [6]

Letterform

public final int Letterform()
Return the letterform attribute [7]

Midline

public final int Midline()
Return the midline attribute [8]

XHeight

public final int XHeight()
Return the x-height attribute [9]

toByteArray

public byte[] toByteArray()
Return panose-1 classifier in array of 10 bytes.

toString

public java.lang.String toString()
Return ansii representation of panose classifier in the form "N N N N N N N N N N".
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Compare this object with another panose classifier and return true if they coinside.
Overrides:
equals in class java.lang.Object