Blender V2.61 - r43446
Functions

blf_internal.h File Reference

Go to the source code of this file.

Functions

unsigned int blf_next_p2 (unsigned int x)
unsigned int blf_hash (unsigned int val)
char * blf_dir_search (const char *file)
char * blf_dir_metrics_search (const char *filename)
int blf_font_init (void)
void blf_font_exit (void)
struct FontBLFblf_font_new (const char *name, const char *filename)
struct FontBLFblf_font_new_from_mem (const char *name, unsigned char *mem, int mem_size)
void blf_font_attach_from_mem (struct FontBLF *font, const unsigned char *mem, int mem_size)
void blf_font_size (struct FontBLF *font, int size, int dpi)
void blf_font_draw (struct FontBLF *font, const char *str, unsigned int len)
void blf_font_draw_ascii (struct FontBLF *font, const char *str, unsigned int len)
void blf_font_buffer (struct FontBLF *font, const char *str)
void blf_font_boundbox (struct FontBLF *font, const char *str, struct rctf *box)
void blf_font_width_and_height (struct FontBLF *font, const char *str, float *width, float *height)
float blf_font_width (struct FontBLF *font, const char *str)
float blf_font_height (struct FontBLF *font, const char *str)
float blf_font_fixed_width (struct FontBLF *font)
void blf_font_free (struct FontBLF *font)
struct GlyphCacheBLFblf_glyph_cache_find (struct FontBLF *font, int size, int dpi)
struct GlyphCacheBLFblf_glyph_cache_new (struct FontBLF *font)
void blf_glyph_cache_clear (struct FontBLF *font)
void blf_glyph_cache_free (struct GlyphCacheBLF *gc)
struct GlyphBLFblf_glyph_search (struct GlyphCacheBLF *gc, unsigned int c)
struct GlyphBLFblf_glyph_add (struct FontBLF *font, unsigned int index, unsigned int c)
void blf_glyph_free (struct GlyphBLF *g)
int blf_glyph_render (struct FontBLF *font, struct GlyphBLF *g, float x, float y)

Detailed Description

Definition in file blf_internal.h.


Function Documentation

char* blf_dir_metrics_search ( const char *  filename)

Definition at line 181 of file blf_dir.c.

References BLI_exists(), BLI_strdup(), BLI_strnlen(), MEM_freeN(), and NULL.

Referenced by blf_font_new().

char* blf_dir_search ( const char *  file)
void blf_font_attach_from_mem ( struct FontBLF font,
const unsigned char *  mem,
int  mem_size 
)

Definition at line 548 of file blf_font.c.

References FontBLF::face.

Referenced by BLF_metrics_attach().

void blf_font_boundbox ( struct FontBLF font,
const char *  str,
struct rctf box 
)
void blf_font_buffer ( struct FontBLF font,
const char *  str 
)

Definition at line 215 of file blf_font.c.

References FontBLF::b_col, g, GlyphCacheBLF::glyph_ascii_table, FontBLF::glyph_cache, i, NULL, and FontBLF::pos.

Referenced by BLF_draw_buffer().

void blf_font_draw ( struct FontBLF font,
const char *  str,
unsigned int  len 
)
void blf_font_draw_ascii ( struct FontBLF font,
const char *  str,
unsigned int  len 
)
void blf_font_exit ( void  )

Definition at line 66 of file blf_font.c.

References ft_lib.

Referenced by BLF_exit().

float blf_font_fixed_width ( struct FontBLF font)
void blf_font_free ( struct FontBLF font)
float blf_font_height ( struct FontBLF font,
const char *  str 
)

Definition at line 425 of file blf_font.c.

References FontBLF::aspect, BLF_ASPECT, blf_font_boundbox(), FontBLF::flags, rctf::ymax, and rctf::ymin.

Referenced by BLF_height().

int blf_font_init ( void  )

Definition at line 61 of file blf_font.c.

References ft_lib.

Referenced by BLF_init().

struct FontBLF* blf_font_new ( const char *  name,
const char *  filename 
) [read]
struct FontBLF* blf_font_new_from_mem ( const char *  name,
unsigned char *  mem,
int  mem_size 
) [read]
void blf_font_size ( struct FontBLF font,
int  size,
int  dpi 
)
float blf_font_width ( struct FontBLF font,
const char *  str 
)

Definition at line 411 of file blf_font.c.

References FontBLF::aspect, BLF_ASPECT, blf_font_boundbox(), FontBLF::flags, rctf::xmax, and rctf::xmin.

Referenced by BLF_width().

void blf_font_width_and_height ( struct FontBLF font,
const char *  str,
float *  width,
float *  height 
)
struct GlyphBLF* blf_glyph_add ( struct FontBLF font,
unsigned int  index,
unsigned int  c 
) [read]
void blf_glyph_cache_clear ( struct FontBLF font)
struct GlyphCacheBLF* blf_glyph_cache_find ( struct FontBLF font,
int  size,
int  dpi 
) [read]
void blf_glyph_cache_free ( struct GlyphCacheBLF gc)
struct GlyphCacheBLF* blf_glyph_cache_new ( struct FontBLF font) [read]
void blf_glyph_free ( struct GlyphBLF g)

Definition at line 287 of file blf_glyph.c.

References GlyphBLF::bitmap, and MEM_freeN().

Referenced by blf_glyph_cache_clear(), and blf_glyph_cache_free().

int blf_glyph_render ( struct FontBLF font,
struct GlyphBLF g,
float  x,
float  y 
)
struct GlyphBLF* blf_glyph_search ( struct GlyphCacheBLF gc,
unsigned int  c 
) [read]
unsigned int blf_hash ( unsigned int  val)

Definition at line 52 of file blf_util.c.

References simple_enum_gen::val.

Referenced by blf_glyph_add(), and blf_glyph_search().

unsigned int blf_next_p2 ( unsigned int  x)

Definition at line 40 of file blf_util.c.

Referenced by blf_glyph_cache_texture().