freetype.c File Reference

Include dependency graph for freetype.c:


Data Structures

struct  line_desc_t
struct  font_stack_t
struct  ft_style_t
struct  filter_sys_t
 filter_sys_t: chroma method descriptor More...

Defines

#define FT_FLOOR(X)   ((X & -64) >> 6)
#define FT_CEIL(X)   (((X + 63) & -64) >> 6)
#define FT_MulFix(v, s)   (((v)*(s))>>16)
#define DEFAULT_FONT   "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf"
#define FC_DEFAULT_FONT   "Serif Bold"
#define FONT_TEXT   N_("Font")
#define FONT_LONGTEXT   N_("Filename for the font you want to use")
#define FONTSIZE_TEXT   N_("Font size in pixels")
#define FONTSIZE_LONGTEXT
#define OPACITY_TEXT   N_("Opacity")
#define OPACITY_LONGTEXT
#define COLOR_TEXT   N_("Text default color")
#define COLOR_LONGTEXT
#define FONTSIZER_TEXT   N_("Relative font size")
#define FONTSIZER_LONGTEXT
#define YUVP_TEXT   N_("Use YUVP renderer")
#define YUVP_LONGTEXT
#define EFFECT_TEXT   N_("Font Effect")
#define EFFECT_LONGTEXT
#define EFFECT_BACKGROUND   1
#define EFFECT_OUTLINE   2
#define EFFECT_OUTLINE_FAT   3
#define face   p_sys->p_face
#define glyph   face->glyph

Typedefs

typedef line_desc_t line_desc_t
typedef font_stack_t font_stack_t

Functions

static int Create (vlc_object_t *)
static void Destroy (vlc_object_t *)
int vlc_entry__main (module_t *p_module)
const char * vlc_entry_license__main (void)
static int RenderText (filter_t *p_filter, subpicture_region_t *p_region_out, subpicture_region_t *p_region_in)
 This function renders a text subpicture region into another one.
static int LoadFontsFromAttachments (filter_t *p_filter)
static int GetFontSize (filter_t *p_filter)
static int SetFontSize (filter_t *, int)
static void YUVFromRGB (uint32_t i_argb, uint8_t *pi_y, uint8_t *pi_u, uint8_t *pi_v)
static line_desc_tNewLine (int)
static int Render (filter_t *, subpicture_region_t *, line_desc_t *, int, int)
static void FreeLines (line_desc_t *)
static void FreeLine (line_desc_t *)
static void UnderlineGlyphYUVA (int i_line_thickness, int i_line_offset, bool b_ul_next_char, FT_BitmapGlyph p_this_glyph, FT_Vector *p_this_glyph_pos, FT_BitmapGlyph p_next_glyph, FT_Vector *p_next_glyph_pos, int i_glyph_tmax, int i_align_offset, uint8_t i_y, uint8_t i_u, uint8_t i_v, subpicture_region_t *p_region)
static void DrawBlack (line_desc_t *p_line, int i_width, subpicture_region_t *p_region, int xoffset, int yoffset)
static int RenderYUVA (filter_t *p_filter, subpicture_region_t *p_region, line_desc_t *p_line, int i_width, int i_height)

Variables

static const int pi_sizes [] = { 20, 18, 16, 12, 6 }
static const char *const ppsz_sizes_text []
static int const pi_effects [] = { 1, 2, 3 }
static const char *const ppsz_effects_text []
static const int pi_color_values []
static const char *const ppsz_color_descriptions []

Define Documentation

#define COLOR_LONGTEXT

Value:

N_("The color of the text that will be rendered on "\
    "the video. This must be an hexadecimal (like HTML colors). The first two "\
    "chars are for red, then green, then blue. #000000 = black, #FF0000 = red,"\
    " #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white" )

#define COLOR_TEXT   N_("Text default color")

#define DEFAULT_FONT   "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf"

#define EFFECT_BACKGROUND   1

#define EFFECT_LONGTEXT

Value:

N_("It is possible to apply effects to the rendered " \
"text to improve its readability." )

#define EFFECT_OUTLINE   2

#define EFFECT_OUTLINE_FAT   3

#define EFFECT_TEXT   N_("Font Effect")

#define face   p_sys->p_face

#define FC_DEFAULT_FONT   "Serif Bold"

#define FONT_LONGTEXT   N_("Filename for the font you want to use")

#define FONT_TEXT   N_("Font")

#define FONTSIZE_LONGTEXT

Value:

N_("This is the default size of the fonts " \
    "that will be rendered on the video. " \
    "If set to something different than 0 this option will override the " \
    "relative font size." )

