Font¶
-
php\swing\Font
Constants
Properties
- property
family¶
stringread-only
Family name of font
- property
fontName¶
stringread-only
- property
name¶
stringread-only
- property
psName¶
stringread-only
PostScript name of font
- property
size¶
intread-only
- property
size2D¶
intread-only
- property
style¶
intread-only
- property
italicAngle¶
doubleread-only
- property
attributes¶
string[]read-only
- property
numGlyphs¶
intread-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