From 4f2c5544bbbe663483544da8d15675dfce9c0f89 Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 12 May 2000 10:19:41 +0000 Subject: [PATCH] additional changes, this time in order to pass extra parameters to font drivers when creating a new face object. The FT_Open_Args structure has been changed to simplify its use and allow generic parameters too.. --- docs/tutorial/index.html | 122 +++++++++++++-------------- include/freetype/freetype.h | 113 +++++++++++++++++++++---- include/freetype/internal/ftdriver.h | 17 ++-- src/base/ftobjs.c | 103 +++++++++++----------- src/truetype/ttdriver.c | 10 ++- src/truetype/ttobjs.c | 14 ++- src/truetype/ttobjs.h | 8 +- src/type1/t1objs.c | 10 ++- src/type1/t1objs.h | 8 +- src/type1/t1tokens.c | 2 +- src/type1z/t1objs.c | 11 ++- src/type1z/t1objs.h | 8 +- src/type1z/t1parse.c | 2 +- 13 files changed, 272 insertions(+), 156 deletions(-) diff --git a/docs/tutorial/index.html b/docs/tutorial/index.html index 8158e5069..f6413cbca 100644 --- a/docs/tutorial/index.html +++ b/docs/tutorial/index.html @@ -164,18 +164,18 @@ FreeType 2.0 Tutorial

     
-          FT_Library   library;   /* handle to library     */
-          FT_Face      face;      /* handle to face object */
-    
-          error = FT_Init_FreeType( &library );
-          if (error) { ..... }
-          
-          error = FT_New_Memory_Face( library,
-                                      buffer,    /* first byte in memory */
-                                      size,      /* size in bytes        */
-                                      0,         /* face_index           */
-                                      &face );
-          if (error) { ... }
+      FT_Library   library;   /* handle to library     */
+      FT_Face      face;      /* handle to face object */
+
+      error = FT_Init_FreeType( &library );
+      if (error) { ..... }
+      
+      error = FT_New_Memory_Face( library,
+                                  buffer,    /* first byte in memory */
+                                  size,      /* size in bytes        */
+                                  0,         /* face_index           */
+                                  &face );
+      if (error) { ... }
     

As you can see, FT_New_Memory_Face simply takes a pointer to @@ -185,38 +185,17 @@ FreeType 2.0 Tutorial

-

c. From other sources:

+

c. From other sources: (compressed files, network, etc..)

@@ -396,7 +375,7 @@ FreeType 2.0 Tutorial The glyph image is always stored in a special object called a glyph slot. As it names suggests, a glyph slot is simply a container that is able to hold one glyph image at a time, be it a bitmap, - an outline, or something else. Each face object has a single glyph + an outline, or something else. Each face object has a single glyph slot object that can be accessed as face−>glyph.

Loading a glyph image into the slot is performed by calling @@ -440,14 +419,16 @@ FreeType 2.0 Tutorial As said before, when a new face object is created, it will look for a Unicode, Latin-1 or ASCII charmap and select it. The currently selected charmap is accessed via face−>charmap. This - field is NULL when no charmap is selected. + field is NULL when no charmap is selected, which typically happen when you + create a new FT_Face object from a font file that doesn't contain + an ASCII, Latin-1 or Unicode charmap (rare stuff).

- The field face−>num_charmaps and + The fields face−>num_charmaps and face−>charmaps (notice the 's') can be used by client applications to look at what charmaps are available in a given face.

- face−charmaps is an array of pointers + face−>charmaps is an array of pointers to the face−>num_charmaps charmaps contained in the font face.

@@ -493,23 +474,31 @@ FreeType 2.0 Tutorial

7. Accessing glyph image data:

8. Rendering glyph outlines into bitmaps: