Rich text library supporting customizable Markdown formatting

Overview

BYG Rich Text Library

Example Output

This plugin for Unreal Engine 4 is an alternative to UE4's built in rich text system.

It differs from Unreal's default rich text implementation in a few ways:

  • Support for Markdown and customizable markup.
  • Support for nested styles.
  • Simple to extend supported text properties in C++.

Feature Comparison

Feature Unreal Rich Text BYG Rich Text
Nested styles ✔️
Customizable syntax ✔️
Markdown-like shortcuts ✔️
Inline images ✔️ ✔️
Style-based justification (block only) ✔️
Style-base margins (block only) ✔️
Inline tooltips ✔️ ✔️
Customizable paragraph separator ✔️
XML-like syntax ✔️ ✔️
Datatable-based stylesheet ✔️
Blueprint code support ✔️

Usage

Creating a custom stylesheet

  1. Create a new Blueprint asset, with BYGRichTextStylesheet as the`parent class.
  2. Add styles to the stylesheet.
  3. Add properties to each style.
  • Each stylesheet can have one or more Styles.
  • Each style can hae one or more Properties applied to it.

Rich Text Properties

  • Font/Typeface
  • Text style: bold, italic and other styles.
  • Text size
  • Text color
  • Text case: force uppercase or lowercase
  • Text shadow (color and distance)
  • Margin: Add spacing between paragraphs.
  • Justification: Align text left, right or center.
  • Line Height: Change the spacing between lines.
  • Text Wrap
  • Background: Set a background color or image.

Using the Rich Text Block

  1. Create a UserWidget blueprint.
  2. From the widget palette, under Brace Yourself Games, find BYG Rich Text Block and add it to your UserWidget.
  3. By default, the stylesheet selected will be the Markdown example included with the project.
  4. Try entering Hello *bold world*, hello _italic world_!

Example Stylesheet

Installation

Source

  1. Download the zip or clone the repository to ProjectName/Plugins/BYGRichText.
  2. Add BYGRichText to PrivateDependencyModuleNames inside ProjectName.Build.cs.

Unreal Version Support

  • Unreal Engine 4.26
  • May work with previous versions, but not tested

License

Contact

FAQ

Q) How do I change the default Stylesheet used on new BYG Rich Text widgets?

A) Open Project Settings, then under Plugins, select BYG Rich Text. Change the Default Stylesheet property to your desired Stylesheet.

Q) How do I change the default appearance of my text?

A) By default, text without a specified tag will be styled based on the Default Style Name property within a stylesheet. Create a style in your stylesheet named default and customize its properties to change the appearance of un-tagged text.

Q) Can I use this in a commercial game?

A) Yes, the license is the 3-clause BSD license which means it can be used in commercial works so long as the copyright notice is included.

Q) Has this been used in any games?

A) This is based on the rich text system implemented for Industries of Titan

Q) Is stylesheet inheritance supported?

A) Currently it is not supported. I am looking into it.

Q) My text is pink, what's going wrong?

A) Make sure that you have selected a Stylesheet Class from within the BYG Rich Text Block properties.

Comments
  • BYGRichTextBlock resizes when zooming in and out in UMG editor

    BYGRichTextBlock resizes when zooming in and out in UMG editor

    rt_sizing (the top box is a BYG Rich Text block, the bottom is a builtin rich text block with the desired behaviour)

    Repro info

    I have a UMG hierarchy that looks like: Canvas/Canvas/Horizontal Box/Vertical Box/BYG Rich Text Block When scrolling in and out in the UMG editor, the rich text block will appear to resize itself depending on the zoom level. When you compile the user widget or change a property on the rich text block, everything goes back to normal (the text block goes back to one line using the example gif above).

    My best guess is this has something to do with DPI or "desired size", but I'm not familiar enough with UMG/Slate's layout system to properly guess.

    opened by Grimeh 4
  • Disable text wrap?

    Disable text wrap?

    Is there anyway to disable the text wrapping? If i set the text to size to container, then zooming in/out will trigger text wrapping and breaks the text overall.

    opened by slicer4ever 1
  • How to make ` ` work?

    How to make ` ` work?

    So I have a data table with Text fields that I was to display. The Editor (4.27.2) doesn't seem to have an easy way to make newlines/line breaks, so I was trying to make a style for a block that would do this. I have a default and * bold set up, but no matter how I try to get this working I can't seem to get it to. Does a block style require newlines to work or what's up with this?

    opened by mclark4386 1
  • Updating for UE4.27/5 and BP Interface

    Updating for UE4.27/5 and BP Interface

    Fixed:

    • SetText not updating contents
    • GC CollectReferences warning due to BYGRichTextModule not implementing the new FGCObject interface

    Added:

    • Blueprint interface for SetText/GetText
    opened by Reticulatas 1
  • Dedicated server run in editor crashes with CDO not able to find engine fonts

    Dedicated server run in editor crashes with CDO not able to find engine fonts

    While trying to use this plugin to run the game in editor as a client spawning a dedicated server process it crashes as by default engine fonts are excluded from dedicated servers.

    The issue comes from these lines https://github.com/BraceYourselfGames/UE4-BYGRichText/blob/main/Source/BYGRichText/Public/Settings/BYGRichTextProperty.h#L135-L136

    opened by phalasz 2
Owner
Brace Yourself Games
Brace Yourself Games
Very fast Markdown parser and HTML generator implemented in WebAssembly, based on md4c

Very fast Markdown parser and HTML generator implemented in WebAssembly, based on md4c

Rasmus 1.3k Dec 24, 2022
A markdown parser for tree-sitter

tree-sitter-markdown A markdown parser for tree-sitter Progress: Leaf blocks Thematic breaks ATX headings Setext headings Indented code blocks Fenced

Matthias Deiml 227 Jan 7, 2023
The most powerful and customizable binary pattern scanner written on modern C++

Sig The most powerful and customizable binary pattern scanner written on modern C++ ✔ Capabilities: Support for all common pattern formats: Pattern +

Александр 153 Dec 21, 2022
fpicker is a Frida-based fuzzing suite supporting various modes (including AFL++ in-process fuzzing)

fpicker fpicker is a Frida-based fuzzing suite that offers a variety of fuzzing modes for in-process fuzzing, such as an AFL++ mode or a passive traci

Dennis Heinze 184 Dec 30, 2022
An easy-to-use C library for displaying text progress bars.

What is this thing? progressbar is a C-class (it's a convention, dammit) for displaying attractive progress bars on the command line. It's heavily inf

Trevor Fountain 440 Dec 27, 2022
Library for writing text-based user interfaces

IMPORTANT This library is no longer maintained. It's pretty small if you have a big project that relies on it, just maintain it yourself. Or look for

null 1.9k Dec 22, 2022
The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.

libxo libxo - A Library for Generating Text, XML, JSON, and HTML Output The libxo library allows an application to generate text, XML, JSON, and HTML

Juniper Networks 253 Dec 10, 2022
A library to automatically generate a text based interface for programs and libraries.

Introduction Auto Menu is an open-source library to automatically generate a text based interface for your programs and libraries. Installation Clone

Soumya Ranjan Patnaik 7 Oct 31, 2021
Mustache text templates for modern C++

About Mustache implementation for modern C++ (requires C++11) Header only Zero dependencies Templated string type for compatibility with any STL-like

Kevin Wojniak 307 Dec 11, 2022
Read Non-Rectangular Text Data

meltr The goal of ‘meltr’ is to provide a fast and friendly way to read non-rectangular data (like ragged forms of ‘csv’, ‘tsv’, and ‘fwf’). Standard

R infrastructure 29 Dec 26, 2022
A c++ file just to show how can we change color of Background and Text in C++...

A c++ file just to show how can we change color of Background and Text in C++...

null 1 Nov 2, 2021
Isocline is a pure C library that can be used as an alternative to the GNU readline library

Isocline: a portable readline alternative. Isocline is a pure C library that can be used as an alternative to the GNU readline library (latest release

Daan 136 Dec 30, 2022
A linux library to get the file path of the currently running shared library. Emulates use of Win32 GetModuleHandleEx/GetModuleFilename.

whereami A linux library to get the file path of the currently running shared library. Emulates use of Win32 GetModuleHandleEx/GetModuleFilename. usag

Blackle Morisanchetto 3 Sep 24, 2022
Command-line arguments parsing library.

argparse argparse - A command line arguments parsing library in C (compatible with C++). Description This module is inspired by parse-options.c (git)

Yecheng Fu 533 Dec 26, 2022
A cross platform C99 library to get cpu features at runtime.

cpu_features A cross-platform C library to retrieve CPU features (such as available instructions) at runtime. Table of Contents Design Rationale Code

Google 2.2k Dec 22, 2022
Library that solves the exact cover problem using Dancing Links, also known as DLX.

The DLX Library The DLX library The DLX library solves instances of the exact cover problem, using Dancing Links (Knuth’s Algorithm X). Also included

Ben Lynn 44 Dec 18, 2022
CommonMark parsing and rendering library and program in C

cmark cmark is the C reference implementation of CommonMark, a rationalized version of Markdown syntax with a spec. (For the JavaScript reference impl

CommonMark 1.4k Jan 4, 2023
A cross-platform protocol library to communicate with iOS devices

libimobiledevice A library to communicate with services on iOS devices using native protocols. Features libimobiledevice is a cross-platform software

libimobiledevice 5.4k Dec 30, 2022
Platform independent Near Field Communication (NFC) library

*- * Free/Libre Near Field Communication (NFC) library * * Libnfc historical contributors: * Copyright (C) 2009 Roel Verdult * Copyright (C) 2009

null 1.4k Jan 5, 2023