jassub 1.7.13 → 1.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/dist/js/jassub-worker-modern.js +0 -128
- package/dist/js/jassub-worker-modern.wasm +0 -0
- package/dist/js/jassub-worker.js +0 -128
- package/dist/js/jassub-worker.wasm +0 -0
- package/dist/js/jassub-worker.wasm.js +0 -84
- package/dist/js/jassub.js +0 -832
- package/dist/libraries/bin/brotli.js +0 -1
- package/dist/libraries/include/ass/ass.h +0 -812
- package/dist/libraries/include/ass/ass_types.h +0 -292
- package/dist/libraries/include/brotli/decode.h +0 -344
- package/dist/libraries/include/brotli/encode.h +0 -448
- package/dist/libraries/include/brotli/port.h +0 -288
- package/dist/libraries/include/brotli/types.h +0 -83
- package/dist/libraries/include/expat.h +0 -1064
- package/dist/libraries/include/expat_config.h +0 -115
- package/dist/libraries/include/expat_external.h +0 -165
- package/dist/libraries/include/fontconfig/fcfreetype.h +0 -59
- package/dist/libraries/include/fontconfig/fcprivate.h +0 -134
- package/dist/libraries/include/fontconfig/fontconfig.h +0 -1154
- package/dist/libraries/include/freetype2/freetype/config/ftconfig.h +0 -63
- package/dist/libraries/include/freetype2/freetype/config/ftheader.h +0 -824
- package/dist/libraries/include/freetype2/freetype/config/ftmodule.h +0 -20
- package/dist/libraries/include/freetype2/freetype/config/ftoption.h +0 -1011
- package/dist/libraries/include/freetype2/freetype/config/ftstdlib.h +0 -175
- package/dist/libraries/include/freetype2/freetype/config/integer-types.h +0 -245
- package/dist/libraries/include/freetype2/freetype/config/mac-support.h +0 -49
- package/dist/libraries/include/freetype2/freetype/config/public-macros.h +0 -120
- package/dist/libraries/include/freetype2/freetype/freetype.h +0 -4833
- package/dist/libraries/include/freetype2/freetype/ftadvanc.h +0 -188
- package/dist/libraries/include/freetype2/freetype/ftbbox.h +0 -101
- package/dist/libraries/include/freetype2/freetype/ftbdf.h +0 -212
- package/dist/libraries/include/freetype2/freetype/ftbitmap.h +0 -329
- package/dist/libraries/include/freetype2/freetype/ftbzip2.h +0 -102
- package/dist/libraries/include/freetype2/freetype/ftcache.h +0 -1087
- package/dist/libraries/include/freetype2/freetype/ftchapters.h +0 -147
- package/dist/libraries/include/freetype2/freetype/ftcid.h +0 -167
- package/dist/libraries/include/freetype2/freetype/ftcolor.h +0 -1609
- package/dist/libraries/include/freetype2/freetype/ftdriver.h +0 -1193
- package/dist/libraries/include/freetype2/freetype/fterrdef.h +0 -279
- package/dist/libraries/include/freetype2/freetype/fterrors.h +0 -296
- package/dist/libraries/include/freetype2/freetype/ftfntfmt.h +0 -93
- package/dist/libraries/include/freetype2/freetype/ftgasp.h +0 -143
- package/dist/libraries/include/freetype2/freetype/ftglyph.h +0 -664
- package/dist/libraries/include/freetype2/freetype/ftgxval.h +0 -354
- package/dist/libraries/include/freetype2/freetype/ftgzip.h +0 -151
- package/dist/libraries/include/freetype2/freetype/ftimage.h +0 -1276
- package/dist/libraries/include/freetype2/freetype/ftincrem.h +0 -348
- package/dist/libraries/include/freetype2/freetype/ftlcdfil.h +0 -323
- package/dist/libraries/include/freetype2/freetype/ftlist.h +0 -296
- package/dist/libraries/include/freetype2/freetype/ftlogging.h +0 -184
- package/dist/libraries/include/freetype2/freetype/ftlzw.h +0 -100
- package/dist/libraries/include/freetype2/freetype/ftmac.h +0 -289
- package/dist/libraries/include/freetype2/freetype/ftmm.h +0 -752
- package/dist/libraries/include/freetype2/freetype/ftmodapi.h +0 -806
- package/dist/libraries/include/freetype2/freetype/ftmoderr.h +0 -204
- package/dist/libraries/include/freetype2/freetype/ftotval.h +0 -206
- package/dist/libraries/include/freetype2/freetype/ftoutln.h +0 -586
- package/dist/libraries/include/freetype2/freetype/ftparams.h +0 -203
- package/dist/libraries/include/freetype2/freetype/ftpfr.h +0 -179
- package/dist/libraries/include/freetype2/freetype/ftrender.h +0 -244
- package/dist/libraries/include/freetype2/freetype/ftsizes.h +0 -159
- package/dist/libraries/include/freetype2/freetype/ftsnames.h +0 -272
- package/dist/libraries/include/freetype2/freetype/ftstroke.h +0 -773
- package/dist/libraries/include/freetype2/freetype/ftsynth.h +0 -83
- package/dist/libraries/include/freetype2/freetype/ftsystem.h +0 -352
- package/dist/libraries/include/freetype2/freetype/fttrigon.h +0 -350
- package/dist/libraries/include/freetype2/freetype/fttypes.h +0 -615
- package/dist/libraries/include/freetype2/freetype/ftwinfnt.h +0 -276
- package/dist/libraries/include/freetype2/freetype/t1tables.h +0 -773
- package/dist/libraries/include/freetype2/freetype/ttnameid.h +0 -1235
- package/dist/libraries/include/freetype2/freetype/tttables.h +0 -855
- package/dist/libraries/include/freetype2/freetype/tttags.h +0 -123
- package/dist/libraries/include/freetype2/ft2build.h +0 -42
- package/dist/libraries/include/fribidi/fribidi-arabic.h +0 -81
- package/dist/libraries/include/fribidi/fribidi-begindecls.h +0 -3
- package/dist/libraries/include/fribidi/fribidi-bidi-types-list.h +0 -96
- package/dist/libraries/include/fribidi/fribidi-bidi-types.h +0 -405
- package/dist/libraries/include/fribidi/fribidi-bidi.h +0 -142
- package/dist/libraries/include/fribidi/fribidi-brackets.h +0 -89
- package/dist/libraries/include/fribidi/fribidi-char-sets-list.h +0 -54
- package/dist/libraries/include/fribidi/fribidi-char-sets.h +0 -106
- package/dist/libraries/include/fribidi/fribidi-common.h +0 -158
- package/dist/libraries/include/fribidi/fribidi-config.h +0 -23
- package/dist/libraries/include/fribidi/fribidi-deprecated.h +0 -175
- package/dist/libraries/include/fribidi/fribidi-enddecls.h +0 -3
- package/dist/libraries/include/fribidi/fribidi-flags.h +0 -72
- package/dist/libraries/include/fribidi/fribidi-joining-types-list.h +0 -44
- package/dist/libraries/include/fribidi/fribidi-joining-types.h +0 -249
- package/dist/libraries/include/fribidi/fribidi-joining.h +0 -74
- package/dist/libraries/include/fribidi/fribidi-mirroring.h +0 -86
- package/dist/libraries/include/fribidi/fribidi-shape.h +0 -71
- package/dist/libraries/include/fribidi/fribidi-types.h +0 -79
- package/dist/libraries/include/fribidi/fribidi-unicode-version.h +0 -10
- package/dist/libraries/include/fribidi/fribidi-unicode.h +0 -105
- package/dist/libraries/include/fribidi/fribidi.h +0 -129
- package/dist/libraries/include/harfbuzz/hb-aat-layout.h +0 -795
- package/dist/libraries/include/harfbuzz/hb-aat.h +0 -38
- package/dist/libraries/include/harfbuzz/hb-blob.h +0 -160
- package/dist/libraries/include/harfbuzz/hb-buffer.h +0 -799
- package/dist/libraries/include/harfbuzz/hb-common.h +0 -902
- package/dist/libraries/include/harfbuzz/hb-cplusplus.hh +0 -221
- package/dist/libraries/include/harfbuzz/hb-deprecated.h +0 -251
- package/dist/libraries/include/harfbuzz/hb-draw.h +0 -325
- package/dist/libraries/include/harfbuzz/hb-face.h +0 -181
- package/dist/libraries/include/harfbuzz/hb-font.h +0 -1108
- package/dist/libraries/include/harfbuzz/hb-ft.h +0 -145
- package/dist/libraries/include/harfbuzz/hb-map.h +0 -124
- package/dist/libraries/include/harfbuzz/hb-ot-color.h +0 -146
- package/dist/libraries/include/harfbuzz/hb-ot-deprecated.h +0 -141
- package/dist/libraries/include/harfbuzz/hb-ot-font.h +0 -45
- package/dist/libraries/include/harfbuzz/hb-ot-layout.h +0 -503
- package/dist/libraries/include/harfbuzz/hb-ot-math.h +0 -333
- package/dist/libraries/include/harfbuzz/hb-ot-meta.h +0 -72
- package/dist/libraries/include/harfbuzz/hb-ot-metrics.h +0 -129
- package/dist/libraries/include/harfbuzz/hb-ot-name.h +0 -158
- package/dist/libraries/include/harfbuzz/hb-ot-shape.h +0 -53
- package/dist/libraries/include/harfbuzz/hb-ot-var.h +0 -191
- package/dist/libraries/include/harfbuzz/hb-ot.h +0 -49
- package/dist/libraries/include/harfbuzz/hb-set.h +0 -200
- package/dist/libraries/include/harfbuzz/hb-shape-plan.h +0 -122
- package/dist/libraries/include/harfbuzz/hb-shape.h +0 -62
- package/dist/libraries/include/harfbuzz/hb-style.h +0 -81
- package/dist/libraries/include/harfbuzz/hb-subset-repacker.h +0 -81
- package/dist/libraries/include/harfbuzz/hb-subset.h +0 -234
- package/dist/libraries/include/harfbuzz/hb-unicode.h +0 -643
- package/dist/libraries/include/harfbuzz/hb-version.h +0 -95
- package/dist/libraries/include/harfbuzz/hb.h +0 -50
- package/dist/libraries/lib/cmake/expat-2.4.7/expat-config-version.cmake +0 -70
- package/dist/libraries/lib/cmake/expat-2.4.7/expat-config.cmake +0 -99
- package/dist/libraries/lib/cmake/expat-2.4.7/expat-noconfig.cmake +0 -19
- package/dist/libraries/lib/cmake/expat-2.4.7/expat.cmake +0 -99
- package/dist/libraries/lib/libass.a +0 -0
- package/dist/libraries/lib/libass.la +0 -41
- package/dist/libraries/lib/libbrotlicommon.a +0 -0
- package/dist/libraries/lib/libbrotlidec.a +0 -0
- package/dist/libraries/lib/libbrotlienc.a +0 -0
- package/dist/libraries/lib/libexpat.a +0 -0
- package/dist/libraries/lib/libfontconfig.a +0 -0
- package/dist/libraries/lib/libfontconfig.la +0 -41
- package/dist/libraries/lib/libfreetype.a +0 -0
- package/dist/libraries/lib/libfreetype.la +0 -41
- package/dist/libraries/lib/libfribidi.a +0 -0
- package/dist/libraries/lib/libfribidi.la +0 -41
- package/dist/libraries/lib/libharfbuzz-subset.a +0 -0
- package/dist/libraries/lib/libharfbuzz-subset.la +0 -41
- package/dist/libraries/lib/libharfbuzz.a +0 -0
- package/dist/libraries/lib/libharfbuzz.la +0 -41
- package/dist/libraries/lib/pkgconfig/expat.pc +0 -11
- package/dist/libraries/lib/pkgconfig/fontconfig.pc +0 -18
- package/dist/libraries/lib/pkgconfig/freetype2.pc +0 -14
- package/dist/libraries/lib/pkgconfig/fribidi.pc +0 -13
- package/dist/libraries/lib/pkgconfig/harfbuzz-subset.pc +0 -12
- package/dist/libraries/lib/pkgconfig/harfbuzz.pc +0 -13
- package/dist/libraries/lib/pkgconfig/libass.pc +0 -13
- package/dist/libraries/lib/pkgconfig/libbrotlicommon.pc +0 -11
- package/dist/libraries/lib/pkgconfig/libbrotlidec.pc +0 -12
- package/dist/libraries/lib/pkgconfig/libbrotlienc.pc +0 -12
- package/dist/libraries/share/aclocal/freetype2.m4 +0 -194
- package/dist/libraries/share/doc/expat/AUTHORS +0 -10
- package/dist/libraries/share/doc/expat/changelog +0 -1161
- package/dist/license/all +0 -951
- package/dist/license/all.tmp +0 -307
- package/dist/license/brotli +0 -12
- package/dist/license/expat +0 -71
- package/dist/license/fontconfig +0 -46
- package/dist/license/freetype +0 -92
- package/dist/license/fribidi +0 -15
- package/dist/license/harfbuzz +0 -32
- package/dist/license/jassub +0 -0
- package/dist/license/libass +0 -28
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
/* FriBidi
|
|
2
|
-
* fribidi-bidi-types.h - character bidi types
|
|
3
|
-
*
|
|
4
|
-
* Author:
|
|
5
|
-
* Behdad Esfahbod, 2001, 2002, 2004
|
|
6
|
-
*
|
|
7
|
-
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
|
8
|
-
* Copyright (C) 2001,2002 Behdad Esfahbod
|
|
9
|
-
*
|
|
10
|
-
* This library is free software; you can redistribute it and/or
|
|
11
|
-
* modify it under the terms of the GNU Lesser General Public
|
|
12
|
-
* License as published by the Free Software Foundation; either
|
|
13
|
-
* version 2.1 of the License, or (at your option) any later version.
|
|
14
|
-
*
|
|
15
|
-
* This library is distributed in the hope that it will be useful,
|
|
16
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
18
|
-
* Lesser General Public License for more details.
|
|
19
|
-
*
|
|
20
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
21
|
-
* along with this library, in a file named COPYING; if not, write to the
|
|
22
|
-
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
23
|
-
* Boston, MA 02110-1301, USA
|
|
24
|
-
*
|
|
25
|
-
* For licensing issues, contact <fribidi.license@gmail.com>.
|
|
26
|
-
*/
|
|
27
|
-
#ifndef _FRIBIDI_BIDI_TYPES_H
|
|
28
|
-
#define _FRIBIDI_BIDI_TYPES_H
|
|
29
|
-
|
|
30
|
-
#include "fribidi-common.h"
|
|
31
|
-
|
|
32
|
-
#include "fribidi-types.h"
|
|
33
|
-
|
|
34
|
-
#include "fribidi-begindecls.h"
|
|
35
|
-
|
|
36
|
-
typedef signed char FriBidiLevel;
|
|
37
|
-
|
|
38
|
-
/*
|
|
39
|
-
* Define bit masks that bidi types are based on, each mask has
|
|
40
|
-
* only one bit set.
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/* RTL mask better be the least significant bit. */
|
|
44
|
-
#define FRIBIDI_MASK_RTL 0x00000001L /* Is right to left */
|
|
45
|
-
#define FRIBIDI_MASK_ARABIC 0x00000002L /* Is arabic */
|
|
46
|
-
|
|
47
|
-
/* Each char can be only one of the three following. */
|
|
48
|
-
#define FRIBIDI_MASK_STRONG 0x00000010L /* Is strong */
|
|
49
|
-
#define FRIBIDI_MASK_WEAK 0x00000020L /* Is weak */
|
|
50
|
-
#define FRIBIDI_MASK_NEUTRAL 0x00000040L /* Is neutral */
|
|
51
|
-
#define FRIBIDI_MASK_SENTINEL 0x00000080L /* Is sentinel */
|
|
52
|
-
/* Sentinels are not valid chars, just identify the start/end of strings. */
|
|
53
|
-
|
|
54
|
-
/* Each char can be only one of the six following. */
|
|
55
|
-
#define FRIBIDI_MASK_LETTER 0x00000100L /* Is letter: L, R, AL */
|
|
56
|
-
#define FRIBIDI_MASK_NUMBER 0x00000200L /* Is number: EN, AN */
|
|
57
|
-
#define FRIBIDI_MASK_NUMSEPTER 0x00000400L /* Is separator or terminator: ES, ET, CS */
|
|
58
|
-
#define FRIBIDI_MASK_SPACE 0x00000800L /* Is space: BN, BS, SS, WS */
|
|
59
|
-
#define FRIBIDI_MASK_EXPLICIT 0x00001000L /* Is explicit mark: LRE, RLE, LRO, RLO, PDF */
|
|
60
|
-
#define FRIBIDI_MASK_ISOLATE 0x00008000L /* Is isolate mark: LRI, RLI, FSI, PDI */
|
|
61
|
-
|
|
62
|
-
/* Can be set only if FRIBIDI_MASK_SPACE is also set. */
|
|
63
|
-
#define FRIBIDI_MASK_SEPARATOR 0x00002000L /* Is text separator: BS, SS */
|
|
64
|
-
/* Can be set only if FRIBIDI_MASK_EXPLICIT is also set. */
|
|
65
|
-
#define FRIBIDI_MASK_OVERRIDE 0x00004000L /* Is explicit override: LRO, RLO */
|
|
66
|
-
#define FRIBIDI_MASK_FIRST 0x02000000L /* Whether direction is determined by first strong */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/* The following exist to make types pairwise different, some of them can
|
|
70
|
-
* be removed but are here because of efficiency (make queries faster). */
|
|
71
|
-
|
|
72
|
-
#define FRIBIDI_MASK_ES 0x00010000L
|
|
73
|
-
#define FRIBIDI_MASK_ET 0x00020000L
|
|
74
|
-
#define FRIBIDI_MASK_CS 0x00040000L
|
|
75
|
-
|
|
76
|
-
#define FRIBIDI_MASK_NSM 0x00080000L
|
|
77
|
-
#define FRIBIDI_MASK_BN 0x00100000L
|
|
78
|
-
|
|
79
|
-
#define FRIBIDI_MASK_BS 0x00200000L
|
|
80
|
-
#define FRIBIDI_MASK_SS 0x00400000L
|
|
81
|
-
#define FRIBIDI_MASK_WS 0x00800000L
|
|
82
|
-
|
|
83
|
-
/* We reserve a single bit for user's private use: we will never use it. */
|
|
84
|
-
#define FRIBIDI_MASK_PRIVATE 0x01000000L
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/*
|
|
88
|
-
* Define values for FriBidiCharType
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
/* Strong types */
|
|
92
|
-
|
|
93
|
-
/* Left-To-Right letter */
|
|
94
|
-
#define FRIBIDI_TYPE_LTR_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER )
|
|
95
|
-
/* Right-To-Left letter */
|
|
96
|
-
#define FRIBIDI_TYPE_RTL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \
|
|
97
|
-
| FRIBIDI_MASK_RTL)
|
|
98
|
-
/* Arabic Letter */
|
|
99
|
-
#define FRIBIDI_TYPE_AL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \
|
|
100
|
-
| FRIBIDI_MASK_RTL | FRIBIDI_MASK_ARABIC )
|
|
101
|
-
/* Left-to-Right Embedding */
|
|
102
|
-
#define FRIBIDI_TYPE_LRE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT)
|
|
103
|
-
/* Right-to-Left Embedding */
|
|
104
|
-
#define FRIBIDI_TYPE_RLE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
|
|
105
|
-
| FRIBIDI_MASK_RTL )
|
|
106
|
-
/* Left-to-Right Override */
|
|
107
|
-
#define FRIBIDI_TYPE_LRO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
|
|
108
|
-
| FRIBIDI_MASK_OVERRIDE )
|
|
109
|
-
/* Right-to-Left Override */
|
|
110
|
-
#define FRIBIDI_TYPE_RLO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
|
|
111
|
-
| FRIBIDI_MASK_RTL | FRIBIDI_MASK_OVERRIDE )
|
|
112
|
-
|
|
113
|
-
/* Weak types */
|
|
114
|
-
|
|
115
|
-
/* Pop Directional Flag*/
|
|
116
|
-
#define FRIBIDI_TYPE_PDF_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_EXPLICIT )
|
|
117
|
-
/* European Numeral */
|
|
118
|
-
#define FRIBIDI_TYPE_EN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER )
|
|
119
|
-
/* Arabic Numeral */
|
|
120
|
-
#define FRIBIDI_TYPE_AN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER \
|
|
121
|
-
| FRIBIDI_MASK_ARABIC )
|
|
122
|
-
/* European number Separator */
|
|
123
|
-
#define FRIBIDI_TYPE_ES_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
|
|
124
|
-
| FRIBIDI_MASK_ES )
|
|
125
|
-
/* European number Terminator */
|
|
126
|
-
#define FRIBIDI_TYPE_ET_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
|
|
127
|
-
| FRIBIDI_MASK_ET )
|
|
128
|
-
/* Common Separator */
|
|
129
|
-
#define FRIBIDI_TYPE_CS_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
|
|
130
|
-
| FRIBIDI_MASK_CS )
|
|
131
|
-
/* Non Spacing Mark */
|
|
132
|
-
#define FRIBIDI_TYPE_NSM_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NSM )
|
|
133
|
-
/* Boundary Neutral */
|
|
134
|
-
#define FRIBIDI_TYPE_BN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_SPACE \
|
|
135
|
-
| FRIBIDI_MASK_BN )
|
|
136
|
-
|
|
137
|
-
/* Neutral types */
|
|
138
|
-
|
|
139
|
-
/* Block Separator */
|
|
140
|
-
#define FRIBIDI_TYPE_BS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
|
|
141
|
-
| FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_BS )
|
|
142
|
-
/* Segment Separator */
|
|
143
|
-
#define FRIBIDI_TYPE_SS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
|
|
144
|
-
| FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_SS )
|
|
145
|
-
/* WhiteSpace */
|
|
146
|
-
#define FRIBIDI_TYPE_WS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
|
|
147
|
-
| FRIBIDI_MASK_WS )
|
|
148
|
-
/* Other Neutral */
|
|
149
|
-
#define FRIBIDI_TYPE_ON_VAL ( FRIBIDI_MASK_NEUTRAL )
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
/* The following are used in specifying paragraph direction only. */
|
|
153
|
-
|
|
154
|
-
/* Weak Left-To-Right */
|
|
155
|
-
#define FRIBIDI_TYPE_WLTR_VAL ( FRIBIDI_MASK_WEAK )
|
|
156
|
-
/* Weak Right-To-Left */
|
|
157
|
-
#define FRIBIDI_TYPE_WRTL_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_RTL )
|
|
158
|
-
|
|
159
|
-
/* start or end of text (run list) SENTINEL. Only used internally */
|
|
160
|
-
#define FRIBIDI_TYPE_SENTINEL ( FRIBIDI_MASK_SENTINEL )
|
|
161
|
-
|
|
162
|
-
/* Private types for applications. More private types can be obtained by
|
|
163
|
-
* summing up from this one. */
|
|
164
|
-
#define FRIBIDI_TYPE_PRIVATE ( FRIBIDI_MASK_PRIVATE )
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
/* New types in Unicode 6.3 */
|
|
168
|
-
|
|
169
|
-
/* Left-to-Right Isolate */
|
|
170
|
-
#define FRIBIDI_TYPE_LRI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE )
|
|
171
|
-
/* Right-to-Left Isolate */
|
|
172
|
-
#define FRIBIDI_TYPE_RLI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_RTL )
|
|
173
|
-
/* First strong isolate */
|
|
174
|
-
#define FRIBIDI_TYPE_FSI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_FIRST )
|
|
175
|
-
|
|
176
|
-
/* Pop Directional Isolate*/
|
|
177
|
-
#define FRIBIDI_TYPE_PDI_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_WEAK | FRIBIDI_MASK_ISOLATE )
|
|
178
|
-
|
|
179
|
-
/* Define Enums only if sizeof(int) == 4 (UTF-32), and not compiling C++.
|
|
180
|
-
* The problem with C++ is that then casts between int32 and enum will fail!
|
|
181
|
-
*/
|
|
182
|
-
#if defined(__FRIBIDI_DOC) || (FRIBIDI_SIZEOF_INT+0 == 4 && !defined(__cplusplus))
|
|
183
|
-
|
|
184
|
-
typedef enum
|
|
185
|
-
{
|
|
186
|
-
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \
|
|
187
|
-
FRIBIDI_TYPE_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL,
|
|
188
|
-
# include "fribidi-bidi-types-list.h"
|
|
189
|
-
# undef _FRIBIDI_ADD_TYPE
|
|
190
|
-
_FRIBIDI_TYPE_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */
|
|
191
|
-
} FriBidiCharType;
|
|
192
|
-
|
|
193
|
-
typedef enum
|
|
194
|
-
{
|
|
195
|
-
# define _FRIBIDI_PAR_TYPES
|
|
196
|
-
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \
|
|
197
|
-
FRIBIDI_PAR_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL,
|
|
198
|
-
# include "fribidi-bidi-types-list.h"
|
|
199
|
-
# undef _FRIBIDI_ADD_TYPE
|
|
200
|
-
# undef _FRIBIDI_PAR_TYPES
|
|
201
|
-
_FRIBIDI_PAR_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */
|
|
202
|
-
} FriBidiParType;
|
|
203
|
-
|
|
204
|
-
#else
|
|
205
|
-
|
|
206
|
-
typedef uint32_t FriBidiCharType;
|
|
207
|
-
# define FRIBIDI_TYPE_LTR FRIBIDI_TYPE_LTR_VAL
|
|
208
|
-
# define FRIBIDI_TYPE_RTL FRIBIDI_TYPE_RTL_VAL
|
|
209
|
-
# define FRIBIDI_TYPE_AL FRIBIDI_TYPE_AL_VAL
|
|
210
|
-
# define FRIBIDI_TYPE_EN FRIBIDI_TYPE_EN_VAL
|
|
211
|
-
# define FRIBIDI_TYPE_AN FRIBIDI_TYPE_AN_VAL
|
|
212
|
-
# define FRIBIDI_TYPE_ES FRIBIDI_TYPE_ES_VAL
|
|
213
|
-
# define FRIBIDI_TYPE_ET FRIBIDI_TYPE_ET_VAL
|
|
214
|
-
# define FRIBIDI_TYPE_CS FRIBIDI_TYPE_CS_VAL
|
|
215
|
-
# define FRIBIDI_TYPE_NSM FRIBIDI_TYPE_NSM_VAL
|
|
216
|
-
# define FRIBIDI_TYPE_BN FRIBIDI_TYPE_BN_VAL
|
|
217
|
-
# define FRIBIDI_TYPE_BS FRIBIDI_TYPE_BS_VAL
|
|
218
|
-
# define FRIBIDI_TYPE_SS FRIBIDI_TYPE_SS_VAL
|
|
219
|
-
# define FRIBIDI_TYPE_WS FRIBIDI_TYPE_WS_VAL
|
|
220
|
-
# define FRIBIDI_TYPE_ON FRIBIDI_TYPE_ON_VAL
|
|
221
|
-
# define FRIBIDI_TYPE_LRE FRIBIDI_TYPE_LRE_VAL
|
|
222
|
-
# define FRIBIDI_TYPE_RLE FRIBIDI_TYPE_RLE_VAL
|
|
223
|
-
# define FRIBIDI_TYPE_LRO FRIBIDI_TYPE_LRO_VAL
|
|
224
|
-
# define FRIBIDI_TYPE_RLO FRIBIDI_TYPE_RLO_VAL
|
|
225
|
-
# define FRIBIDI_TYPE_PDF FRIBIDI_TYPE_PDF_VAL
|
|
226
|
-
# define FRIBIDI_TYPE_LRI FRIBIDI_TYPE_LRI_VAL
|
|
227
|
-
# define FRIBIDI_TYPE_RLI FRIBIDI_TYPE_RLI_VAL
|
|
228
|
-
# define FRIBIDI_TYPE_FSI FRIBIDI_TYPE_FSI_VAL
|
|
229
|
-
# define FRIBIDI_TYPE_PDI FRIBIDI_TYPE_PDI_VAL
|
|
230
|
-
|
|
231
|
-
typedef uint32_t FriBidiParType;
|
|
232
|
-
# define FRIBIDI_PAR_LTR FRIBIDI_TYPE_LTR_VAL
|
|
233
|
-
# define FRIBIDI_PAR_RTL FRIBIDI_TYPE_RTL_VAL
|
|
234
|
-
# define FRIBIDI_PAR_ON FRIBIDI_TYPE_ON_VAL
|
|
235
|
-
# define FRIBIDI_PAR_WLTR FRIBIDI_TYPE_WLTR_VAL
|
|
236
|
-
# define FRIBIDI_PAR_WRTL FRIBIDI_TYPE_WRTL_VAL
|
|
237
|
-
|
|
238
|
-
#endif
|
|
239
|
-
|
|
240
|
-
/* Please don't use these two type names, use FRIBIDI_PAR_* form instead. */
|
|
241
|
-
#define FRIBIDI_TYPE_WLTR FRIBIDI_PAR_WLTR
|
|
242
|
-
#define FRIBIDI_TYPE_WRTL FRIBIDI_PAR_WRTL
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
/*
|
|
246
|
-
* Defining macros for needed queries, It is fully dependent on the
|
|
247
|
-
* implementation of FriBidiCharType.
|
|
248
|
-
*/
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
/* Is right-to-left level? */
|
|
252
|
-
#define FRIBIDI_LEVEL_IS_RTL(lev) ((lev) & 1)
|
|
253
|
-
|
|
254
|
-
/* Return the bidi type corresponding to the direction of the level number,
|
|
255
|
-
FRIBIDI_TYPE_LTR for evens and FRIBIDI_TYPE_RTL for odds. */
|
|
256
|
-
#define FRIBIDI_LEVEL_TO_DIR(lev) \
|
|
257
|
-
(FRIBIDI_LEVEL_IS_RTL (lev) ? FRIBIDI_TYPE_RTL : FRIBIDI_TYPE_LTR)
|
|
258
|
-
|
|
259
|
-
/* Return the minimum level of the direction, 0 for FRIBIDI_TYPE_LTR and
|
|
260
|
-
1 for FRIBIDI_TYPE_RTL and FRIBIDI_TYPE_AL. */
|
|
261
|
-
#define FRIBIDI_DIR_TO_LEVEL(dir) \
|
|
262
|
-
((FriBidiLevel) (FRIBIDI_IS_RTL (dir) ? 1 : 0))
|
|
263
|
-
|
|
264
|
-
/* Is right to left: RTL, AL, RLE, RLO? */
|
|
265
|
-
#define FRIBIDI_IS_RTL(p) ((p) & FRIBIDI_MASK_RTL)
|
|
266
|
-
/* Is arabic: AL, AN? */
|
|
267
|
-
#define FRIBIDI_IS_ARABIC(p) ((p) & FRIBIDI_MASK_ARABIC)
|
|
268
|
-
|
|
269
|
-
/* Is strong? */
|
|
270
|
-
#define FRIBIDI_IS_STRONG(p) ((p) & FRIBIDI_MASK_STRONG)
|
|
271
|
-
/* Is weak? */
|
|
272
|
-
#define FRIBIDI_IS_WEAK(p) ((p) & FRIBIDI_MASK_WEAK)
|
|
273
|
-
/* Is neutral? */
|
|
274
|
-
#define FRIBIDI_IS_NEUTRAL(p) ((p) & FRIBIDI_MASK_NEUTRAL)
|
|
275
|
-
/* Is sentinel? */
|
|
276
|
-
#define FRIBIDI_IS_SENTINEL(p) ((p) & FRIBIDI_MASK_SENTINEL)
|
|
277
|
-
|
|
278
|
-
/* Is letter: L, R, AL? */
|
|
279
|
-
#define FRIBIDI_IS_LETTER(p) ((p) & FRIBIDI_MASK_LETTER)
|
|
280
|
-
/* Is number: EN, AN? */
|
|
281
|
-
#define FRIBIDI_IS_NUMBER(p) ((p) & FRIBIDI_MASK_NUMBER)
|
|
282
|
-
/* Is number separator or terminator: ES, ET, CS? */
|
|
283
|
-
#define FRIBIDI_IS_NUMBER_SEPARATOR_OR_TERMINATOR(p) \
|
|
284
|
-
((p) & FRIBIDI_MASK_NUMSEPTER)
|
|
285
|
-
/* Is space: BN, BS, SS, WS? */
|
|
286
|
-
#define FRIBIDI_IS_SPACE(p) ((p) & FRIBIDI_MASK_SPACE)
|
|
287
|
-
/* Is explicit mark: LRE, RLE, LRO, RLO, PDF? */
|
|
288
|
-
#define FRIBIDI_IS_EXPLICIT(p) ((p) & FRIBIDI_MASK_EXPLICIT)
|
|
289
|
-
/* Is isolator */
|
|
290
|
-
#define FRIBIDI_IS_ISOLATE(p) ((p) & FRIBIDI_MASK_ISOLATE)
|
|
291
|
-
|
|
292
|
-
/* Is text separator: BS, SS? */
|
|
293
|
-
#define FRIBIDI_IS_SEPARATOR(p) ((p) & FRIBIDI_MASK_SEPARATOR)
|
|
294
|
-
|
|
295
|
-
/* Is explicit override: LRO, RLO? */
|
|
296
|
-
#define FRIBIDI_IS_OVERRIDE(p) ((p) & FRIBIDI_MASK_OVERRIDE)
|
|
297
|
-
|
|
298
|
-
/* Some more: */
|
|
299
|
-
|
|
300
|
-
/* Is left to right letter: LTR? */
|
|
301
|
-
#define FRIBIDI_IS_LTR_LETTER(p) \
|
|
302
|
-
((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) == FRIBIDI_MASK_LETTER)
|
|
303
|
-
|
|
304
|
-
/* Is right to left letter: RTL, AL? */
|
|
305
|
-
#define FRIBIDI_IS_RTL_LETTER(p) \
|
|
306
|
-
((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) \
|
|
307
|
-
== (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL))
|
|
308
|
-
|
|
309
|
-
/* Is ES or CS: ES, CS? */
|
|
310
|
-
#define FRIBIDI_IS_ES_OR_CS(p) \
|
|
311
|
-
((p) & (FRIBIDI_MASK_ES | FRIBIDI_MASK_CS))
|
|
312
|
-
|
|
313
|
-
/* Is explicit or BN: LRE, RLE, LRO, RLO, PDF, BN? */
|
|
314
|
-
#define FRIBIDI_IS_EXPLICIT_OR_BN(p) \
|
|
315
|
-
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN))
|
|
316
|
-
|
|
317
|
-
/* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */
|
|
318
|
-
#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_NSM(p) \
|
|
319
|
-
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM))
|
|
320
|
-
|
|
321
|
-
/* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */
|
|
322
|
-
#define FRIBIDI_IS_EXPLICIT_OR_ISOLATE_OR_BN_OR_NSM(p) \
|
|
323
|
-
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM))
|
|
324
|
-
|
|
325
|
-
/* Is explicit or BN or WS: LRE, RLE, LRO, RLO, PDF, BN, WS? */
|
|
326
|
-
#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_WS(p) \
|
|
327
|
-
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_WS))
|
|
328
|
-
|
|
329
|
-
/* Is explicit or separator or BN or WS: LRE, RLE, LRO, RLO, PDF, BS, SS, BN, WS? */
|
|
330
|
-
#define FRIBIDI_IS_EXPLICIT_OR_SEPARATOR_OR_BN_OR_WS(p) \
|
|
331
|
-
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_SEPARATOR \
|
|
332
|
-
| FRIBIDI_MASK_BN | FRIBIDI_MASK_WS))
|
|
333
|
-
|
|
334
|
-
/* Is private-use type for application? */
|
|
335
|
-
#define FRIBIDI_IS_PRIVATE(p) ((p) & FRIBIDI_MASK_PRIVATE)
|
|
336
|
-
|
|
337
|
-
/* Define some conversions. */
|
|
338
|
-
|
|
339
|
-
/* Change numbers to RTL: EN,AN -> RTL. */
|
|
340
|
-
#define FRIBIDI_CHANGE_NUMBER_TO_RTL(p) \
|
|
341
|
-
(FRIBIDI_IS_NUMBER(p) ? FRIBIDI_TYPE_RTL : (p))
|
|
342
|
-
|
|
343
|
-
/* Override status of an explicit mark:
|
|
344
|
-
* LRO,LRE->LTR, RLO,RLE->RTL, otherwise->ON. */
|
|
345
|
-
#define FRIBIDI_EXPLICIT_TO_OVERRIDE_DIR(p) \
|
|
346
|
-
(FRIBIDI_IS_OVERRIDE(p) ? FRIBIDI_LEVEL_TO_DIR(FRIBIDI_DIR_TO_LEVEL(p)) \
|
|
347
|
-
: FRIBIDI_TYPE_ON)
|
|
348
|
-
|
|
349
|
-
/* Weaken type for paragraph fallback purposes:
|
|
350
|
-
* LTR->WLTR, RTL->WRTL. */
|
|
351
|
-
#define FRIBIDI_WEAK_PARAGRAPH(p) (FRIBIDI_PAR_WLTR | ((p) & FRIBIDI_MASK_RTL))
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
/* Functions finally */
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
/* fribidi_get_bidi_type - get character bidi type
|
|
358
|
-
*
|
|
359
|
-
* This function returns the bidi type of a character as defined in Table 3.7
|
|
360
|
-
* Bidirectional Character Types of the Unicode Bidirectional Algorithm
|
|
361
|
-
* available at
|
|
362
|
-
* http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, using
|
|
363
|
-
* data provided in file UnicodeData.txt of the Unicode Character Database
|
|
364
|
-
* available at http://www.unicode.org/Public/UNIDATA/UnicodeData.txt.
|
|
365
|
-
*
|
|
366
|
-
* There are a few macros defined in fribidi-bidi-types.h for querying a bidi
|
|
367
|
-
* type.
|
|
368
|
-
*/
|
|
369
|
-
FRIBIDI_ENTRY FriBidiCharType
|
|
370
|
-
fribidi_get_bidi_type (
|
|
371
|
-
FriBidiChar ch /* input character */
|
|
372
|
-
) FRIBIDI_GNUC_CONST;
|
|
373
|
-
|
|
374
|
-
/* fribidi_get_bidi_types - get bidi types for an string of characters
|
|
375
|
-
*
|
|
376
|
-
* This function finds the bidi types of an string of characters. See
|
|
377
|
-
* fribidi_get_bidi_type() for more information about the bidi types returned
|
|
378
|
-
* by this function.
|
|
379
|
-
*/
|
|
380
|
-
FRIBIDI_ENTRY void fribidi_get_bidi_types (
|
|
381
|
-
const FriBidiChar *str, /* input string */
|
|
382
|
-
const FriBidiStrIndex len, /* input string length */
|
|
383
|
-
FriBidiCharType *btypes /* output bidi types */
|
|
384
|
-
);
|
|
385
|
-
|
|
386
|
-
/* fribidi_get_bidi_type_name - get bidi type name
|
|
387
|
-
*
|
|
388
|
-
* This function returns the bidi type name of a character type. The
|
|
389
|
-
* returned string is a static string and should not be freed.
|
|
390
|
-
*
|
|
391
|
-
* The type names are the same as ones defined in Table 3.7 Bidirectional
|
|
392
|
-
* Character Types of the Unicode Bidirectional Algorithm available at
|
|
393
|
-
* http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, with a
|
|
394
|
-
* few modifications: L->LTR, R->RTL, B->BS, S->SS.
|
|
395
|
-
*/
|
|
396
|
-
FRIBIDI_ENTRY const char *fribidi_get_bidi_type_name (
|
|
397
|
-
FriBidiCharType t /* input bidi type */
|
|
398
|
-
) FRIBIDI_GNUC_CONST;
|
|
399
|
-
|
|
400
|
-
#include "fribidi-enddecls.h"
|
|
401
|
-
|
|
402
|
-
#endif /* !_FRIBIDI_BIDI_TYPES_H */
|
|
403
|
-
/* Editor directions:
|
|
404
|
-
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
|
405
|
-
*/
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/* FriBidi
|
|
2
|
-
* fribidi-bidi.h - bidirectional algorithm
|
|
3
|
-
*
|
|
4
|
-
* Authors:
|
|
5
|
-
* Behdad Esfahbod, 2001, 2002, 2004
|
|
6
|
-
* Dov Grobgeld, 1999, 2000
|
|
7
|
-
*
|
|
8
|
-
* Copyright (C) 2004 Sharif FarsiWeb, Inc
|
|
9
|
-
* Copyright (C) 2001,2002 Behdad Esfahbod
|
|
10
|
-
* Copyright (C) 1999,2000 Dov Grobgeld
|
|
11
|
-
*
|
|
12
|
-
* This library is free software; you can redistribute it and/or
|
|
13
|
-
* modify it under the terms of the GNU Lesser General Public
|
|
14
|
-
* License as published by the Free Software Foundation; either
|
|
15
|
-
* version 2.1 of the License, or (at your option) any later version.
|
|
16
|
-
*
|
|
17
|
-
* This library is distributed in the hope that it will be useful,
|
|
18
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
20
|
-
* Lesser General Public License for more details.
|
|
21
|
-
*
|
|
22
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
23
|
-
* along with this library, in a file named COPYING; if not, write to the
|
|
24
|
-
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
25
|
-
* Boston, MA 02110-1301, USA
|
|
26
|
-
*
|
|
27
|
-
* For licensing issues, contact <fribidi.license@gmail.com>.
|
|
28
|
-
*/
|
|
29
|
-
#ifndef _FRIBIDI_BIDI_H
|
|
30
|
-
#define _FRIBIDI_BIDI_H
|
|
31
|
-
|
|
32
|
-
#include "fribidi-common.h"
|
|
33
|
-
|
|
34
|
-
#include "fribidi-types.h"
|
|
35
|
-
#include "fribidi-flags.h"
|
|
36
|
-
#include "fribidi-bidi-types.h"
|
|
37
|
-
|
|
38
|
-
#include "fribidi-begindecls.h"
|
|
39
|
-
|
|
40
|
-
/* fribidi_get_par_direction - get base paragraph direction
|
|
41
|
-
*
|
|
42
|
-
* This function finds the base direction of a single paragraph,
|
|
43
|
-
* as defined by rule P2 of the Unicode Bidirectional Algorithm available at
|
|
44
|
-
* http://www.unicode.org/reports/tr9/#P2.
|
|
45
|
-
*
|
|
46
|
-
* You typically do not need this function as
|
|
47
|
-
* fribidi_get_par_embedding_levels() knows how to compute base direction
|
|
48
|
-
* itself, but you may need this to implement a more sophisticated paragraph
|
|
49
|
-
* direction handling. Note that you can pass more than a paragraph to this
|
|
50
|
-
* function and the direction of the first non-neutral paragraph is returned,
|
|
51
|
-
* which is a very good heuristic to set direction of the neutral paragraphs
|
|
52
|
-
* at the beginning of text. For other neutral paragraphs, you better use the
|
|
53
|
-
* direction of the previous paragraph.
|
|
54
|
-
*
|
|
55
|
-
* Returns: Base pargraph direction. No weak paragraph direction is returned,
|
|
56
|
-
* only LTR, RTL, or ON.
|
|
57
|
-
*/
|
|
58
|
-
FRIBIDI_ENTRY FriBidiParType fribidi_get_par_direction (
|
|
59
|
-
const FriBidiCharType *bidi_types, /* input list of bidi types as returned by
|
|
60
|
-
fribidi_get_bidi_types() */
|
|
61
|
-
const FriBidiStrIndex len /* input string length */
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
/* fribidi_get_par_embedding_levels_ex - get bidi embedding levels of a paragraph
|
|
65
|
-
*
|
|
66
|
-
* This function finds the bidi embedding levels of a single paragraph,
|
|
67
|
-
* as defined by the Unicode Bidirectional Algorithm available at
|
|
68
|
-
* http://www.unicode.org/reports/tr9/. This function implements rules P2 to
|
|
69
|
-
* I1 inclusive, and parts 1 to 3 of L1, except for rule X9 which is
|
|
70
|
-
* implemented in fribidi_remove_bidi_marks(). Part 4 of L1 is implemented
|
|
71
|
-
* in fribidi_reorder_line().
|
|
72
|
-
*
|
|
73
|
-
* There are a few macros defined in fribidi-bidi-types.h to work with this
|
|
74
|
-
* embedding levels.
|
|
75
|
-
*
|
|
76
|
-
* Returns: Maximum level found plus one, or zero if any error occurred
|
|
77
|
-
* (memory allocation failure most probably).
|
|
78
|
-
*/
|
|
79
|
-
FRIBIDI_ENTRY FriBidiLevel
|
|
80
|
-
fribidi_get_par_embedding_levels_ex (
|
|
81
|
-
const FriBidiCharType *bidi_types, /* input list of bidi types as returned by
|
|
82
|
-
fribidi_get_bidi_types() */
|
|
83
|
-
const FriBidiBracketType *bracket_types, /* input list of bracket types as returned by
|
|
84
|
-
fribidi_get_bracket_types() */
|
|
85
|
-
const FriBidiStrIndex len, /* input string length of the paragraph */
|
|
86
|
-
FriBidiParType *pbase_dir, /* requested and resolved paragraph
|
|
87
|
-
* base direction */
|
|
88
|
-
FriBidiLevel *embedding_levels /* output list of embedding levels */
|
|
89
|
-
) FRIBIDI_GNUC_WARN_UNUSED;
|
|
90
|
-
|
|
91
|
-
/* fribidi_reorder_line - reorder a line of logical string to visual
|
|
92
|
-
*
|
|
93
|
-
* This function reorders the characters in a line of text from logical to
|
|
94
|
-
* final visual order. This function implements part 4 of rule L1, and rules
|
|
95
|
-
* L2 and L3 of the Unicode Bidirectional Algorithm available at
|
|
96
|
-
* http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels.
|
|
97
|
-
*
|
|
98
|
-
* As a side effect it also sets position maps if not NULL.
|
|
99
|
-
*
|
|
100
|
-
* You should provide the resolved paragraph direction and embedding levels as
|
|
101
|
-
* set by fribidi_get_par_embedding_levels(). Also note that the embedding
|
|
102
|
-
* levels may change a bit. To be exact, the embedding level of any sequence
|
|
103
|
-
* of white space at the end of line is reset to the paragraph embedding level
|
|
104
|
-
* (That is part 4 of rule L1).
|
|
105
|
-
*
|
|
106
|
-
* Note that the bidi types and embedding levels are not reordered. You can
|
|
107
|
-
* reorder these (or any other) arrays using the map later. The user is
|
|
108
|
-
* responsible to initialize map to something sensible, like an identity
|
|
109
|
-
* mapping, or pass NULL if no map is needed.
|
|
110
|
-
*
|
|
111
|
-
* There is an optional part to this function, which is whether non-spacing
|
|
112
|
-
* marks for right-to-left parts of the text should be reordered to come after
|
|
113
|
-
* their base characters in the visual string or not. Most rendering engines
|
|
114
|
-
* expect this behavior, but console-based systems for example do not like it.
|
|
115
|
-
* This is controlled by the FRIBIDI_FLAG_REORDER_NSM flag. The flag is on
|
|
116
|
-
* in FRIBIDI_FLAGS_DEFAULT.
|
|
117
|
-
*
|
|
118
|
-
* Returns: Maximum level found in this line plus one, or zero if any error
|
|
119
|
-
* occurred (memory allocation failure most probably).
|
|
120
|
-
*/
|
|
121
|
-
FRIBIDI_ENTRY FriBidiLevel fribidi_reorder_line (
|
|
122
|
-
FriBidiFlags flags, /* reorder flags */
|
|
123
|
-
const FriBidiCharType *bidi_types, /* input list of bidi types as returned by
|
|
124
|
-
fribidi_get_bidi_types() */
|
|
125
|
-
const FriBidiStrIndex len, /* input length of the line */
|
|
126
|
-
const FriBidiStrIndex off, /* input offset of the beginning of the line
|
|
127
|
-
in the paragraph */
|
|
128
|
-
const FriBidiParType base_dir, /* resolved paragraph base direction */
|
|
129
|
-
FriBidiLevel *embedding_levels, /* input list of embedding levels,
|
|
130
|
-
as returned by
|
|
131
|
-
fribidi_get_par_embedding_levels */
|
|
132
|
-
FriBidiChar *visual_str, /* visual string to reorder */
|
|
133
|
-
FriBidiStrIndex *map /* a map of string indices which is reordered
|
|
134
|
-
* to reflect where each glyph ends up. */
|
|
135
|
-
) FRIBIDI_GNUC_WARN_UNUSED;
|
|
136
|
-
|
|
137
|
-
#include "fribidi-enddecls.h"
|
|
138
|
-
|
|
139
|
-
#endif /* !_FRIBIDI_BIDI_H */
|
|
140
|
-
/* Editor directions:
|
|
141
|
-
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
|
142
|
-
*/
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/* fribidi-brackets.h - get bracket character property
|
|
2
|
-
*
|
|
3
|
-
* Copyright (C) 2004 Sharif FarsiWeb, Inc
|
|
4
|
-
* Copyright (C) 2001, 2002, 2004 Behdad Esfahbod
|
|
5
|
-
* Copyright (C) 1999, 2000, 2017 Dov Grobgeld
|
|
6
|
-
*
|
|
7
|
-
* This file is part of GNU FriBidi.
|
|
8
|
-
*
|
|
9
|
-
* GNU FriBidi is free software; you can redistribute it and/or
|
|
10
|
-
* modify it under the terms of the GNU Lesser General Public License
|
|
11
|
-
* as published by the Free Software Foundation; either version 2.1
|
|
12
|
-
* of the License, or (at your option) any later version.
|
|
13
|
-
*
|
|
14
|
-
* GNU FriBidi is distributed in the hope that it will be useful,
|
|
15
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
* GNU Lesser General Public License for more details.
|
|
18
|
-
*
|
|
19
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
20
|
-
* along with GNU FriBidi; if not, write to the Free Software
|
|
21
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
22
|
-
*
|
|
23
|
-
* For licensing issues, contact <fribidi.license@gmail.com> or write to
|
|
24
|
-
* Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
|
|
25
|
-
*
|
|
26
|
-
* Author(s):
|
|
27
|
-
* Behdad Esfahbod, 2001, 2002, 2004
|
|
28
|
-
* Dov Grobgeld, 1999, 2000, 2017
|
|
29
|
-
*/
|
|
30
|
-
#ifndef _FRIBIDI_BRACKETS_H
|
|
31
|
-
#define _FRIBIDI_BRACKETS_H
|
|
32
|
-
|
|
33
|
-
#include "fribidi-common.h"
|
|
34
|
-
|
|
35
|
-
#include "fribidi-types.h"
|
|
36
|
-
#include "fribidi-bidi-types.h"
|
|
37
|
-
|
|
38
|
-
#include "fribidi-begindecls.h"
|
|
39
|
-
|
|
40
|
-
/* fribidi_get_bracket - get bracketed character
|
|
41
|
-
*
|
|
42
|
-
* This function finds the bracketed equivalent of a character as defined in
|
|
43
|
-
* the file BidiBrackets.txt of the Unicode Character Database available at
|
|
44
|
-
* http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt.
|
|
45
|
-
*
|
|
46
|
-
* If the input character is a declared as a brackets character in the
|
|
47
|
-
* Unicode standard and has a bracketed equivalent. The matching bracketed
|
|
48
|
-
* character is put in the output, otherwise the input character itself is
|
|
49
|
-
* put.
|
|
50
|
-
*
|
|
51
|
-
* Returns: The bracket type of the character. Use the
|
|
52
|
-
* FRIBIDI_IS_BRACKET(FriBidiBracketType) to test if it is a valid
|
|
53
|
-
* property.
|
|
54
|
-
*/
|
|
55
|
-
FRIBIDI_ENTRY FriBidiBracketType fribidi_get_bracket (
|
|
56
|
-
FriBidiChar ch /* input character */
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
/* fribidi_get_bracket_types - get bracketed characters
|
|
60
|
-
*
|
|
61
|
-
* This function finds the bracketed characters of an string of characters.
|
|
62
|
-
* See fribidi_get_bracket() for more information about the bracketed
|
|
63
|
-
* characters returned by this function.
|
|
64
|
-
*/
|
|
65
|
-
FRIBIDI_ENTRY void
|
|
66
|
-
fribidi_get_bracket_types (
|
|
67
|
-
const FriBidiChar *str, /* input string */
|
|
68
|
-
const FriBidiStrIndex len, /* input string length */
|
|
69
|
-
const FriBidiCharType *types, /* input bidi types */
|
|
70
|
-
FriBidiBracketType *btypes /* output bracketed characters */
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
#define FRIBIDI_BRACKET_OPEN_MASK 0x80000000
|
|
74
|
-
#define FRIBIDI_BRACKET_ID_MASK 0x7fffffff
|
|
75
|
-
#define FRIBIDI_IS_BRACKET_OPEN(bt) ((bt & FRIBIDI_BRACKET_OPEN_MASK)>0)
|
|
76
|
-
#define FRIBIDI_BRACKET_ID(bt) ((bt & FRIBIDI_BRACKET_ID_MASK))
|
|
77
|
-
|
|
78
|
-
#include "fribidi-enddecls.h"
|
|
79
|
-
|
|
80
|
-
#endif /* !_FRIBIDI_BRACKETS_H */
|
|
81
|
-
/* Editor directions:
|
|
82
|
-
* Local Variables:
|
|
83
|
-
* mode: c
|
|
84
|
-
* c-basic-offset: 2
|
|
85
|
-
* indent-tabs-mode: t
|
|
86
|
-
* tab-width: 8
|
|
87
|
-
* End:
|
|
88
|
-
* vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8:
|
|
89
|
-
*/
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
#ifndef __FRIBIDI_DOC
|
|
2
|
-
/* FriBidi
|
|
3
|
-
* fribidi-char-sets-list.h - list of supported character sets
|
|
4
|
-
*
|
|
5
|
-
* Author:
|
|
6
|
-
* Behdad Esfahbod, 2001, 2002, 2004
|
|
7
|
-
*
|
|
8
|
-
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
|
9
|
-
* Copyright (C) 2001,2002 Behdad Esfahbod
|
|
10
|
-
*
|
|
11
|
-
* This library is free software; you can redistribute it and/or
|
|
12
|
-
* modify it under the terms of the GNU Lesser General Public
|
|
13
|
-
* License as published by the Free Software Foundation; either
|
|
14
|
-
* version 2.1 of the License, or (at your option) any later version.
|
|
15
|
-
*
|
|
16
|
-
* This library is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
19
|
-
* Lesser General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
22
|
-
* along with this library, in a file named COPYING; if not, write to the
|
|
23
|
-
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
24
|
-
* Boston, MA 02110-1301, USA
|
|
25
|
-
*
|
|
26
|
-
* For licensing issues, contact <fribidi.license@gmail.com>.
|
|
27
|
-
*/
|
|
28
|
-
/* *INDENT-OFF* */
|
|
29
|
-
|
|
30
|
-
/* The order of types in this list should not be important at compile time,
|
|
31
|
-
* but apparently it should not be changed after compilation! */
|
|
32
|
-
#endif /* !__FRIBIDI_DOC */
|
|
33
|
-
#ifdef _FRIBIDI_ADD_CHAR_SET
|
|
34
|
-
# define _FRIBIDI_ADD_CHAR_SET_OTHERS _FRIBIDI_ADD_CHAR_SET
|
|
35
|
-
# define _FRIBIDI_ADD_CHAR_SET_ONE2ONE _FRIBIDI_ADD_CHAR_SET
|
|
36
|
-
#endif /* _FRIBIDI_ADD_CHAR_SET */
|
|
37
|
-
#ifdef _FRIBIDI_ADD_CHAR_SET_OTHERS
|
|
38
|
-
_FRIBIDI_ADD_CHAR_SET_OTHERS (UTF8, utf8) /* UTF-8 (Unicode) */
|
|
39
|
-
_FRIBIDI_ADD_CHAR_SET_OTHERS (CAP_RTL, cap_rtl) /* CapRTL (Test) */
|
|
40
|
-
#endif /* _FRIBIDI_ADD_CHAR_SET_OTHERS */
|
|
41
|
-
#ifdef _FRIBIDI_ADD_CHAR_SET_ONE2ONE
|
|
42
|
-
_FRIBIDI_ADD_CHAR_SET_ONE2ONE (ISO8859_6, iso8859_6) /* ISO8859-6 (Arabic) */
|
|
43
|
-
_FRIBIDI_ADD_CHAR_SET_ONE2ONE (ISO8859_8, iso8859_8) /* ISO8859-8 (Hebrew) */
|
|
44
|
-
_FRIBIDI_ADD_CHAR_SET_ONE2ONE (CP1255, cp1255) /* CP1255 (MS Hebrew/Yiddish) */
|
|
45
|
-
_FRIBIDI_ADD_CHAR_SET_ONE2ONE (CP1256, cp1256) /* CP1256 (MS Arabic) */
|
|
46
|
-
#endif /* _FRIBIDI_ADD_CHAR_SET_ONE2ONE */
|
|
47
|
-
#ifdef _FRIBIDI_ADD_CHAR_SET
|
|
48
|
-
# undef _FRIBIDI_ADD_CHAR_SET_OTHERS
|
|
49
|
-
# undef _FRIBIDI_ADD_CHAR_SET_ONE2ONE
|
|
50
|
-
#endif /* _FRIBIDI_ADD_CHAR_SET */
|
|
51
|
-
|
|
52
|
-
#ifndef __FRIBIDI_DOC
|
|
53
|
-
/* *INDENT-ON* */
|
|
54
|
-
#endif /* !__FRIBIDI_DOC */
|