---
name: "thrend.h"
section: "3"
platform: "linux"
package: "libthai-dev"
version: "0.1.6-1+etch1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/thrend.h"
---

# thrend.h(3)

## NAME

thai/thrend.h -

## Detailed Description

Thai string rendering.

## SYNOPSIS

### Defines

\#define **TH\_BLANK\_BASE\_GLYPH**   0xdd\
 *Blank base glyph, for floating upper/lower vowel.*

### Typedefs

typedef unsigned char **thglyph\_t**\
 *Glyph code type.*

### Functions

int **th\_render\_cell\_tis** (struct **thcell\_t** cell, **thglyph\_t** res\[\], size\_t res\_sz, int is\_decomp\_am)\
 *Render the given cell using TIS-620 glyph set.*  int **th\_render\_cell\_win** (struct **thcell\_t** cell, **thglyph\_t** res\[\], size\_t res\_sz, int is\_decomp\_am)\
 *Render the given cell using Thai Windows glyph set.*  int **th\_render\_cell\_mac** (struct **thcell\_t** cell, **thglyph\_t** res\[\], size\_t res\_sz, int is\_decomp\_am)\
 *Render the given cell using Mac Thai glyph set.*  int **th\_render\_text\_tis** (const **thchar\_t** \*s, **thglyph\_t** res\[\], size\_t res\_sz, int is\_decomp\_am)\
 *Render the given text using TIS-620 glyph set.*  int **th\_render\_text\_win** (const **thchar\_t** \*s, **thglyph\_t** res\[\], size\_t res\_sz, int is\_decomp\_am)\
 *Render the given text using Thai Windows glyph set.*  int **th\_render\_text\_mac** (const **thchar\_t** \*s, **thglyph\_t** res\[\], size\_t res\_sz, int is\_decomp\_am)\
 *Render the given text using Mac Thai glyph set.*

## Function Documentation

### int th\_render\_cell\_mac (struct thcell\_t cell, thglyph\_t res\[\], size\_t res\_sz, int is\_decomp\_am)

Render the given cell using Mac Thai glyph set.

**Parameters:**

*cell* : the cell to render \
 *res* : the buffer for storing output glyph string \
 *res\_sz* : the size of *res* buffer \
 *is\_decomp\_am* : whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells

**Returns:**

total number of glyphs written to *res*\[\]

Calculates glyphs from Mac Thai glyph set for the given *cell*, and store the glyph string in *res*, terminated with '\\0'. If resulting glyphs are longer than the provided buffer, only the first *res\_sz* glyphs are stored.

### int th\_render\_cell\_tis (struct thcell\_t cell, thglyph\_t res\[\], size\_t res\_sz, int is\_decomp\_am)

Render the given cell using TIS-620 glyph set.

**Parameters:**

*cell* : the cell to render \
 *res* : the buffer for storing output glyph string \
 *res\_sz* : the size of *res* buffer \
 *is\_decomp\_am* : whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells

**Returns:**

total number of glyphs written to *res*\[\]

Calculates glyphs from TIS-620 glyph set for the given *cell*, and store the glyph string in *res*, terminated with '\\0'. If resulting glyphs are longer than the provided buffer, only the first *res\_sz* glyphs are stored.

### int th\_render\_cell\_win (struct thcell\_t cell, thglyph\_t res\[\], size\_t res\_sz, int is\_decomp\_am)

Render the given cell using Thai Windows glyph set.

**Parameters:**

*cell* : the cell to render \
 *res* : the buffer for storing output glyph string \
 *res\_sz* : the size of *res* buffer \
 *is\_decomp\_am* : whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells

**Returns:**

total number of glyphs written to *res*\[\]

Calculates glyphs from Thai Windows glyph set for the given *cell*, and store the glyph string in *res*, terminated with '\\0'. If resulting glyphs are longer than the provided buffer, only the first *res\_sz* glyphs are stored.

### int th\_render\_text\_mac (const thchar\_t \* s, thglyph\_t res\[\], size\_t res\_sz, int is\_decomp\_am)

Render the given text using Mac Thai glyph set.

**Parameters:**

*s* : the string to render \
 *res* : the buffer for storing output glyph string \
 *res\_sz* : the size of *res* buffer \
 *is\_decomp\_am* : whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells

**Returns:**

total number of glyphs written to *res*\[\]

Calculates glyphs from Mac Thai glyph set for the given string *s*, and store the glyph string in *res*, terminated with '\\0'. If resulting glyphs are longer than the provided buffer, only the first *res\_sz* glyphs are stored.

### int th\_render\_text\_tis (const thchar\_t \* s, thglyph\_t res\[\], size\_t res\_sz, int is\_decomp\_am)

Render the given text using TIS-620 glyph set.

**Parameters:**

*s* : the string to render \
 *res* : the buffer for storing output glyph string \
 *res\_sz* : the size of *res* buffer \
 *is\_decomp\_am* : whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells

**Returns:**

total number of glyphs written to *res*\[\]

Calculates glyphs from TIS-620 glyph set for the given string *s*, and store the glyph string in *res*, terminated with '\\0'. If resulting glyphs are longer than the provided buffer, only the first *res\_sz* glyphs are stored.

### int th\_render\_text\_win (const thchar\_t \* s, thglyph\_t res\[\], size\_t res\_sz, int is\_decomp\_am)

Render the given text using Thai Windows glyph set.

**Parameters:**

*s* : the string to render \
 *res* : the buffer for storing output glyph string \
 *res\_sz* : the size of *res* buffer \
 *is\_decomp\_am* : whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells

**Returns:**

total number of glyphs written to *res*\[\]

Calculates glyphs from Thai Windows glyph set for the given string *s*, and store the glyph string in *res*, terminated with '\\0'. If resulting glyphs are longer than the provided buffer, only the first *res\_sz* glyphs are stored.

## Author

Generated automatically by Doxygen for libthai from the source code.
