/[freetype]/freetype2/docs/CUSTOMIZE
ViewVC logotype

Diff of /freetype2/docs/CUSTOMIZE

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by wl, Sat Jun 4 23:00:25 2005 UTC revision 1.5 by wl, Tue Aug 30 00:22:46 2005 UTC
# Line 1  Line 1 
1  How to customize the compilation of the library:  How to customize the compilation of the library
2  ================================================  ===============================================
3    
4    FreeType  is  highly  customizable  to  fit various  needs,  and  this    FreeType  is  highly  customizable  to  fit various  needs,  and  this
5    document describes how it is possible to select options and components    document describes how it is possible to select options and components
# Line 8  How to customize the compilation of the Line 8  How to customize the compilation of the
8    
9  I. Configuration macros  I. Configuration macros
10    
11    The file found in "include/freetype/config/ftoption.h" contains a list    The file found in `include/freetype/config/ftoption.h' contains a list
12    of commented configuration macros that can be toggled by developers to    of commented configuration macros that can be toggled by developers to
13    indicate which features should be active while building the library.    indicate which features should be active while building the library.
14        
# Line 22  I. Configuration macros Line 22  I. Configuration macros
22        
23  II. Modules list  II. Modules list
24    
25    The file found in "include/freetype/config/ftmodule.h" contains a list    The file found in `include/freetype/config/ftmodule.h' contains a list
26    of  names  corresponding  to  the  modules  and  font  drivers  to  be    of  names  corresponding  to  the  modules  and  font  drivers  to  be
27    statically compiled in the FreeType library during the build.    statically compiled in the FreeType library during the build.
28    
29    You can change it to suit your own preferences.  Be aware that certain    You can change it to suit your own preferences.  Be aware that certain
30    modules depend  on others, as  described by the file  "modules.txt" in    modules depend  on others, as  described by the file  `modules.txt' in
31    this directory.    this directory.
32    
33    You can modify  the file's content to suit your  needs, or override it    You can modify  the file's content to suit your  needs, or override it
34    at compile time with one of the methods described below.    at compile time with one of the methods described below.
35    
36      Note that  you also  have to  rename the various  `*.mk' files  in the
37      module directories  which you  want to exclude  so that  the extension
38      isn't `.mk'  -- GNU make uses  a simple globbing  mechanism to include
39      all those files.
40    
41    
42  III. System interface  III. System interface
43    
44    FreeType's default interface to the  system (i.e., the parts that deal    FreeType's default interface to the  system (i.e., the parts that deal
45    with   memory   management   and    i/o   streams)   is   located   in    with   memory   management   and    i/o   streams)   is   located   in
46    "src/base/ftsystem.c".    `src/base/ftsystem.c'.
47        
48    The  current implementation uses  standard C  library calls  to manage    The  current implementation uses  standard C  library calls  to manage
49    memory and to read font files.  It is however possible to write custom    memory and to read font files.  It is however possible to write custom
# Line 74  IV. Overriding default configuration and Line 79  IV. Overriding default configuration and
79      Use the C include path to ensure that your own versions of the files      Use the C include path to ensure that your own versions of the files
80      are used at compile time when the lines      are used at compile time when the lines
81            
82         #include FT_CONFIG_OPTIONS_H        #include FT_CONFIG_OPTIONS_H
83         #include FT_CONFIG_MODULES_H        #include FT_CONFIG_MODULES_H
84    
85      are       compiled.       Their      default       values      being      are       compiled.       Their      default       values      being
86      <freetype/config/ftoption.h>  and  <freetype/config/ftmodule.h>, you      <freetype/config/ftoption.h>  and  <freetype/config/ftmodule.h>, you
87      can do something like:      can do something like:
88    
89         custom/        custom/
90           freetype/          freetype/
91             config/            config/
92               ftoption.h    => custom options header              ftoption.h    => custom options header
93               ftmodule.h    => custom modules list              ftmodule.h    => custom modules list
94                            
95         include/            => normal FreeType 2 include        include/            => normal FreeType 2 include
96           freetype/          freetype/
97             ...            ...
98    
99      then change the  C include path to always give  the path to "custom"      then change the  C include path to always give  the path to `custom'
100      before the FreeType 2 "include".      before the FreeType 2 `include'.
101    
102    
103    2. Re-defining FT_CONFIG_OPTIONS_H and FT_CONFIG_MODULES_H    2. Redefining FT_CONFIG_OPTIONS_H and FT_CONFIG_MODULES_H
104        
105      Another way to  do the same thing is to redefine  the macros used to      Another way to  do the same thing is to redefine  the macros used to
106      name  the  configuration headers.   To  do  so,  you need  a  custom      name  the  configuration headers.   To  do  so,  you need  a  custom
107      "ft2build.h" whose content can be as simple as:      `ft2build.h' whose content can be as simple as:
108        
109        #ifndef __FT2_BUILD_MY_PLATFORM_H__        #ifndef __FT2_BUILD_MY_PLATFORM_H__
110        #define __FT2_BUILD_MY_PLATFORM_H__        #define __FT2_BUILD_MY_PLATFORM_H__
# Line 111  IV. Overriding default configuration and Line 116  IV. Overriding default configuration and
116    
117        #endif /* __FT2_BUILD_MY_PLATFORM_H__ */        #endif /* __FT2_BUILD_MY_PLATFORM_H__ */
118        
119      Place those files in a separate directory, e.g.:      Place those files in a separate directory, e.g.,
120        
121        custom/        custom/
122          ft2build.h           => custom version described above          ft2build.h           => custom version described above
123          my-ftoption.h        => custom options header          my-ftoption.h        => custom options header
124          my-ftmodule.h        => custom modules list header          my-ftmodule.h        => custom modules list header
125    
126      and  change the C  include path  to ensure  that "custom"  is always      and  change the C  include path  to ensure  that `custom'  is always
127      placed before the FT2 "include" during compilation.      placed before the FT2 `include' during compilation.
128    
129  ------------------------------------------------------------------------  ------------------------------------------------------------------------
130    
131  Copyright 2003 by  Copyright 2003, 2005 by
132  David Turner, Robert Wilhelm, and Werner Lemberg.  David Turner, Robert Wilhelm, and Werner Lemberg.
133    
134  This  file  is  part  of the  FreeType  project, and may  only be  used,  This  file is  part  of the  FreeType  project, and  may  only be  used,
135  modified,  and  distributed  under  the  terms of  the FreeType  project  modified,  and  distributed under  the  terms  of  the FreeType  project
136  license, LICENSE.TXT.   By continuing to use, modify, or distribute this  license, LICENSE.TXT.  By continuing  to use, modify, or distribute this
137  file you  indicate that  you have  read the  license and understand  and  file  you indicate that  you have  read the  license and  understand and
138  accept it fully.  accept it fully.
139    
140    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26