Forge: font.h Source File

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
14 extern "C" {
15 #endif
16
28 FGAPI fg_err fg_create_font(fg_font* pFont);
29
37 FGAPI fg_err fg_destroy_font(fg_font pFont);
38
47 FGAPI fg_err fg_load_font_file(fg_font pFont, const char* const pFileFullPath);
48
57 FGAPI fg_err fg_load_system_font(fg_font pFont, const char* const pFontName);
58
61 #ifdef __cplusplus
62 }
63 #endif
64
65
66 #ifdef __cplusplus
67
68 namespace forge
69 {
70
76 class Font {
77 private:
78 fg_font mValue;
79
80 public:
84 FGAPI Font();
85
91 FGAPI Font(const Font& other);
92
96 FGAPI ~Font();
97
103 FGAPI void loadFontFile(const char* const pFile);
104
110 FGAPI void loadSystemFont(const char* const pName);
111
115 FGAPI fg_font get() const;
116 };
117
118 }
119
120 #endif
fg_load_font_file
FGAPI fg_err fg_load_font_file(fg_font pFont, const char *const pFileFullPath)
Load a given font file.
forge
Definition: chart.h:214
forge::Font::~Font
FGAPI ~Font()
Font Destructor.
FGAPI
#define FGAPI
Definition: defines.h:28
defines.h
forge::Font::loadSystemFont
FGAPI void loadSystemFont(const char *const pName)
Load a system font based on the name.
forge::Font
Font object is essentially a resource handler for the specific font you want to use.
Definition: font.h:76
fg_err
fg_err
Definition: defines.h:49
fg_font
void * fg_font
Definition: defines.h:41
fg_create_font
FGAPI fg_err fg_create_font(fg_font *pFont)
Create a Font object.
fg_load_system_font
FGAPI fg_err fg_load_system_font(fg_font pFont, const char *const pFontName)
Load a system font based on the name.
fg_destroy_font
FGAPI fg_err fg_destroy_font(fg_font pFont)
Destroy font object.
forge::Font::loadFontFile
FGAPI void loadFontFile(const char *const pFile)
Load a given font file.
forge::Font::Font
FGAPI Font()
Creates Font object.