Skip to content

LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.

1.7 KB
Raw Blame
/* unicode.h — Unicode character properties (tables in unidata.h, generated by
 * tools/gen-unicode.mjs). */
#ifndef LORD_UNICODE_H
#define LORD_UNICODE_H

#include <stdint.h>

#include "unidata.h"

int uc_bidi(uint32_t cp);                       /* BIDI_* */
uint32_t uc_mirror(uint32_t cp);                /* mirrored glyph (BidiMirroring), 0 if none */
uint32_t uc_bracket(uint32_t cp, int *open);    /* bracket pair, 0 if not a bracket */
int uc_join(uint32_t cp);                       /* JOIN_* (Arabic, Syriac…) */
int uc_script(uint32_t cp);                     /* SCRIPT_* (index into uc_script_tag) */
const char *uc_script_tag(int script);          /* OpenType tag: "arab", "latn"… */
const char *uc_script_name(int script);         /* "Arabic", "Old Italic"… */
int uc_linebreak(uint32_t cp);                  /* LB_* (only what matters for CJK) */
int uc_ccc(uint32_t cp);                        /* canonical combining class (0 = base) */
int uc_ignorable(uint32_t cp);                  /* default ignorable (ZWJ, LRM, VS…) */
int uc_indic_cat(uint32_t cp);                  /* IC_* (Indic scripts, like HarfBuzz) */
int uc_indic_pos(uint32_t cp);                  /* IP_* */
int uc_mark(uint32_t cp);                       /* general category Mn, Mc or Me */
int uc_sea_cat(uint32_t cp);                    /* SEA_* (Khmer and Myanmar, like HarfBuzz) */
int uc_use_cat(uint32_t cp);                    /* USE_* (Universal Shaping Engine) */
/* Two-part canonical decomposition (complex scripts): 1 if it has one; excluded = not
 * recomposed. */
int uc_decompose(uint32_t cp, uint32_t *a, uint32_t *b, int *excluded);
uint32_t uc_compose(uint32_t a, uint32_t b);    /* 0 if none or excluded */

#endif