|
Blender
V2.59
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <ft2build.h>#include "MEM_guardedalloc.h"#include "DNA_vec_types.h"#include "BLI_blenlib.h"#include "BLI_linklist.h"#include "BLI_math.h"#include "BIF_gl.h"#include "BLF_api.h"#include "blf_internal_types.h"#include "blf_internal.h"Go to the source code of this file.
Functions | |
| int | blf_font_init (void) |
| void | blf_font_exit (void) |
| void | blf_font_size (FontBLF *font, int size, int dpi) |
| void | blf_font_draw (FontBLF *font, const char *str, unsigned int len) |
| void | blf_font_draw_ascii (FontBLF *font, const char *str, unsigned int len) |
| void | blf_font_buffer (FontBLF *font, const char *str) |
| void | blf_font_boundbox (FontBLF *font, const char *str, rctf *box) |
| void | blf_font_width_and_height (FontBLF *font, const char *str, float *width, float *height) |
| float | blf_font_width (FontBLF *font, const char *str) |
| float | blf_font_height (FontBLF *font, const char *str) |
| float | blf_font_fixed_width (FontBLF *font) |
| void | blf_font_free (FontBLF *font) |
| static void | blf_font_fill (FontBLF *font) |
| FontBLF * | blf_font_new (const char *name, const char *filename) |
| void | blf_font_attach_from_mem (FontBLF *font, const unsigned char *mem, int mem_size) |
| FontBLF * | blf_font_new_from_mem (const char *name, unsigned char *mem, int mem_size) |
Variables | |
| static FT_Library | ft_lib |
Definition in file blf_font.c.
| void blf_font_attach_from_mem | ( | FontBLF * | font, |
| const unsigned char * | mem, | ||
| int | mem_size | ||
| ) |
Definition at line 601 of file blf_font.c.
References FontBLF::face.
Referenced by BLF_metrics_attach().
Definition at line 354 of file blf_font.c.
References GlyphBLF::advance, blf_glyph_add(), blf_glyph_search(), BLF_KERNING_DEFAULT, blf_utf8_next(), GlyphBLF::box, FontBLF::face, FontBLF::flags, g, FontBLF::glyph_cache, i, GlyphBLF::idx, NULL, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BLF_boundbox(), blf_font_height(), blf_font_width(), and blf_font_width_and_height().
| void blf_font_buffer | ( | FontBLF * | font, |
| const char * | str | ||
| ) |
Definition at line 212 of file blf_font.c.
References GlyphBLF::advance, FontBLF::b_cbuf, FontBLF::b_col, FontBLF::b_fbuf, FontBLF::bch, FontBLF::bh, GlyphBLF::bitmap, blf_glyph_add(), blf_glyph_search(), BLF_KERNING_DEFAULT, blf_utf8_next(), FontBLF::bw, FontBLF::face, FontBLF::flags, g, FontBLF::glyph_cache, GlyphBLF::height, i, GlyphBLF::idx, if(), NULL, GlyphBLF::pitch, FontBLF::pos, GlyphBLF::pos_x, GlyphBLF::pos_y, and GlyphBLF::width.
Referenced by BLF_draw_buffer().
| void blf_font_draw | ( | FontBLF * | font, |
| const char * | str, | ||
| unsigned int | len | ||
| ) |
Definition at line 100 of file blf_font.c.
References GlyphBLF::advance, blf_glyph_add(), blf_glyph_render(), blf_glyph_search(), BLF_KERNING_DEFAULT, blf_utf8_next(), FontBLF::face, FontBLF::flags, g, FontBLF::glyph_cache, i, GlyphBLF::idx, and NULL.
Referenced by BLF_draw().
| void blf_font_draw_ascii | ( | FontBLF * | font, |
| const char * | str, | ||
| unsigned int | len | ||
| ) |
Definition at line 155 of file blf_font.c.
References GlyphBLF::advance, blf_glyph_add(), blf_glyph_render(), blf_glyph_search(), BLF_KERNING_DEFAULT, FontBLF::face, FontBLF::flags, g, FontBLF::glyph_ascii_table, FontBLF::glyph_cache, i, GlyphBLF::idx, and NULL.
Referenced by BLF_draw_ascii().
| void blf_font_exit | ( | void | ) |
| static void blf_font_fill | ( | FontBLF * | font | ) | [static] |
Definition at line 528 of file blf_font.c.
References FontBLF::angle, FontBLF::aspect, FontBLF::b_cbuf, FontBLF::b_col, FontBLF::b_fbuf, FontBLF::bch, FontBLF::bh, FontBLF::blur, FontBLF::bw, FontBLF::cache, FontBLF::clip_rec, FontBLF::dpi, ListBase::first, FontBLF::flags, ft_lib, FontBLF::ft_lib, FontBLF::glyph_ascii_table, FontBLF::glyph_cache, i, ListBase::last, FontBLF::m, FontBLF::max_tex_size, NULL, FontBLF::pos, FontBLF::size, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by blf_font_new(), and blf_font_new_from_mem().
| float blf_font_fixed_width | ( | FontBLF * | font | ) |
Definition at line 488 of file blf_font.c.
References GlyphBLF::advance, blf_glyph_add(), blf_glyph_search(), FontBLF::face, g, and FontBLF::glyph_cache.
Referenced by BLF_fixed_width().
| void blf_font_free | ( | FontBLF * | font | ) |
Definition at line 509 of file blf_font.c.
References blf_glyph_cache_free(), BLI_remlink(), FontBLF::cache, FontBLF::face, FontBLF::filename, ListBase::first, FontBLF::glyph_cache, MEM_freeN(), FontBLF::name, and NULL.
Referenced by BLF_exit().
| float blf_font_height | ( | FontBLF * | font, |
| const char * | str | ||
| ) |
Definition at line 471 of file blf_font.c.
References FontBLF::aspect, BLF_ASPECT, blf_font_boundbox(), FontBLF::flags, FontBLF::glyph_cache, rctf::ymax, and rctf::ymin.
Referenced by BLF_height().
| int blf_font_init | ( | void | ) |
| FontBLF* blf_font_new | ( | const char * | name, |
| const char * | filename | ||
| ) | [read] |
Definition at line 568 of file blf_font.c.
References blf_dir_metrics_search(), blf_font_fill(), BLI_strdup(), err, FontBLF::face, FontBLF::filename, ft_lib, MEM_freeN(), MEM_mallocN(), FontBLF::name, and NULL.
Referenced by BLF_load(), and BLF_load_unique().
| FontBLF* blf_font_new_from_mem | ( | const char * | name, |
| unsigned char * | mem, | ||
| int | mem_size | ||
| ) | [read] |
Definition at line 611 of file blf_font.c.
References blf_font_fill(), BLI_strdup(), err, FontBLF::face, FontBLF::filename, ft_lib, MEM_freeN(), MEM_mallocN(), FontBLF::name, and NULL.
Referenced by BLF_load_mem(), and BLF_load_mem_unique().
| void blf_font_size | ( | FontBLF * | font, |
| int | size, | ||
| int | dpi | ||
| ) |
Definition at line 73 of file blf_font.c.
References blf_glyph_cache_find(), blf_glyph_cache_new(), FontBLF::dpi, err, FontBLF::face, FontBLF::glyph_cache, NULL, size(), and FontBLF::size.
Referenced by BLF_size().
| float blf_font_width | ( | FontBLF * | font, |
| const char * | str | ||
| ) |
Definition at line 454 of file blf_font.c.
References FontBLF::aspect, BLF_ASPECT, blf_font_boundbox(), FontBLF::flags, FontBLF::glyph_cache, rctf::xmax, and rctf::xmin.
Referenced by BLF_width().
| void blf_font_width_and_height | ( | FontBLF * | font, |
| const char * | str, | ||
| float * | width, | ||
| float * | height | ||
| ) |
Definition at line 433 of file blf_font.c.
References FontBLF::aspect, BLF_ASPECT, blf_font_boundbox(), FontBLF::flags, FontBLF::glyph_cache, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BLF_width_and_height().
FT_Library ft_lib [static] |
Definition at line 61 of file blf_font.c.
Referenced by blf_font_exit(), blf_font_fill(), blf_font_init(), blf_font_new(), and blf_font_new_from_mem().