Menu

Tree [66bb77] master /
 History

HTTPS access


File Date Author Commit
 build 2014-07-15 Paul Wise Paul Wise [ee5537] Use the clean-local target, don't override clea...
 database 2014-07-15 Paul Wise Paul Wise [43f0b8] Commit only once to speed up generation of the ...
 docs 2018-08-20 Paul Wise Paul Wise [66bb77] Fix spelling errors in documentation, comments ...
 examples 2016-09-15 Paul Wise Paul Wise [4e670c] Fix typos, word choice and grammar
 include 2014-10-26 Paul Wise Paul Wise [35325f] Fix cross-compiling to Windows with the mingw c...
 src 2018-08-20 Paul Wise Paul Wise [66bb77] Fix spelling errors in documentation, comments ...
 tests 2018-08-20 Paul Wise Paul Wise [66bb77] Fix spelling errors in documentation, comments ...
 .gitignore 2014-05-12 Paul Wise Paul Wise [d7ab9a] Update git file ignore list
 AUTHORS 2007-01-21 Bertrand Coconnier Bertrand Coconnier [951049] QuesoGLC now uses GLEW to manage OpenGL extensions
 COPYING 2016-09-15 Paul Wise Paul Wise [1bd106] Update to latest copy of the GNU Lesser General...
 INSTALL 2016-09-15 Paul Wise Paul Wise [4e670c] Fix typos, word choice and grammar
 INSTALL.win 2016-09-15 Paul Wise Paul Wise [4e670c] Fix typos, word choice and grammar
 Makefile.am 2015-06-13 Paul Wise Paul Wise [20ca61] Rename the ChangeLog file to NEWS
 NEWS 2018-08-20 Paul Wise Paul Wise [66bb77] Fix spelling errors in documentation, comments ...
 QuesoGLC.sln 2009-12-29 Bertrand Coconnier Bertrand Coconnier [32ebac] Restore test11.8 in MSVC project
 README 2016-09-15 Paul Wise Paul Wise [4e670c] Fix typos, word choice and grammar
 THANKS 2016-09-15 Paul Wise Paul Wise [203d6f] Remove whitespace before colons
 autogen.sh 2011-12-04 Paul Wise Paul Wise [b752dc] Use autoreconf instead of hard-coding the list ...
 configure.ac 2016-09-15 Paul Wise Paul Wise [203d6f] Remove whitespace before colons
 makefile.mgw 2016-09-15 Paul Wise Paul Wise [203d6f] Remove whitespace before colons
 quesoglc.pc.in 2008-04-27 Bertrand Coconnier Bertrand Coconnier [5e70d5] Fixed the feature request #1947346 : request fo...
 quesoglc.spec 2015-06-13 Paul Wise Paul Wise [20ca61] Rename the ChangeLog file to NEWS
 specification.txt 2016-09-15 Paul Wise Paul Wise [4e670c] Fix typos, word choice and grammar
 todo.txt 2016-09-15 Paul Wise Paul Wise [4e670c] Fix typos, word choice and grammar

Read Me

This file contains general information about QuesoGLC. For installation
instructions, see the INSTALL file if you run a POSIX platform and INSTALL.win
if you run Windows.

QuesoGLC is a free implementation of SGI's OpenGL Character Renderer (GLC).
QuesoGLC is based on the FreeType library, provides Unicode support and is
designed to be easily ported on any platform that supports both FreeType and
OpenGL.

The most authoritative documentation on GLC is the GLC specification document,
which is available in Postscript form at www.opengl.org

Overview of GLC
---------------

The OpenGL Character Renderer (GLC) is a subroutine library that provides
OpenGL programs with character rendering services.

A GLC context is an instantiation of the GLC state machine. A GLC client
is a program that uses both OpenGL (henceforth, "GL") and GLC.  When a
client thread issues a GLC command, the thread's current GLC context
executes the command.

To render a character, a GLC client issues the command

    glcRenderChar(GLint inCode);

GLC then goes through these steps:

1.  GLC finds a font that maps inCode to a character such as LATIN
    CAPITAL LETTER A.

2.  GLC uses one or more glyphs from the font to create a graphical
    layout that represents the character.

3.  GLC issues a sequence of GL commands to draw the layout.

A font is a stylistically consistent set of glyphs that can be used to
render some set of characters. Each font has a family name (e.g. Palatino)
and a state variable that selects one of the faces (e.g. Regular, Bold,
Italic, Bold Italic) that the font contains. A typeface is the combination
of a family and a face (e.g.  Palatino Bold).

A font is an instantiation of a master. A master is a representation of the
font that is stored outside of GLC in a standard format such as Type 1.

A catalog is a file containing a list of master file names. A list of catalog
names (GLC_CATALOG_LIST) defines the list of masters that can be instantiated
in a GLC context.

By default, GLC interprets all character codes as elements of the Unicode
Character Database (UCD) defined by Unicode 4.0.1.

The interpretation of arrays of character codes of type GLCchar in the
GLC API is determined by the value of the GLC context state variable
GLC_STRING_TYPE. The values GLC_UCS1, GLC_UCS2, GLC_UCS4 and GLC_UTF8 specify
that each array element is either a Unicode code point of type GLubyte,
GLushort, GLint, or GLubyte respectively. The initial value of GLC_STRING_TYPE
is GLC_UCS1.

Before issuing a GLC rendering command, a client must issue GL commands
directly to establish a GL state such that the GL commands issued by GLC
produce the desired result. For example, before issuing a glcRenderChar
command, a client may issue glColor and glRasterPos commands to establish
the color and origin of the resulting layout.

Before issuing any GLC commands, the client must create a GL context and
make it current.

Glyph coordinates are defined in em units and are transformed during
rendering to produce the desired mapping of the glyph shape into the GL
window coordinate system.

In addition to commands for rendering, the GLC API includes measurement
commands that return certain metrics (currently the bounding box and the
baseline) for the layout.

Since the focus of GLC is on rendering and not modeling, the GLC API does
not provide access to glyph shape data.

EXAMPLES
--------

The following ISO C code fragment uses GL and GLC to render the character
LATIN CAPITAL LETTER A in red at (100, 100) using a default typeface at a
scale of 24 pixels per em. In this example, GLC issues a glBitmap command
to draw the layout.

    glcContext(glcGenContext());
    glcScale(24.f, 24.f);
    glColor3f(1.f, 0.f, 0.f);
    glRasterPos2f(100.f, 100.f);
    glcRenderChar(`A');

In the following example, GLC renders the string "Hello, world!" in red
24 pixel Palatino Bold at a rotation of 30 degrees, starting at (100,
100).

    glcContext(glcGenContext());
    glcFont (glcNewFontFromFamily(1, "palatino"));
    glcFontFace(1, "bold");
    glcScale(24.f, 24.f);
    glcRotate(30.f);
    glColor3f(1.f, 0.f, 0.f);
    glRasterPos2f(100.f, 100.f);
    glcRenderString("Hello, world!");

More examples can be found in the directory 'tests' of QuesoGLC.

More info on QuesoGLC
---------------------

Although the GLC specs are the authoritative doc, some details are left
implementation dependent. Read the file 'specific.txt' for more info about
that topic concerning QuesoGLC.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.