top of page

[Discussion] My solution to Label Component

After doing some research about possible solutions to label, see issue on github(https://github.com/ZhangMenghe/PokeMeow-Renderer/issues/8), I now implemented labels using FreeType(version 2.6) library with Java bindings.

FreeType

FreeType is a freely available software library to render fonts.

It is written in C, designed to be small, efficient, highly customizable, and portable while capable of producing high-quality output (glyph images) of most vector and bitmap font formats.

Some products that use FreeType for rendering fonts on screen or on paper, either exclusively or partially:

  • GNU/Linux and other free Unix operating system derivates like FreeBSD or NetBSD;

  • iOS, Apple's mobile operating system for iPhones and iPads;

  • Android, Google's operating system for smartphones and tablet computers;

  • ChromeOS, Google's operating system for laptop computers;

  • ReactOS, a free open source operating system based on the best design principles found in the Windows NT architecture;

  • Ghostscript, a PostScript interpreter used in many printers.

Counting the above products only, you get more than a billion devices that contain FreeType.

FreeType 2.6 was released in 2015,.This is a new major release that provides a better (and simpler) thread-safety model. Among other new features we now have auto-hinting support for Arabic and Thai, together with much improved handling of Apple's GX TrueType variation font format.

---------------------

The Java bindings now I used is from (https://github.com/mlomb/freetype-jni).

With this binding, native functions can be applied using the defined classes in Java style.

bottom of page