Font¶
-
php\swing\Font
Constants
Properties
- property
family
¶
string
read-only
Family name of font
- property
fontName
¶
string
read-only
- property
name
¶
string
read-only
- property
psName
¶
string
read-only
PostScript name of font
- property
size
¶
int
read-only
- property
size2D
¶
int
read-only
- property
style
¶
int
read-only
- property
italicAngle
¶
double
read-only
- property
attributes
¶
string[]
read-only
- property
numGlyphs
¶
int
read-only
Methods
__construct
($name, $style, $size)¶
Параметры:
- $name –
string
- $style –
int
- - PLAIN, BOLD, ITALIC- $size –
int
isBold
()¶
Результат: bool
isItalic
()¶
Результат: bool
isPlain
()¶
Результат: bool
isTransformed
()¶
Результат: bool
getBaselineFor
($symbol)¶
Параметры:
- $symbol –
string
- - one charРезультат:
int
canDisplay
($symbol)¶
Параметры:
- $symbol –
string
- - one charРезультат:
bool
canDisplayUpTo
($string)¶Indicates whether or not this Font can display a specified String.
Параметры:
- $string –
string
Результат:
int
- an offset into $string that points to the first character in $string that thisFont cannot display; or -1 if this Font can display all characters in $string.
- static
decode
($str)¶Decode font by using a specified string
Параметры:
- $str –
string
Результат:
- static
create
($source, $trueType = true)¶Create new font by using Stream or File
throws php\io\IOException
throws
php\swing\\Exception
Параметры:
- $source –
string
, php\io\Stream- $trueType –
bool
Результат:
- static
get
($name)¶Get font by name
Параметры:
- $name –
string
Результат: php\swing\Font,
null
- return null if not exists