Font

Native font.

Header#include "nativeui/gfx/font.h"
Namespacenamespace nu
Typeclass (RefCounted)

To get the default font used for displaying text, you should use the App::GetDefaultFont() API.

Constructors

Font(const std::string& name, float size, Font::Weight weight, Font::Style style)

Create a Font implementation with the specified name, DIP size, weight and style.

Parameters

Methods

std::string GetName() const

Return font's family name.

Return

std::string

float GetSize() const

Return font's DIP size.

Return

float

Font::Weight GetWeight() const

Return the font weight.

Return

Font::Weight

Font::Style GetStyle() const

Return the font style.

Return

Font::Style

NativeFont GetNative() const

Return the native instance wrapped by the class.

Return

NativeFont