Preparing search index...
The search index is not available
@turbowarp/types-tw
@turbowarp/types-tw
scratch-vm
VM
FontManager
Interface FontManager
interface
FontManager
{
fonts
:
{
asset
?:
Asset
;
fallback
:
string
;
family
:
string
;
system
:
boolean
;
}
[]
;
restrictedFonts
:
Set
<
string
>
;
runtime
:
Runtime
;
addCustomFont
(
family
:
string
,
fallback
:
string
,
asset
:
Asset
)
:
void
;
addSystemFont
(
family
:
string
,
fallback
:
string
)
:
void
;
changed
()
:
void
;
clear
()
:
void
;
deleteFont
(
index
:
number
)
:
void
;
deserialize
(
json
:
unknown
,
zip
?:
JSZip
,
keepExisting
?:
boolean
,
)
:
Promise
<
void
>
;
emit
<
K
extends
"change"
>
(
event
:
K
,
...
args
:
EventEmitterArgs
<
FontManagerEvents
,
K
>
,
)
:
void
;
getFonts
()
:
{
data
:
null
|
Uint8Array
;
family
:
string
;
format
:
null
|
string
;
name
:
string
;
system
:
boolean
;
}
[]
;
getUnusedCustomFont
(
family
:
string
)
:
string
;
getUnusedSystemFont
(
family
:
string
)
:
string
;
hasFont
(
family
:
string
)
:
boolean
;
isValidCustomFont
(
family
:
string
)
:
boolean
;
isValidFamily
(
family
:
string
)
:
boolean
;
isValidSystemFont
(
family
:
string
)
:
boolean
;
listeners
<
K
extends
"change"
>
(
event
:
K
,
)
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
[]
;
off
<
K
extends
"change"
>
(
event
:
K
,
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
,
)
:
void
;
on
<
K
extends
"change"
>
(
event
:
K
,
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
,
)
:
void
;
once
<
K
extends
"change"
>
(
event
:
K
,
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
,
)
:
void
;
removeListener
<
K
extends
"change"
>
(
event
:
K
,
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
,
)
:
void
;
restrictFont
(
font
:
string
)
:
void
;
serializeAssets
()
:
Asset
[]
;
serializeJSON
()
:
unknown
;
updateRenderer
()
:
void
;
}
Hierarchy (
View Summary
)
EventEmitter
<
FontManagerEvents
>
FontManager
Index
Properties
fonts
restricted
Fonts
runtime
Methods
add
Custom
Font
add
System
Font
changed
clear
delete
Font
deserialize
emit
get
Fonts
get
Unused
Custom
Font
get
Unused
System
Font
has
Font
is
Valid
Custom
Font
is
Valid
Family
is
Valid
System
Font
listeners
off
on
once
remove
Listener
restrict
Font
serialize
Assets
serializeJSON
update
Renderer
Properties
fonts
fonts
:
{
asset
?:
Asset
;
fallback
:
string
;
family
:
string
;
system
:
boolean
}
[]
restricted
Fonts
restrictedFonts
:
Set
<
string
>
runtime
runtime
:
Runtime
Methods
add
Custom
Font
addCustomFont
(
family
:
string
,
fallback
:
string
,
asset
:
Asset
)
:
void
Parameters
family
:
string
fallback
:
string
asset
:
Asset
Returns
void
add
System
Font
addSystemFont
(
family
:
string
,
fallback
:
string
)
:
void
Parameters
family
:
string
fallback
:
string
Returns
void
changed
changed
()
:
void
Returns
void
clear
clear
()
:
void
Returns
void
delete
Font
deleteFont
(
index
:
number
)
:
void
Parameters
index
:
number
Returns
void
deserialize
deserialize
(
json
:
unknown
,
zip
?:
JSZip
,
keepExisting
?:
boolean
)
:
Promise
<
void
>
Parameters
json
:
unknown
Optional
zip
:
JSZip
Optional
keepExisting
:
boolean
Returns
Promise
<
void
>
emit
emit
<
K
extends
"change"
>
(
event
:
K
,
...
args
:
EventEmitterArgs
<
FontManagerEvents
,
K
>
,
)
:
void
Type Parameters
K
extends
"change"
Parameters
event
:
K
...
args
:
EventEmitterArgs
<
FontManagerEvents
,
K
>
Returns
void
get
Fonts
getFonts
()
:
{
data
:
null
|
Uint8Array
;
family
:
string
;
format
:
null
|
string
;
name
:
string
;
system
:
boolean
;
}
[]
Returns
{
data
:
null
|
Uint8Array
;
family
:
string
;
format
:
null
|
string
;
name
:
string
;
system
:
boolean
;
}
[]
get
Unused
Custom
Font
getUnusedCustomFont
(
family
:
string
)
:
string
Parameters
family
:
string
Returns
string
get
Unused
System
Font
getUnusedSystemFont
(
family
:
string
)
:
string
Parameters
family
:
string
Returns
string
has
Font
hasFont
(
family
:
string
)
:
boolean
Parameters
family
:
string
Returns
boolean
is
Valid
Custom
Font
isValidCustomFont
(
family
:
string
)
:
boolean
Parameters
family
:
string
Returns
boolean
is
Valid
Family
isValidFamily
(
family
:
string
)
:
boolean
Parameters
family
:
string
Returns
boolean
Deprecated
use isValidSystemFont or isValidCustomFont instead
is
Valid
System
Font
isValidSystemFont
(
family
:
string
)
:
boolean
Parameters
family
:
string
Returns
boolean
listeners
listeners
<
K
extends
"change"
>
(
event
:
K
,
)
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
[]
Type Parameters
K
extends
"change"
Parameters
event
:
K
Returns
EventEmitterCallback
<
FontManagerEvents
,
K
>
[]
off
off
<
K
extends
"change"
>
(
event
:
K
,
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
,
)
:
void
Type Parameters
K
extends
"change"
Parameters
event
:
K
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
Returns
void
on
on
<
K
extends
"change"
>
(
event
:
K
,
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
,
)
:
void
Type Parameters
K
extends
"change"
Parameters
event
:
K
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
Returns
void
once
once
<
K
extends
"change"
>
(
event
:
K
,
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
,
)
:
void
Type Parameters
K
extends
"change"
Parameters
event
:
K
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
Returns
void
remove
Listener
removeListener
<
K
extends
"change"
>
(
event
:
K
,
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
,
)
:
void
Type Parameters
K
extends
"change"
Parameters
event
:
K
callback
:
EventEmitterCallback
<
FontManagerEvents
,
K
>
Returns
void
restrict
Font
restrictFont
(
font
:
string
)
:
void
Parameters
font
:
string
Returns
void
serialize
Assets
serializeAssets
()
:
Asset
[]
Returns
Asset
[]
serializeJSON
serializeJSON
()
:
unknown
Returns
unknown
update
Renderer
updateRenderer
()
:
void
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
fonts
restricted
Fonts
runtime
Methods
add
Custom
Font
add
System
Font
changed
clear
delete
Font
deserialize
emit
get
Fonts
get
Unused
Custom
Font
get
Unused
System
Font
has
Font
is
Valid
Custom
Font
is
Valid
Family
is
Valid
System
Font
listeners
off
on
once
remove
Listener
restrict
Font
serialize
Assets
serializeJSON
update
Renderer
@turbowarp/types-tw
Loading...
Deprecated
use isValidSystemFont or isValidCustomFont instead