-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathfont.cpp
More file actions
62 lines (49 loc) · 1.29 KB
/
Copy pathfont.cpp
File metadata and controls
62 lines (49 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*******************************************************
* Copyright (c) 2015-2019, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
#include <common/font.hpp>
#include <common/handle.hpp>
#include <fg/font.h>
using namespace forge;
using forge::common::getFont;
fg_err fg_create_font(fg_font* pFont) {
try {
*pFont = getHandle(new common::Font());
}
CATCHALL
return FG_ERR_NONE;
}
fg_err fg_retain_font(fg_font* pOut, fg_font pIn) {
try {
common::Font* temp = new common::Font(getFont(pIn));
*pOut = getHandle(temp);
}
CATCHALL
return FG_ERR_NONE;
}
fg_err fg_release_font(fg_font pFont) {
try {
delete getFont(pFont);
}
CATCHALL
return FG_ERR_NONE;
}
fg_err fg_load_font_file(fg_font pFont, const char* const pFileFullPath) {
try {
getFont(pFont)->loadFont(pFileFullPath);
}
CATCHALL
return FG_ERR_NONE;
}
fg_err fg_load_system_font(fg_font pFont, const char* const pFontName) {
try {
getFont(pFont)->loadSystemFont(pFontName);
}
CATCHALL
return FG_ERR_NONE;
}