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)¶
Parameters:
- $name – string
- $style – int - - PLAIN, BOLD, ITALIC
- $size – int
isBold
()¶
Returns: bool
isItalic
()¶
Returns: bool
isPlain
()¶
Returns: bool
isTransformed
()¶
Returns: bool
getBaselineFor
($symbol)¶
Parameters:
- $symbol – string - - one char
Returns: int
canDisplay
($symbol)¶
Parameters:
- $symbol – string - - one char
Returns: bool
canDisplayUpTo
($string)¶Indicates whether or not this Font can display a specified String.
Parameters:
- $string – string
Returns: int - an offset into $string that points to the first character in $string that this
Font cannot display; or -1 if this Font can display all characters in $string.
- static
decode
($str)¶Decode font by using a specified string
Parameters:
- $str – string
Returns:
- static
create
($source, $trueType = true)¶Create new font by using Stream or File
throws php\io\IOException
throws php\swing\\Exception
Parameters:
- $source – string, php\io\Stream
- $trueType – bool
Returns:
- static
get
($name)¶Get font by name
Parameters:
- $name – string
Returns: php\swing\Font, null - return null if not exists