AERMRE 1.5.1
AER modding framework for Hyper Light Drifter.
|
Utilities for querying and manipulating fonts. More...
Go to the source code of this file.
Enumerations | |
enum | AERFontIndex { AER_FONT_NULL = -1 , AER_FONT_ARIAL = 0x0 , AER_FONT_UNI = 0x1 , AER_FONT_CYR = 0x2 , AER_FONT_JP = 0x3 , AER_FONT_EDITORSMALL = 0x4 , AER_FONT_EDITOR = 0x5 , AER_FONT_IMAGINE = 0x6 } |
Vanilla fonts. More... | |
Functions | |
int32_t | AERFontGetCurrent (void) |
Query the currently active font. More... | |
void | AERFontSetCurrent (int32_t fontIdx) |
Change the currently active font to a new one. More... | |
int32_t | AERFontRegister (const char *filename, size_t size, bool bold, bool italic, int32_t first, int32_t last) |
Register a custom font. More... | |
size_t | AERFontGetNumRegistered (void) |
Query the total number of vanilla and mod fonts registered. More... | |
const char * | AERFontGetName (int32_t fontIdx) |
Query the name of a font. More... | |
size_t | AERFontGetSize (int32_t fontIdx) |
Query the size of a font in pixels. More... | |
bool | AERFontGetBold (int32_t fontIdx) |
Query whether a font is bold. More... | |
bool | AERFontGetItalic (int32_t fontIdx) |
Query whether a font is italic. More... | |
int32_t | AERFontGetFirst (int32_t fontIdx) |
Query the index of the first character in a font. More... | |
int32_t | AERFontGetLast (int32_t fontIdx) |
Query the index of the last character in a font. More... | |
Utilities for querying and manipulating fonts.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
enum AERFontIndex |
bool AERFontGetBold | ( | int32_t | fontIdx | ) |
Query whether a font is bold.
[in] | fontIdx | Font of interest. |
false
if unsuccessful.AER_SEQ_BREAK | if called before start of font registration stage. |
AER_FAILED_LOOKUP | if argument fontIdx is an invalid font. |
int32_t AERFontGetCurrent | ( | void | ) |
Query the currently active font.
AER_SEQ_BREAK | if called outside action stage. |
int32_t AERFontGetFirst | ( | int32_t | fontIdx | ) |
Query the index of the first character in a font.
[in] | fontIdx | Font of interest. |
-1
if unsuccessful.AER_SEQ_BREAK | if called before start of font registration stage. |
AER_FAILED_LOOKUP | if argument fontIdx is an invalid font. |
bool AERFontGetItalic | ( | int32_t | fontIdx | ) |
Query whether a font is italic.
[in] | fontIdx | Font of interest. |
false
if unsuccessful.AER_SEQ_BREAK | if called before start of font registration stage. |
AER_FAILED_LOOKUP | if argument fontIdx is an invalid font. |
int32_t AERFontGetLast | ( | int32_t | fontIdx | ) |
Query the index of the last character in a font.
[in] | fontIdx | Font of interest. |
-1
if unsuccessful.AER_SEQ_BREAK | if called before start of font registration stage. |
AER_FAILED_LOOKUP | if argument fontIdx is an invalid font. |
const char * AERFontGetName | ( | int32_t | fontIdx | ) |
Query the name of a font.
[in] | fontIdx | Font of interest. |
NULL
if unsuccessful.AER_SEQ_BREAK | if called before start of font registration stage. |
AER_FAILED_LOOKUP | if argument fontIdx is an invalid font. |
size_t AERFontGetNumRegistered | ( | void | ) |
Query the total number of vanilla and mod fonts registered.
0
if unsuccessful.AER_SEQ_BREAK | if called before start of font registration stage. |
size_t AERFontGetSize | ( | int32_t | fontIdx | ) |
Query the size of a font in pixels.
[in] | fontIdx | Font of interest. |
0
if unsuccessful.AER_SEQ_BREAK | if called before start of font registration stage. |
AER_FAILED_LOOKUP | if argument fontIdx is an invalid font. |
int32_t AERFontRegister | ( | const char * | filename, |
size_t | size, | ||
bool | bold, | ||
bool | italic, | ||
int32_t | first, | ||
int32_t | last | ||
) |
Register a custom font.
*.ttf
).[in] | filename | Path to font file relative to asset directory. |
[in] | size | Pixel size of font. |
[in] | bold | Whether font is bold. |
[in] | italic | Whether font is italic. |
[in] | first | Index of first font character to include. |
[in] | last | Index of last font character to include. |
AER_NULL_ARG | if argument filename is NULL . |
AER_SEQ_BREAK | if called outside font registration stage. |
AER_BAD_FILE | if argument filename does not point to valid file. |
void AERFontSetCurrent | ( | int32_t | fontIdx | ) |
Change the currently active font to a new one.
[in] | fontIdx | Index of new font. |
AER_SEQ_BREAK | if called outside action stage. |
AER_FAILED_LOOKUP | if argument fontIdx is an invalid font. |