Top Description Fields Constructors Methods
org.apache.poi.common.usermodel.fonts

public final Enum FontPitch

extends Enum<FontPitch>
Class Inheritance

A property of a font that describes the pitch, of the characters.
Since
POI 3.17-beta2

Field Summary

Modifier and TypeField and Description
public static final FontPitch
DEFAULT

The default pitch, which is implementation-dependent.

public static final FontPitch
FIXED

A fixed pitch, which means that all the characters in the font occupy the same width when output in a string.

private int
public static final FontPitch
VARIABLE

A variable pitch, which means that the characters in the font occupy widths that are proportional to the actual widths of the glyphs when output in a string.

Constructor Summary

AccessConstructor and Description
private
FontPitch(int nativeId)

Method Summary

Modifier and TypeMethod and Description
public int
public static byte

Returns:

The resulting combined byte-value with pitch and family encoded into one byte
getNativeId
(FontPitch
The pitch-value, cannot be null
pitch
,
FontFamily
The family-value, cannot be null
family
)

Combine pitch and family to native id

public static FontPitch
public static FontPitch
valueOf(int flag)

public static FontPitch

Returns:

The resulting FontPitch enumeration value
valueOfPitchFamily
(byte
The combined byte value for pitch and family
pitchAndFamily
)

Get FontPitch from native id

public static FontPitch[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEFAULTback to summary
public static final FontPitch DEFAULT

The default pitch, which is implementation-dependent.

FIXEDback to summary
public static final FontPitch FIXED

A fixed pitch, which means that all the characters in the font occupy the same width when output in a string.

nativeIdback to summary
private int nativeId
VARIABLEback to summary
public static final FontPitch VARIABLE

A variable pitch, which means that the characters in the font occupy widths that are proportional to the actual widths of the glyphs when output in a string. For example, the "i" and space characters usually have much smaller widths than a "W" or "O" character.

Constructor Detail

FontPitchback to summary
private FontPitch(int nativeId)

Method Detail

getNativeIdback to summary
public int getNativeId()
getNativeIdback to summary
public static byte getNativeId(FontPitch pitch, FontFamily family)

Combine pitch and family to native id

Parameters
pitch:FontPitch

The pitch-value, cannot be null

family:FontFamily

The family-value, cannot be null

Returns:byte

The resulting combined byte-value with pitch and family encoded into one byte

See Also
LOGFONT structure
valueOfback to summary
public static FontPitch valueOf(String name)
valueOfback to summary
public static FontPitch valueOf(int flag)
valueOfPitchFamilyback to summary
public static FontPitch valueOfPitchFamily(byte pitchAndFamily)

Get FontPitch from native id

Parameters
pitchAndFamily:byte

The combined byte value for pitch and family

Returns:FontPitch

The resulting FontPitch enumeration value

valuesback to summary
public static FontPitch[] values()