GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
ft_font.c File Reference
#include <gpac/modules/font.h>
#include <gpac/list.h>
#include <gpac/utf.h>
#include <gpac/tools.h>
#include <ft2build.h>
#include <FT_FREETYPE_H>
#include <FT_GLYPH_H>
#include <FT_OUTLINE_H>
#include <FT_TRUETYPE_TABLES_H>
+ Include dependency graph for ft_font.c:

Data Structures

struct  FTBuilder
 
struct  ft_outliner
 

Functions

static Bool isBestFontFor (const char *listOfFonts[], const char *currentBestFont, const char *fontName)
 
void setBestFont (const char *listOfFonts[], char **currentBestFont, const char *fontName)
 
static Bool ft_enum_fonts (void *cbck, char *file_name, char *file_path)
 
static Bool ft_enum_fonts_dir (void *cbck, char *file_name, char *file_path)
 
static void ft_rescan_fonts (GF_FontReader *dr)
 
static GF_Err ft_init_font_engine (GF_FontReader *dr)
 
static GF_Err ft_shutdown_font_engine (GF_FontReader *dr)
 
static Bool ft_check_face (FT_Face font, const char *fontName, u32 styles)
 
static FT_Face ft_font_in_cache (FTBuilder *ft, const char *fontName, u32 styles)
 
static GF_Err ft_set_font (GF_FontReader *dr, const char *OrigFontName, u32 styles)
 
static GF_Err ft_get_font_info (GF_FontReader *dr, char **font_name, u32 *em_size, s32 *ascent, s32 *descent, s32 *underline, s32 *line_spacing, s32 *max_advance_h, s32 *max_advance_v)
 
static GF_Err ft_get_glyphs (GF_FontReader *dr, const char *utf_string, u32 *glyph_buffer, u32 *io_glyph_buffer_size, const char *xml_lang, Bool *is_rtl)
 
static int ft_move_to (const FT_Vector *to, void *user)
 
static int ft_line_to (const FT_Vector *to, void *user)
 
static int ft_conic_to (const FT_Vector *control, const FT_Vector *to, void *user)
 
static int ft_cubic_to (const FT_Vector *c1, const FT_Vector *c2, const FT_Vector *to, void *user)
 
static GF_Glyphft_load_glyph (GF_FontReader *dr, u32 glyph_name)
 
GF_FontReaderft_load ()
 
void ft_delete (GF_BaseInterface *ifce)
 
const u32QueryInterfaces ()
 
GF_BaseInterfaceLoadInterface (u32 InterfaceType)
 
void ShutdownInterface (GF_BaseInterface *ifce)
 

Variables

static const char * BEST_FIXED_FONTS []
 
static const char * BEST_SERIF_FONTS []
 
static const char * BEST_SANS_FONTS []
 

Data Structure Documentation

struct FTBuilder
+ Collaboration diagram for FTBuilder:
Data Fields
FT_Library library
FT_Face active_face
char * font_dir
GF_List * loaded_fonts
char * font_serif
char * font_sans
char * font_fixed
struct ft_outliner
+ Collaboration diagram for ft_outliner:
Data Fields
FTBuilder * ftpriv
GF_Path * path
s32 last_x
s32 last_y

Function Documentation

static Bool isBestFontFor ( const char *  listOfFonts[],
const char *  currentBestFont,
const char *  fontName 
)
static

Choose the best font in the list of fonts

+ Here is the caller graph for this function:

void setBestFont ( const char *  listOfFonts[],
char **  currentBestFont,
const char *  fontName 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool ft_enum_fonts ( void *  cbck,
char *  file_name,
char *  file_path 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool ft_enum_fonts_dir ( void *  cbck,
char *  file_name,
char *  file_path 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ft_rescan_fonts ( GF_FontReader dr)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err ft_init_font_engine ( GF_FontReader dr)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err ft_shutdown_font_engine ( GF_FontReader dr)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool ft_check_face ( FT_Face  font,
const char *  fontName,
u32  styles 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static FT_Face ft_font_in_cache ( FTBuilder ft,
const char *  fontName,
u32  styles 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err ft_set_font ( GF_FontReader dr,
const char *  OrigFontName,
u32  styles 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err ft_get_font_info ( GF_FontReader dr,
char **  font_name,
u32 em_size,
s32 ascent,
s32 descent,
s32 underline,
s32 line_spacing,
s32 max_advance_h,
s32 max_advance_v 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err ft_get_glyphs ( GF_FontReader dr,
const char *  utf_string,
u32 glyph_buffer,
u32 io_glyph_buffer_size,
const char *  xml_lang,
Bool is_rtl 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ft_move_to ( const FT_Vector *  to,
void *  user 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ft_line_to ( const FT_Vector *  to,
void *  user 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ft_conic_to ( const FT_Vector *  control,
const FT_Vector *  to,
void *  user 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ft_cubic_to ( const FT_Vector *  c1,
const FT_Vector *  c2,
const FT_Vector *  to,
void *  user 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Glyph* ft_load_glyph ( GF_FontReader dr,
u32  glyph_name 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_FontReader* ft_load ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ft_delete ( GF_BaseInterface ifce)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const u32* QueryInterfaces ( )
GF_BaseInterface* LoadInterface ( u32  InterfaceType)

+ Here is the call graph for this function:

void ShutdownInterface ( GF_BaseInterface ifce)

+ Here is the call graph for this function:

Variable Documentation

const char* BEST_FIXED_FONTS[]
static
Initial value:
= {
"Courier New",
"Courier",
"Monaco",
"Bitstream Vera Monospace",
"Droid Sans Mono",
0
}
const char* BEST_SERIF_FONTS[]
static
Initial value:
= {
"Times New Roman",
"Bitstream Vera",
"Times",
"Droid Serif",
0
}
const char* BEST_SANS_FONTS[]
static
Initial value:
= {
"Arial",
"Tahoma",
"Verdana",
"Helvetica",
"Bitstream Vera Sans",
"Frutiger",
"Droid Sans",
0
}