Class: FontMeasurements
core/FontMeasurements.FontMeasurements
Contains measurements for the user's font
Constructors
constructor
• new FontMeasurements(graph
)
Parameters
Name | Type |
---|---|
graph | Graph |
Defined in
core/FontMeasurements.ts:24
Properties
characterHeight
• characterHeight: number
The height of a character in the user's chosen font and font size. The height is measured from the baseline to the top of a letter
Defined in
core/FontMeasurements.ts:19
characterWidth
• characterWidth: number
The width of a character in the user's chosen font and font size.
Defined in
core/FontMeasurements.ts:13
extensionContext
• Private
extensionContext: ExtensionContext
Defined in
core/FontMeasurements.ts:21
fontSize
• fontSize: number
Defined in
core/FontMeasurements.ts:8
initialized
• Private
initialized: boolean
= false
Defined in
core/FontMeasurements.ts:22
Methods
calculate
▸ calculate(): Promise
<void
>
Returns
Promise
<void
>
Defined in
core/FontMeasurements.ts:39
clearCache
▸ clearCache(): void
Returns
void
Defined in
core/FontMeasurements.ts:31
init
▸ init(extensionContext
): void
Parameters
Name | Type |
---|---|
extensionContext | ExtensionContext |
Returns
void
Defined in
core/FontMeasurements.ts:26