FTEQW
Documentation of the FTE engine source tree.
gl_font.c File Reference

Typedefs

typedef unsigned int FT_Pixel_Mode
 
typedef struct fontface_s fontface_t
 
typedef struct font_s font_t
 

Enumerations

enum  fontfmt_e {
  FMT_AUTO , FMT_QUAKE , FMT_ISO88591 , FMT_WINDOWS1252 ,
  FMT_KOI8U , FMT_HORIZONTAL
}
 

Functions

void Font_Init (void)
 
void Font_Shutdown (void)
 
struct font_s * Font_LoadFont (const char *fontfilename, float height, float scale, int outline, unsigned int flags)
 
void Font_Free (struct font_s *f)
 
void Font_BeginString (struct font_s *font, float vx, float vy, int *px, int *py)
 
void Font_BeginScaledString (struct font_s *font, float vx, float vy, float szx, float szy, float *px, float *py)
 
void Font_Transform (float vx, float vy, int *px, int *py)
 
int Font_CharHeight (void)
 
float Font_CharScaleHeight (void)
 
int Font_CharWidth (unsigned int charflags, unsigned int codepoint)
 
float Font_CharScaleWidth (unsigned int charflags, unsigned int codepoint)
 
int Font_CharEndCoord (struct font_s *font, int x, unsigned int charflags, unsigned int codepoint)
 
int Font_DrawChar (int px, int py, unsigned int charflags, unsigned int codepoint)
 
float Font_DrawScaleChar (float px, float py, unsigned int charflags, unsigned int codepoint)
 
void Font_EndString (struct font_s *font)
 
int Font_LineBreaks (conchar_t *start, conchar_t *end, int maxpixelwidth, int maxlines, conchar_t **starts, conchar_t **ends)
 
