Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text renderer for the BEAM graphics library

🚧 This project is under active development. Do not used at the moment as it's not ready. Consult the develop branch for progress.

Erlangsters Repository Supported Erlang/OTP Versions Current Version License Build Status Documentation Link

A helper library to complement the graphics library of the BEAM ecosystem with loading font and rendering texts.

{deps, [
  {beam_graphics, {git, "https://github.com/erlangsters/beam-graphics.git", {tag, "master"}}},
  {beam_graphics_text, {git, "https://github.com/erlangsters/beam-graphics-text.git", {tag, "master"}}}
]}.
{ok, Font} = graphics_font:from_file("font.ttf", 32.0),
{ok, Shape} = graphics_text:from_string(Font, {0.0, 0.0}, "Hello", ?COLOR_WHITE),
ok = graphics_surface:set_blend_mode(Surface, alpha),
ok = graphics_surface:draw_shape2(Surface, Shape),
ok = graphics_shape2:destroy(Shape),
ok = graphics_font:destroy(Font).

from_string places the first baseline at Position (Y-up). Draw with blend mode alpha. The font owns the atlas texture; the text shape does not.

Written by the Erlangsters community and released under the MIT license.

About

Text renderer for the graphics library of the BEAM ecosystem.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages