summaryrefslogtreecommitdiff
path: root/gsoc.html
blob: 36b8d541bfe1e38990614b00bad055dda214c444 (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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<!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="Ideas for GSoC">
  <meta name="keywords"
        content="GSoC Ideas">

  <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>Ideas for Google Summer of Code</title>
</head>

<body>

<div id="top"
     class="bar">
  <h1><a href="index.html">FreeType</a> &amp; GSoC</h1>
</div>


<div id="wrapper">

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


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

        <div>
          <p>The FreeType project has successfully participated at
            <a href="https://developers.google.com/open-source/gsoc/">Google
              Summer of Code</a>.  Here is our list of possible
              projects – if you more ideas, please write to
              our <a href="mailto:freetype-devel@nongnu.org">mailing
              list</a> so that we can discuss your suggestions,
              eventually adding them to this page.</p>

          <p>If you are interested to participate as a student, please
            also contact us via
            the <a href="mailto:freetype-devel@nongnu.org">mailing
              list</a>.  It's probably best if
            you <a href="https://lists.nongnu.org/mailman/listinfo/freetype-devel">subscribe</a>
            to it.</p>

          <p>Note that starting with 2021 the time available for
            students has been halved.  Most of our projects are
            modular, more or less, allowing students to propose a
            subset of the mentioned targets if this appears
            appropriate.</p>

          <p class="warning">Before contacting us, however, you should
            get <em>really</em> acquainted with the topic you would
            like to start with – in particular, search
            the <a href="https://lists.nongnu.org/archive/html/freetype-devel/">mailing
              list archive</a> and/or do some googling!  We don't want
            to answer questions like &ldquo;I'm interested in your
            project, I want to contribute, please tell me what to
            do!&rdquo; again and again&hellip;</p>

          <dl>
            <dt>Develop a test framework for checking FreeType's
              rendering output</dt>
            <dd>
              <p>Right now, FreeType's rendering results of the
                current development version are not systematically
                compared to a baseline version, using continuous
                integration (CI) or something similar.  This is
                problematic, since rendering regressions can be very
                easily missed due to subtle differences.</p>

              <p>However,
                a <a href="https://github.com/fundies/freetype2/tree/greg-gsoc">GSoC
                2020 project</a> now provides a good framework that
                can act as a starting point for better integration.
                In addition, we are moving to the gitlab instance
                of <a href="https://gitlab.freedesktop.org/freetype">freedesktop.org</a>;
                this implies that access to
                its <a href="https://docs.gitlab.com/ee/ci/">CI
                abilities</a> should be straightforward.</p>

              <p>The idea is to select a representative set of
                reference fonts from font corpora (which already exist
                mainly
                for <a href="https://github.com/freetype/freetype2-testing/tree/master/fuzzing">fuzzing</a>).
                The fonts are used to produce glyph images for various
                sizes and rendering modes (anti-aliased, B/W, native
                hinting, auto-hinting, etc.).  FreeType can already
                produce MD5 checksums of glyph images as part of its
                debugging output; these values should be compared
                against a baseline version of rendering results.  If
                there are differences, HTML pages should be generated
                that contain comparison images of the baseline's and
                the current development version's rendering result,
                ideally indicating how large the differences between
                the images are by using some yet to be defined
                measure.</p>

              <p><em>Difficulty:</em> medium.  <em>Requirements:</em>
                C, HTML, Unix build tools.  <em>Potential
                mentors:</em> Werner Lemberg, Alexei Podtelezhnikov,
                Toshiya Suzuki (FreeType).</p>
            </dd>
          </dl>

          <dl>
            <dt>Update FreeType's build systems</dt>

            <dd>
              <p>Due to historical reasons, FreeType's build systems
                are strange to newcomers.  The default one is based
                on <a href="https://www.gnu.org/software/make/"><code>GNU
                make</code></a>, also
                integrating <a href="https://www.gnu.org/software/autoconf/"><code>autoconf</code></a>
                support.  Alternatives are generic build files
                for <a href="https://cmake.org/"><code>cmake</code></a>
                and <a href="https://mesonbuild.com/"><code>meson</code></a>,
                together with special support files
                for <a href="https://visualstudio.microsoft.com">MS
                Visual
                Studio</a>, <a href="https://en.wikipedia.org/wiki/OpenVMS">OpenVMS</a>,
                and some even more exotic, old platforms.</p>

              <p>This project is intended to update the build systems.
                Here is a preliminary list of tasks.</p>

              <ul>
                <li>Investigate which build systems should be
                  retained, modified, added, removed, etc.,
                  approaching the project with a conservative point of
                  view.  This needs intensive contact with the mailing
                  list(s) to identify the needs of users and the
                  preferences of developers.  Right now, we tend to
                  move to <code>meson</code>.</li>

                <li>Check software distributions for different
                  platforms and analyze how FreeType's build systems
                  are modified for integration.  This might give
                  further hints on necessary changes or
                  adaptations.</li>

                <li>Especially for <code>cmake</code> support, there
                  are a bunch of issues
                  in <a href="https://gitlab.freedesktop.org/groups/freetype/-/issues">Freetype's
                  bug tracker</a> that should be taken care of.</li>

                <li>Modernize and update the build system based on the
                  outcome of the previous items.  This might also
                  include changes in the directory structure of the
                  source files if necessary and useful.</li>
              </ul>

              <p><em>Difficulty:</em> medium.  <em>Requirements:</em>
                Various Unix and Windows build tools, in
                particular <code>GNU make</code>,
                <code>cmake</code>,
                and <code>meson</code>.  <em>Potential mentors:</em>
                Werner Lemberg, Alexei Podtelezhnikov, Toshiya Suzuki
                (FreeType).</p>
            </dd>
          </dl>

          <dl>
            <dt>Integrate FreeType with alternative rendering
              engines</dt>

            <dd>
              <p>Raph Levien has
                developed <a href="https://github.com/raphlinus/font-rs"><code>font-rs</code></a>,
                an experimental font renderer written in
                the <a href="https://www.rust-lang.org/">Rust
                  programming language</a>.
                A <a href="https://medium.com/@raphlinus/inside-the-fastest-font-renderer-in-the-world-75ae5270c445">blogpost</a>
                describes some of its features in more detail.  It
                claims to be much faster than FreeType's anti-aliasing
                rendering module due to SIMD optimizations.</p>

              <p>Note that
                the <a href="https://github.com/mooman219/fontdue"><code>fontdue</code></a>
                Rust package is another rendering engine based on
                <code>font-rs</code>, and it claims to be even faster
                and is actively developed.  You can find some additional
                discussion <a href="https://www.reddit.com/r/rust/comments/ilnd41/fontdue_the_fastest_font_renderer_in_the_world">here</a>.
                Another project inspired by <code>font-rs</code> is
                <a href="https://github.com/servo/pathfinder"><code>Pathfinder</code></a>,
                which takes advantages of GPU rendering.</p>

              <p>The project is about implementing an
                alternative <a href="https://www.freetype.org/freetype2/docs/reference/ft2-module_management.html#ft_renderer"><code>FT_Renderer</code></a>
                module in&nbsp;C that can take priority over the
                native FreeType rasterizer.  It should either wrap the
                calls to a linked precompiled object or port the Rust
                code to&nbsp;C.  It requires in-depth feasibility
                analysis of either approach and a good understanding
                of FreeType's architectural details.</p>

              <p><em>Difficulty:</em> high.  <em>Requirements:</em>
                Rust, C, Unix build tools.  <em>Potential
                mentors:</em> Werner Lemberg, Alexei Podtelezhnikov,
                Toshiya Suzuki (FreeType), Raph Levien (Google).</p>
            </dd>
          </dl>

          <dl>
            <dt>Improve FreeType demo programs</dt>
            <dd>
              <p>Right now, FreeType comes with a suite of small
                graphic tools to test and showcase the library, most
                notably <a href="https://gitlab.freedesktop.org/freetype/freetype-demos/-/blob/master/src/ftview.c"><code>ftview</code></a>
                and <a href="https://gitlab.freedesktop.org/freetype/freetype-demos/-/blob/master/src/ftgrid.c"><code>ftgrid</code></a>.
                They natively work
                on <a href="https://www.x.org/wiki/">X11</a> and
                <a href="https://docs.microsoft.com/en-us/windows/win32/gdi/windows-gdi">Windows
                GDI</a> without any additional requirements.  One
                opportunity is to port them
                to <a href="https://wayland.freedesktop.org/">Wayland</a>
                and <a href="https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/CocoaApplicationLayer/CocoaApplicationLayer.html">Cocoa/macOS</a>.
                This would involve implementing a small, low-level
                driver to manage a basic window, together with
                associated keyboard and resizing events.</p>

              <p>Another opportunity is to work on a modern GUI tool
                to showcase and test FreeType capabilities.  A first
                try to improve the demo program
                called <a href="https://gitlab.freedesktop.org/freetype/freetype-demos/-/tree/master/src/ftinspect"><code>ftinspect</code></a>,
                which is based on the <a href="https://www.qt.io/">Qt
                GUI</a> toolkit, was started as
                a <a href="https://gitlab.freedesktop.org/freetype/freetype-demos/-/tree/gsoc-2019-veeki">GSoC
                2019 project</a>.  However, the development is
                currently stalled.</p>

              <p>The idea is to finish <code>ftinspect</code>,
                handling <em>all</em> aspects of the other demo
                programs.  Currently, it only provides the
                functionality of <code>ftgrid</code>.</p>

              <p>If the student prefers, the Qt toolkit could be
                replaced
                with <a href="https://www.gtk.org/">GTK</a>.<p>

              <p><em>Difficulty:</em> medium.  <em>Requirements:</em>
                C, C++, Qt, Unix build tools.  <em>Potential
                mentor:</em> Werner Lemberg, Alexei Podtelezhnikov
                (FreeType).</p>
            </dd>
          </dl>

          <dl>
            <dt>Add a &lsquo;capability database&rsquo; to FreeType's
              auto-hinter</dt>
            <dd>
              <p>At smaller sizes, usually in the range 12ppem to
                20ppem, it can happen that separate outlines of glyphs
                touch each other (mainly caused by rounding issues),
                making glyphs illegible.  A typical example is glyph
                &lsquo;i&rsquo;, where the vertical space between the
                i-dot and the body must have a certain size to let the
                reader's eye separate the two parts.  [Note that the
                auto-hinter's capability to hint glyphs smaller than
                12ppem is very limited in general and thus not part of
                this project description.]</p>

              <p>Another example is the tilde accent, &lsquo;~&rsquo;,
                used in languages like Spanish: Even at smaller sizes
                the wiggle of the accent shape must be prevented,
                otherwise it can happen that a character like
                &lsquo;ã&rsquo; looks like &lsquo;ā&rsquo;.</p>

              <p>There are numerous other cases where some knowledge
                of the shape of a given glyph might help the
                <a href="https://www.freetype.org/autohinting/hinter.html">auto-hinter</a>
                improve the hinting, irrespective of the font shape or
                family – the i-dot and its body must be separate for
                virtually all available fonts.</p>

              <p>The project consists of the following parts.</p>

              <ul>
                <li>Identify hinting problems of the auto-hinter
                  related to shape distortion and accent positioning.
                  A good starting point is
                  the <a href="https://gitlab.freedesktop.org/groups/freetype/-/issues">FreeType
                  bug database.</a></li>

                <li>Collect necessary adjustments.  For the above two
                  examples, it would be necessary (a) to tell the
                  auto-hinter that there must be a certain vertical
                  distance between the body and its accent, and (b) to
                  distort some glyph shapes intentionally so that
                  rasterization at small ppem values gives decent
                  results.</li>

                <li>Invent a database format (to be compiled into the
                  library) that describes the necessary actions.
                  Basically, this would be a key-value table, where
                  the key is the Unicode character code of the
                  affected glyph, and the value is a list of necessary
                  actions.</li>

                <li>Add a mechanism to the auto-hinter to read the
                  database, and to apply the action (shift, distort,
                  whatever) to the affected glyph outlines if
                  necessary.  This last feature is the non-trivial
                  part of this project.</li>
              </ul>

              <p><em>Difficulty:</em> medium to
                high.  <em>Requirements:</em> C, and ideally some
                basic font hinting and rasterization
                knowledge.  <em>Potential mentors:</em> Werner
                Lemberg, Alexei Podtelezhnikov (FreeType).</p>
            </dd>
          </dl>

          <dl>
            <dt>Integrate VFlib's TeX font support into FreeType</dt>
            <dd>
              <p>A <a href="https://gitlab.freedesktop.org/freetype/freetype/-/tree/GSoC-2018-parth">GSoC
                  2018 project</a> was a first try to integrate
                <a href="http://www-masu.ist.osaka-u.ac.jp/~kakugawa/VFlib/">VFlib</a>
                into FreeType.  This library contains mature support
                for TeX's bitmap formats (in
                particular <code>GF</code> and <code>PK</code> fonts,
                together with <code>TFM</code> metric files
                and <code>VF</code> virtual fonts).</p>

              <p>The project would be as follows.</p>

              <ul>
                <li>Evaluate the existing code to find out whether it
                  can be used as a starting point to complete the
                  begun task, this is, to merge VFlib's source code
                  into FreeType, thus providing new modules to handle
                  TeX bitmap fonts.</li>

                <li>Evaluate different routes if necessary.  For
                  example, it might be easier to provide simple and
                  small wrapper modules that call VFlib functions.  In
                  other words, this wouldn't integrate the code of
                  VFlib but have it as an external dependency.</li>

                <li>Create modules.</li>
              </ul>

              <p>The canonic reference of
                the <code>PK</code>, <code>GF</code>, <code>TFM</code>,
                and <code>VF</code> font formats is the source code of
                the TeX
                tools <a href="https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/doc/generic/knuth/mfware/gftopk.pdf?view=co">gftopk</a>
                (for
                <code>PK</code>), <a href="https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/doc/generic/knuth/mfware/gftype.pdf?view=co">gftype</a>
                (for
                <code>GF</code>), <a href="https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/doc/generic/knuth/texware/tftopl.pdf?view=co">tftopl</a>
                (for <code>TFM</code>),
                and <a href="https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/doc/generic/knuth/etc/vftovp.pdf?view=co">vftovp</a>
                (for <code>VF</code>).</p>

              <p><em>Difficulty:</em> medium (hard for VF
                support).  <em>Requirements:</em> C, Unix build tools,
                knowledge of TeX infrastructure
                (using <a href="https://www.tug.org/texlive/">TeXLive</a>
                is recommended).  <em>Potential mentor:</em> Werner
                Lemberg (FreeType).</p>
            </dd>
          </dl>

          <p>Do you have more ideas?  Please write to
            our <a href="mailto:freetype-devel@nongnu.org">mailing
              list</a> so that we can discuss your suggestions,
            eventually adding them to the list!</p>
        </div>

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

        <div class="updated">
          <p>Last update: 18-Feb-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!">
        <img alt=""
             border="0"
             src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"
             width="1"
             height="1">
      </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">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="gsoc.html" class="current">FreeType &amp; GSoC</a>
    </li>
  </ul>
</div>

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

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

</body>
</html>