int Font_ChangeFTSize (struct fontface_s *qface, int pixelheight)
 
 FT_Error (VARGS *pFT_Init_FreeType)(FT_Library *alibrary)
 
 FT_UInt (VARGS *pFT_Get_Char_Index)(FT_Face face
 
const char *VARGS * pFT_Error_String (FT_Error error_code)
 
int Font_RegisterTrackerImage (const char *image)
 
qboolean Font_TrackerValid (unsigned int imid)
 
void Font_FlushPlane (void)
 
qboolean Font_LoadHorizontalFont (struct font_s *f, int fheight, const char *fontfilename)
 
qboolean Font_LoadKexFont (struct font_s *f, int fheight, const char *fontfilename)
 
qboolean Font_LoadFreeTypeFont (struct font_s *f, int height, const char *fontfilename, const char *styles)
 
 FTE_ALIGN (4)
 
void Doom_ExpandPatch (doompatch_t *p, unsigned char *b, int stride)
 
int Font_CharPHeight (struct font_s *font)
 
int Font_GetTrueHeight (struct font_s *font)
 
float Font_CharVHeight (struct font_s *font)
 
int Font_TabWidth (int x)
 
conchar_tFont_DecodeReverse (conchar_t *start, conchar_t *stop, unsigned int *codeflags, unsigned int *codepoint)
 
int Font_LineWidth (conchar_t *start, conchar_t *end)
 
float Font_LineScaleWidth (conchar_t *start, conchar_t *end)
 
void Font_LineDraw (int x, int y, conchar_t *start, conchar_t *end)
 
conchar_tFont_CharAt (int x, conchar_t *start, conchar_t *end)
 
void Font_InvalidateColour (vec4_t newcolour)
 

Variables

struct font_s * font_menu
 
struct font_s * font_default
 
struct font_s * font_console
 
struct font_s * font_tiny
 
unsigned int r2d_be_flags
 
qboolean triedtoloadfreetype
 
dllhandle_t * fontmodule
 
FT_ULong char_code
 
FT_ULong FT_Int32 load_flags
 
FT_ULong charcode
 
FT_UInt pixel_width
 
FT_UInt FT_UInt pixel_height
 
FT_Int strike_index
 
const char * pathname
 
const char FT_Long face_index
 
const char FT_Long FT_Face * aface
 
const FT_Byte * file_base
 
const FT_Byte FT_Long file_size
 
cvar_t cl_noblink
 
cvar_t con_ocranaleds
 
cvar_t r_font_linear
 
unsigned short hex [16]
 
cvar_t dpcompat_smallerfonts
 

Typedef Documentation

◆ font_t

typedef struct font_s font_t

◆ fontface_t

typedef struct fontface_s fontface_t

◆ FT_Pixel_Mode

typedef unsigned int FT_Pixel_Mode

Enumeration Type Documentation

◆ fontfmt_e

enum fontfmt_e
Enumerator
FMT_AUTO 
FMT_QUAKE 
FMT_ISO88591 
FMT_WINDOWS1252 
FMT_KOI8U 
FMT_HORIZONTAL 

Function Documentation

◆ Doom_ExpandPatch()

void Doom_ExpandPatch ( doompatch_t *  p,
unsigned char *  b,
int  stride 
)

◆ Font_BeginScaledString()

void Font_BeginScaledString ( struct font_s *  font,
float  vx,
float  vy,
float  szx,
float  szy,
float *  px,
float *  py 
)

◆ Font_BeginString()

void Font_BeginString ( struct font_s *  font,
float  vx,
float  vy,
int px,
int py 
)

◆ Font_ChangeFTSize()

int Font_ChangeFTSize ( struct fontface_s *  qface,
int  pixelheight 
)

◆ Font_CharAt()

conchar_t * Font_CharAt ( int  x,
conchar_t start,
conchar_t end 
)

◆ Font_CharEndCoord()

int Font_CharEndCoord ( struct font_s *  font,
int  x,
unsigned int  charflags,
unsigned int  codepoint 
)

◆ Font_CharHeight()

int Font_CharHeight ( void  )

◆ Font_CharPHeight()

int Font_CharPHeight ( struct font_s *  font)

◆ Font_CharScaleHeight()

float Font_CharScaleHeight ( void  )

◆ Font_CharScaleWidth()

float Font_CharScaleWidth ( unsigned int  charflags,
unsigned int  codepoint 
)

◆ Font_CharVHeight()

float Font_CharVHeight ( struct font_s *  font)

◆ Font_CharWidth()

int Font_CharWidth ( unsigned int  charflags,
unsigned int  codepoint 
)

◆ Font_DecodeReverse()

conchar_t * Font_DecodeReverse ( conchar_t start,
conchar_t stop,
unsigned int codeflags,
unsigned int codepoint 
)

◆ Font_DrawChar()

int Font_DrawChar ( int  px,
int  py,
unsigned int  charflags,
unsigned int  codepoint 
)

◆ Font_DrawScaleChar()

float Font_DrawScaleChar ( float  px,
float  py,
unsigned int  charflags,
unsigned int  codepoint 
)

◆ Font_EndString()

void Font_EndString ( struct font_s *  font)

◆ Font_FlushPlane()

void Font_FlushPlane ( void  )

◆ Font_Free()

void Font_Free ( struct font_s *  f)

◆ Font_GetTrueHeight()

int Font_GetTrueHeight ( struct font_s *  font)

◆ Font_Init()

void Font_Init ( void  )

◆ Font_InvalidateColour()

void Font_InvalidateColour ( vec4_t  newcolour)

◆ Font_LineBreaks()

int Font_LineBreaks ( conchar_t start,
conchar_t end,
int  maxpixelwidth,
int  maxlines,
conchar_t **  starts,
conchar_t **  ends 
)

◆ Font_LineDraw()

void Font_LineDraw ( int  x,
int  y,
conchar_t start,
conchar_t end 
)

◆ Font_LineScaleWidth()

float Font_LineScaleWidth ( conchar_t start,
conchar_t end 
)

◆ Font_LineWidth()

int Font_LineWidth ( conchar_t start,
conchar_t end 
)

◆ Font_LoadFont()

struct font_s * Font_LoadFont ( const char *  fontfilename,
float  height,
float  scale,
int  outline,
unsigned int  flags 
)

◆ Font_LoadFreeTypeFont()

qboolean Font_LoadFreeTypeFont ( struct font_s *  f,
int  height,
const char *  fontfilename,
const char *  styles 
)

◆ Font_LoadHorizontalFont()

qboolean Font_LoadHorizontalFont ( struct font_s *  f,
int  fheight,
const char *  fontfilename 
)

◆ Font_LoadKexFont()

qboolean Font_LoadKexFont ( struct font_s *  f,
int  fheight,
const char *  fontfilename 
)

◆ Font_RegisterTrackerImage()

int Font_RegisterTrackerImage ( const char *  image)

◆ Font_Shutdown()

void Font_Shutdown ( void  )

◆ Font_TabWidth()

int Font_TabWidth ( int  x)

◆ Font_TrackerValid()

qboolean Font_TrackerValid ( unsigned int  imid)

◆ Font_Transform()

void Font_Transform ( float  vx,
float  vy,
int px,
int py 
)

◆ FT_Error()

FT_Error ( VARGS *  pFT_Init_FreeType)

◆ FT_UInt()

FT_UInt ( VARGS *  pFT_Get_Char_Index)

◆ FTE_ALIGN()

FTE_ALIGN ( )

◆ pFT_Error_String()

const char *VARGS * pFT_Error_String ( FT_Error  error_code)

Variable Documentation

◆ aface

const FT_Byte FT_Long FT_Long FT_Face * aface

◆ char_code

FT_ULong char_code

◆ charcode

FT_ULong charcode

◆ cl_noblink

cvar_t cl_noblink
extern

◆ con_ocranaleds

cvar_t con_ocranaleds
extern

◆ dpcompat_smallerfonts

cvar_t dpcompat_smallerfonts
extern

◆ face_index

const FT_Byte FT_Long FT_Long face_index

◆ file_base

const FT_Byte* file_base

◆ file_size

const FT_Byte FT_Long file_size

◆ font_console

struct font_s* font_console

◆ font_default

struct font_s* font_default

◆ font_menu

struct font_s* font_menu

◆ font_tiny

struct font_s* font_tiny

◆ fontmodule

dllhandle_t* fontmodule

◆ hex

unsigned short hex[16]
Initial value:
= {
(7<<0)|(5<<3)|(5<<6)|(5<<9)|(7<<12),
(2<<0)|(2<<3)|(2<<6)|(2<<9)|(2<<12),
(7<<0)|(1<<3)|(7<<6)|(4<<9)|(7<<12),
(7<<0)|(1<<3)|(3<<6)|(1<<9)|(7<<12),
(5<<0)|(5<<3)|(7<<6)|(1<<9)|(1<<12),
(7<<0)|(4<<3)|(7<<6)|(1<<9)|(7<<12),
(4<<0)|(4<<3)|(7<<6)|(5<<9)|(7<<12),
(7<<0)|(1<<3)|(1<<6)|(1<<9)|(1<<12),
(7<<0)|(5<<3)|(7<<6)|(5<<9)|(7<<12),
(7<<0)|(5<<3)|(7<<6)|(1<<9)|(1<<12),
(7<<0)|(5<<3)|(7<<6)|(5<<9)|(5<<12),
(6<<0)|(5<<3)|(7<<6)|(5<<9)|(6<<12),
(7<<0)|(5<<3)|(4<<6)|(5<<9)|(7<<12),
(6<<0)|(5<<3)|(5<<6)|(5<<9)|(6<<12),
(7<<0)|(4<<3)|(6<<6)|(4<<9)|(7<<12),
(7<<0)|(4<<3)|(6<<6)|(4<<9)|(4<<12)
}

◆ image

image_t* image

◆ load_flags

FT_ULong FT_Int32 load_flags

◆ name

char name[64]

◆ pathname

const char* pathname

◆ pixel_height

FT_UInt FT_UInt pixel_height

◆ pixel_width

FT_UInt pixel_width

◆ r2d_be_flags

unsigned int r2d_be_flags
extern

◆ r_font_linear

cvar_t r_font_linear
extern

◆ strike_index

FT_Int strike_index

◆ triedtoloadfreetype

qboolean triedtoloadfreetype