HTMLCSS Programming Manual

Michael R Sweet

Copyright © 2018-2020 by Michael R Sweet

Contents

Functions

hcCSSDelete

Free memory associated with a stylesheet.

void hcCSSDelete(hc_css_t *css);

Parameters

css Stylesheet

hcCSSImport

Import CSS definitions from a URL, file, or string.

int hcCSSImport(hc_css_t *css, hc_file_t *file);

Parameters

css Stylesheet
file File

Return Value

1 on success, 0 on error

hcCSSImportDefault

Import the default HTML stylesheet.

int hcCSSImportDefault(hc_css_t *css);

Parameters

css Stylesheet

Return Value

1 on success, 0 on error

hcCSSNew

Allocate a new stylesheet.

hc_css_t *hcCSSNew(hc_pool_t *pool);

Parameters

pool Memory pool

Return Value

Stylesheet

hcCSSSetMedia

Set the base media settings.

int hcCSSSetMedia(hc_css_t *css, const char *type, int color_bits, int monochrome_bits, float width, float height);

Parameters

css Stylesheet
type Media type ("print', etc.)
color_bits Bits of color supported
monochrome_bits Bits of grayscale supported
width Device width
height Device height

Return Value

1 on success, 0 on failure

hcDictCopy

Make a copy of a dictionary.

hc_dict_t *hcDictCopy(const hc_dict_t *dict);

Parameters

dict Dictionary to copy

Return Value

New dictionary

hcDictDelete

Delete a dictionary.

void hcDictDelete(hc_dict_t *dict);

Parameters

dict Dictionary

hcDictGetCount

Return the number of key/value pairs in a dictionary.

size_t hcDictGetCount(const hc_dict_t *dict);

Parameters

dict Dictionary

Return Value

Number of key/value pairs

hcDictGetIndexKeyValue

Return the key and value for the specified pair.

const char *hcDictGetIndexKeyValue(const hc_dict_t *dict, size_t idx, const char **key);

Parameters

dict Dictionary
idx Index (0-based)
key Key or NULL if idx is invalid.

Return Value

Value or NULL if idx is invalid.

hcDictGetKeyValue

Get the value for a key in a dictionary.

const char *hcDictGetKeyValue(const hc_dict_t *dict, const char *key);

Parameters

dict Dictionary
key Key string

Return Value

Value or NULL if not found.

hcDictNew

Create a new dictionary.

hc_dict_t *hcDictNew(hc_pool_t *pool);

Parameters

pool Memory pool

Return Value

New dictionary

hcDictRemoveKey

Remove a key/value pair from a dictionary.

void hcDictRemoveKey(hc_dict_t *dict, const char *key);

Parameters

dict Dictionary
key Key string

hcDictSetKeyValue

Set a key/value pair in a dictionary.

void hcDictSetKeyValue(hc_dict_t *dict, const char *key, const char *value);

Parameters

dict Dictionary
key Key string
value Value string

hcFileDelete

Close a file and free any memory associated with it.

void hcFileDelete(hc_file_t *file);

Parameters

file File

hcFileGetc

Get a character from a file.

int hcFileGetc(hc_file_t *file);

Parameters

file File

Return Value

Character or EOF

hcFileNewBuffer

Create a new file buffer stream.

hc_file_t *hcFileNewBuffer(hc_pool_t *pool, const void *buffer, size_t bytes);

Parameters

pool Memory pool
buffer Buffer
bytes Size of buffer

Return Value

File

hcFileNewString

Create a new file string stream.

hc_file_t *hcFileNewString(hc_pool_t *pool, const char *s);

Parameters

pool Memory pool
s String

Return Value

File

hcFileNewURL

Create a new file URL stream.

hc_file_t *hcFileNewURL(hc_pool_t *pool, const char *url, const char *baseurl);

Parameters

pool Memory pool
url URL or filename
baseurl Base URL or NULL

Return Value

File

hcFileRead

Read bytes from a file.

size_t hcFileRead(hc_file_t *file, void *buffer, size_t bytes);

Parameters

file File
buffer Buffer
bytes Number of bytes to read

Return Value

Number of bytes read

hcFileSeek

Randomly access data within a file.

size_t hcFileSeek(hc_file_t *file, size_t offset);

Parameters

file File
offset Offset within file

Return Value

New file offset or 0 on error

hcFileUngetc

Return a character to a file.

void hcFileUngetc(hc_file_t *f, int ch);

Parameters

f File
ch Character

hcFontAddCached

Add a font to a memory pool cache.

void hcFontAddCached(hc_pool_t *pool, hc_font_t *font, const char *url);

Parameters

pool Memory pool for cache
font Font to add
url URL for font

hcFontComputeExtents

Compute the extents of a string when rendered using the given font object, size, style, etc.

int hcFontComputeExtents(const hc_font_t *font, float size, const char *s, hc_rect_t *extents);

Parameters

font Font object
size Font size
s String
extents Extents of the string

Return Value

1 on success, 0 on failure

hcFontDelete

Free all memory used for a font family object.

void hcFontDelete(hc_font_t *font);

Parameters

font Font object

hcFontFindCached

Find a font...

hc_font_t *hcFontFindCached(hc_pool_t *pool, const char *family, hc_font_stretch_t stretch, hc_font_style_t style, hc_font_variant_t variant, hc_font_weight_t weight);

Parameters

pool Memory pool for cache
family Family name
stretch Stretching of font
style Style of font
variant Variant of font
weight Weight of font

Return Value

Matching font or NULL

hcFontGetCached

Get a cached font from a pool.

hc_font_t *hcFontGetCached(hc_pool_t *pool, size_t idx);

Parameters

pool Memory pool
idx Font number (0-based)

Return Value

Font

hcFontGetCachedCount

Return the number of cached fonts.

size_t hcFontGetCachedCount(hc_pool_t *pool);

Parameters

pool Memory pool

Return Value

Number of cached fonts

hcFontGetCopyright

Get the copyright text for a font.

const char *hcFontGetCopyright(hc_font_t *font);

Parameters

font Font object

Return Value

Copyright text

hcFontGetFamily

Get the family name of a font.

const char *hcFontGetFamily(hc_font_t *font);

Parameters

font Font object

Return Value

Family name

hcFontGetNumFonts

size_t hcFontGetNumFonts(hc_font_t *font);

Parameters

font Font object

Return Value

Get the number of fonts in this collection.

hcFontGetPostScriptName

Get the PostScript name of a font.

const char *hcFontGetPostScriptName(hc_font_t *font);

Parameters

font Font object

Return Value

PostScript name

hcFontGetStyle

Get the font style.

hc_font_style_t hcFontGetStyle(hc_font_t *font);

Parameters

font Font object

Return Value

Style

hcFontGetVersion

Get the version number of a font.

const char *hcFontGetVersion(hc_font_t *font);

Parameters

font Font object

Return Value

Version number

hcFontGetWeight

Get the weight of a font.

hc_font_weight_t hcFontGetWeight(hc_font_t *font);

Parameters

font Font object

Return Value

Weight

hcFontNew

Create a new font object for the named font family.

hc_font_t *hcFontNew(hc_pool_t *pool, hc_file_t *file, size_t idx);

Parameters

pool Memory pool
file File
idx Font number in collection (0-based)

Return Value

New font object

hcHTMLDelete

Free the memory used by a HTML document.

void hcHTMLDelete(hc_html_t *html);

Parameters

html HTML document

hcHTMLFindNode

Find the first node in a document that matches the given element and/or ID string.

hc_node_t *hcHTMLFindNode(hc_html_t *html, hc_node_t *current, hc_element_t element, const char *id);

Parameters

html HTML document
current Current node or NULL
element Element or HC_ELEMENT_WILDCARD for any
id ID string or NULL for any

Return Value

First matching node or NULL

hcHTMLGetCSS

Get the stylesheet for a HTML document.

hc_css_t *hcHTMLGetCSS(hc_html_t *html);

Parameters

html HTML document

Return Value

Stylesheet

hcHTMLGetDOCTYPE

Get a HTML document's DOCTYPE value, if any.

const char *hcHTMLGetDOCTYPE(hc_html_t *html);

Parameters

html HTML document

Return Value

DOCTYPE value

hcHTMLGetRootNode

Get the root node for a document.

hc_node_t *hcHTMLGetRootNode(hc_html_t *html);

Parameters

html HTML document

Return Value

Root node or NULL if none

hcHTMLImport

Load a HTML file into a document.

int hcHTMLImport(hc_html_t *html, hc_file_t *file);

Parameters

html HTML document
file File to import

Return Value

1 on success, 0 on failure

hcHTMLNew

Create a new HTML document.

hc_html_t *hcHTMLNew(hc_pool_t *pool, hc_css_t *css);

Parameters

pool Memory pool
css Base stylesheet

Return Value

HTML document

hcHTMLNewRootNode

Create a new root node.

hc_node_t *hcHTMLNewRootNode(hc_html_t *html, const char *doctype);

Parameters

html HTML document
doctype DOCTYPE value

Return Value

New root node

hcImageDelete

Delete an image object.

void hcImageDelete(hc_image_t *image);

Parameters

image Image object

hcImageGetFormat

Get the MIME media type for the image.

const char *hcImageGetFormat(hc_image_t *image);

Parameters

image Image object

Return Value

MIME media type

hcImageGetHeight

Get the height of an image.

int hcImageGetHeight(hc_image_t *image);

Parameters

image Image object

Return Value

Height in pixels

hcImageGetSize

Get the natural size of an image.

hc_size_t hcImageGetSize(hc_image_t *image);

Parameters

image Image object

Return Value

CSS dimensions

hcImageGetWidth

Get the width of an image.

int hcImageGetWidth(hc_image_t *image);

Parameters

image Image object

Return Value

Width in pixels

hcImageNew

Create a new image object.

hc_image_t *hcImageNew(hc_pool_t *pool, hc_file_t *file);

Parameters

pool Memory pool
file File

Return Value

Image object

hcNodeAttrGetCount

Get the number of attributes for an element.

size_t hcNodeAttrGetCount(hc_node_t *node);

Parameters

node Element node

Return Value

Number of attributes

hcNodeAttrGetIndexNameValue

Get the name and value of a specified attribute.

const char *hcNodeAttrGetIndexNameValue(hc_node_t *node, size_t idx, const char **name);

Parameters

node Element node
idx Attribute index (0-based)
name Attribute name

Return Value

Attribute value or NULL

hcNodeAttrGetNameValue

Get the value of an element attribute.

const char *hcNodeAttrGetNameValue(hc_node_t *node, const char *name);

Parameters

node Element node
name Attribute name

Return Value

Value or NULL if not present

hcNodeAttrRemove

Delete an element attribute.

void hcNodeAttrRemove(hc_node_t *node, const char *name);

Parameters

node Element node
name Attribute name

hcNodeAttrSetNameValue

Add an element attribute.

void hcNodeAttrSetNameValue(hc_node_t *node, const char *name, const char *value);

Parameters

node Element node
name Attribute name
value Attribute value

hcNodeComputeCSSBox

Compute the box properties for the given HTML node.

int hcNodeComputeCSSBox(hc_node_t *node, hc_compute_t compute, hc_box_t *box);

Parameters

node HTML node
compute Pseudo-class, if any
box Box properties

Return Value

1 on success, 0 on failure

hcNodeComputeCSSContent

Compute the content: value for the given HTML node.

char *hcNodeComputeCSSContent(hc_node_t *node, hc_compute_t compute);

Parameters

node HTML node
compute Pseudo-class, if any

Return Value

Content string or NULL if none/error

Discussion

The returned string must be freed using free().

hcNodeComputeCSSDisplay

Compute the display property for the given HTML node.

hc_display_t hcNodeComputeCSSDisplay(hc_node_t *node, hc_compute_t compute);

Parameters

node HTML node
compute Pseudo-class, if any

Return Value

1 on success, 0 on failure

hcNodeComputeCSSMedia

Compute the media properties for the given HTML node.

int hcNodeComputeCSSMedia(hc_node_t *node, hc_compute_t compute, hc_media_t *media);

Parameters

node HTML node
compute Pseudo-class, if any
media Media properties

Return Value

1 on success, 0 on failure

hcNodeComputeCSSProperties

Compute the properties for the given node.

const hc_dict_t *hcNodeComputeCSSProperties(hc_node_t *node, hc_compute_t compute);

Parameters

node HTML node
compute Pseudo-class, if any

Return Value

Properties or NULL on error

Discussion

The dictionary is stored in the stylesheet cache and must not be deleted using the hcDictDelete function.

hcNodeComputeCSSTable

Compute the table properties for the given HTML node.

int hcNodeComputeCSSTable(hc_node_t *node, hc_compute_t compute, hc_table_t *table);

Parameters

node HTML node
compute Pseudo-class, if any
table Table properties

Return Value

1 on success, 0 on failure

hcNodeComputeCSSText

Compute the text properties for the given HTML node.

int hcNodeComputeCSSText(hc_node_t *node, hc_compute_t compute, hc_text_t *text);

Parameters

node HTML node
compute Pseudo-class, if any
text Text properties

Return Value

1 on success, 0 on failure

hcNodeDelete

Delete a HTML node from a document.

void hcNodeDelete(hc_html_t *html, hc_node_t *node);

Parameters

html HTML document
node HTML node

hcNodeGetComment

Get a HTML node's comment value, if any.

const char *hcNodeGetComment(hc_node_t *node);

Parameters

node HTML node

Return Value

Comment value

hcNodeGetElement

Get a HTML node's element/type.

hc_element_t hcNodeGetElement(hc_node_t *node);

Parameters

node HTML node

Return Value

Node element/type

hcNodeGetFirstChildNode

Get a HTML node's first child node, if any.

hc_node_t *hcNodeGetFirstChildNode(hc_node_t *node);

Parameters

node HTML node

Return Value

First child node or NULL if none

hcNodeGetLastChildNode

Get a HTML node's last child node, if any.

hc_node_t *hcNodeGetLastChildNode(hc_node_t *node);

Parameters

node HTML node

Return Value

Last child node or NULL if none

hcNodeGetNextSiblingNode

Get a HTML node's next sibling node, if any.

hc_node_t *hcNodeGetNextSiblingNode(hc_node_t *node);

Parameters

node HTML node

Return Value

Next sibling node or NULL if none

hcNodeGetParentNode

Get a HTML node's parent node, if any.

hc_node_t *hcNodeGetParentNode(hc_node_t *node);

Parameters

node HTML node

Return Value

Parent node or NULL if none

hcNodeGetPrevSiblingNode

Get a HTML node's previous sibling node, if any.

hc_node_t *hcNodeGetPrevSiblingNode(hc_node_t *node);

Parameters

node HTML node

Return Value

Previous sibling node or NULL if none

hcNodeGetString

Get a HTML node's string value, if any.

const char *hcNodeGetString(hc_node_t *node);

Parameters

node HTML node

Return Value

String value

hcNodeNewComment

Create a new HTML comment node.

hc_node_t *hcNodeNewComment(hc_node_t *parent, const char *c);

Parameters

parent Parent node
c Comment value

Return Value

New HTML comment node

hcNodeNewElement

Create a new HTML element node.

hc_node_t *hcNodeNewElement(hc_node_t *parent, hc_element_t element);

Parameters

parent Parent node
element HTML element

Return Value

New HTML element node

hcNodeNewString

Create a new HTML string node.

hc_node_t *hcNodeNewString(hc_node_t *parent, const char *s);

Parameters

parent Parent node
s String value

Return Value

New HTML string node

hcPoolDelete

Free the memory used by a pool.

void hcPoolDelete(hc_pool_t *pool);

Parameters

pool Memory pool

hcPoolGetLastError

Return the last error message recorded.

const char *hcPoolGetLastError(hc_pool_t *pool);

Parameters

pool Memory pool

Return Value

Last error message or NULL

hcPoolGetString

Find or copy a string.

const char *hcPoolGetString(hc_pool_t *pool, const char *s);

Parameters

pool Memory pool
s String to find/copy

Return Value

New string pointer

Discussion

This function finds or makes a copy of the passed string that will be freed when the corresponding memory pool is deleted. Since the memory pool only maintains a single copy of any string, copied strings are immutable.

hcPoolGetURL

Get a file corresponding to a URL.

const char *hcPoolGetURL(hc_pool_t *pool, const char *url, const char *baseurl);

Parameters

pool Memory pool
url URL
baseurl Base URL, if any

Return Value

Filename or NULL on error

hcPoolNew

Create a new memory pool.

hc_pool_t *hcPoolNew(void);

Return Value

New memory pool

hcPoolSetErrorCallback

Set the error reporting callback.

void hcPoolSetErrorCallback(hc_pool_t *pool, hc_error_cb_t cb, void *ctx);

Parameters

pool Memory pool
cb Error callback or NULL for the default
ctx Context pointer for callback

Discussion

The default error callback writes the message to stderr.

The error callback returns 1 to continue processing or 0 to stop immediately.

hcPoolSetURLCallback

Set the URL callback.

void hcPoolSetURLCallback(hc_pool_t *pool, hc_url_cb_t cb, void *ctx);

Parameters

pool Memory pool
cb URL callback or NULL for the default
ctx Context pointer for callback

Discussion

The default URL callback supports local files (only).

The URL callback returns a local pathname (copied to the specified buffer) or NULL if the URL cannot be loaded/found.

hcSHA3Final

Finalize the SHA3-256 hash, putting the result in "hash".

void hcSHA3Final(hc_sha3_t *ctx, unsigned char *hash, size_t hashlen);

Parameters

ctx Hash context
hash Hash buffer
hashlen Bytes to copy from hash

hcSHA3Init

Initialize a SHA3-256 hashing context.

void hcSHA3Init(hc_sha3_t *ctx);

Parameters

ctx Hash context

hcSHA3Update

Update the SHA3-256 hashing context with the given data.

void hcSHA3Update(hc_sha3_t *ctx, const void *data, size_t datalen);

Parameters

ctx Hash context
data Data to hash
datalen Number of bytes of data

Data Types

hc_background_attachment_t

Types...

typedef enum hc_background_attachment_t;

hc_border_props_t

CSS border properties

typedef struct hc_border_props_s hc_border_props_t;

hc_border_radius_t

CSS border-xxx-radius properties

typedef struct hc_border_radius_s hc_border_radius_t;

hc_border_t

All CSS border properties

typedef struct hc_border_s hc_border_t;

hc_box_shadow_t

Box shadow values

typedef struct hc_box_shadow_s hc_box_shadow_t;

hc_box_t

CSS box properties

typedef struct hc_box_s hc_box_t;

hc_color_t

sRGBA color

typedef struct hc_color_s hc_color_t;

hc_compute_t

What to compute

typedef enum hc_compute_t;

hc_css_t

CSS data

typedef struct _hc_css_s hc_css_t;

hc_dict_t

Key/value string dictionary

typedef struct _hc_dict_s hc_dict_t;

hc_html_t

HTML document

typedef struct _hc_html_s hc_html_t;

hc_image_t

Image object

typedef struct _hc_image_s hc_image_t;

hc_node_t

HTML element enum

typedef typedef struct _hc_node_s hc_node_t;

hc_file_t

High-level file/stream

typedef struct _hc_file_s hc_file_t;

hc_font_stretch_t

Font stretch

typedef enum hc_font_stretch_t;

hc_font_style_t

Font style

typedef enum hc_font_style_t;

hc_font_variant_t

Font variant

typedef enum hc_font_variant_t;

hc_font_t

Font weight

typedef typedef struct _hc_font_s hc_font_t;

hc_media_t

CSS media properties

typedef struct hc_media_s hc_media_t;

hc_point_t

Point/coordinate

typedef struct hc_point_s hc_point_t;

hc_pool_t

Memory allocation pool

typedef struct _hc_pool_s hc_pool_t;

hc_rect_t

Rectangle

typedef struct hc_rect_s hc_rect_t;

hc_sha3_t

SHA3 hashing context

typedef struct hc_sha3_s hc_sha3_t;

hc_size_t

Point/coordinate

typedef struct hc_size_s hc_size_t;

hc_table_t

CSS table properties

typedef struct hc_table_s hc_table_t;

hc_text_t

CSS text properties

typedef struct hc_text_s hc_text_t;

hc_url_cb_t

Functions...

typedef char *(*hc_url_cb_t)(void *ctx, const char *url, char *buffer, size_t bufsize);

Structures

hc_border_props_s

CSS border properties

struct hc_border_props_s {
    hc_color_t color;
    hc_border_style_t style;
    float width;
};

Members

color Border color
style Border style
width Border width

hc_border_radius_s

CSS border-xxx-radius properties

struct hc_border_radius_s {
    hc_size_t bottom_left;
    hc_size_t bottom_right;
    hc_size_t top_left;
    hc_size_t top_right;
};

Members

bottom_left Bottom-left border radius
bottom_right Bottom-right border radius
top_left Top-left border radius
top_right Top-right border radius

hc_border_s

All CSS border properties

struct hc_border_s {
    hc_border_props_t bottom;
    hc_border_props_t left;
    hc_border_props_t right;
    hc_border_props_t top;
};

Members

bottom
left
right
top

hc_box_s

CSS box properties

struct hc_box_s {
    hc_background_attachment_t background_attachment;
    hc_background_box_t background_clip;
    hc_color_t background_color;
    const char *background_image;
    hc_background_box_t background_origin;
    hc_point_t background_position;
    hc_background_repeat_t background_repeat;
    hc_size_t background_size;
    hc_border_t border;
    const char *border_image;
    hc_bool_t border_image_fill;
    hc_rect_t border_image_outset;
    hc_border_image_repeat_t border_image_repeat[2];
    hc_rect_t border_image_slice;
    hc_rect_t border_image_width;
    hc_border_radius_t border_radius;
    hc_size_t border_spacing;
    hc_rect_t bounds;
    hc_box_shadow_t box_shadow;
    hc_break_t break_after;
    hc_break_t break_before;
    hc_break_t break_inside;
    hc_rect_t clip;
    hc_float_t float_value;
    const char *list_style_image;
    hc_list_style_position_t list_style_position;
    hc_list_style_type_t list_style_type;
    hc_rect_t margin;
    hc_size_t max_size;
    hc_size_t min_size;
    int orphans;
    hc_overflow_t overflow;
    hc_rect_t padding;
    hc_size_t size;
    int widows;
    int z_index;
};

Members

background_attachment
background_clip
background_color
background_image
background_origin
background_position
background_repeat
background_size
border
border_image
border_image_fill
border_image_outset
border_image_repeat[2]
border_image_slice
border_image_width
border_radius
border_spacing
bounds Computed bounds
box_shadow
break_after
break_before
break_inside
clip Clip bounds
float_value
list_style_image
list_style_position
list_style_type
margin
max_size
min_size
orphans
overflow
padding
size Computed size
widows
z_index

hc_box_shadow_s

Box shadow values

struct hc_box_shadow_s {
    float blur_radius;
    hc_color_t color;
    float horizontal_offset;
    hc_bool_t inset;
    float spread_distance;
    float vertical_offset;
};

Members

blur_radius
color
horizontal_offset
inset
spread_distance
vertical_offset

hc_color_s

sRGBA color

struct hc_color_s {
    float alpha;
    float blue;
    float green;
    float red;
};

Members

alpha Alpha, 0.0 (transparent) to 1.0 (opaque)
blue Blue, 0.0 to 1.0
green Green, 0.0 to 1.0
red Red, 0.0 to 1.0

hc_media_s

CSS media properties

struct hc_media_s {
    int color_bits;
    hc_rect_t margin;
    int monochrome_bits;
    hc_size_t size;
    const char *type;
};

Members

color_bits Color bits
margin Margins
monochrome_bits Grayscale bits
size Dimensions
type "print", "screen", etc.

hc_point_s

Point/coordinate

struct hc_point_s {
    float left;
    float top;
};

Members

left Horizontal position
top Vertical position

hc_rect_s

Rectangle

struct hc_rect_s {
    float bottom;
    float left;
    float right;
    float top;
};

Members

bottom Bottom offset
left Left offset
right Right offset
top Top offset

hc_sha3_s

SHA3 hashing context

struct hc_sha3_s {
    unsigned char used, block, state[200];
};

Members

state[200] SHA3 state

hc_size_s

Point/coordinate

struct hc_size_s {
    float height;
    float width;
};

Members

height Height
width Width

hc_table_s

CSS table properties

struct hc_table_s {
    hc_border_collapse_t border_collapse;
    hc_caption_side_t caption_side;
    hc_empty_cells_t empty_cells;
    hc_table_layout_t table_layout;
};

Members

border_collapse
caption_side
empty_cells
table_layout

hc_text_s

CSS text properties

struct hc_text_s {
    hc_color_t color;
    hc_direction_t direction;
    hc_font_t *font;
    const char *font_family;
    float font_size;
    float font_size_adjust;
    hc_font_stretch_t font_stretch;
    hc_font_style_t font_style;
    hc_font_variant_t font_variant;
    hc_font_weight_t font_weight;
    float letter_spacing;
    float line_height;
    const char *quotes[4];
    hc_text_align_t text_align;
    hc_text_decoration_t text_decoration;
    float text_indent;
    hc_text_transform_t text_transform;
    hc_unicode_bidi_t unicode_bidi;
    hc_white_space_t white_space;
    float word_spacing;
};

Members

color
direction
font Loaded font
font_family
font_size
font_size_adjust
font_stretch
font_style
font_variant
font_weight
letter_spacing
line_height
quotes[4]
text_align
text_decoration
text_indent
text_transform
unicode_bidi
white_space
word_spacing

Variables

hcElements[HC_ELEMENT_MAX]

Functions...

extern const char *const hcElements[HC_ELEMENT_MAX];