Skip to content
0880880Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Matn

A font rasterization and shaping library for libGDX using HarfBuzz.

  • Font rasterization (AA and MSDF)
  • GPU glyph rendering (Slug)
  • Complex script shaping
  • Cross platform

Core

implementation "com.github.zeroeighteightzero:matn:0.3.4"

Desktop

implementation "com.github.zeroeighteightzero:matn:0.3.4:natives-desktop"

Android

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"

iOS

implementation "com.github.zeroeighteightzero:matn:0.3.4:natives-ios"

Usage

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();

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages