libgpac
Documentation of the core library of GPAC
font_engine.c File Reference
#include <gpac/internal/compositor_dev.h>
#include <gpac/modules/font.h>
#include "visual_manager.h"
#include "nodes_stacks.h"
#include "texturing.h"
+ Include dependency graph for font_engine.c:

Data Structures

struct  GF_FontManager
 
struct  GF_SpanExtensions
 

Macros

#define MAX_TX_SIZE   512
 
#define MIN_TX_SIZE   32
 

Functions

GF_EXPORT GF_FontManager * gf_font_manager_new ()
 
void gf_font_predestroy (GF_Font *font)
 
void gf_font_del (GF_Font *font)
 
void gf_font_manager_del (GF_FontManager *fm)
 
GF_Err gf_font_manager_register_font (GF_FontManager *fm, GF_Font *font)
 
GF_Err gf_font_manager_unregister_font (GF_FontManager *fm, GF_Font *font)
 
GF_EXPORT GF_Font * gf_font_manager_set_font_ex (GF_FontManager *fm, char **alt_fonts, u32 nb_fonts, u32 styles, Bool check_only)
 
GF_Font * gf_font_manager_set_font (GF_FontManager *fm, char **alt_fonts, u32 nb_fonts, u32 styles)
 
static GF_Glyphgf_font_get_glyph (GF_FontManager *fm, GF_Font *font, u32 name)
 
GF_EXPORT GF_TextSpangf_font_manager_create_span (GF_FontManager *fm, GF_Font *font, char *text, Fixed font_size, Bool needs_x_offset, Bool needs_y_offset, Bool needs_rotate, const char *xml_lang, Bool fliped_text, u32 styles, GF_Node *user)
 
void gf_font_manager_delete_span (GF_FontManager *fm, GF_TextSpan *span)
 
GF_EXPORT void gf_font_manager_refresh_span_bounds (GF_TextSpan *span)
 
GF_Pathgf_font_span_create_path (GF_TextSpan *span)
 
static void span_alloc_extensions (GF_TextSpan *span)
 
static void span_build_mesh (GF_TextSpan *span)
 
static Bool span_setup_texture (GF_Compositor *compositor, GF_TextSpan *span, Bool for_3d, GF_TraverseState *tr_state)
 
static void span_fill_3d (GF_TextSpan *span, GF_TraverseState *tr_state)
 
static void span_strike_3d (GF_TextSpan *span, GF_TraverseState *tr_state, DrawAspect2D *asp, Bool vect_outline)
 
void gf_font_spans_draw_3d (GF_List *spans, GF_TraverseState *tr_state, DrawAspect2D *asp, u32 text_hl, Bool force_texturing)
 
static void gf_font_span_draw_2d (GF_TraverseState *tr_state, GF_TextSpan *span, DrawableContext *ctx, GF_Rect *bounds)
 
void gf_font_underline_span (GF_TraverseState *tr_state, GF_TextSpan *span, DrawableContext *ctx, Bool is_strikeout)
 
static GF_Rect font_get_sel_rect (GF_TraverseState *tr_state)
 
static void gf_font_spans_select (GF_TextSpan *span, GF_TraverseState *tr_state, DrawableContext *ctx, Bool has_more_spans, Bool first_span, GF_Rect *rc)
 
void gf_font_spans_get_selection (GF_Node *node, GF_List *spans, GF_TraverseState *tr_state)
 
void gf_font_spans_draw_2d (GF_List *spans, GF_TraverseState *tr_state, u32 hl_color, Bool force_texture_text, GF_Rect *bounds)
 
void gf_font_spans_pick (GF_Node *node, GF_List *spans, GF_TraverseState *tr_state, GF_Rect *node_bounds, Bool use_dom_events, Drawable *drawable)
 

Data Structure Documentation

◆ _gf_ft_mgr

struct _gf_ft_mgr
+ Collaboration diagram for GF_FontManager:
Data Fields
GF_FontReader * reader
GF_Font * font
GF_Font * default_font
GF_Path * line_path
u32 * id_buffer
u32 id_buffer_size
Bool wait_font_load

◆ GF_SpanExtensions

struct GF_SpanExtensions
+ Collaboration diagram for GF_SpanExtensions:
Data Fields
Fixed last_zoom
GF_TextureHandler * txh
GF_Path * path
GF_Mesh * mesh
GF_Mesh * tx_mesh
GF_Mesh * outline

