another fix for the build system (the module list wasn't

taken from the correct location)

plus a small update in the tutorial to reflect the fact that
we know use the "freetype" directory prefix for header
inclusion
This commit is contained in:
David Turner 2000-05-11 19:06:03 +00:00
parent 2561b24537
commit 8c62a12062
3 changed files with 35 additions and 34 deletions

View File

@ -53,8 +53,8 @@ BASE_ := $(BASE_DIR)$(SEP)
OBJ_ := $(OBJ_DIR)$(SEP) OBJ_ := $(OBJ_DIR)$(SEP)
LIB_ := $(LIB_DIR)$(SEP) LIB_ := $(LIB_DIR)$(SEP)
PUBLIC_ := $(TOP)$(SEP)include$(SEP)freetype$(SEP) PUBLIC_ := $(TOP)$(SEP)include$(SEP)freetype$(SEP)
INTERNAL_ := $(PUBLIC_)$(SEP)internal$(SEP) INTERNAL_ := $(PUBLIC_)internal$(SEP)
CONFIG_ := $(PUBLIC_)$(SEP)config$(SEP) CONFIG_ := $(PUBLIC_)config$(SEP)
# The name of the final library file. # The name of the final library file.

View File

@ -25,7 +25,7 @@
# resides. For now, it is in `config/ftmodule.h'. # resides. For now, it is in `config/ftmodule.h'.
# #
ifndef FT_MODULE_LIST ifndef FT_MODULE_LIST
FT_MODULE_LIST := $(CONFIG_)ftmodule.h FT_MODULE_LIST := $(TOP)$(SEP)include$(SEP)freetype$(SEP)config$(SEP)ftmodule.h
endif endif
# To build the modules list, we invoke the `make_module_list' target. # To build the modules list, we invoke the `make_module_list' target.

View File

@ -25,6 +25,9 @@ FreeType 2.0 Tutorial</h1></center>
(<a href="http://www.freetype.org">www.freetype.org</a>) (<a href="http://www.freetype.org">www.freetype.org</a>)
</h3></center> </h3></center>
<center>
<table width=650><tr><td>
<p><br> <p><br>
<hr WIDTH="100%"> <hr WIDTH="100%">
<br>&nbsp; <br>&nbsp;
@ -38,17 +41,13 @@ FreeType 2.0 Tutorial</h1></center>
<h3>1. Header files :</h3> <h3>1. Header files :</h3>
<ul> <ul>
You only need to include the public header file named <tt>freetype.h</tt> To include the main FreeType header file, simply use:<p>
in your source code. Depending on how the library was installed on your
system, you might need to use :<p>
<ul><font color="blue"><tt> <ul><font color="blue"><tt>
#include &lt;freetype.h&gt;<p> #include &lt;freetype/freetype.h&gt;<p>
</tt></font></ul> </tt></font></ul>
or in your application code. Note that other files are available in the
<ul><font color="blue"><tt> FreeType include directory, most of them being included by
#include &lt;freetype2/freetype.h&gt;<p> <tt>"freetype.h"</tt>. They will be described later in this tutorial.
</tt></font></ul>
in your application to include the public interface to FreeType.<p>
</ul> </ul>
<p><hr><p> <p><hr><p>
@ -59,7 +58,7 @@ FreeType 2.0 Tutorial</h1></center>
<tt>library</tt>, and call the function <tt>FT_Init_FreeType</tt> as in: <tt>library</tt>, and call the function <tt>FT_Init_FreeType</tt> as in:
<font color="blue"><pre> <font color="blue"><pre>
#include &lt;freetype.h&gt; #include &lt;freetype/freetype.h&gt;
FT_Library library; FT_Library library;
@ -103,26 +102,26 @@ FreeType 2.0 Tutorial</h1></center>
<p> <p>
<font color="blue"><pre> <font color="blue"><pre>
FT_Library library; /* handle to library */ FT_Library library; /* handle to library */
FT_Face face; /* handle to face object */ FT_Face face; /* handle to face object */
error = FT_Init_FreeType( &library ); error = FT_Init_FreeType( &library );
if (error) { ..... } if (error) { ..... }
error = FT_New_Face( library, error = FT_New_Face( library,
"/usr/share/fonts/truetype/arial.ttf", "/usr/share/fonts/truetype/arial.ttf",
0, 0,
&face ); &face );
if (error == FT_Err_Unknown_File_Format) if (error == FT_Err_Unknown_File_Format)
{ {
.... the font file could be opened and read, but it appears .... the font file could be opened and read, but it appears
.... that its font format is unsupported .... that its font format is unsupported
} }
else if (error) else if (error)
{ {
.... another error code means that the font file could not .... another error code means that the font file could not
.... be opened, read or simply that it is broken.. .... be opened, read or simply that it is broken..
} }
</pre></font> </pre></font>
<p> <p>
As you certainly imagine, <tt>FT_New_Face</tt> opens a font file then As you certainly imagine, <tt>FT_New_Face</tt> opens a font file then
@ -639,6 +638,8 @@ FreeType 2.0 Tutorial</h1></center>
<p> <p>
</ul> </ul>
</ul> </ul>
</td></tr></table>
</center>
<p><hr> <p><hr>