Blender  V2.93
BLI_vfontdata.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
20 #pragma once
21 
28 #include "DNA_listBase.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 struct PackedFile;
35 struct VFont;
36 
37 typedef struct VFontData {
38  struct GHash *characters;
39  char name[128];
40  float scale;
41  /* Calculated from the font. */
42  float em_height;
43  float ascender;
45 
46 typedef struct VChar {
48  unsigned int index;
49  float width;
51 
53 VFontData *BLI_vfontdata_copy(const VFontData *vfont_src, const int flag);
54 
55 VChar *BLI_vfontchar_from_freetypefont(struct VFont *vfont, unsigned long character);
56 VChar *BLI_vfontchar_copy(const VChar *vchar_src, const int flag);
57 
58 #ifdef __cplusplus
59 }
60 #endif
VFontData * BLI_vfontdata_from_freetypefont(struct PackedFile *pf)
Definition: freetypefont.c:420
VFontData * BLI_vfontdata_copy(const VFontData *vfont_src, const int flag)
VChar * BLI_vfontchar_copy(const VChar *vchar_src, const int flag)
struct VFontData VFontData
struct VChar VChar
VChar * BLI_vfontchar_from_freetypefont(struct VFont *vfont, unsigned long character)
Definition: freetypefont.c:461
These structs are the foundation for all linked lists in the library system.
#define pf(_x, _i)
Prefetch 64.
Definition: gim_memory.h:48
float width
Definition: BLI_vfontdata.h:49
ListBase nurbsbase
Definition: BLI_vfontdata.h:47
unsigned int index
Definition: BLI_vfontdata.h:48
float scale
Definition: BLI_vfontdata.h:40
float ascender
Definition: BLI_vfontdata.h:43
struct GHash * characters
Definition: BLI_vfontdata.h:38
char name[128]
Definition: BLI_vfontdata.h:39
float em_height
Definition: BLI_vfontdata.h:42