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
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
diff --git a/config/freetype.mk b/config/freetype.mk
index af79338..72d96be 100644
--- a/config/freetype.mk
+++ b/config/freetype.mk
@@ -53,8 +53,8 @@ BASE_ := $(BASE_DIR)$(SEP)
OBJ_ := $(OBJ_DIR)$(SEP)
LIB_ := $(LIB_DIR)$(SEP)
PUBLIC_ := $(TOP)$(SEP)include$(SEP)freetype$(SEP)
-INTERNAL_ := $(PUBLIC_)$(SEP)internal$(SEP)
-CONFIG_ := $(PUBLIC_)$(SEP)config$(SEP)
+INTERNAL_ := $(PUBLIC_)internal$(SEP)
+CONFIG_ := $(PUBLIC_)config$(SEP)
# The name of the final library file.
diff --git a/config/modules.mk b/config/modules.mk
index 876b33e..f674357 100644
--- a/config/modules.mk
+++ b/config/modules.mk
@@ -25,7 +25,7 @@
# resides. For now, it is in `config/ftmodule.h'.
#
ifndef FT_MODULE_LIST
- FT_MODULE_LIST := $(CONFIG_)ftmodule.h
+ FT_MODULE_LIST := $(TOP)$(SEP)include$(SEP)freetype$(SEP)config$(SEP)ftmodule.h
endif
# To build the modules list, we invoke the `make_module_list' target.
diff --git a/docs/tutorial/index.html b/docs/tutorial/index.html
index 0ada333..8158e50 100644
--- a/docs/tutorial/index.html
+++ b/docs/tutorial/index.html
@@ -25,6 +25,9 @@ FreeType 2.0 Tutorial</h1></center>
(<a href="http://www.freetype.org">www.freetype.org</a>)
</h3></center>
+<center>
+<table width=650><tr><td>
+
<p><br>
<hr WIDTH="100%">
<br>
@@ -38,17 +41,13 @@ FreeType 2.0 Tutorial</h1></center>
<h3>1. Header files :</h3>
<ul>
- You only need to include the public header file named <tt>freetype.h</tt>
- in your source code. Depending on how the library was installed on your
- system, you might need to use :<p>
+ To include the main FreeType header file, simply use:<p>
<ul><font color="blue"><tt>
- #include <freetype.h><p>
+ #include <freetype/freetype.h><p>
</tt></font></ul>
- or
- <ul><font color="blue"><tt>
- #include <freetype2/freetype.h><p>
- </tt></font></ul>
- in your application to include the public interface to FreeType.<p>
+ in your application code. Note that other files are available in the
+ FreeType include directory, most of them being included by
+ <tt>"freetype.h"</tt>. They will be described later in this tutorial.
</ul>
<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:
<font color="blue"><pre>
- #include <freetype.h>
+ #include <freetype/freetype.h>
FT_Library library;
@@ -103,26 +102,26 @@ FreeType 2.0 Tutorial</h1></center>
<p>
<font color="blue"><pre>
- FT_Library library; /* handle to library */
- FT_Face face; /* handle to face object */
-
- error = FT_Init_FreeType( &library );
- if (error) { ..... }
-
- error = FT_New_Face( library,
- "/usr/share/fonts/truetype/arial.ttf",
- 0,
- &face );
- if (error == FT_Err_Unknown_File_Format)
- {
- .... the font file could be opened and read, but it appears
- .... that its font format is unsupported
- }
- else if (error)
- {
- .... another error code means that the font file could not
- .... be opened, read or simply that it is broken..
- }
+ FT_Library library; /* handle to library */
+ FT_Face face; /* handle to face object */
+
+ error = FT_Init_FreeType( &library );
+ if (error) { ..... }
+
+ error = FT_New_Face( library,
+ "/usr/share/fonts/truetype/arial.ttf",
+ 0,
+ &face );
+ if (error == FT_Err_Unknown_File_Format)
+ {
+ .... the font file could be opened and read, but it appears
+ .... that its font format is unsupported
+ }
+ else if (error)
+ {
+ .... another error code means that the font file could not
+ .... be opened, read or simply that it is broken..
+ }
</pre></font>
<p>
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>
</ul>
</ul>
-
+
+</td></tr></table>
+</center>
<p><hr>