File: README

package info (click to toggle)
libuninameslist 20190701-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 4,860 kB
  • sloc: ansic: 95,072; python: 118; makefile: 107; sh: 4
file content (176 lines) | stat: -rw-r--r-- 6,883 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
LibUniNamesList
***************

LibUniNamesList holds www.unicode.org Nameslist.txt data which can be useful
for programs that need Unicode "Names", "Annotations" and block definitions.

Accessing LibUniNamesList Information
*************************************

Older versions of LibUniNamesList consisted of static data arrays which can
be accessed simply as arrays. This access still exists for compatibility
with older programs that use this method. One example program using this
older method is FontForge 20120731-b. The latest version of LibUniNamesList
contains functions which help simplify access to the same data.

Functions to access data in LibUniNamesList is listed here with the oldest
listed first, and latest added function listed last. If more functions are
added, they will be added to the bottom of this list.

1) const char *uniNamesList_name(unsigned long uni);
2) const char *uniNamesList_annot(unsigned long uni);
3) const char *uniNamesList_NamesListVersion(void);
4) int uniNamesList_blockCount(void);
5) int uniNamesList_blockNumber(unsigned long uni);
6) long uniNamesList_blockStart(int uniBlock);
7) long uniNamesList_blockEnd(int uniBlock);
8) const char *uniNamesList_blockName(int uniBlock);
9) int uniNamesList_names2cnt(void);
10) long uniNamesList_names2val(int count);
11) int uniNamesList_names2getU(unsigned long uni);
12) int uniNamesList_names2lnC(int count);
13) int uniNamesList_names2lnU(unsigned long uni);
14) const char *uniNamesList_names2anC(int count);
15) const char *uniNamesList_names2anU(unsigned long uni);

For a better description of each function, check "uninameslist.h", and see
an example of how to use these functions in FontForge ~ 20140101 or later.

Building and Installing LibUniNamesList
***************************************

Read INSTALL for details on building LibUniNamesList using this package.
This package contains 2 libraries, but only 1 is built by default:
	1) libuninameslist - holds NamesList.txt data from www.unicode.org
	2) libuninameslist-fr - currently holds French 10.0 NamesList.txt
If you need the libuninameslist-fr library then you will also need to enable
building it since the current default is not to build it.
	configure --enable-frenchlib

Added Python Wrapper
********************

A python wrapper is provided for users interested in libuninameslist access
using python. The easiest and simplest method for users to add it is to run:

	$ cd py
	$ su
	# python setup.py install
	# exit
	$

The build system can optionally also build installable wheels of the package.
To do this, pass --enable-pylib. Optionally, also set the `PYTHON` environment
variable to configure which python to use. The configured python must have pip,
setuptools and the wheel packages installed.

	$ PYTHON=python2 ./configure --enable-pylib
	$ make
	$ su
	# pip install py/dist/*.whl
	# exit
	$

Build Process
*************

The default build process can be summarized quickly like this:

	Download LibUniNamesList*.tar.gz
	Move it somewhere appropriate (temp perhaps?) and type:
	$ tar -xzf libuninameslist*.tar.gz
	$ cd libuninameslist????????
	$ autoreconf -i
	$ automake
	$ ./configure
	$ make
	$ su
	# make install
	# exit
	$

The above steps work for both release or latest versions of libuninameslist.
Release versions provided by your distro may include a configure script which
allows you to skip extra package requirements (for autotools, automake), and
you would skip steps autoreconf -i, automake above, and start at ./configure

NOTE: Some Distros and Operating Systems may require you to run 'ldconfig' to
recognize LibUniNamesList if you are not rebooting your computer first before
loading another program that depends on LibUniNamesList. To do this, you may
need to run 'ldconfig' in 'su -' mode after you have done 'make install':

	$ su -
	# ldconfig
	# exit
	$

	
How to Update LibUniNamesList (for maintainers)
***********************************************

The main purpose for LibUniNamesList is to contain a current copy of the
latest updated version of Nameslist.txt as published by www.unicode.org
which can then be accessed by users needing this information.

This means every now and then, LibUniNamesList needs to be updated with new
information. To do this, you will need to get the latest NamesList.txt file
from www.unicode.org which will then be used to build a new namelist.c file.

Let's say the next version of NamesList is version 8.0.
1) Update configure.ac with the new timestamp:
	uninameslist_package_stamp [20150701]	<-"YYYYMMDD" format
2) Update configure.ac with the new NamesList version:
	uninameslist_nameslist_ver [8.0]
3) Increment the point release, was 0.4, now becomes 0.5. NOTE: This minor
   point number may get large since LibUniNamesList is backwards compatible.
	uninameslist_major_version [0]
	uninameslist_minor_version [5]
   (if a future update of ListeDesNoms.txt >7.0 appears, then update this;
	fr_major_version [0]
	fr_minor_version [4] )
4) Update the config system, and create a versioned buildnameslist.h:
	autoreconf -i -Wall
	automake --foreign
	./configure
5) Build the buildnameslist program:
	make
6) Import "NamesList.txt" and "ListeDesNoms.txt" into the same directory:
	make NamesList.txt
	make ListeDesNoms.txt
7) Create new updated {nameslist*.c, uninameslist*.h} files:
	./buildnameslist
	make clean
	make

Added note: Going from Unicode 8.0 to 9.0, both of these libraries listed are
now bumped to 1.0 since this can be seen as a large change due to the library
compilation of the CRA being confused with Major Minor versioning.
Backwards compatibility to accessing data still remains intact for programs
that require access using older methods.

Adding And/Or Updating Languages (for translators)
**************************************************

If you are interested in adding a new language but don't know where to start,
then first recommendation is get a hold of the latest NamesList.txt file from
www.unicode.org and start with that first. You will want to use some sort of
plain text editor able to edit UTF-8 style files.
If you are interested in updating an existing file, there are some references
pointing to where latest NamesList style files were found, see in Makefile.am
or other nameslist*.c or uninameslist*.h for possible information if not seen
on readme files. Ask originating Authors if they want/need help if looking at
updating existing files.
If you are aware of translations in another format, they could be considered.

Old Bugs Out, New Bugs In
*************************

If you have user type questions, a good place to look, or ask is:
	https://sourceforge.net/p/fontforge/mailman/fontforge-users/
	fontforge-devel@lists.sourceforge.net

Please report any bugs, patches and/or improvements to:
	fontforge-devel@lists.sourceforge.net

This file was last updated:
	2018-Jul-01, by Joe Da Silva