6#define SF3_FORMAT_ID_TEXT 0x08
114 const char *base = (
char*)markup;
141 const char *base = (
char *)text->
markup;
160 default:
return "Unknown";
166 const char *base = (
char *)text->
markup;
169 const void *start = (
const void *)text;
170 const void *end = (
const void *)(str->
str+str->
length);
#define SF3_SKIP_STR(STR)
Macro to retrieve a pointer past the variable size of an SF3 string.
SF3_INLINE const char * sf3_text_string(const struct sf3_text *text)
Returns the raw textual contents.
SF3_INLINE const struct sf3_markup * sf3_text_next_markup(const struct sf3_markup *markup)
sf3_markup_option_type
The possible markup option types.
@ SF3_MARKUP_ITALIC
The option marks italicisation.
@ SF3_MARKUP_UNDERLINE
The option marks underlining.
@ SF3_MARKUP_TARGET
The option marks a link target and is a sf3_markup_target.
@ SF3_MARKUP_HEADING
The option marks a heading and is a sf3_markup_heading.
@ SF3_MARKUP_COLOR
The option marks color and is a sf3_markup_color.
@ SF3_MARKUP_SIZE
The option marks font size and is a sf3_markup_size.
@ SF3_MARKUP_FONT
The option marks a font switch and is a sf3_markup_font.
@ SF3_MARKUP_BOLD
The option marks bolding.
@ SF3_MARKUP_MONO
The option marks monospacing.
@ SF3_MARKUP_STRIKE
The option marks strikethrough.
@ SF3_MARKUP_LINK
The option marks a hyperlink and is a sf3_markup_link.
SF3_EXPORT const char * sf3_text_markup_option_type(enum sf3_markup_option_type type)
Returns a human-readable string description of the markup option.
SF3_EXPORT size_t sf3_text_size(const struct sf3_text *text)
Computes the size of the text file in bytes.
The basic header structure of every SF3 file.
Description of a color change.
float g
The green channel, in the range of [0,1].
float r
The red channel, in the range of [0,1].
float b
The blue channel, in the range of [0,1].
Description of a font family change.
sf3_str16 font
The name of the font-family to select.
Description of a heading.
uint8_t level
The level of the heading as a positive integer.
Description of a hyperlink.
Description of a font size change.
float size
The size of the font in em units.
Description of a link target.
sf3_str16 address
The address of this target.
struct sf3_markup markup[]
The markup options.
uint32_t markup_count
The number of markup options stored.
uint64_t markup_size
The size of the markup options in bytes.