Documentation/GdiFont
class

GdiFont

js/foo_uie_jsplitter.js:4363
GdiFont(name, size_px, style)

Constructor may fail if font is not present.

Performance note: try caching and reusing GdiFont objects, since the maximum amount of such objects is hard-limited by Windows. GdiFont creation will fail after reaching this limit.

Parameters

NameTypeDescription
namestring
size_pxnumber

See Point2Pixel function for conversions

style = 0optionalnumber

See FontStyle flags

propertyreadonly

Height

js/foo_uie_jsplitter.js:4376
Height: number

Example

console.log(my_font.Height); // 15
propertyreadonly

Name

js/foo_uie_jsplitter.js:4385
Name: string

Example

console.log(my_font.Name); // Segoe UI
propertyreadonly

Size

js/foo_uie_jsplitter.js:4394
Size: float

Example

console.log(my_font.Size); // 12
propertyreadonly

Style

js/foo_uie_jsplitter.js:4403
Style: number

See FontStyle flags for value interpretation.

Example

console.log(my_font.Style);