GdiFont(name, size_px, styleopt)

new GdiFont(name, size_px, styleopt)

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:
Name Type Attributes Default Description
name string
size_px number See Helper.js > Point2Pixel function for conversions
style number <optional>
0 See Flags.js > FontStyle

Members

readonly Height :number

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

readonly Name :string

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

readonly Size :float

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

readonly Style :number

See Flags.js > FontStyle for value interpretation.
Example
console.log(my_font.Style);