{
  "name": "Font",
  "component": "gui",
  "header": "nativeui/gfx/font.h",
  "type": "refcounted",
  "namespace": "nu",
  "description": "Native font.",
  "constructors": [
    {
      "signature": {
        "name": "Font",
        "parameters": [
          {
            "type": {
              "name": "const std::string&"
            },
            "name": "name"
          },
          {
            "type": {
              "name": "float"
            },
            "name": "size"
          },
          {
            "type": {
              "name": "Font::Weight",
              "id": "font_weight"
            },
            "name": "weight"
          },
          {
            "type": {
              "name": "Font::Style",
              "id": "font_style"
            },
            "name": "style"
          }
        ],
        "shortStr": "Font(name, size, weight, style)",
        "str": "Font(const std::string& name, float size, Font::Weight weight, Font::Style style)"
      },
      "description": "Create a Font implementation with the specified `name`, DIP `size`,\n`weight` and `style`.\n",
      "id": "font-name-size-weight-style"
    },
    {
      "signature": {
        "name": "Font",
        "parameters": [
          {
            "type": {
              "name": "const base::FilePath&"
            },
            "name": "path"
          },
          {
            "type": {
              "name": "float"
            },
            "name": "size"
          }
        ],
        "shortStr": "Font(path, size)",
        "str": "Font(const base::FilePath& path, float size)"
      },
      "description": "Create a Font by reading from |path|. If the font file contains multiple\nfamilies or weights, only the first encountered font will be used.\n",
      "id": "font-path-size"
    }
  ],
  "class_methods": [
    {
      "signature": {
        "returnType": {
          "name": "Font*",
          "id": "font"
        },
        "name": "Default",
        "parameters": [],
        "shortStr": "Default()",
        "str": "Font* Default()"
      },
      "description": "Return the default font used for displaying text.",
      "id": "default"
    }
  ],
  "methods": [
    {
      "signature": {
        "returnType": {
          "name": "Font*",
          "id": "font"
        },
        "name": "Derive",
        "parameters": [
          {
            "type": {
              "name": "float"
            },
            "name": "size_delta"
          },
          {
            "type": {
              "name": "Font::Weight",
              "id": "font_weight"
            },
            "name": "weight"
          },
          {
            "type": {
              "name": "Font::Style",
              "id": "font_style"
            },
            "name": "style"
          }
        ],
        "shortStr": "Derive(size_delta, weight, style)",
        "str": "Font* Derive(float size_delta, Font::Weight weight, Font::Style style) const"
      },
      "description": "Returns a new Font derived from the existing font.",
      "detail": "The `size_delta` is the size in DIP to add to the current font.",
      "id": "derive-sizedelta-weight-style"
    },
    {
      "signature": {
        "returnType": {
          "name": "std::string"
        },
        "name": "GetName",
        "parameters": [],
        "shortStr": "GetName()",
        "str": "std::string GetName() const"
      },
      "description": "Return font's family name.",
      "id": "getname"
    },
    {
      "signature": {
        "returnType": {
          "name": "float"
        },
        "name": "GetSize",
        "parameters": [],
        "shortStr": "GetSize()",
        "str": "float GetSize() const"
      },
      "description": "Return font's DIP size.",
      "id": "getsize"
    },
    {
      "signature": {
        "returnType": {
          "name": "Font::Weight",
          "id": "font_weight"
        },
        "name": "GetWeight",
        "parameters": [],
        "shortStr": "GetWeight()",
        "str": "Font::Weight GetWeight() const"
      },
      "description": "Return the font weight.",
      "id": "getweight"
    },
    {
      "signature": {
        "returnType": {
          "name": "Font::Style",
          "id": "font_style"
        },
        "name": "GetStyle",
        "parameters": [],
        "shortStr": "GetStyle()",
        "str": "Font::Style GetStyle() const"
      },
      "description": "Return the font style.",
      "id": "getstyle"
    },
    {
      "signature": {
        "returnType": {
          "name": "NativeFont",
          "id": "nativefont"
        },
        "name": "GetNative",
        "parameters": [],
        "shortStr": "GetNative()",
        "str": "NativeFont GetNative() const"
      },
      "description": "Return the native instance wrapped by the class.",
      "id": "getnative"
    }
  ],
  "id": "font"
}