Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
/ info-beamer-text Public archive

Helper library for rendering rich text with info-beamer

License

Notifications You must be signed in to change notification settings

fenhl/info-beamer-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maintenance notice: This project is no longer maintained since I no longer use info-beamer. If you would like me to add a link to a maintained fork, please ping me in an issue.

This is a helper library for rendering rich text with info-beamer.

Usage

util.resource_loader{
    "some_font.ttf",
}
local text = require "text" -- text.lua needs to be in the same directory as your node.lua
local write = text{font=some_font, width=WIDTH, height=HEIGHT} -- optional arguments: r, g, b, a (default: white), size (default: 100)
local dimensions = write{text={{"Hello", "world!"}}}
-- `dimensions` is a table containing `width` and `height` in pixels

TODO

Features

Features with a checkmark are available, unchecked features are planned.

  • Write text given in a specific format to the screen. Format example:
    {{"This", "is", "a", "paragraph,"}, {"and", "this", "is", "another", "paragraph."}}
  • Automatic word wrapping
  • Simulation mode: only determine width and height without rendering
  • Custom base text size
  • Variable text size:
    {{"Individual", "words", "can", "be", {word="bigger", size=200}, "or", {word="smaller", size=50}, {word=".", space_before=false}}}
  • Text colors and opacity
  • Specify bounds for the text area
  • Horizontal alignment (left, center, or right)
  • Vertical alignment (top, middle, or bottom)
  • Fallback to a different font if the main font doesn't have the glyph
  • Custom word separators, maybe-breaks, and hyphenation
  • Custom emoji
  • Unicode emoji
  • Bold and italic text (via per-call or per-word font overrides)
  • Underlines and strikethroughs
  • Plugin support (render things like images inline)

About

Helper library for rendering rich text with info-beamer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published