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 
29 
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
FGAPI fg_err fg_load_font_file(fg_font pFont, const char *const pFileFullPath)
Load a given font file.
Definition: chart.h:214
FGAPI ~Font()
Font Destructor.
#define FGAPI
Definition: defines.h:28
FGAPI void loadSystemFont(const char *const pName)
Load a system font based on the name.
Font object is essentially a resource handler for the specific font you want to use.
Definition: font.h:76
fg_err
Definition: defines.h:49
void * fg_font
Definition: defines.h:41
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.
FGAPI fg_err fg_destroy_font(fg_font pFont)
Destroy font object.
FGAPI void loadFontFile(const char *const pFile)
Load a given font file.
FGAPI Font()
Creates Font object.