font.h
Go to the documentation of this file.
/*******************************************************
* 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
********************************************************/
#pragma once
#include <fg/defines.h>
#ifdef __cplusplus
extern "C" {
#endif
FGAPI fg_err fg_create_font(fg_font* pFont);
FGAPI fg_err fg_retain_font(fg_font *pOut, fg_font pIn);
FGAPI fg_err fg_release_font(fg_font pFont);
FGAPI fg_err fg_load_font_file(fg_font pFont, const char* const pFileFullPath);
FGAPI fg_err fg_load_system_font(fg_font pFont, const char* const pFontName);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
namespace forge
{
class Font {
private:
fg_font mValue;
public:
FGAPI Font();
FGAPI Font(const Font& other);
FGAPI ~Font();
FGAPI void loadFontFile(const char* const pFile);
FGAPI void loadSystemFont(const char* const pName);
FGAPI fg_font get() const;
};
}
#endif
forge::Font::Font
FGAPI Font()
Creates Font object.
forge::Font::loadFontFile
FGAPI void loadFontFile(const char *const pFile)
Load a given font file.
forge::Font::get
FGAPI fg_font get() const
Get handle for internal implementation of Font object.
forge::Font::Font
FGAPI Font(const Font &other)
Copy constructor for Font.
forge::Font::loadSystemFont
FGAPI void loadSystemFont(const char *const pName)
Load a system font based on the name.
forge::Font::~Font
FGAPI ~Font()
Font Destructor.
defines.h
FGAPI
#define FGAPI
Definition defines.h:28
fg_font
void * fg_font
Definition defines.h:41
fg_err
fg_err
Definition defines.h:49
fg_retain_font
FGAPI fg_err fg_retain_font(fg_font *pOut, fg_font pIn)
Increase reference count of the resource.
fg_load_font_file
FGAPI fg_err fg_load_font_file(fg_font pFont, const char *const pFileFullPath)
Load a given font file.
fg_release_font
FGAPI fg_err fg_release_font(fg_font pFont)
Destroy font object.
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.
forge
Definition chart.h:305