Blender V4.3
vfontdata_freetype.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLF_api.hh"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BKE_curve.hh"
#include "BKE_vfont.hh"
#include "BKE_vfontdata.hh"
#include "DNA_packedFile_types.h"
#include "DNA_vfont_types.h"

Go to the source code of this file.

Functions

VFontDataBKE_vfontdata_from_freetypefont (PackedFile *pf)
 
static void * vfontdata_copy_characters_value_cb (const void *src)
 
VFontDataBKE_vfontdata_copy (const VFontData *vfont_src, const int)
 
VCharBKE_vfontdata_char_from_freetypefont (VFont *vfont, ulong character)
 
VCharBKE_vfontdata_char_copy (const VChar *vchar_src)
 

Variables

const void * builtin_font_data
 
int builtin_font_size
 

Detailed Description

This code parses the Freetype font outline data to chains of Blender's bezier-triples. Additional information can be found at the bottom of this file.

Code that uses exotic character maps is present but commented out.

Definition in file vfontdata_freetype.cc.

Function Documentation

◆ BKE_vfontdata_char_copy()

VChar * BKE_vfontdata_char_copy ( const VChar * vchar_src)

◆ BKE_vfontdata_char_from_freetypefont()

◆ BKE_vfontdata_copy()

VFontData * BKE_vfontdata_copy ( const VFontData * vfont_src,
const int flag )

◆ BKE_vfontdata_from_freetypefont()

VFontData * BKE_vfontdata_from_freetypefont ( PackedFile * pf)

Construct a new VFontData structure from free-type font data in pf.

Parameters
pfThe font data.
Return values
Anew VFontData structure, or NULL if unable to load.

Definition at line 34 of file vfontdata_freetype.cc.

References ARRAY_SIZE, VFontData::ascender, BLF_display_name_from_id(), BLF_get_vfont_metrics(), BLF_load_mem(), BLF_unload_id(), BLI_ghash_int_new_ex(), BLI_str_utf8_invalid_strip(), VFontData::characters, VFontData::em_height, MEM_callocN, MEM_freeN(), VFontData::name, pf, VFontData::scale, and STRNCPY.

Referenced by BKE_vfont_load(), vfont_get_data(), and vfont_init_data().

◆ vfontdata_copy_characters_value_cb()

static void * vfontdata_copy_characters_value_cb ( const void * src)
static

Definition at line 61 of file vfontdata_freetype.cc.

References BKE_vfontdata_char_copy().

Referenced by BKE_vfontdata_copy().

Variable Documentation

◆ builtin_font_data

const void* builtin_font_data
extern

◆ builtin_font_size

int builtin_font_size
extern