GithubHelp home page GithubHelp logo

sfmltextaline's Introduction

Sfml Text "Aline"

Alignable Multi-line SFML Text

Currently a work-in-progress and is in a useable state with some other features still to come.

It is a single-object multi-line text object for SFML.
It is similar to SFML's own sf::Text object but has some extra features (but doesn't include some of sf::Text's features as yet - see below).

Features:

  • Lines are alignable globally (throughout the entire object) to the left, centre, right and justified (distributed/separated characters or spread through whitespace only).
  • Individual lines can also be customised (including having their own alignment, colour, positional offset, bold and italic)
  • Positional offset is any offset that a single line can be given (allowing each line to be moved around freely - after alignments)
  • Can be assigned an sf::Text to reproduce it automatically (within its own features - so far)
  • The length of a tab character can be customised to any set number of spaces
  • Kerning is applied
  • Some text styles (bold and italic - italic shear amount is customisable)
  • A minimum width can be specified that allows for a virtual right side margin when aligning

Planned - but currently missing - features:

  • Other text styles (underline and strike-through)
  • Outline
  • Letter spacing
  • Line spacing
  • Bounds

Note that these missing features are available in the original sf::Text but yet included here.

You now use just the shortcut class name Aline instead of its full name SfmlTextAline. If you would like to cancel the shortcut from being created, define SFMLTEXTALINE_NO_CLASS_SHORTCUT before including the class.

The alignment enum class has been renamed to make it more convenient. It is now just Align instead of LineAlignment.

So, you can access the alignment enum class by simply using it like this: Aline::Align::Center.

sfmltextaline's People

Contributors

hapaxia avatar xparq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.