diff options
author | Werner Lemberg <wl@gnu.org> | 2000-06-11 03:46:57 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2000-06-11 03:46:57 +0000 |
commit | e35cac66c652480b0d682647e92c2e7ef5cf7081 (patch) | |
tree | c49c07b430917ab6c81ca7c25671fd81711e1922 /docs | |
parent | cb9109fc4013c04b1fdb6c6c1bd1294dd3602448 (diff) |
A complete revision of FreeType 2's GNU makefiles (of the library):
Tons of unnecessary stuff have been removed; only the essential rules
have been retained.
The source files now depend on all header files in include/freetype,
include/freetype/config, and include/freetype/internal. This is not
optimal, I know, and I'll try to improve this, but it is better than
before (namely no dependencies on `internal').
FTDEBUG_SRC has been added (similar to FTSYS_SRC) -- I don't know
exactly whether this is really useful, but it doesn't harm.
There is now more documentation in the makefiles itself.
io-frames.html: Use of <th>, <code>, and <var> for better tagging.
Reactivating of FT_DEBUG_LEVEL_xxx macros.
Added a lot of #include directives to make `multi' builds possible -- note
that currently the modules cid, t1, and t1z have clashing structures and
functions which means that you can only use one of these three modules for a
multi build.
Added some missing function declarations to (local) header files.
Renamed some T1_Open_Face() to CID_Open_Face() in the cid module -- a lot
of other functions should be renamed also...
Replaced many FT_xxx stuff with T1_xxx in t1z driver -- this isn't finished
yet...
Fixed FT_Free() to allow a NULL pointer without an assertion (this has
always been a valid assumption in FreeType, at least in FT 1.x).
A lot of other, minor fixes (mostly documentation).
Diffstat (limited to 'docs')
-rw-r--r-- | docs/design/io-frames.html | 110 |
1 files changed, 56 insertions, 54 deletions
diff --git a/docs/design/io-frames.html b/docs/design/io-frames.html index 2b249b69..a5c6de7c 100644 --- a/docs/design/io-frames.html +++ b/docs/design/io-frames.html @@ -49,8 +49,8 @@ </h2> <p>Simply speaking, a frame is an array of bytes in a font file that is - "preloaded" into memory in order to be rapidly parsed. Frames are useful - to ensure that every "load" is checked against end-of-file overruns, and + `preloaded' into memory in order to be rapidly parsed. Frames are useful + to ensure that every `load' is checked against end-of-file overruns, and provides nice functions to extract data in a variety of distinct formats.</p> @@ -83,7 +83,7 @@ FT_Forget_Frame( stream );</pre> </font> - <p>Here, the call to <tt>FT_Access_Frame()</tt> will</p> + <p>Here, the call to <code>FT_Access_Frame()</code> will</p> <ul> <li> @@ -91,20 +91,20 @@ stream.</p> </li> <li> - <p>"Preload" (for disk-based streams) 10 bytes from the current + <p>`Preload' (for disk-based streams) 10 bytes from the current stream position.</p> </li> <li> - <p>Set the frame "cursor" to the first byte in the frame.</p> + <p>Set the frame `cursor' to the first byte in the frame.</p> </li> </ul> - <p>Each <tt>FT_Get_Short()</tt> or <tt>FT_Get_ULong()</tt> call will read - a big-endian integer from the stream (2 bytes for - <tt>FT_Get_Short()</tt>, 4 bytes for <tt>FT_Get_ULong</tt>) and - advance the frame cursor accordingly.</p> + <p>Each <code>FT_Get_Short()</code> or <code>FT_Get_ULong()</code> call + will read a big-endian integer from the stream (2 bytes for + <code>FT_Get_Short()</code>, 4 bytes for <code>FT_Get_ULong</code>) + and advance the frame cursor accordingly.</p> - <p><tt>FT_Forget_Frame()</tt> "releases" the frame from memory.</p> + <p><code>FT_Forget_Frame()</code> `releases' the frame from memory.</p> <p>There are several advantages to using frames:</p> @@ -126,54 +126,55 @@ </h2> <p>By convention in the FreeType source code, macros are able to use two - implicit variables named <tt>error</tt> and <tt>stream</tt>. This is + implicit variables named <var>error</var> and <var>stream</var>. This is useful because these two variables are extremely often used in the library, and doing this only reduces our typing requirements and make the source code much clearer.</p> - <p>Note that <tt>error</tt> must be a local variable of type - <tt>FT_Error</tt>, while <tt>stream</tt> must be a local variable or - argument of type <tt>FT_Stream</tt>.</p> + <p>Note that <var>error</var> must be a local variable of type + <code>FT_Error</code>, while <var>stream</var> must be a local variable or + argument of type <code>FT_Stream</code>.</p> <p>The macro used to access a frame is <font - color="purple"><tt><b>ACCESS_Frame(_size_)</b></tt></font>, it will + color="purple"><code><b>ACCESS_Frame(_size_)</b></code></font>, it will translate to</p> <font color="blue"> <pre> ( error = FT_Access_Frame( stream, _size_ ) ) - != FT_Err_Ok</tt></pre> + != FT_Err_Ok</pre> </font> <p>Similarly, the macro <font - color="purple"><b><tt>FORGET_Frame()</tt></b></font> translates to</p> + color="purple"><b><code>FORGET_Frame()</code></b></font> translates to</p> <font color="blue"> <pre> - <tt>FT_Forget_Frame( stream )</tt></pre> + FT_Forget_Frame( stream )</pre> </font> - <p>Extracting integers can be performed with the <tt>GET_xxx()</tt> + <p>Extracting integers can be performed with the <code>GET_xxx()</code> macros, like</p> - <table align=center> + <table align=center + cellpadding=5> <tr valign="top"> - <td> - <b>Macro name</b> - </td> - <td> + <th> + Macro name + </th> + <th> Translation - </td> - <td> + </th> + <th> Description - </td> + </th> </tr> <tr valign="top"> <td> - <font color="purple"><tt><b>GET_Byte()</b></tt></font> + <font color="purple"><code><b>GET_Byte()</b></code></font> </td> <td> - <font color="blue"><tt>FT_Get_Byte(stream)</tt></font> + <font color="blue"><code>FT_Get_Byte(stream)</code></font> </td> <td> <p>Reads an 8-bit unsigned byte.</p> @@ -181,11 +182,11 @@ </tr> <tr valign="top"> <td> - <font color="purple"><tt><b>GET_Char()</b></tt></font> + <font color="purple"><code><b>GET_Char()</b></code></font> </td> <td> - <font color="blue"><tt>(FT_Char)<br> - FT_Get_Byte(stream)</tt></font> + <font color="blue"><code>(FT_Char)<br> + FT_Get_Byte(stream)</code></font> </td> <td> <p>Reads an 8-bit <em>signed</em> byte.</p> @@ -193,10 +194,10 @@ </tr> <tr valign="top"> <td> - <font color="purple"><tt><b>GET_Short()</b></tt></font> + <font color="purple"><code><b>GET_Short()</b></code></font> </td> <td> - <font color="blue"><tt>FT_Get_Short(stream)</tt></font> + <font color="blue"><code>FT_Get_Short(stream)</code></font> </td> <td> Reads a 16-bit signed big-endian integer. @@ -204,11 +205,11 @@ </tr> <tr valign="top"> <td> - <font color="purple"><tt><b>GET_UShort()</b></tt></font> + <font color="purple"><code><b>GET_UShort()</b></code></font> </td> <td> - <font color="blue"><tt>(FT_UShort)<br> - FT_Get_Short(stream)</tt></font> + <font color="blue"><code>(FT_UShort)<br> + FT_Get_Short(stream)</code></font> </td> <td> Reads a 16-bit unsigned big-endian integer. @@ -216,10 +217,10 @@ </tr> <tr valign="top"> <td> - <font color="purple"><tt><b>GET_Offset()</b></tt></font> + <font color="purple"><code><b>GET_Offset()</b></code></font> </td> <td> - <font color="blue"><tt>FT_Get_Offset(stream)</tt></font> + <font color="blue"><code>FT_Get_Offset(stream)</code></font> </td> <td> Reads a 24-bit signed big-endian integer. @@ -227,11 +228,11 @@ </tr> <tr valign="top"> <td> - <font color="purple"><tt><b>GET_UOffset()</b></tt></font> + <font color="purple"><code><b>GET_UOffset()</b></code></font> </td> <td> - <font color="blue"><tt>(FT_UOffset)<br> - FT_Get_Offset(stream)</tt></font> + <font color="blue"><code>(FT_UOffset)<br> + FT_Get_Offset(stream)</code></font> </td> <td> Reads a 24-bit unsigned big-endian integer. @@ -239,10 +240,10 @@ </tr> <tr valign="top"> <td> - <font color="purple"><tt><b>GET_Long()</b></tt></font> + <font color="purple"><code><b>GET_Long()</b></code></font> </td> <td> - <font color="blue"><tt>FT_Get_Long(stream)</tt></font> + <font color="blue"><code>FT_Get_Long(stream)</code></font> </td> <td> Reads a 32-bit signed big-endian integer. @@ -250,11 +251,11 @@ </tr> <tr valign="top"> <td> - <font color="purple"><tt><b>GET_ULong()</b></tt></font> + <font color="purple"><code><b>GET_ULong()</b></code></font> </td> <td> - <font color="blue"><tt>(FT_ULong)<br> - FT_Get_Long(stream)</tt></font> + <font color="blue"><code>(FT_ULong)<br> + FT_Get_Long(stream)</code></font> </td> <td> Reads a 32-bit unsigned big-endian integer. @@ -292,7 +293,7 @@ FORGET_Frame();</pre> </font> - <p>Which is clearer. Notice that <tt>error</tt> and <tt>stream</tt> + <p>Which is clearer. Notice that <var>error</var> and <var>stream</var> must be defined locally though for this code to work!</p> <hr> @@ -304,18 +305,18 @@ <p>It is sometimes useful to read small integers from a font file without using a frame. Some functions have been introduced in FreeType 2 to do just that, and they are of the form <font - color="blue"><tt>FT_Read_xxxx</tt></font>.</p> + color="blue"><code>FT_Read_xxxx</code></font>.</p> - <p>For example, <font color="blue"><tt>FT_Read_Short(stream, - &error)</tt></font> reads and returns a 2-byte big-endian integer from a - <tt>stream</tt>, and places an error code in the <tt>error</tt> + <p>For example, <font color="blue"><code>FT_Read_Short(stream, + &error)</code></font> reads and returns a 2-byte big-endian integer from a + <var>stream</var>, and places an error code in the <var>error</var> variable.</p> <p>Thus, reading a single big-endian integer is shorter than using a frame for it.</p> <p>Note that there are also macros <font - color="purple"><tt>READ_xxx()</tt></font> which translate to</p> + color="purple"><code>READ_xxx()</code></font> which translate to</p> <font color="blue"> <pre> @@ -331,7 +332,8 @@ goto Fail;</pre> </font> - <p>if <tt>error</tt> and <tt>stream</tt> are already defined locally.</p> + <p>if <var>error</var> and <var>stream</var> are already defined + locally.</p> </td></tr> </table> |