summaryrefslogtreecommitdiff
path: root/developer.html
blob: fcd82bf2fb977a9d45d59249ceefefa82fa61c5a (plain)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "https://www.w3.org/TR/html4/loose.dtd">

<html lang="en">

<head>
  <meta http-equiv="Content-Type"
        content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type"
        content="text/css">
  <meta http-equiv="Content-Script-Type"
        content="text/javascript">

  <meta name="description"
        content="FreeType Development">
  <meta name="keywords"
        content="FreeType fonts renderer TrueType OpenType Type1
                 TTF OTF TTC library free fast quality">

  <link rel="icon"
        href="image/favicon_-60.ico">
  <link rel="shortcut icon"
        href="image/favicon_-60.ico">
  <link rel="stylesheet"
        type="text/css"
        href="css/freetype2_-60.css">

  <script type="text/javascript"
          src="js/jquery-1.11.0.min.js">
  </script>
  <script type="text/javascript"
          src="js/jquery.ba-resize.min.js">
  </script>
  <script type="text/javascript"
          src="js/freetype2.js">
  </script>

  <title>FreeType Development</title>
</head>

<body>

<div id="top"
     class="bar">
  <h1><a href="index.html">FreeType</a> Development</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="source-code">
          <h2>Accessing the Source Code</h2>

          <p>There are several ways to access the source code for the
            FreeType packages.</p>

          <ul>
            <li class="emph">
              <p><a href="download.html">Download a source
                  archive</a></p>

              <p>This is for browsing, compiling, and using the source
                code locally.</p>
            </li>
            <li class="emph">
              <p>Use git access</p>

              <p>FreeType's git repositories are available
                from <a href="https://gitlab.freedesktop.org/freetype">freedesktop.org's
                gitlab instance</a>.</p>

              <div class="quote">
                <tt>git clone https://gitlab.freedesktop.org/freetype/freetype.git<br>
                  git clone https://gitlab.freedesktop.org/freetype/freetype-demos.git</tt>
              </div>
            </li>
            <li class="emph">
              <p>Use anonymous CVS access</p>

              <p>Other, no longer maintained FreeType repositories
                (which exist for historical interest only) can be
                downloaded
                from <a href="https://savannah.nongnu.org/">Savannah</a>
                through CVS and
                viewed <a href="https://cvs.savannah.gnu.org/viewvc/?root=freetype">here</a>.
                Use the following value for the <tt>CVSROOT</tt>
                environment variable (or the equivalent <tt>-d</tt>
                command line option of the cvs client):</p>

              <div class="quote">
                <tt>:pserver:anonymous@cvs.sv.nongnu.org:/sources/freetype</tt>
              </div>

              <p>When asked for a password, simply press Enter
                for <tt>cvs login</tt>.  The module names
                are <tt>freetype</tt> (Freetype version&nbsp;1.x,
                C&nbsp;code), <tt>freetype1-contrib</tt> (contributed
                programs), and <tt>ftpascal</tt> (Freetype
                version&nbsp;1.x, Pascal code).</p>

              <p>The <tt>freetype2</tt> and <tt>ft2demos</tt> modules
                have been transformed to git (see above) and shouldn't
                be used anymore.</p>
            </li>
          </ul>
        </div>


        <!-- ************************************************** -->

        <div id="bug-report">
          <h2>Reporting a Bug</h2>

          <p>In case you find a bug, which you think is related to
            FreeType, please check the problematic font with one of
            our demo programs, for example <b>ftview</b>
            or <b>ftstring</b>.  In case the problem persists, consult
            <a href="https://gitlab.freedesktop.org/groups/freetype/-/issues">FreeType's
            issue list</a> to find out whether the problem has been
            reported already.  Otherwise, please submit a new issue.
            It is helpful to use the git version (see above) of
            FreeType and its demo programs for testing if possible
            since we don't release FreeType very often.</p>
        </div>


        <!-- ************************************************** -->

        <div id="patches">
          <h2>Submitting Patches</h2>

          <p>For larger changes please
            provide <a href="https://gitlab.freedesktop.org/groups/freetype/-/merge_requests">merge
            requests</a>.  Alternatively, you can submit patches to
            the <a href="mailto:freetype-devel@nongnu.org">freetype-devel@nongnu.org</a>
            mailing list &ndash; and thank you in advance for your
            work on improving FreeType!<p>

          <p>Here are some tips on making your contribution easy to
            integrate into the FreeType git repositories.</p>

          <ul>
            <li>
              In the preamble of your patch, add a description of your
              changes similar to the entries in the <tt>ChangeLog</tt>
              file.  With &lsquo;similar&rsquo; it is meant that the
              format and style of <tt>ChangeLog</tt> entries should be
              imitated as much as possible.  However, don't modify
              the <tt>ChangeLog</tt> file by yourself.
            </li>
            <li>
              Try to follow the formatting of the source code as much
              as possible.
            </li>
            <li>
              If you plan to contribute larger changes, split them
              into smaller, logical units.  Reviewing code changes in
              small, incremental steps is much easier to perform.
            </li>
          </ul>
        </div>


        <!-- ************************************************** -->

        <div id="language-bindings">
          <h2>Language Bindings</h2>

          <p>For a couple of programming languages there exist
            wrappers around FreeType.  Note that some of them are
            quite old and probably no longer maintained.</p>


          <h3><a href="https://caml.inria.fr/">Caml</a></h3>

          <p>Bindings are part of
            the <a href="http://cristal.inria.fr/camlimages/eng.html">CamlImages</a>
            package.</p>


          <h3><a href="https://dlang.org">D</a></h3>

          <p>Bindings are available
            in <a href="https://code.dlang.org/packages/derelict-ft">derelict-ft</a>.</p>


          <h3><a href="https://factorcode.org/">Factor</a></h3>

          <p>This dynamic programming language comes
            with <a href="https://docs.factorcode.org/content/vocab-freetype.html">FreeType
              bindings</a>.</p>


          <h3><a href="https://www.perl.org">Perl</a></h3>

          <p>More than a single binding package is available.
            Try <a href="https://metacpan.org/search?q=freetype">here</a>
            for a search on CPAN.</p>


          <h3><a href="https://www.python.org">Python</a></h3>

          <p>Bindings are
            available <a href="https://github.com/rougier/freetype-py/">here</a>.
            <a href="https://pypi.org/project/Pillow/">Pillow</a>, the
            successor of the Python Imaging Library (PIL), can be
            built to use FreeType for font rendering, giving
            high-level access to fonts.</p>

          <p>A more extensive set of Python bindings, designed to work
            together to cover the main parts of the Linux typography
            stack, are</p>

          <ul>
            <li>
              <a href="https://github.com/ldo/python_freetype">python_freetype</a>
              for FreeType,
            </li>
            <li>
              <a href="https://github.com/ldo/qahirah">Qahirah</a> for
              the Cairo graphics library,
            </li>
            <li>
              <a href="https://github.com/ldo/pybidi">PyBidi</a> for
              the FriBidi bidirectional-layout library,
            </li>
            <li>
              <a href="https://github.com/ldo/harfpy">HarfPy</a> for
              the HarfBuzz type-shaping library, and
            </li>
            <li>
              <a href="https://github.com/ldo/python_fontconfig">python_fontconfig</a> for
              the Fontconfig font-matching library.
            </li>
          </ul>


          <h3><a href="https://www.ruby-lang.org">Ruby</a></h3>

          <p>See <a href="https://rubygems.org/search?query=freetype+OR+ft2">rubygems</a>
            for bindings.</p>


          <h3><a href="https://www.rust-lang.org">Rust</a></h3>

          <p>Crates, the Rust Package Registry, shows a list of
            bindings <a href="https://crates.io/search?q=freetype">here</a>.
        </div>


        <!-- ************************************************** -->

        <div id="support-tools">
          <h2>Support Tools</h2>

          <p>One of the simplest way to compile FreeType is from the
            command line using one of the following tools.</p>


          <h3>GNU Make</h3>

          <p>FreeType comes with a sophisticated build system that is
            based on GNU Make.  This really means a set of Makefiles
            and sub-Makefiles that are used to perform the following
            operations.</p>

          <ul>
            <li>
              <p>Detect the current operating system in order to
              select the appropriate default compiler settings for the
              build.</p>
            </li>
            <li>
              <p>Select the settings corresponding to a given compiler
                for a given platform.  For example, on Windows, the
                following compilers are supported: Visual C++, GCC,
                Borland C++, Watcom C++, Win32-LCC.  On Unix, gcc, lcc
                and standard cc are also supported through a
                traditional <tt>configure</tt> script.</p>
            </li>
            <li>
              <p>Build the list of FreeType modules automatically from
              the sub-directories present in the <tt>src</tt>
              directory.</p>
            </li>
            <li>
              <p>Finally, build the library and its module as a static
              library or DLL, depending on the platform and
              compiler.</p>
            </li>
          </ul>

          <p>The build system is capable of supporting several
            compilers, on several platforms.  However, you <b>must</b>
            have a recent version of GNU Make installed to use it.
            The build does <em>not work</em> with other <tt>make</tt>
            tools (like BSD Make, NMake, etc.).</p>

          <p>See the <a href="download.html">download section</a> for
            binaries of GNU Make for Windows.</p>


          <h3>Meson</h3>

          <p>Right now, support for
            <a href="https://mesonbuild.com/">Meson</a> is
            experimental and available for the library only, without
            the demo programs.  It is planned to fix this eventually,
            making Meson a first-class build system.</p>


          <h3>CMake</h3>

          <p>FreeType can also be built with
            <a href="https://cmake.org/">CMake</a>.  Note, however,
            that this is contributed code not officially
            supported.</p>

        </div>


        <!-- ************************************************** -->

        <div class="updated">
          <p>Last update: 16-Jan-2021</p>
        </div>
      </div>
    </div>


    <!-- ************************************************** -->

    <div class="col2">
    </div>
  </div>
