RetroArch
Classes | Macros | Functions | Variables
switch_font.c File Reference
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <math.h>
#include <encodings/utf.h>
#include <retro_math.h>
#include "../font_driver.h"
#include "../video_driver.h"
#include "../../verbosity.h"
#include "../common/switch_common.h"
Include dependency graph for switch_font.c:

Classes

struct  switch_font_t
 

Macros

#define AVG_GLPYH_LIMIT   140
 

Functions

static voidswitch_font_init_font (void *data, const char *font_path, float font_size, bool is_threaded)
 
static void switch_font_free_font (void *data, bool is_threaded)
 
static int switch_font_get_message_width (void *data, const char *msg, unsigned msg_len, float scale)
 
static void switch_font_render_line (video_frame_info_t *video_info, switch_font_t *font, const char *msg, unsigned msg_len, float scale, const unsigned int color, float pos_x, float pos_y, unsigned text_align)
 
static void switch_font_render_message (video_frame_info_t *video_info, switch_font_t *font, const char *msg, float scale, const unsigned int color, float pos_x, float pos_y, unsigned text_align)
 
static void switch_font_render_msg (video_frame_info_t *video_info, void *data, const char *msg, const struct font_params *params)
 
static const struct font_glyphswitch_font_get_glyph (void *data, uint32_t code)
 
static void switch_font_bind_block (void *data, void *userdata)
 

Variables

font_renderer_t switch_font
 

Macro Definition Documentation

◆ AVG_GLPYH_LIMIT

#define AVG_GLPYH_LIMIT   140

Function Documentation

◆ switch_font_bind_block()

static void switch_font_bind_block ( void data,
void userdata 
)
static
Here is the call graph for this function:

◆ switch_font_free_font()

static void switch_font_free_font ( void data,
bool  is_threaded 
)
static
Here is the call graph for this function:

◆ switch_font_get_glyph()

static const struct font_glyph* switch_font_get_glyph ( void data,
uint32_t  code 
)
static

◆ switch_font_get_message_width()

static int switch_font_get_message_width ( void data,
const char *  msg,
unsigned  msg_len,
float  scale 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ switch_font_init_font()

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

◆ switch_font_render_line()

static void switch_font_render_line ( video_frame_info_t video_info,
switch_font_t font,
const char *  msg,
unsigned  msg_len,
float  scale,
const unsigned int  color,
float  pos_x,
float  pos_y,
unsigned  text_align 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ switch_font_render_message()

static void switch_font_render_message ( video_frame_info_t video_info,
switch_font_t font,
const char *  msg,
float  scale,
const unsigned int  color,
float  pos_x,
float  pos_y,
unsigned  text_align 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ switch_font_render_msg()

static void switch_font_render_msg ( video_frame_info_t video_info,
void data,
const char *  msg,
const struct font_params params 
)
static
Here is the call graph for this function:

Variable Documentation

◆ switch_font

font_renderer_t switch_font
Initial value:
=
{
"switchfont",
NULL,
}
static void switch_font_render_msg(video_frame_info_t *video_info, void *data, const char *msg, const struct font_params *params)
Definition: switch_font.c:244
static void * switch_font_init_font(void *data, const char *font_path, float font_size, bool is_threaded)
Definition: switch_font.c:41
static const struct font_glyph * switch_font_get_glyph(void *data, uint32_t code)
Definition: switch_font.c:321
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void switch_font_free_font(void *data, bool is_threaded)
Definition: switch_font.c:64
static int switch_font_get_message_width(void *data, const char *msg, unsigned msg_len, float scale)
Definition: switch_font.c:77
static void switch_font_bind_block(void *data, void *userdata)
Definition: switch_font.c:335