libunibreak 6.1

Loading...
Searching...
No Matches
eastasianwidthdef.h
Go to the documentation of this file.
1/*
2 * Definitions of internal data types for Indic Conjunct Break.
3 *
4 * Copyright (C) 2024 Wu Yongwei <wuyongwei at gmail dot com>
5 *
6 * This software is provided 'as-is', without any express or implied
7 * warranty. In no event will the author be held liable for any damages
8 * arising from the use of this software.
9 *
10 * Permission is granted to anyone to use this software for any purpose,
11 * including commercial applications, and to alter it and redistribute
12 * it freely, subject to the following restrictions:
13 *
14 * 1. The origin of this software must not be misrepresented; you must
15 * not claim that you wrote the original software. If you use this
16 * software in a product, an acknowledgement in the product
17 * documentation would be appreciated but is not required.
18 * 2. Altered source versions must be plainly marked as such, and must
19 * not be misrepresented as being the original software.
20 * 3. This notice may not be removed or altered from any source
21 * distribution.
22 */
23
24#ifndef EASTASIANWIDTHDEF_H
25#define EASTASIANWIDTHDEF_H
26
27#include "unibreakdef.h"
28
33 enum EastAsianWidthClass
34{
35 EAW_A,
36 EAW_F,
37 EAW_H,
38 EAW_Na,
39 EAW_W,
40 EAW_N,
41};
42
47 struct EastAsianWidthProperties
48{
49 utf32_t start;
50 utf32_t end;
51 enum EastAsianWidthClass prop;
52};
53
54 enum EastAsianWidthClass ub_get_char_eaw_class(utf32_t ch);
55
56#endif /* EASTASIANWIDTHDEF_H */
EastAsianWidthClass
EastAsianWidthClass
East Asian Width (ea) class.
Definition eastasianwidthdef.h:34
EAW_W
@ EAW_W
Wide.
Definition eastasianwidthdef.h:39
EAW_A
@ EAW_A
Ambiguous.
Definition eastasianwidthdef.h:35
EAW_Na
@ EAW_Na
Narrow.
Definition eastasianwidthdef.h:38
EAW_H
@ EAW_H
Halfwidth.
Definition eastasianwidthdef.h:37
EAW_N
@ EAW_N
Neutral.
Definition eastasianwidthdef.h:40
EAW_F
@ EAW_F
Fullwidth.
Definition eastasianwidthdef.h:36
ub_get_char_eaw_class
enum EastAsianWidthClass ub_get_char_eaw_class(utf32_t ch)
Gets the East Asian Width class of a character.
Definition eastasianwidthdef.c:34
EastAsianWidthProperties
Struct for entries of East Asian Width properties.
Definition eastasianwidthdef.h:48
EastAsianWidthProperties::end
utf32_t end
End codepoint, inclusive.
Definition eastasianwidthdef.h:50
EastAsianWidthProperties::start
utf32_t start
Start codepoint.
Definition eastasianwidthdef.h:49
EastAsianWidthProperties::prop
enum EastAsianWidthClass prop
The East Asian Width property.
Definition eastasianwidthdef.h:51
utf32_t
unsigned int utf32_t
Type for UTF-32 data points.
Definition unibreakbase.h:49
unibreakdef.h
Header file for private definitions in the libunibreak library.