</div>


<!-- ************************************************** -->

<div id="TOC">
  <ul>
    <li class="funding">
      <form action="https://www.paypal.com/cgi-bin/webscr"
            method="post"
            target="_top">
        <input type="hidden"
               name="cmd"
               value="_s-xclick">
        <input type="hidden"
               name="hosted_button_id"
               value="SK827YKEALMT4">
        <input type="image"
               src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
               name="submit"
               alt="PayPal - The safer, easier way to pay online!">
      </form>
    </li>
    <li class="primary">
      <a href="index.html">Home</a>
    </li>
    <li class="primary">
      <a href="index.html#news">News</a>
    </li>
    <li class="primary">
      <a href="freetype2/docs/index.html">Overview</a>
    </li>
    <li class="primary">
      <a href="freetype2/docs/documentation.html">Documentation</a>
    </li>
    <li class="primary">
      <a href="developer.html" class="current">Development</a>
    </li>
    <li class="primary">
      <a href="contact.html"
         class="emphasis">Contact</a>
    </li>

    <li>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="#source-code">Source Code</a>
    </li>
    <li class="secondary">
      <a href="#bug-report">Bug Reports</a>
    </li>
    <li class="secondary">
      <a href="#patches">Submitting Patches</a>
    </li>
    <li class="secondary">
      <a href="#language-bindings">Language Bindings</a>
    </li>
    <li class="secondary">
      <a href="#support-tools">Support Tools</a>
    </li>
    <li class="secondary">
      <a href="contact.html#mailing-lists">Mailing Lists</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>