A font rasterization and shaping library for libGDX using HarfBuzz.
- Font rasterization (AA and MSDF)
- GPU glyph rendering (Slug)
- Complex script shaping
- Cross platform
implementation "com.github.zeroeighteightzero:matn:0.3.4"implementation "com.github.zeroeighteightzero:matn:0.3.4:natives-desktop"implementation "com.github.zeroeighteightzero:matn:0.3.4:natives-armeabi-v7a"
implementation "com.github.zeroeighteightzero:matn:0.3.4:natives-arm64-v8a"
implementation "com.github.zeroeighteightzero:matn:0.3.4:natives-x86"
implementation "com.github.zeroeighteightzero:matn:0.3.4:natives-x86_64"implementation "com.github.zeroeighteightzero:matn:0.3.4:natives-ios"Typeface face = new Typeface("MyFont.ttf");
GlyphAtlas atlas = new GlyphAtlas(512);
Font font = new Font(face, atlas);
Layout layout = new Layout("Hello, world!", 64); // 64px
layout.setFont(font);
layout.markup();Render
batch.begin();
layout.draw(batch, 0, 0); // Raster
layout.drawGPU(batch, 0, 0); // Requires GPUGlyphBatch
batch.end();Dispose
font.dispose();
atlas.dispose();
face.dispose();