openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
font.cpp File Reference
#include <lib/gdi/font.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <pthread.h>
#include <sys/types.h>
#include <unistd.h>
#include <byteswap.h>
#include <ft2build.h>
#include <lib/base/eerror.h>
#include <lib/gdi/lcd.h>
#include <lib/gdi/grc.h>
#include <lib/base/elock.h>
#include <lib/base/init.h>
#include <lib/base/init_num.h>
#include <fribidi/fribidi.h>
#include <map>

Classes

struct  fntColorCacheKey
 

Macros

#define FTC_Image_Cache_New(a, b)   FTC_ImageCache_New(a,b)
 
#define FTC_SBit_Cache_New(a, b)   FTC_SBitCache_New(a,b)
 
#define FTC_SBit_Cache_Lookup(a, b, c, d)   FTC_SBitCache_Lookup(a,b,c,d,NULL)
 
#define BLEND(y, x, a)   (y + (((x-y) * a)>>8))
 
#define BLEND(y, x, a)   (y + (((x-y) * a)>>8))
 

Functions

static gLookupgetColor (const gPalette &pal, const gRGB &start, const gRGB &end)
 
FT_Error myFTC_Face_Requester (FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face *aface)
 
void addFont (const char *filename, const char *alias, int scale_factor, int is_replacement, int renderflags)
 
 DEFINE_REF (Font)
 
 DEFINE_REF (eTextPara)
 
void shape (std::vector< unsigned long > &string, const std::vector< unsigned long > &text)
 

Variables

static pthread_mutex_t ftlock =PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
 
std::map< fntColorCacheKey, gLookupcolorcache
 
eAutoInitP0< fontRenderClassinit_fontRenderClass (eAutoInitNumbers::graphic-1, "Font Render Class")
 

Macro Definition Documentation

◆ BLEND [1/2]

#define BLEND (   y,
  x,
 
)    (y + (((x-y) * a)>>8))

◆ BLEND [2/2]

#define BLEND (   y,
  x,
 
)    (y + (((x-y) * a)>>8))

◆ FTC_Image_Cache_New

#define FTC_Image_Cache_New (   a,
 
)    FTC_ImageCache_New(a,b)

◆ FTC_SBit_Cache_Lookup

#define FTC_SBit_Cache_Lookup (   a,
  b,
  c,
 
)    FTC_SBitCache_Lookup(a,b,c,d,NULL)

◆ FTC_SBit_Cache_New

#define FTC_SBit_Cache_New (   a,
 
)    FTC_SBitCache_New(a,b)

Function Documentation

◆ addFont()

void addFont ( const char *  filename,
const char *  alias,
int  scale_factor,
int  is_replacement,
int  renderflags 
)

◆ DEFINE_REF() [1/2]

DEFINE_REF ( eTextPara  )

◆ DEFINE_REF() [2/2]

DEFINE_REF ( Font  )

◆ getColor()

static gLookup& getColor ( const gPalette pal,
const gRGB start,
const gRGB end 
)
static

◆ myFTC_Face_Requester()

FT_Error myFTC_Face_Requester ( FTC_FaceID  face_id,
FT_Library  library,
FT_Pointer  request_data,
FT_Face *  aface 
)

◆ shape()

void shape ( std::vector< unsigned long > &  string,
const std::vector< unsigned long > &  text 
)

Variable Documentation

◆ colorcache

std::map<fntColorCacheKey,gLookup> colorcache

◆ ftlock

pthread_mutex_t ftlock =PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
static

◆ init_fontRenderClass

eAutoInitP0<fontRenderClass> init_fontRenderClass(eAutoInitNumbers::graphic-1, "Font Render Class") ( eAutoInitNumbers::graphic 1,
"Font Render Class"   
)