#define FONTSIZE_TEXT   N_("Font size in pixels")

#define FONTSIZER_LONGTEXT

Value:

N_("This is the relative default size of the " \
    "fonts that will be rendered on the video. If absolute font size is set, "\
    "relative size will be overriden." )

#define FONTSIZER_TEXT   N_("Relative font size")

#define FT_CEIL (  )     (((X + 63) & -64) >> 6)

#define FT_FLOOR (  )     ((X & -64) >> 6)

#define FT_MulFix ( v,
 )     (((v)*(s))>>16)

#define glyph   face->glyph

#define OPACITY_LONGTEXT

Value:

N_("The opacity (inverse of transparency) of the " \
    "text that will be rendered on the video. 0 = transparent, " \
    "255 = totally opaque. " )

#define OPACITY_TEXT   N_("Opacity")

#define YUVP_LONGTEXT

Value:

N_("This renders the font using \"paletized YUV\". " \
  "This option is only needed if you want to encode into DVB subtitles" )

#define YUVP_TEXT   N_("Use YUVP renderer")


Typedef Documentation

typedef struct font_stack_t font_stack_t

typedef struct line_desc_t line_desc_t


Function Documentation

static int Create ( vlc_object_t  )  [static]

static void Destroy ( vlc_object_t  )  [static]

static void DrawBlack ( line_desc_t p_line,
int  i_width,
subpicture_region_t p_region,
int  xoffset,
int  yoffset 
) [static]

static void FreeLine ( line_desc_t  )  [static]

static void FreeLines ( line_desc_t  )  [static]

static int GetFontSize ( filter_t p_filter  )  [static]

static int LoadFontsFromAttachments ( filter_t p_filter  )  [static]

static line_desc_t * NewLine ( int   )  [static]

static int Render ( filter_t ,
subpicture_region_t ,
line_desc_t ,
int  ,
int   
) [static]

static int RenderText ( filter_t p_filter,
subpicture_region_t p_region_out,
subpicture_region_t p_region_in 
) [static]

This function renders a text subpicture region into another one.

It also calculates the size needed for this string, and renders the needed glyphs into memory. It is used as pf_add_string callback in the vout method by this module

static int RenderYUVA ( filter_t p_filter,
subpicture_region_t p_region,
line_desc_t p_line,
int  i_width,
int  i_height 
) [static]

static int SetFontSize ( filter_t ,
int   
) [static]

static void UnderlineGlyphYUVA ( int  i_line_thickness,
int  i_line_offset,
bool  b_ul_next_char,
FT_BitmapGlyph  p_this_glyph,
FT_Vector *  p_this_glyph_pos,
FT_BitmapGlyph  p_next_glyph,
FT_Vector *  p_next_glyph_pos,
int  i_glyph_tmax,
int  i_align_offset,
uint8_t  i_y,
uint8_t  i_u,
uint8_t  i_v,
subpicture_region_t p_region 
) [static]

int vlc_entry__main ( module_t p_module  ) 

const char* vlc_entry_license__main ( void   ) 

static void YUVFromRGB ( uint32_t  i_argb,
uint8_t *  pi_y,
uint8_t *  pi_u,
uint8_t *  pi_v 
) [static]


Variable Documentation

const int pi_color_values[] [static]

Initial value:

 {
  0x00000000, 0x00808080, 0x00C0C0C0, 0x00FFFFFF, 0x00800000,
  0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00808000, 0x00008000, 0x00008080,
  0x0000FF00, 0x00800080, 0x00000080, 0x000000FF, 0x0000FFFF }

int const pi_effects[] = { 1, 2, 3 } [static]

const int pi_sizes[] = { 20, 18, 16, 12, 6 } [static]

const char* const ppsz_color_descriptions[] [static]

Initial value:

 {
  N_("Black"), N_("Gray"), N_("Silver"), N_("White"), N_("Maroon"),
  N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Olive"), N_("Green"), N_("Teal"),
  N_("Lime"), N_("Purple"), N_("Navy"), N_("Blue"), N_("Aqua") }

const char* const ppsz_effects_text[] [static]

Initial value:

 {
    N_("Background"),N_("Outline"), N_("Fat Outline") }

const char* const ppsz_sizes_text[] [static]

Initial value:

 {
    N_("Smaller"), N_("Small"), N_("Normal"), N_("Large"), N_("Larger") }


Generated on Wed Aug 13 08:04:40 2008 for VLC by  doxygen 1.5.1