novelate.textwrap

Copyright © Novelate 2020

Members

Functions

wrapableText
dstring wrapableText(dstring text, string fontName, size_t fontSize, size_t width)

Creates text that wraps when it exceeds a given width. It does so by adding a new line at the last space given before the text exceeds the width and does so for all of the text.

Meta

Authors

Jacob Jensen (bausshf) Website: https://novelate.com/

Novelate is a free and open-source visual novel engine and framework written in the D programming language.
It can be used freely for both personal and commercial projects.

Module Description: This module handles text wrapping which is an essential feature when working with text that has to fit into a specific width. It's currently not a very performant algorithm but it gets the job done.