FireBirdLib - Topfield TMS PVR TAP Programming Library
FM_GetStringHeight.c
Go to the documentation of this file.
1
#include <string.h>
2
#include "
FBLib_FontManager.h
"
3
4
dword
FM_GetStringHeight
(
char
*Text,
tFontData
*FontData)
5
{
6
TRACEENTER
();
7
8
dword i;
9
dword h, Height = 0;
10
11
if
(!Text || !Text[0] || !FontData || !FontData->
pFontData
)
12
{
13
TRACEEXIT
();
14
return
0;
15
}
16
17
for
(i = 0; i < strlen(Text); i++)
18
{
19
if
(
FM_isValidCharacter
(Text[i]))
20
{
21
h = FontData->
FontDef
[
FM_CharToIndex
(Text[i])].
Height
;
22
if
(h > Height) Height = h;
23
}
24
}
25
26
TRACEEXIT
();
27
return
Height;
28
}
FBLib_FontManager.h
FM_CharToIndex
byte FM_CharToIndex(byte Char)
Definition:
FM_CharToIndex.c:3
FM_isValidCharacter
bool FM_isValidCharacter(byte Char)
Definition:
FM_isValidCharacter.c:3
FM_GetStringHeight
dword FM_GetStringHeight(char *Text, tFontData *FontData)
Definition:
FM_GetStringHeight.c:4
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
tFontData
Definition:
libFireBird.h:1819
tFontData::FontDef
tFontDef FontDef[191]
Definition:
libFireBird.h:1821
tFontData::pFontData
byte * pFontData
Definition:
libFireBird.h:1820
tFontDef::Height
dword Height
Definition:
libFireBird.h:1814
FontManager
FM_GetStringHeight.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3