Forge
font.h
Go to the documentation of this file.
1/*******************************************************
2 * Copyright (c) 2015-2019, ArrayFire
3 * All rights reserved.
4 *
5 * This file is distributed under 3-clause BSD license.
6 * The complete license agreement can be obtained at:
7 * http://arrayfire.com/licenses/BSD-3-Clause
8 ********************************************************/
9
10#pragma once
11#include <fg/defines.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
29
39
48
57FGAPI fg_err fg_load_font_file(fg_font pFont, const char* const pFileFullPath);
58
67FGAPI fg_err fg_load_system_font(fg_font pFont, const char* const pFontName);
68
71#ifdef __cplusplus
72}
73#endif
74
75
76#ifdef __cplusplus
77
78namespace forge
79{
80
86class Font {
87 private:
88 fg_font mValue;
89
90 public:
95
101 FGAPI Font(const Font& other);
102
107
113 FGAPI void loadFontFile(const char* const pFile);
114
120 FGAPI void loadSystemFont(const char* const pName);
121
126};
127
128}
129
130#endif
Font object is essentially a resource handler for the specific font you want to use.
Definition: font.h:86
FGAPI Font()
Creates Font object.
FGAPI void loadFontFile(const char *const pFile)
Load a given font file.
FGAPI fg_font get() const
Get handle for internal implementation of Font object.
FGAPI Font(const Font &other)
Copy constructor for Font.
FGAPI void loadSystemFont(const char *const pName)
Load a system font based on the name.
FGAPI ~Font()
Font Destructor.
#define FGAPI
Definition: defines.h:28
void * fg_font
Definition: defines.h:41
fg_err
Definition: defines.h:49
FGAPI fg_err fg_retain_font(fg_font *pOut, fg_font pIn)
Increase reference count of the resource.
FGAPI fg_err fg_load_font_file(fg_font pFont, const char *const pFileFullPath)
Load a given font file.
FGAPI fg_err fg_release_font(fg_font pFont)
Destroy font object.
FGAPI fg_err fg_create_font(fg_font *pFont)
Create a Font object.
FGAPI fg_err fg_load_system_font(fg_font pFont, const char *const pFontName)
Load a system font based on the name.
Definition: chart.h:305