Guiliani  Version 2.5 revision 7293 (documentation build 13)
FreeTypeEnv.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef _FREETYPEENV_H_
11#define _FREETYPEENV_H_
12
13#include "ft2build.h"
14
15#include FT_MODULE_H
16
17#include "eC_Types.h"
18
19#include "GUIFontResource.h"
20
21//macros for Freetype fixpoint
22#define FT_CEIL(X) (((X + 63) & -64) >> 6)
23#define FT_FLOOR(X) ((X & -64) >>6)
24
26
35{
36protected:
37 static eC_Bool ms_bFakeBoldAndItalic;
38 static eC_Bool ms_bDisableKerning;
39
40public:
48 static void SetFakeBoldAndItalic(const eC_Bool bFakeBoldAndItalic);
49
52 static eC_Bool GetFakeBoldAndItalic();
53
59 static void SetDisableKerning(const eC_Bool bDisableKerning);
60
63 static eC_Bool GetDisableKerning();
64
70 static void* FreeType_AllocFunc(FT_Memory memory, long size);
71
76 static void FreeType_FreeFunc(FT_Memory memory, void* block);
77
85 static void* FreeType_ReAllocFunc(FT_Memory memory, long cur_size, long new_size, void* block);
86
94 static unsigned long FreeType_Stream_IoFunc(
95 FT_Stream stream,
96 unsigned long offset,
97 unsigned char* buffer,
98 unsigned long count);
99
103 static void FreeType_CloseStreamFunc(FT_Stream stream);
104
113 static eC_Int LoadRequestedFont(
114 const FontResource_t eFontID,
115 FT_Face* pTheLoadedFace,
116 const FT_Library* pFTLibrary);
117};
118
119#endif //#ifndef _FREETYPEENV_H_
Helper Macros in Guiliani
FontResource_t
List of font resource ids.
Definition: GUIFontResource.h:54
Class for all common FreeType functions.
Definition: FreeTypeEnv.h:35
static eC_Bool ms_bDisableKerning
True will disable Kerning. False will enable it (if supported by the given FontWrapper)
Definition: FreeTypeEnv.h:38
static eC_Int LoadRequestedFont(const FontResource_t eFontID, FT_Face *pTheLoadedFace, const FT_Library *pFTLibrary)
static unsigned long FreeType_Stream_IoFunc(FT_Stream stream, unsigned long offset, unsigned char *buffer, unsigned long count)
static void SetDisableKerning(const eC_Bool bDisableKerning)
static eC_Bool GetDisableKerning()
static void SetFakeBoldAndItalic(const eC_Bool bFakeBoldAndItalic)
static void * FreeType_ReAllocFunc(FT_Memory memory, long cur_size, long new_size, void *block)
static void FreeType_CloseStreamFunc(FT_Stream stream)
static eC_Bool GetFakeBoldAndItalic()
static void * FreeType_AllocFunc(FT_Memory memory, long size)
static eC_Bool ms_bFakeBoldAndItalic
True will enable auto-generation of bold/italic effects. False will disable it. (if supported by the ...
Definition: FreeTypeEnv.h:37
static void FreeType_FreeFunc(FT_Memory memory, void *block)