55#include <allegro5/allegro.h>
56#include <allegro5/allegro_font.h>
static void background(float x, float y, float w, float h, void *user_data)
a background
ALLEGRO_COLOR heading
heading text
int hard_breaks
Non-zero to break a paragraph where its source breaks, which is what a chat message wants: somebody p...
float col_min
narrowest a table column may be squeezed to, in pixels
float cell_pad
padding inside a table cell, left and right
ALLEGRO_COLOR text
body text
ALLEGRO_COLOR quote
a blockquote's text, and its bar
ALLEGRO_COLOR link
link text
int n_gui_md_link_at(const N_GUI_MD_FONTS *fonts, const N_GUI_MD_STYLE *style, float x, float y, float width, const char *text, float px, float py, char *url, size_t url_cap)
the url of the link under (px, py), if there is one
ALLEGRO_FONT * regular
body text, and the fallback for every other face.
ALLEGRO_COLOR code_bg
the panel behind a fenced code block, and behind inline code
ALLEGRO_FONT * h1
"# " headings, ideally the bold face at a larger size
float n_gui_md_draw(const N_GUI_MD_FONTS *fonts, const N_GUI_MD_STYLE *style, float x, float y, float width, const char *text)
draw text as markdown at (x, y), wrapped to width
ALLEGRO_COLOR rule
the rule under a heading and under a table's header row
ALLEGRO_FONT * bolditalic
both at once
ALLEGRO_FONT * h3
"### " and deeper
unsigned parse_flags
n_markdown parse flags.
ALLEGRO_FONT * mono
code and fenced code blocks
ALLEGRO_FONT * h2
"## " headings
ALLEGRO_FONT * italic
italic
ALLEGRO_COLOR code
code and code block text
float indent
how far a quote, a list item's text and a code block are indented
float block_gap
vertical space between two blocks, in pixels
void n_gui_md_style_default(N_GUI_MD_STYLE *out, ALLEGRO_COLOR text, ALLEGRO_COLOR background, float line_height)
fill a style from two colours and a line height
float n_gui_md_height(const N_GUI_MD_FONTS *fonts, const N_GUI_MD_STYLE *style, float width, const char *text)
height of text laid out as markdown at width, in pixels
Parse a SAFE, strict subset of Markdown into a block / styled-span model.