RetroArch
Classes | Macros | Typedefs | Functions | Variables
freetype.c File Reference
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <ctype.h>
#include <ft2build.h>
#include <file/file_path.h>
#include <streams/file_stream.h>
#include <retro_miscellaneous.h>
#include <string/stdstring.h>
#include "../font_driver.h"
Include dependency graph for freetype.c:

Classes

struct  freetype_atlas_slot
 
struct  freetype_renderer
 

Macros

#define FT_ATLAS_ROWS   16
 
#define FT_ATLAS_COLS   16
 
#define FT_ATLAS_SIZE   (FT_ATLAS_ROWS * FT_ATLAS_COLS)
 

Typedefs

typedef struct freetype_atlas_slot freetype_atlas_slot_t
 
typedef struct freetype_renderer ft_font_renderer_t
 

Functions

static struct font_atlasfont_renderer_ft_get_atlas (void *data)
 
static void font_renderer_ft_free (void *data)
 
static freetype_atlas_slot_tfont_renderer_get_slot (ft_font_renderer_t *handle)
 
static const struct font_glyphfont_renderer_ft_get_glyph (void *data, uint32_t charcode)
 
static bool font_renderer_create_atlas (ft_font_renderer_t *handle, float font_size)
 
static voidfont_renderer_ft_init (const char *font_path, float font_size)
 
static const char * font_renderer_ft_get_default_font (void)
 
static int font_renderer_ft_get_line_height (void *data)
 

Variables

static const char * font_paths []
 
font_renderer_driver_t freetype_font_renderer
 

Macro Definition Documentation

◆ FT_ATLAS_COLS

#define FT_ATLAS_COLS   16

◆ FT_ATLAS_ROWS

#define FT_ATLAS_ROWS   16

◆ FT_ATLAS_SIZE

#define FT_ATLAS_SIZE   (FT_ATLAS_ROWS * FT_ATLAS_COLS)

Typedef Documentation

◆ freetype_atlas_slot_t

◆ ft_font_renderer_t

Function Documentation

◆ font_renderer_create_atlas()

static bool font_renderer_create_atlas ( ft_font_renderer_t handle,
float  font_size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ font_renderer_ft_free()

static void font_renderer_ft_free ( void data)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ font_renderer_ft_get_atlas()

static struct font_atlas* font_renderer_ft_get_atlas ( void data)
static

◆ font_renderer_ft_get_default_font()

static const char* font_renderer_ft_get_default_font ( void  )
static
Here is the call graph for this function:

◆ font_renderer_ft_get_glyph()

static const struct font_glyph* font_renderer_ft_get_glyph ( void data,
uint32_t  charcode 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ font_renderer_ft_get_line_height()

static int font_renderer_ft_get_line_height ( void data)
static

◆ font_renderer_ft_init()

static void* font_renderer_ft_init ( const char *  font_path,
float  font_size 
)
static
Here is the call graph for this function:

◆ font_renderer_get_slot()

static freetype_atlas_slot_t* font_renderer_get_slot ( ft_font_renderer_t handle)
static
Here is the caller graph for this function:

Variable Documentation

◆ font_paths

const char* font_paths[]
static
Initial value:
= {
"assets://pkg/osd-font.ttf",
"/usr/share/fonts/TTF/DejaVuSansMono.ttf",
"/usr/share/fonts/TTF/DejaVuSans.ttf",
"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf",
"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
"/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf",
"/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
"/usr/share/fonts/TTF/Vera.ttf",
"/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf",
"osd-font.ttf",
}

◆ freetype_font_renderer

font_renderer_driver_t freetype_font_renderer
Initial value:
= {
"freetype",
}
static struct font_atlas * font_renderer_ft_get_atlas(void *data)
Definition: freetype.c:58
static const struct font_glyph * font_renderer_ft_get_glyph(void *data, uint32_t charcode)
Definition: freetype.c:106
static int font_renderer_ft_get_line_height(void *data)
Definition: freetype.c:326
static void * font_renderer_ft_init(const char *font_path, float font_size)
Definition: freetype.c:212
static const char * font_renderer_ft_get_default_font(void)
Definition: freetype.c:295
static void font_renderer_ft_free(void *data)
Definition: freetype.c:66