Skip to content

generaloss/freetype-jni

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Maven Central


FreeType version: 2.13.3


Features

  • Natives compiled with libraries: zlib, harfbuzz, libpng
  • Сaching FTStruct objects to prevent unnecessary heap usage and duplicates
  • Enumerations are actually java enums (so it would be hard to use the wrong argument in a FreeType function)
  • Flag bitmask objects (as an alternative to integers)

Requirements

  • Java: 1.8 +
  • Android SDK: 21 +

How to use

  1. Add the freetype-jni dependency.
  2. Add the natives you need:

Code sample

final FTLibrary lib = new FTLibrary();
final ByteBuffer data = ...;
final FTFace face = lib.newMemoryFace(data, 0);
// ...
face.done();
lib.done();

See other samples (99) in Tests.java

Implemented


Bugs and Feedback

For bugs, questions and discussions please use the GitHub Issues.


Credits: FreeType