freetype.c File Reference

Include dependency graph for freetype.c:


Data Structures

struct  line_desc_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_("Font file 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 UCHAR   uint32_t
#define TR_DEFAULT_FONT   p_sys->psz_fontfamily
#define TR_FONT_STYLE_PTR   ft_style_t *
#define face   p_sys->p_face
#define glyph   face->glyph

Typedefs

typedef struct line_desc_t line_desc_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)
static void SetupLine (filter_t *p_filter, const char *psz_text_in, uint32_t **psz_text_out, uint32_t *pi_runs, uint32_t **ppi_run_lengths, ft_style_t ***ppp_styles, ft_style_t *p_style)
static ft_style_tGetStyleFromFontStack (filter_sys_t *p_sys, font_stack_t **p_fonts, bool b_bold, bool b_italic, bool b_uline, bool b_through)

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

Referenced by RenderYUVA().

#define EFFECT_LONGTEXT

Value:

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

#define EFFECT_OUTLINE   2

Referenced by RenderYUVA().

#define EFFECT_OUTLINE_FAT   3

Referenced by RenderYUVA().

#define EFFECT_TEXT   N_("Font Effect")

#define face   p_sys->p_face

Referenced by RenderText().

#define FC_DEFAULT_FONT   "Serif Bold"

#define FONT_LONGTEXT   N_("Font file 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 overridden." )

#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

Referenced by FT2Font::drawString(), and RenderText().

#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 TR_DEFAULT_FONT   p_sys->psz_fontfamily

Referenced by ProcessNodes().

#define TR_FONT_STYLE_PTR   ft_style_t *

#define UCHAR   uint32_t

Referenced by ProcessNodes().

#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 line_desc_t line_desc_t


Function Documentation

static int Create ( vlc_object_t p_this  )  [static]

static void Destroy ( vlc_object_t p_this  )  [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 p_line  )  [static]

static void FreeLines ( line_desc_t p_lines  )  [static]

References FreeLine(), and line_desc_t::p_next.

Referenced by RenderText().

static int GetFontSize ( filter_t p_filter  )  [static]

static ft_style_t* GetStyleFromFontStack ( filter_sys_t p_sys,
font_stack_t **  p_fonts,
bool  b_bold,
bool  b_italic,
bool  b_uline,
bool  b_through 
) [static]

References VLC_UNUSED.

Referenced by ProcessNodes().

static int LoadFontsFromAttachments ( filter_t p_filter  )  [static]

static line_desc_t * NewLine ( int  i_count  )  [static]

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

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

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 p_filter,
int  i_size 
) [static]

static void SetupLine ( filter_t p_filter,
const char *  psz_text_in,
uint32_t **  psz_text_out,
uint32_t *  pi_runs,
uint32_t **  ppi_run_lengths,
ft_style_t ***  ppp_styles,
ft_style_t p_style 
) [static]

References VLC_UNUSED.

Referenced by ProcessNodes().

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]

References subpicture_region_t::p_picture.

Referenced by RenderYUVA().

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]

References __MIN.

Referenced by RenderYUVA().


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 Tue May 25 08:05:25 2010 for VLC by  doxygen 1.5.6