Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hslf.model
Class PPFont

    java.lang.Object
      org.apache.poi.hslf.model.PPFont

    public final class PPFont

extends java.lang.Object

Represents a Font used in a presenation.

In PowerPoint Font is a shared resource and can be shared among text object in the presentation.

Some commonly used fonts are predefined in static constants.

Author:
  Yegor Kozlov

Field Summary
`static byte` | `ANSI_CHARSET` ANSI character set
`static PPFont` | `ARIAL`
`static PPFont` | `COURIER_NEW`
`static byte` | `DEFAULT_CHARSET` Default character set.
`static byte` | `DEFAULT_PITCH` Constants for the pitch and family of the font.
`static byte` | `FF_DECORATIVE` Novelty fonts.
`static byte` | `FF_DONTCARE` Don't care or don't know.
`static byte` | `FF_MODERN` Fonts with constant stroke width (monospace), with or without serifs.
`static byte` | `FF_ROMAN` Fonts with variable stroke width (proportional) and with serifs.
`static byte` | `FF_SCRIPT` Fonts designed to look like handwriting.
`static byte` | `FF_SWISS` Fonts with variable stroke width (proportional) and without serifs.
`static byte` | `FIXED_PITCH`
`static byte` | `SYMBOL_CHARSET` Symbol character set
`static PPFont` | `TIMES_NEW_ROMAN`
`static byte` | `VARIABLE_PITCH`
`static PPFont` | `WINGDINGS`

Constructor Summary
`PPFont()` Creates a new instance of PPFont
`PPFont(FontEntityAtom fontAtom)` Creates a new instance of PPFont and initialize it from the supplied font atom

Method Summary
`int` | `getCharSet()` get the character set
`int` | `getFontFlags()` get the character set Bit 1: If set, font is subsetted
`java.lang.String` | `getFontName()` get the name for the font (i.e.
`int` | `getFontType()` get the font type
`int` | `getPitchAndFamily()` get lfPitchAndFamily
`void` | `setCharSet(int val)` set the character set
`void` | `setFontFlags(int val)` set the font flags Bit 1: If set, font is subsetted
`void` | `setFontName(java.lang.String val)` set the name for the font (i.e.
`void` | `setFontType(int val)` set the font type
`void` | `setPitchAndFamily(int val)` set lfPitchAndFamily

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ANSI_CHARSET

    public static final byte ANSI_CHARSET

  ANSI character set

  See Also:
    Constant Field Values

### DEFAULT_CHARSET

    public static final byte DEFAULT_CHARSET

  Default character set.

  See Also:
    Constant Field Values

### SYMBOL_CHARSET

    public static final byte SYMBOL_CHARSET

  Symbol character set

  See Also:
    Constant Field Values

### DEFAULT_PITCH

    public static final byte DEFAULT_PITCH

  Constants for the pitch and family of the font. The two low-order bits specify the pitch of the font and can be one of the following values

  See Also:
    Constant Field Values

### FIXED_PITCH

    public static final byte FIXED_PITCH

See Also:
  Constant Field Values

### VARIABLE_PITCH

    public static final byte VARIABLE_PITCH

See Also:
  Constant Field Values

### FF_DONTCARE

    public static final byte FF_DONTCARE

  Don't care or don't know.

  See Also:
    Constant Field Values

### FF_ROMAN

    public static final byte FF_ROMAN

  Fonts with variable stroke width (proportional) and with serifs. Times New Roman is an example.

  See Also:
    Constant Field Values

### FF_SWISS

    public static final byte FF_SWISS

  Fonts with variable stroke width (proportional) and without serifs. Arial is an example.

  See Also:
    Constant Field Values

### FF_SCRIPT

    public static final byte FF_SCRIPT

  Fonts designed to look like handwriting. Script and Cursive are examples.

  See Also:
    Constant Field Values

### FF_MODERN

    public static final byte FF_MODERN

  Fonts with constant stroke width (monospace), with or without serifs. Monospace fonts are usually modern. CourierNew is an example

  See Also:
    Constant Field Values

### FF_DECORATIVE

    public static final byte FF_DECORATIVE

  Novelty fonts. Old English is an example

  See Also:
    Constant Field Values

### ARIAL

    public static final PPFont ARIAL

### TIMES_NEW_ROMAN

    public static final PPFont TIMES_NEW_ROMAN

### COURIER_NEW

    public static final PPFont COURIER_NEW

### WINGDINGS

    public static final PPFont WINGDINGS

Constructor Detail

### PPFont

    public PPFont()

  Creates a new instance of PPFont

### PPFont

    public PPFont(FontEntityAtom fontAtom)

  Creates a new instance of PPFont and initialize it from the supplied font atom

Method Detail

### setFontName

    public void setFontName(java.lang.String val)

  set the name for the font (i.e. Arial)

  Parameters:
    `val` - String representing the name of the font to use

### getFontName

    public java.lang.String getFontName()

  get the name for the font (i.e. Arial)

  Returns:
    String representing the name of the font to use

### setCharSet

    public void setCharSet(int val)

  set the character set

  Parameters:
    `val` - - characterset

### getCharSet

    public int getCharSet()

  get the character set

  Returns:
    charset - characterset

### setFontFlags

    public void setFontFlags(int val)

  set the font flags Bit 1: If set, font is subsetted

  Parameters:
    `val` - - the font flags

### getFontFlags

    public int getFontFlags()

  get the character set Bit 1: If set, font is subsetted

  Returns:
    the font flags

### setFontType

    public void setFontType(int val)

  set the font type

  Bit 1: Raster Font Bit 2: Device Font Bit 3: TrueType Font

  Parameters:
    `val` - - the font type

### getFontType

    public int getFontType()

  get the font type

  Bit 1: Raster Font Bit 2: Device Font Bit 3: TrueType Font

  Returns:
    the font type

### setPitchAndFamily

    public void setPitchAndFamily(int val)

  set lfPitchAndFamily

  Parameters:
    `val` - - Corresponds to the lfPitchAndFamily field of the Win32 API LOGFONT structure

### getPitchAndFamily

    public int getPitchAndFamily()

  get lfPitchAndFamily

  Returns:
    corresponds to the lfPitchAndFamily field of the Win32 API LOGFONT structure

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD