GNU Unifont 15.1.04
Pan-Unicode font with complete Unicode Plane 0 coverage and partial coverage of higher planes
hex2otf.h
Go to the documentation of this file.
1/**
2 @file hex2otf.h
3
4 @brief hex2otf.h - Header file for hex2otf.c
5
6 @copyright Copyright © 2022 何志翔 (He Zhixiang)
7
8 @author 何志翔 (He Zhixiang)
9*/
10
11/*
12 LICENSE:
13
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License
16 as published by the Free Software Foundation; either version 2
17 of the License, or (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software
26 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 02110-1301, USA.
28
29 NOTE: It is a violation of the license terms of this software
30 to delete license and copyright information below if creating
31 a font derived from Unifont glyphs.
32*/
33#ifndef _HEX2OTF_H_
34#define _HEX2OTF_H_
35
36#define UNIFONT_VERSION "15.1.04" ///< Current Unifont version.
37
38/**
39 Define default strings for some TrueType font NameID strings.
40
41 NameID Description
42 ------ -----------
43 0 Copyright Notice
44 1 Font Family
45 2 Font Subfamily
46 5 Version of the Name Table
47 11 URL of the Font Vendor
48 13 License Description
49 14 License Information URL
50
51 Default NameID 0 string (Copyright Notice)
52*/
53#define DEFAULT_ID0 "Copyright © 1998-2022 Roman Czyborra, Paul Hardy, \
54Qianqian Fang, Andrew Miller, Johnnie Weaver, David Corbett, \
55Nils Moskopp, Rebecca Bettencourt, et al."
56
57#define DEFAULT_ID1 "Unifont" ///< Default NameID 1 string (Font Family)
58#define DEFAULT_ID2 "Regular" ///< Default NameID 2 string (Font Subfamily)
59
60/// Default NameID 5 string (Version of the Name Table)
61#define DEFAULT_ID5 "Version "UNIFONT_VERSION
62
63/// Default NameID 11 string (Font Vendor URL)
64#define DEFAULT_ID11 "https://unifoundry.com/unifont/"
65
66/// Default NameID 13 string (License Description)
67#define DEFAULT_ID13 "Dual license: SIL Open Font License version 1.1, \
68and GNU GPL version 2 or later with the GNU Font Embedding Exception."
69
70/// Default NameID 14 string (License Information URLs)
71#define DEFAULT_ID14 "http://unifoundry.com/LICENSE.txt, \
72https://scripts.sil.org/OFL"
73
74/**
75 @brief Data structure for a font ID number and name character string.
76*/
77typedef struct NamePair
78{
79 int id;
80 const char *str;
82
83/// Macro to initialize name identifier codes to default values defined above.
84#define NAMEPAIR(n) {(n), DEFAULT_ID##n}
85
86/**
87 @brief Allocate array of NameID codes with default values.
88
89 This array contains the default values for several TrueType NameID
90 strings, as defined above in this file. Strings are assigned using
91 the NAMEPAIR macro defined above.
92*/
94{
95 NAMEPAIR (0), // Copyright notice; required (used in CFF)
96 NAMEPAIR (1), // Font family; required (used in CFF)
97 NAMEPAIR (2), // Font subfamily
98 NAMEPAIR (5), // Version of the name table
99 NAMEPAIR (11), // URL of font vendor
100 NAMEPAIR (13), // License description
101 NAMEPAIR (14), // License information URL
102 {0, NULL} // Sentinel
103};
104
105#undef NAMEPAIR
106
107#endif
const NamePair defaultNames[]
Allocate array of NameID codes with default values.
Definition: hex2otf.h:93
#define NAMEPAIR(n)
Macro to initialize name identifier codes to default values defined above.
Definition: hex2otf.h:84
Data structure for a font ID number and name character string.
Definition: hex2otf.h:78