-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathspecific.txt
82 lines (67 loc) · 4.01 KB
/
specific.txt
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
QuesoGLC draft-1
This file contains notes about non-conformance and "extensions" to
the GLC specs 0.2
Preface
-------
SGI provides the GLC specs 0.2 at www.opengl.org but they have stayed in a draft
version since 1996 (hence the 0.2 version number) and then they are far from
completion. Some things are ambiguous or even not documented at all.
In order to provide a complete, self-consistent libary, I have been led to take
some arbitrary decisions on how to implement some aspects of QuesoGLC. These
choices might or might not be conformant to the specs. Hence the purpose of this
file which is to contain the (hoppefully) complete list of non-conformance and
"extensions" to the specs. By "extensions" I mean things that are not fully
documented in the docs such as the GLC_RESOLUTION state variable for which the
specs do not clearly describe what it is intended for and how it should
interfer on the library behaviour.
Notice that the non-conformance notes are intended to be fixed so that QuesoGLC
becomes fully conformant. However "extensions" issues can not be fixed without
SGI help.
Finally specifications generally let some freedom to the implementation
developers to determine the way they implement some things. This is what I call
"Arbitrary choices". Arbitrary choices are those details that may vary from one
implementation to another although they are conformant.
Non-conformance:
---------------
- In the current implementation, glcGetMasterc(GLC_VERSION) always return NULL.
Extensions:
----------
- QuesoGLC uses the GLC_RESOLUTION parameter to translate em units to pixels
The resolution is given in dpi (dots per inch). Its default value is 72 dpi.
Arbitrary choices:
-----------------
- Fonts are rendered at the default size of 1 point. If the user wants to
display his text at a different size, he should use glScale() or glcScale()
to precise the actual size he wants.
- The GLC API is designed to support a variety of master formats, but the
current implementation supports only masters in scalable formats that can be
read by FreeType.
- In the current implementation, the font files that belong to the same family
will be mapped into a single GLC master object that has multiple faces. For
example, the files cour.pfa, courb.pfa, courbi.pfa and couri.pfa are visible
through the GLC API as a single master with GLC_FAMILY="Courier",
GLC_FACE_COUNT=4 and GLC_FACE_LIST=("Regular","Bold","Bold Italic","Italic").
- When the GLC_GL_OBJECTS state variable is set to GL_TRUE, QuesoGLC generates
display lists each time the user tries to render a character for the first
time. Afterwards, when the user asks QuesoGLC to render those characters,
QuesoGLC draws the display lists instead of re-processing the character. This
feature has however some limitations :
- QuesoGLC creates display lists "just on time". This means that no
display lists are stored for a given character until the user asks
QuesoGLC to render it.
- QuesoGLC do not create display lists when the rendering mode is
GLC_BITMAP. Moreover the user should not try to create himself the
display lists by encapsulating glcRenderChar by a glNewList / glEndList
pair. This will fail because QuesoGLC deletes the picture used to
render the character as soon as the picture is drawn.
- GLC specifications allows any implementation to load some "default masters"
during the initialization. This feature allows the user to access to some
default fonts like "Times" or "Courier", even if he did not call
glcAppendCatalog or glcPrependCatalog.
QuesoGLC is supposed to run on several different platforms. This portability
has a drawback : different platforms do not locate the font files to the same
place. So, in order to get rid of this limitation, QuesoGLC uses an
environment variable called GLC_PATH. This variable defines the path (in the
same format than PATH) to the directories which contain font files : each time
that glcGenContext is executed, QuesoGLC looks up in the directories listed
in GLC_PATH to find fonts files.