Blender  V3.3
Functions | Variables
vfontdata_freetype.c File Reference
#include <ft2build.h>
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "BKE_curve.h"
#include "BKE_vfontdata.h"
#include "DNA_curve_types.h"
#include "DNA_packedFile_types.h"
#include "DNA_vfont_types.h"

Go to the source code of this file.

Functions

static VCharfreetypechar_to_vchar (FT_Face face, FT_ULong charcode, VFontData *vfd)
 
static VCharobjchr_to_ftvfontdata (VFont *vfont, FT_ULong charcode)
 
static VFontDataobjfnt_to_ftvfontdata (PackedFile *pf)
 
static bool check_freetypefont (PackedFile *pf)
 
VFontDataBKE_vfontdata_from_freetypefont (PackedFile *pf)
 
static voidvfontdata_copy_characters_value_cb (const void *src)
 
VFontDataBKE_vfontdata_copy (const VFontData *vfont_src, const int UNUSED(flag))
 
VCharBKE_vfontdata_char_from_freetypefont (VFont *vfont, unsigned long character)
 
VCharBKE_vfontdata_char_copy (const VChar *vchar_src)
 

Variables

static FT_Library library
 
static FT_Error err
 

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.c.

Function Documentation

◆ BKE_vfontdata_char_copy()

VChar* BKE_vfontdata_char_copy ( const VChar vchar_src)

◆ BKE_vfontdata_char_from_freetypefont()

VChar* BKE_vfontdata_char_from_freetypefont ( VFont vfont,
unsigned long  character 
)

Definition at line 421 of file vfontdata_freetype.c.

References err, library, NULL, and objchr_to_ftvfontdata().

Referenced by vfont_to_curve().

◆ BKE_vfontdata_copy()

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

◆ BKE_vfontdata_from_freetypefont()

VFontData* BKE_vfontdata_from_freetypefont ( struct 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 383 of file vfontdata_freetype.c.

References check_freetypefont(), err, library, NULL, objfnt_to_ftvfontdata(), and pf.

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

◆ check_freetypefont()

static bool check_freetypefont ( PackedFile pf)
static

Definition at line 358 of file vfontdata_freetype.c.

References err, library, NULL, and pf.

Referenced by BKE_vfontdata_from_freetypefont().

◆ freetypechar_to_vchar()

static VChar* freetypechar_to_vchar ( FT_Face  face,
FT_ULong  charcode,
VFontData vfd 
)
static

◆ objchr_to_ftvfontdata()

static VChar* objchr_to_ftvfontdata ( VFont vfont,
FT_ULong  charcode 
)
static

◆ objfnt_to_ftvfontdata()

static VFontData* objfnt_to_ftvfontdata ( PackedFile pf)
static

◆ vfontdata_copy_characters_value_cb()

static void* vfontdata_copy_characters_value_cb ( const void src)
static

Definition at line 404 of file vfontdata_freetype.c.

References BKE_vfontdata_char_copy(), and src.

Referenced by BKE_vfontdata_copy().

Variable Documentation

◆ err

FT_Error err
static

◆ library

FT_Library library
static