FreeType & GSoC

The FreeType project has successfully participated at Google Summer of Code. Here is our list of possible projects – if you more ideas, please write to our mailing list so that we can discuss your suggestions, eventually adding them to this page.

If you are interested to participate as a student, please also contact us via the mailing list. It's probably best if you subscribe to it.

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.

Before contacting us, however, you should get really acquainted with the topic you would like to start with – in particular, search the mailing list archive and/or do some googling! We don't want to answer questions like “I'm interested in your project, I want to contribute, please tell me what to do!” again and again…

Improve FreeType's website

The final step required for completing the migration of FreeType to the gitlab instance of freedesktop.org is migrating the FreeType website (i.e., the freetype-web repository).

This project is intented to migrate the website hosting to gitlab pages and update the site's functionality accordingly. Here is a preliminary list of tasks.

  • Convert the contents of the 'freetype-web' git repository into a static website.
  • Migrate 'freetype.org' hosting to freedesktop gitlab pages.
  • Implement full-text search using something like this or this.
  • Modernize the UI and improve layout for mobile devices.
  • Integrate with FreeType CI pipeline to provide documentation generated from latest master version in the git repository.
  • Integrate with FreeType regression testing pipeline to display regressions.

If there is still time left after implementing the above, the following can be done as a bonus, to show your dedication to the project :-)

Difficulty: medium to high. Requirements: HTML, CSS, JavaScript, shell scripting. Potential mentors: Werner Lemberg, Alexei Podtelezhnikov.

Develop a test framework for checking FreeType's rendering output

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.

However, a GSoC 2020 project 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 freedesktop.org; this implies that access to its CI abilities should be straightforward.

The idea is to select a representative set of reference fonts from font corpora (which already exist mainly for fuzzing). 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.

Difficulty: medium. Requirements: C, HTML, Unix build tools. Potential mentors: Werner Lemberg, Alexei Podtelezhnikov, Toshiya Suzuki (FreeType).

Update FreeType's build systems

Due to historical reasons, FreeType's build systems are strange to newcomers. The default one is based on GNU make, also integrating autoconf support. Alternatives are generic build files for cmake and meson, together with special support files for MS Visual Studio, OpenVMS, and some even more exotic, old platforms.

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

  • 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 meson.
  • 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.
  • Especially for cmake support, there are a bunch of issues in Freetype's bug tracker that should be taken care of.
  • 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.

Difficulty: medium. Requirements: Various Unix and Windows build tools, in particular GNU make, cmake, and meson. Potential mentors: Werner Lemberg, Alexei Podtelezhnikov, Toshiya Suzuki (FreeType).

Integrate FreeType with alternative rendering engines

Raph Levien has developed font-rs, an experimental font renderer written in the Rust programming language. A blogpost 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.

Note that the fontdue Rust package is another rendering engine based on font-rs, and it claims to be even faster and is actively developed. You can find some additional discussion here. Another project inspired by font-rs is Pathfinder, which takes advantages of GPU rendering.

The project is about implementing an alternative FT_Renderer module in 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 C. It requires in-depth feasibility analysis of either approach and a good understanding of FreeType's architectural details.

Difficulty: high. Requirements: Rust, C, Unix build tools. Potential mentors: Werner Lemberg, Alexei Podtelezhnikov, Toshiya Suzuki (FreeType), Raph Levien (Google).

Improve FreeType demo programs

Right now, FreeType comes with a suite of small graphic tools to test and showcase the library, most notably ftview and ftgrid. They natively work on X11 and Windows GDI without any additional requirements. One opportunity is to port them to Wayland and Cocoa/macOS. This would involve implementing a small, low-level driver to manage a basic window, together with associated keyboard and resizing events.

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 ftinspect, which is based on the Qt GUI toolkit, was started as a GSoC 2019 project. However, the development is currently stalled.

The idea is to finish ftinspect, handling all aspects of the other demo programs. Currently, it only provides the functionality of ftgrid.

If the student prefers, the Qt toolkit could be replaced with GTK.

Difficulty: medium. Requirements: C, C++, Qt, Unix build tools. Potential mentor: Werner Lemberg, Alexei Podtelezhnikov (FreeType).

Add a ‘capability database’ to FreeType's auto-hinter

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 ‘i’, 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.]

Another example is the tilde accent, ‘~’, 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 ‘ã’ looks like ‘ā’.

There are numerous other cases where some knowledge of the shape of a given glyph might help the auto-hinter improve the hinting, irrespective of the font shape or family – the i-dot and its body must be separate for virtually all available fonts.

The project consists of the following parts.

  • Identify hinting problems of the auto-hinter related to shape distortion and accent positioning. A good starting point is the FreeType bug database.
  • 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.
  • 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.
  • 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.

Difficulty: medium to high. Requirements: C, and ideally some basic font hinting and rasterization knowledge. Potential mentors: Werner Lemberg, Alexei Podtelezhnikov (FreeType).

Integrate VFlib's TeX font support into FreeType

A GSoC 2018 project was a first try to integrate VFlib into FreeType. This library contains mature support for TeX's bitmap formats (in particular GF and PK fonts, together with TFM metric files and VF virtual fonts).

The project would be as follows.

  • 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.
  • 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.
  • Create modules.

The canonic reference of the PK, GF, TFM, and VF font formats is the source code of the TeX tools gftopk (for PK), gftype (for GF), tftopl (for TFM), and vftovp (for VF).

Difficulty: medium (hard for VF support). Requirements: C, Unix build tools, knowledge of TeX infrastructure (using TeXLive is recommended). Potential mentor: Werner Lemberg (FreeType).

Do you have more ideas? Please write to our mailing list so that we can discuss your suggestions, eventually adding them to the list!

Last update: 18-Feb-2021