My project under GSoC is drawing to a close. It is time to submit final evaluations.
Here is a link to all the work I have done on my feature branch:
UPDATE: The feature branch was merged with master and deleted. The commits can now be found here:
Commits with the prefix GSOC were made during the GSoC work period.
A list of all the work that has been done in the project:
- The most important goal of this project was to achieve similar glyph rendering across all platforms. With the new layout engine the rendering is almost similar on different platforms. Also, I am able to reproduce same rendering bugs independent of the platform.
- This new layout engine uses HarfBuzz across all platforms. Currently the code can be enabled using a environment variable.
- The new layout engine is integrated with the rendering stack on Windows. I have used DirectWrite and GDI for final drawing of glyphs.
- On MacOS, the new layout engine is integrated with CoreText API for various table data retrieval and final glyph drawing.
- Integration on Unix based platforms is done using the existing Cairo based glyph drawing code.
- The new layout engine also renders Graphite fonts via HarfBuzz.
I achieved all of the goals I set for this project.
LibreOffice text rendering code has some major issues in itself, which were too large to be covered by this project. Some of them are:
- Using floating point arithmetic in text rendering. LibreOffice currently expresses various glyph characteristics in integers. This leads to many obscure rendering bugs (jumping characters, difference in inter-character spacing etc) and poor rendering overall.
- Interaction of layout code with Writer code. LibreOffice justification code is outdated and needs to be updated. For example, the justification code is responsible for incorrect rendering when using Awami Nastaliq Graphite font.
- Vertical text.
- No platform independent abstraction of font objects. LO has different classes representing a font object on different platforms.
Once these bugs are fixed, the cognitive load of the rendering code will be much less. It will be cleaner and easier to maintain. And it goes without saying that the glyph rendering will be much better.