public final class PPFont
extends java.lang.Object
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.Modifier and Type | Field | Description |
---|---|---|
static byte |
ANSI_CHARSET |
ANSI character set
|
static PPFont |
ARIAL |
|
protected int |
charset |
|
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 |
|
protected int |
flags |
|
protected java.lang.String |
name |
|
protected int |
pitch |
|
static byte |
SYMBOL_CHARSET |
Symbol character set
|
static PPFont |
TIMES_NEW_ROMAN |
|
protected int |
type |
|
static byte |
VARIABLE_PITCH |
|
static PPFont |
WINGDINGS |
Constructor | Description |
---|---|
PPFont() |
Creates a new instance of PPFont
|
PPFont(FontEntityAtom fontAtom) |
Creates a new instance of PPFont and initialize it from the supplied font atom
|
Modifier and Type | Method | Description |
---|---|---|
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
|
public static final byte ANSI_CHARSET
public static final byte DEFAULT_CHARSET
public static final byte SYMBOL_CHARSET
public static final byte DEFAULT_PITCH
public static final byte FIXED_PITCH
public static final byte VARIABLE_PITCH
public static final byte FF_DONTCARE
public static final byte FF_ROMAN
public static final byte FF_SWISS
public static final byte FF_SCRIPT
public static final byte FF_MODERN
public static final byte FF_DECORATIVE
protected int charset
protected int type
protected int flags
protected int pitch
protected java.lang.String name
public static final PPFont ARIAL
public static final PPFont TIMES_NEW_ROMAN
public static final PPFont COURIER_NEW
public static final PPFont WINGDINGS
public PPFont()
public PPFont(FontEntityAtom fontAtom)
public void setFontName(java.lang.String val)
val
- String representing the name of the font to usepublic java.lang.String getFontName()
public void setCharSet(int val)
val
- - charactersetpublic int getCharSet()
public void setFontFlags(int val)
val
- - the font flagspublic int getFontFlags()
public void setFontType(int val)
Bit 1: Raster Font Bit 2: Device Font Bit 3: TrueType Font
val
- - the font typepublic int getFontType()
Bit 1: Raster Font Bit 2: Device Font Bit 3: TrueType Font
public void setPitchAndFamily(int val)
val
- - Corresponds to the lfPitchAndFamily field of the Win32 API LOGFONT structurepublic int getPitchAndFamily()
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.