Macro Definition Documentation

◆ MAX_TX_SIZE

#define MAX_TX_SIZE   512

◆ MIN_TX_SIZE

#define MIN_TX_SIZE   32

Function Documentation

◆ gf_font_manager_new()

GF_EXPORT GF_FontManager* gf_font_manager_new ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_predestroy()

void gf_font_predestroy ( GF_Font *  font)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_del()

void gf_font_del ( GF_Font *  font)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_manager_del()

void gf_font_manager_del ( GF_FontManager *  fm)
+ Here is the call graph for this function:

◆ gf_font_manager_register_font()

GF_Err gf_font_manager_register_font ( GF_FontManager *  fm,
GF_Font *  font 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_manager_unregister_font()

GF_Err gf_font_manager_unregister_font ( GF_FontManager *  fm,
GF_Font *  font 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_manager_set_font_ex()

GF_EXPORT GF_Font* gf_font_manager_set_font_ex ( GF_FontManager *  fm,
char **  alt_fonts,
u32  nb_fonts,
u32  styles,
Bool  check_only 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_manager_set_font()

GF_Font* gf_font_manager_set_font ( GF_FontManager *  fm,
char **  alt_fonts,
u32  nb_fonts,
u32  styles 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_get_glyph()

static GF_Glyph* gf_font_get_glyph ( GF_FontManager *  fm,
GF_Font *  font,
u32  name 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_manager_create_span()

GF_EXPORT GF_TextSpan* gf_font_manager_create_span ( GF_FontManager *  fm,
GF_Font *  font,
char *  text,
Fixed  font_size,
Bool  needs_x_offset,
Bool  needs_y_offset,
Bool  needs_rotate,
const char *  xml_lang,
Bool  fliped_text,
u32  styles,
GF_Node user 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_manager_delete_span()

void gf_font_manager_delete_span ( GF_FontManager *  fm,
GF_TextSpan span 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_manager_refresh_span_bounds()

GF_EXPORT void gf_font_manager_refresh_span_bounds ( GF_TextSpan span)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_span_create_path()

GF_Path* gf_font_span_create_path ( GF_TextSpan span)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ span_alloc_extensions()

static void span_alloc_extensions ( GF_TextSpan span)
static
+ Here is the caller graph for this function:

◆ span_build_mesh()

static void span_build_mesh ( GF_TextSpan span)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ span_setup_texture()

static Bool span_setup_texture ( GF_Compositor *  compositor,
GF_TextSpan span,
Bool  for_3d,
GF_TraverseState *  tr_state 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ span_fill_3d()

static void span_fill_3d ( GF_TextSpan span,
GF_TraverseState *  tr_state 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ span_strike_3d()

static void span_strike_3d ( GF_TextSpan span,
GF_TraverseState *  tr_state,
DrawAspect2D *  asp,
Bool  vect_outline 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_spans_draw_3d()

void gf_font_spans_draw_3d ( GF_List *  spans,
GF_TraverseState *  tr_state,
DrawAspect2D *  asp,
u32  text_hl,
Bool  force_texturing 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_span_draw_2d()

static void gf_font_span_draw_2d ( GF_TraverseState *  tr_state,
GF_TextSpan span,
DrawableContext *  ctx,
GF_Rect bounds 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_underline_span()

void gf_font_underline_span ( GF_TraverseState *  tr_state,
GF_TextSpan span,
DrawableContext *  ctx,
Bool  is_strikeout 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ font_get_sel_rect()

static GF_Rect font_get_sel_rect ( GF_TraverseState *  tr_state)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_spans_select()

static void gf_font_spans_select ( GF_TextSpan span,
GF_TraverseState *  tr_state,
DrawableContext *  ctx,
Bool  has_more_spans,
Bool  first_span,
GF_Rect rc 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_spans_get_selection()

void gf_font_spans_get_selection ( GF_Node node,
GF_List *  spans,
GF_TraverseState *  tr_state 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_spans_draw_2d()

void gf_font_spans_draw_2d ( GF_List *  spans,
GF_TraverseState *  tr_state,
u32  hl_color,
Bool  force_texture_text,
GF_Rect bounds 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_font_spans_pick()

void gf_font_spans_pick ( GF_Node node,
GF_List *  spans,
GF_TraverseState *  tr_state,
GF_Rect node_bounds,
Bool  use_dom_events,
Drawable *  drawable 
)
+ Here is the call graph for this function: