mirror of
https://github.com/JimmyLefevre/kb.git
synced 2026-11-30 22:25:00 +01:00
33382 lines
1.8 MiB
Plaintext
33382 lines
1.8 MiB
Plaintext
/* kb_text_shape - v2.33 - text segmentation and shaping
|
|
by Jimmy Lefevre
|
|
|
|
SECURITY
|
|
This library provides NO SECURITY GUARANTEE whatsoever.
|
|
DO NOT use it on untrusted font files.
|
|
|
|
WHAT DOES THIS LIBRARY DO?
|
|
Before computers had monitors, the main way of inspecting the output of a command
|
|
was to print it out on real paper. When monitors appeared, most computer graphics
|
|
were text-based, meaning the display was arranged in a hardcoded grid in which each
|
|
cell could hold one of several hardcoded characters. As simple as it is, this kind
|
|
of text handling is sufficient for displaying almost any document written in the
|
|
Latin alphabet and a few other writing systems that happen to fit particularly well
|
|
on a grid, like Chinese and Japanese.
|
|
Handwritten Latin characters do not all have the same width, however. As computers
|
|
became more powerful, glyphs started having different widths to fit better together.
|
|
After that came kerning, which allows for packing glyphs closer together in pairs.
|
|
This is, of course, N-squared in the number of glyphs you want to handle, but this
|
|
is fine for the Latin alphabet, because there really aren't that many glyphs.
|
|
This is where TrueType stops: it is a good and simple, format for displaying text
|
|
using the Latin alphabet or writing systems that happen to work similarly to it.
|
|
All is well and good.
|
|
|
|
What about the rest of the writing systems?
|
|
|
|
Arabic is a cursive writing system. Much like when we write cursive ourselves, the
|
|
letters need to join together visually. Furthermore, a given letter in Arabic has
|
|
a different appearance depending on whether it is the first letter of a word, the
|
|
last letter of a word, or in the middle, and Unicode does not differenciate between
|
|
any of these. Also, Arabic features a beautiful set of marks that attach to letters,
|
|
much like accents in the Latin alphabet. You would usually want to align these marks
|
|
in some way depending on which other marks are present in the immediate vicinity.
|
|
|
|
Indic scripts, like Devanagari, have even less in common with Latin than Arabic does.
|
|
|
|
To try to support the plethora of writing systems out there, OpenType was introduced.
|
|
OpenType fonts contain rules that allow modifying a sequence of glyphs through pattern
|
|
matching. These rules can modify both the content of the sequence (ligatures replace
|
|
multiple glyphs with a single one, for instance) and its visual appearance by e.g.
|
|
attaching marks to letters. This is the meat of text shaping.
|
|
|
|
OpenType rules have limitations, though. They don't work with mixed direction text,
|
|
because, when going from one text direction to the other, there is a visual jump that
|
|
breaks pattern matching.
|
|
|
|
To illustrate, the logical string "0123456789" might have a display order like this:
|
|
|
|
01234 765 89
|
|
^LTR ^RTL ^LTR continued
|
|
|
|
As you can see, there is a visual jump from 4 all the way to 5, and similarly from
|
|
7 to 8.
|
|
This kind of discontinuity cannot work with OpenType rules, which want to work with
|
|
"neighboring" glyphs in the visual sense.
|
|
|
|
OpenType rules don't work with mixed script text, either. They are designed to work with
|
|
a single writing system, and ideally a single language. A typographic rule that is correct
|
|
in writing system A might not be in writing system B, and vice versa.
|
|
|
|
So, for all of these reasons, we need to split our text before sending it to the shaper.
|
|
This is what the text processing pipeline looks like:
|
|
|
|
Your text A Text runs with B Sequence of glyphs C
|
|
(Probably ------------> uniform direction ------------> ready to rasterize ------------> Pixels
|
|
UTF-8) and script
|
|
|
|
We call arrow A text segmentation, arrow B text shaping, and arrow C rasterization.
|
|
This library does A and B.
|
|
|
|
FEATURE OVERVIEW
|
|
This library provides:
|
|
- Unicode segmentation
|
|
LTR/RTL breaking
|
|
Script breaking
|
|
Line breaking
|
|
Word breaking
|
|
Grapheme breaking
|
|
- OpenType text shaping
|
|
Open and parse TTF and OTF fonts
|
|
Apply OpenType features such as ligatures and contextual typographic rules
|
|
All OpenType shapers are supported, which means most languages in the world are supported
|
|
(see LANGUAGE_SUPPORT for known non-supported cases)
|
|
|
|
COMPILING & LINKING
|
|
This library uses declare-anywhere, so it will not compile as C89/VC6 C.
|
|
|
|
In one C/C++ file that #includes this file, do this:
|
|
#define KB_TEXT_SHAPE_IMPLEMENTATION
|
|
before the #include. That will create the implementation in that file.
|
|
|
|
If you also do this:
|
|
#define KB_TEXT_SHAPE_STATIC
|
|
then all functions will be declared as static.
|
|
|
|
If you do this:
|
|
#define KB_TEXT_SHAPE_NO_CRT
|
|
then we do not use the C runtime library.
|
|
In that case, these functions are compiled out:
|
|
kbts_ShapePushFontFromFile()
|
|
kbts_FontFromFile()
|
|
Additionally, there are some functions that you will want to #define yourself:
|
|
KBTS_MEMSET
|
|
defaults to memset otherwise.
|
|
KBTS_MEMCPY
|
|
defaults to memcpy otherwise.
|
|
KBTS_MEMMOVE
|
|
defaults to memmove otherwise.
|
|
You can redefine the default allocator by redefining these:
|
|
KBTS_MALLOC(AllocatorData, Size)
|
|
defaults to 0 if KB_TEXT_SHAPE_NO_CRT is defined,
|
|
defaults to malloc(Size) otherwise.
|
|
KBTS_FREE(AllocatorData, Pointer)
|
|
defaults to a no-op if KB_TEXT_SHAPE_NO_CRT is defined,
|
|
defaults to free(Pointer) otherwise.
|
|
In other words,
|
|
if you do not redefine the default allocator, and you #define KB_TEXT_SHAPE_NO_CRT,
|
|
then the default allocator always returns 0.
|
|
|
|
EXAMPLES
|
|
Basic
|
|
kbts_shape_context *Context = kbts_CreateShapeContext(0, 0);
|
|
kbts_ShapePushFontFromFile(Context, "myfont.ttf", 0);
|
|
|
|
kbts_ShapeBegin(Context, KBTS_DIRECTION_DONT_KNOW, KBTS_LANGUAGE_DONT_KNOW);
|
|
kbts_ShapeUtf8(Context, "Let's shape something!", sizeof("Let's shape something!") - 1, KBTS_USER_ID_GENERATION_MODE_CODEPOINT_INDEX);
|
|
kbts_ShapeEnd(Context);
|
|
|
|
// Layout runs naively left to right.
|
|
kbts_run Run;
|
|
int CursorX = 0, CursorY = 0;
|
|
while(kbts_ShapeRun(Context, &Run))
|
|
{
|
|
kbts_glyph *Glyph;
|
|
while(kbts_GlyphIteratorNext(&Run.Glyphs, &Glyph))
|
|
{
|
|
int GlyphX = CursorX + Glyph->OffsetX;
|
|
int GlyphY = CursorY + Glyph->OffsetY;
|
|
|
|
DisplayGlyph(Glyph->Id, GlyphX, GlyphY);
|
|
|
|
CursorX += Glyph->AdvanceX;
|
|
CursorY += Glyph->AdvanceY;
|
|
}
|
|
}
|
|
|
|
Font collections
|
|
void *FontData;
|
|
int FontSize;
|
|
kbts_font Font = kbts_FontFromFile("myfonts.ttc", 0, 0, 0, &FontData, &FontSize);
|
|
|
|
kbts_ShapePushFont(Context, &Font);
|
|
|
|
int FontCount = kbts_FontCount(FontData, FontSize);
|
|
for(int FontIndex = 1; FontIndex < FontCount; ++FontIndex)
|
|
{
|
|
kbts_ShapePushFontFromMemory(Context, FontData, FontSize, FontIndex);
|
|
}
|
|
|
|
Feature control
|
|
kbts_ShapeBegin(Context, KBTS_DIRECTION_DONT_KNOW, KBTS_LANGUAGE_DONT_KNOW);
|
|
|
|
kbts_ShapePushFeature(Context, KBTS_FEATURE_TAG_kern, 0);
|
|
kbts_ShapeUtf8(Context, "Without kerning", sizeof("Without kerning") - 1, KBTS_USER_ID_GENERATION_MODE_CODEPOINT_INDEX);
|
|
kbts_ShapePopFeature(Context, KBTS_FEATURE_TAG_kern);
|
|
|
|
kbts_ShapeUtf8(Context, "With kerning", sizeof("With kerning") - 1, KBTS_USER_ID_GENERATION_MODE_CODEPOINT_INDEX);
|
|
|
|
kbts_ShapeEnd(Context);
|
|
|
|
@Todo: Write more examples
|
|
|
|
API
|
|
The shaping API is broken down into two parts: the context API and the direct API.
|
|
|
|
The context API is the higher-level API of the two and is meant to be the default
|
|
API.
|
|
It exposes an immediate-mode, procedural interface somewhat inspired by Dear Imgui
|
|
and covers most of the functionality present in the library. It notably includes
|
|
automatic segmentation into paragraphs and runs, shaping, and font fallback.
|
|
|
|
The direct API, in contrast, is all of the tools you can use to directly manage and
|
|
manipulate shaping data. With it, you can interact directly with the lower-level
|
|
parts of the library, giving you very granular control. It is also very explicit
|
|
about memory. As a result, it is also a lot more verbose than the context API.
|
|
|
|
The library also contains several miscellaneous utility functions that are not
|
|
obviously part of any of the two aforementioned APIs.
|
|
|
|
Variable fonts are supported. A variable font has a certain number of "variation
|
|
axes" which describes how its look can be configured. Within each axis' bounds,
|
|
configuration is continuous, and so the API uses floats for coordinates. However,
|
|
internally, these coordinates are normalized to 16-bit fixed-point, so some of our
|
|
lower-level functions expect normalized input. (See kbts_NormalizeVariationVector.)
|
|
|
|
Furthermore, there are two ways to represent a set of variations. One is an
|
|
array of coordinates, each applying to exactly one font axis, all in order. We
|
|
call these arrays "variation vectors". They are the simplest and fastest
|
|
representation, but they only work for one font at a time. This is because each
|
|
font is free to list its axes in whichever order it pleases.
|
|
The other representation is an array of _tagged_ values (see kbts_variation),
|
|
wherein each tag uniquely identifies the axis it applies to. This is a more
|
|
convenient representation, especially when handling multiple fonts, because it
|
|
requires no per-font shuffling at all.
|
|
Lower-level functions will tend to expect variation vectors, whereas higher-level
|
|
ones will tend to accept the looser tagged values. I have tried to fill in the gaps
|
|
and cater to different use cases wherever seemed appropriate, although, inevitably,
|
|
some combinations are missing. We may add them if they turn out to be useful.
|
|
|
|
In the documentation below, all functions (as well as some structs/enums) are
|
|
marked with "search tags".
|
|
As an example, this hypothetical function:
|
|
|
|
int kbts_Foo(int X);
|
|
|
|
Will be presented like this:
|
|
|
|
:kbts_Foo
|
|
:Foo
|
|
int kbts_Foo(int X);
|
|
|
|
Allowing you to easily search for its documentation by searching for either ":Foo"
|
|
or ":kbts_Foo".
|
|
|
|
MEMORY MANAGEMENT
|
|
kb_text_shape takes manual memory management seriously, and tries to give the user as much
|
|
control over memory as possible.
|
|
|
|
Whenever it is possible for you to pass your own buffer into a function, we allow it.
|
|
Whenever it is not possible, we allow specifying a custom allocator.
|
|
An allocator is simply a function that manages memory:
|
|
|
|
:kbts_allocator_function
|
|
:allocator_function
|
|
typedef void kbts_allocator_function(void *Data, kbts_allocator_op *Op);
|
|
[Data] the custom data pointer you passed in along with your allocator.
|
|
[Op] the memory request. It is of this type:
|
|
|
|
:kbts_allocator_op
|
|
:allocator_op
|
|
typedef struct kbts_allocator_op
|
|
{
|
|
kbts_allocator_op_kind Kind;
|
|
|
|
union
|
|
{
|
|
kbts_allocator_op_allocate Allocate;
|
|
kbts_allocator_op_free Free;
|
|
};
|
|
} kbts_allocator_op;
|
|
|
|
And the possible op kinds are:
|
|
KBTS_ALLOCATOR_OP_KIND_ALLOCATE
|
|
KBTS_ALLOCATOR_OP_KIND_FREE
|
|
|
|
ALLOCATE expects you to fill in Op->Allocate.Pointer.
|
|
The allocation does not need to be aligned.
|
|
FREE expects you to free Op->Free.Pointer.
|
|
|
|
THE CONTEXT API
|
|
CONTEXT:CREATION
|
|
:kbts_SizeOfShapeContext
|
|
:SizeOfShapeContext
|
|
int kbts_SizeOfShapeContext()
|
|
Tells you how big of a buffer you need to provide to kbts_PlaceShapeContext.
|
|
|
|
:kbts_PlaceShapeContext2
|
|
:PlaceShapeContext2
|
|
kbts_shape_context *kbts_PlaceShapeContext2(kbts_allocator_function *Allocator, void *AllocatorData, void *Memory, kbts_shape_context_flags Flags)
|
|
Places a context at Memory and initializes it.
|
|
[Allocator] will be used for subsequent allocations.
|
|
|
|
[Flags] can be any combination of:
|
|
KBTS_SHAPE_CONTEXT_FLAG_NONE
|
|
No-op; default behavior.
|
|
KBTS_SHAPE_CONTEXT_FLAG_FONT_PRIORITY_BOTTOM_TO_TOP = (1 << 0)
|
|
The default priority order for the font stack is top-to-bottom, i.e.
|
|
fonts that were pushed later have higher priority.
|
|
If this flag is set, then this priority is reversed: fonts that are
|
|
pushed earlier, and are thus closer to the bottom of the stack, have
|
|
higher priority.
|
|
For more details on the font stack, see CONTEXT:FONT HANDLING.
|
|
|
|
:kbts_PlaceShapeContext
|
|
:PlaceShapeContext
|
|
kbts_shape_context *kbts_PlaceShapeContext(kbts_allocator_function *Allocator, void *AllocatorData, void *Memory)
|
|
Equivalent to calling kbts_PlaceShapeContext2 with Flags = KBTS_SHAPE_CONTEXT_FLAG_NONE.
|
|
|
|
:kbts_PlaceShapeContextFixedMemory2
|
|
:PlaceShapeContextFixedMemory2
|
|
kbts_shape_context *kbts_PlaceShapeContextFixedMemory(void *Memory, int Size, kbts_shape_context_flags Flags)
|
|
Places a context at Memory and initializes it.
|
|
This context will only use the [Size] bytes located at [Memory] for its allocations.
|
|
|
|
For more details on [Flags], see :kbts_PlaceShapeContext2.
|
|
|
|
:kbts_PlaceShapeContextFixedMemory
|
|
:PlaceShapeContextFixedMemory
|
|
kbts_shape_context *kbts_PlaceShapeContextFixedMemory(void *Memory, int Size)
|
|
Equivalent to calling kbts_PlaceShapeContextFixedMemory2 with
|
|
Flags = KBTS_SHAPE_CONTEXT_FLAG_NONE.
|
|
|
|
:kbts_CreateShapeContext2
|
|
:CreateShapeContext2
|
|
kbts_shape_context *kbts_CreateShapeContext2(kbts_allocator_function *Allocator, void *AllocatorData, kbts_shape_context_flags Flags)
|
|
Allocates a context using [Allocator] and initializes it.
|
|
|
|
For more information on [Flags], see :kbts_PlaceShapeContext2.
|
|
|
|
:kbts_CreateShapeContext
|
|
:CreateShapeContext
|
|
kbts_shape_context *kbts_CreateShapeContext(kbts_allocator_function *Allocator, void *AllocatorData)
|
|
Equivalent to calling kbts_CreateShapeContext2 with Flags = KBTS_SHAPE_CONTEXT_FLAG_NONE.
|
|
|
|
:kbts_DestroyShapeContext
|
|
:DestroyShapeContext
|
|
void kbts_DestroyShapeContext(kbts_shape_context *Context)
|
|
Frees all context memory.
|
|
If the Context was allocated by kbts_CreateShapeContext, then it is also freed.
|
|
|
|
CONTEXT:FONT HANDLING
|
|
The context is capable of managing multiple fonts through a font stack.
|
|
The font stack will hold references to all fonts in use by the context. Whenever
|
|
you try to shape some text, the context will check to see if it is supported by
|
|
the font at the top of the stack. If it is not, it will try the next font down,
|
|
and so on, until all fonts have been tried. As such, you should push your fallback
|
|
fonts first, and your preferred fonts last. Alternatively, you can use the context
|
|
flag KBTS_SHAPE_CONTEXT_FLAG_FONT_PRIORITY_BOTTOM_TO_TOP which reverses the order.
|
|
|
|
The font stack is dynamically-sized. Internally, it is a list of fixed-size blocks.
|
|
Each block contains KBTS_CONTEXT_FONTS_PER_BLOCK fonts, which you can configure by
|
|
defining before including the library.
|
|
|
|
:kbts_ShapePushFontFromFile2
|
|
:ShapePushFontFromFile2
|
|
kbts_font *kbts_ShapePushFontFromFile2(kbts_shape_context *Context, const char *FileName, int FontIndex,
|
|
kbts_variation *Variations, int VariationCount, kbts_u32 *ContextFontHandle)
|
|
(This function is not available if KB_TEXT_SHAPE_NO_CRT is defined.)
|
|
|
|
Opens the file corresponding to [FileName], parses the [FontIndex]th font
|
|
within it, and, if successful, pushes the result onto the stack.
|
|
|
|
[Variations] is an array of [VariationCount] font variation settings.
|
|
We try to apply as many of them as we can, ignoring those that the font
|
|
does not support.
|
|
|
|
If [ContextFontHandle] is non-zero, it receives a handle to the font.
|
|
|
|
A [return value] of 0 could mean that the stack is out of space, that the
|
|
file could not be found or opened, or that the parse has failed.
|
|
|
|
:kbts_ShapePushFontFromFile
|
|
:ShapePushFontFromFile
|
|
kbts_font *kbts_ShapePushFontFromFile(kbts_shape_context *Context, const char *FileName, int FontIndex)
|
|
(This function is not available if KB_TEXT_SHAPE_NO_CRT is defined.)
|
|
Equivalent to kbts_ShapePushFontFromFile2([Context], [FileName], [FontIndex], 0, 0, 0).
|
|
|
|
:kbts_ShapePushFontFromMemory2
|
|
:ShapePushFontFromMemory2
|
|
kbts_font *kbts_ShapePushFontFromMemory2(kbts_shape_context *Context, void *Memory, int Size, int FontIndex,
|
|
kbts_variation *Variations, int VariationCount, kbts_u32 *ContextFontHandle)
|
|
Parses the [FontIndex]th font in [Memory] and pushes the result to the font
|
|
stack.
|
|
|
|
[Variations] is an array of [VariationCount] font variation settings.
|
|
We try to apply as many of them as we can, ignoring those that the font
|
|
does not support.
|
|
|
|
If [ContextFontHandle] is non-zero, it receives a handle to the font.
|
|
|
|
A [return value] of 0 could mean that the stack is out of space or that
|
|
the font could not be parsed.
|
|
|
|
:kbts_ShapePushFontFromMemory
|
|
:ShapePushFontFromMemory
|
|
kbts_font *kbts_ShapePushFontFromMemory(kbts_shape_context *Context, void *Memory, int Size, int FontIndex)
|
|
Equivalent to kbts_ShapePushFontFromMemory([Context], [Memory], [Size], [FontIndex], 0).
|
|
|
|
:kbts_ShapePushFont2
|
|
:ShapePushFont2
|
|
kbts_font *kbts_ShapePushFont2(kbts_shape_context *Context, kbts_font *Font,
|
|
kbts_variation *Variations, int VariationCount, kbts_u32 *ContextFontHandle)
|
|
Pushes the pre-parsed [Font] onto the stack.
|
|
|
|
[Variations] is an array of [VariationCount] font variation settings.
|
|
We try to apply as many of them as we can, ignoring those that the font
|
|
does not support.
|
|
|
|
If [ContextFontHandle] is non-zero, it receives a handle to the font.
|
|
|
|
A [return value] of 0 means that the stack has run out of space.
|
|
|
|
:kbts_ShapePushFont
|
|
:ShapePushFont
|
|
kbts_font *kbts_ShapePushFont(kbts_shape_context *Context, kbts_font *Font)
|
|
Equivalent to kbts_ShapePushFont([Context], [Font], 0, 0, 0).
|
|
|
|
:kbts_ShapePopFont
|
|
:ShapePopFont
|
|
kbts_font *kbts_ShapePopFont(kbts_shape_context *Context)
|
|
Removes the topmost font from the stack.
|
|
|
|
A [return value] of 0 means that there is no font to remove.
|
|
A non-null [return value] is the original font pointer that was pushed.
|
|
|
|
If the context allocated the font itself, using kbts_ShapePushFontFromFile or
|
|
kbts_ShapePushFontFromMemory, then the pointer is still returned, but it points to
|
|
freed memory.
|
|
|
|
CONTEXT:SHAPING
|
|
:kbts_ShapeBegin
|
|
:ShapeBegin
|
|
void kbts_ShapeBegin(kbts_shape_context *Context, kbts_direction ParagraphDirection, kbts_language Language)
|
|
Begins a shaping pass.
|
|
|
|
[ParagraphDirection] is sometimes called the "document direction". It can significantly
|
|
affect segmentation. Bidirectionality in text works like a stack: the default direction
|
|
is at the bottom of the stack, and, sometimes, text can _temporarily_ take a different
|
|
direction. In the end, though, it will always go back to the document direction.
|
|
|
|
To illustrate, a period followed by a space ". " typically ends up resetting the current
|
|
direction to the paragraph direction. This means that, if my paragraph direction is
|
|
left-to-right, and I am shaping Arabic text, then each Arabic sentence will be
|
|
right-to-left, but the sentences themselves will be sequenced left-to-right. If
|
|
[ParagraphDirection] is KBTS_DIRECTION_DONT_KNOW, then the context takes the first
|
|
directional hint in the text as the paragraph direction.
|
|
|
|
[Language] is used to select which font rules are used. Knowing this allows access to
|
|
language-specific typographical features. If [Language] is KBTS_LANGUAGE_DONT_KNOW, then
|
|
the default, language-agnostic font rules are used.
|
|
|
|
:kbts_ShapeEnd
|
|
:ShapeEnd
|
|
void kbts_ShapeEnd(kbts_shape_context *Context)
|
|
Ends a shaping pass.
|
|
|
|
This means you are done providing input to the context, and, in turn, that
|
|
you can start getting results from it with kbts_ShapeRun().
|
|
|
|
:kbts_ShapeRun
|
|
:ShapeRun
|
|
int kbts_ShapeRun(kbts_shape_context *Context, kbts_run *Run)
|
|
Once you've called kbts_ShapeEnd, you can get the resulting runs by calling this
|
|
function repeatedly.
|
|
|
|
!!! CAREFUL !!! Memory is reused from one run to the next, so you cannot
|
|
trivially store [Run] and reuse it later. Instead, you should traverse the
|
|
glyphs using the iterator provided in Run.Glyphs and extract whatever data
|
|
you need before calling kbts_ShapeRun again.
|
|
|
|
The [return value] is non-zero if a run was shaped.
|
|
When there is no text left to shape, the [return value] is 0.
|
|
|
|
kbts_ShapeEnd(Context);
|
|
kbts_run Run;
|
|
while(kbts_ShapeRun(Context, &Run))
|
|
{
|
|
// Handle Run
|
|
}
|
|
|
|
:kbts_ShapePushFeature
|
|
:ShapePushFeature
|
|
void kbts_ShapePushFeature(kbts_shape_context *Context, kbts_u32 FeatureTag, int Value)
|
|
The context has a feature stack that allows you to manipulate font features hierarchically.
|
|
When you give text to the context, it will apply all feature overrides that are on the
|
|
stack at the time.
|
|
If two feature overrides use the same tag, then only the latest one, i.e. the one higher
|
|
in the stack, is applied.
|
|
|
|
:kbts_ShapePopFeature
|
|
:ShapePopFeature
|
|
int kbts_ShapePopFeature(kbts_shape_context *Context, kbts_u32 FeatureTag)
|
|
Removes the latest feature override with tag [FeatureTag].
|
|
The [return value] is non-zero if an override was found and removed, 0 if not.
|
|
|
|
:kbts_ShapeCodepointWithUserId
|
|
:ShapeCodepointWithUserId
|
|
void kbts_ShapeCodepointWithUserId(kbts_shape_context *Context, int Codepoint, int UserId)
|
|
Inputs a codepoint to shape.
|
|
[Codepoint] is a Unicode codepoint.
|
|
[UserId] is an arbitrary identifier that you will get back when reading the results.
|
|
This is often some kind of index into the input text so that you can perform hit-testing.
|
|
If an automatic codepoint index is fine for you, consider using kbts_ShapeCodepoint.
|
|
|
|
:kbts_ShapeCodepoint
|
|
:ShapeCodepoint
|
|
void kbts_ShapeCodepoint(kbts_shape_context *Context, int Codepoint)
|
|
Inputs a codepoint to shape.
|
|
|
|
The codepoint's user ID will be an implicit codepoint index assigned by the
|
|
context.
|
|
|
|
:kbts_ShapeUtf32WithUserId
|
|
:ShapeUtf32WithUserId
|
|
void kbts_ShapeUtf32WithUserId(kbts_shape_context *Context,
|
|
int *Utf32, int Length,
|
|
int UserId, int UserIdIncrement);
|
|
Inputs a block of UTF-32 text to shape.
|
|
|
|
User IDs for each codepoint start at [UserId] and increment by [UserIdIncrement]
|
|
for every codepoint.
|
|
|
|
:kbts_ShapeUtf32
|
|
:ShapeUtf32
|
|
void kbts_ShapeUtf32(kbts_shape_context *Context, int *Utf32, int Length)
|
|
Same as kbts_ShapeUtf8WithUserId, but using the context's implicit user ID counter.
|
|
|
|
:kbts_ShapeUtf8WithUserId
|
|
:ShapeUtf8WithUserId
|
|
void kbts_ShapeUtf8WithUserId(kbts_shape_context *Context,
|
|
const char *Utf8, int Length,
|
|
int UserId, kbts_user_id_generation_mode UserIdGenerationMode);
|
|
Inputs a block of UTF-8 text to shape.
|
|
|
|
User IDs for the corresponding codepoints start at [UserId].
|
|
If [UserIdGenerationMode] is KBTS_USER_ID_GENERATION_MODE_CODEPOINT_INDEX,
|
|
each codepoint will increment the user ID by 1.
|
|
If [UserIdGenerationMode] is KBTS_USER_ID_GENERATION_MODE_SOURCE_INDEX,
|
|
each codepoint will increment the user ID by the length of its encoding in
|
|
UTF-8.
|
|
|
|
:kbts_ShapeUtf8
|
|
:ShapeUtf8
|
|
void kbts_ShapeUtf8(kbts_shape_context *Context,
|
|
const char *Utf8, int Length,
|
|
kbts_user_id_generation_mode UserIdGenerationMode)
|
|
Same as kbts_ShapeUtf8WithUserId, but using the context's implicit user ID
|
|
counter.
|
|
|
|
User IDs for the corresponding codepoints start at the context's implicit
|
|
user ID counter.
|
|
If [UserIdGenerationMode] is KBTS_USER_ID_GENERATION_MODE_CODEPOINT_INDEX,
|
|
each codepoint will increment the user ID by 1.
|
|
If [UserIdGenerationMode] is KBTS_USER_ID_GENERATION_MODE_SOURCE_INDEX,
|
|
each codepoint will increment the user ID by the length of its encoding in
|
|
bytes in UTF-8.
|
|
|
|
:kbts_ShapeCurrentCodepointsIterator
|
|
:ShapeCurrentCodepointsIterator
|
|
kbts_shape_codepoint_iterator kbts_ShapeCurrentCodepointsIterator(kbts_shape_context *Context)
|
|
The [return value] is an iterator that goes over all of the codepoints fed to
|
|
[Context] so far.
|
|
|
|
These codepoints are tagged with user IDs, segmentation info and more. See
|
|
the definition of kbts_shape_codepoint for details.
|
|
|
|
!!! WARNING !!!
|
|
Remember that segmentation is buffered, so, until you call kbts_ShapeEnd,
|
|
some codepoints might not be completely filled in yet!
|
|
|
|
Call kbts_ShapeCodepointIteratorNext repeatedly to loop through the
|
|
corresponding codepoints.
|
|
|
|
:kbts_ShapeCodepointIteratorIsValid
|
|
:ShapeCodepointIteratorIsValid
|
|
int kbts_ShapeCodepointIteratorIsValid(kbts_shape_codepoint_iterator *It)
|
|
The [return value] is non-zero if there is still a codepoint to iterate,
|
|
zero if not.
|
|
|
|
:kbts_ShapeCodepointIteratorNext
|
|
:ShapeCodepointIteratorNext
|
|
int kbts_ShapeCodepointIteratorNext(kbts_shape_codepoint_iterator *It, kbts_shape_codepoint *Codepoint, int *CodepointIndex)
|
|
Gets the next codepoint from the context [It] was initialized from and writes
|
|
it to [Codepoint].
|
|
|
|
If [CodepointIndex] is non-zero, then it is filled with [Codepoint]'s index.
|
|
|
|
The [return value] is non-zero if a codepoint was found, 0 if not.
|
|
|
|
:kbts_ShapeGetShapeCodepoint
|
|
:ShapeGetShapeCodepoint
|
|
int kbts_ShapeGetShapeCodepoint(kbts_shape_context *Context, int CodepointIndex, kbts_shape_codepoint *Codepoint)
|
|
Gets the [CodepointIndex]th codepoint from [Context] and writes it to
|
|
[Codepoint].
|
|
|
|
If you are reading glyphs back from the context, then you can use the
|
|
UserIdOrCodepointIndex field of kbts_glyph here.
|
|
|
|
!!! WARNING !!!
|
|
When using the context API, UserIdOrCodepointIndex will _always_ be a
|
|
codepoint index. To get your original user ID, you need to do:
|
|
|
|
kbts_shape_codepoint ShapeCodepoint;
|
|
kbts_ShapeGetShapeCodepoint(Context, Glyph->UserIdOrCodepointIndex, &ShapeCodepoint);
|
|
int MyUserId = ShapeCodepoint.UserId;
|
|
|
|
The [return value] is non-zero if [CodepointIndex] is in-bounds, 0 if not.
|
|
|
|
CONTEXT:VARIATIONS
|
|
:kbts_ShapeSetFontVariationVector
|
|
:ShapeSetFontVariationVector
|
|
int kbts_ShapeSetFontVariationVector(kbts_shape_context *Context, kbts_u32 ContextFontHandle, float *VariationVector)
|
|
Sets all of the variations in the font corresponding to [ContextFontHandle]
|
|
to be [VariationVector].
|
|
|
|
If any value in [VariationVector] is KBTS_VARIATION_VALUE_UNSET, then any
|
|
font-specific variations to that axis will we wiped.
|
|
|
|
[VariationVector] must be as big as the number of variation axes in the font.
|
|
|
|
:kbts_ShapeSetFontVariations
|
|
:ShapeSetFontVariations
|
|
int kbts_ShapeSetFontVariations(kbts_shape_context *Context, kbts_u32 ContextFontHandle,
|
|
kbts_variation *Variations, int VariationCount)
|
|
Will try to apply all variations described in [Variations] to the font
|
|
referenced by [ContextFontHandle].
|
|
|
|
[Variations] must be at least [VariationCount] big.
|
|
|
|
The [return value] is the amount of variations that were successfully
|
|
applied, i.e. that the font supports.
|
|
|
|
:kbts_ShapeSetFontVariation
|
|
:ShapeSetFontVariation
|
|
int kbts_ShapeSetFontVariation(kbts_shape_context *Context, kbts_u32 ContextFontHandle, kbts_u32 Tag, float Value)
|
|
Equivalent to calling kbts_ShapeSetFontVariations with a single variation
|
|
containing [Tag] and [Value].
|
|
|
|
:kbts_ShapePushGlobalVariation
|
|
:ShapePushGlobalVariation
|
|
int kbts_ShapePushGlobalVariation(kbts_shape_context *Context, kbts_u32 Tag, float Value)
|
|
Pushes a variation setting [Tag] to [Value] on to [Context]'s variation
|
|
stack.
|
|
|
|
If [Value] is KBTS_VARIATION_VALUE_UNSET, then we instead pop the topmost
|
|
variation to [Tag] from the stack.
|
|
|
|
Global variations affect all fonts in [Context] and are lower priority than
|
|
font-specific variations.
|
|
|
|
int kbts_ShapePopGlobalVariation(kbts_shape_context *Context, kbts_u32 Tag)
|
|
Equivalent to kbts_ShapePushGlobalVariation([Context], [Tag], KBTS_VARIATION_VALUE_UNSET).
|
|
|
|
CONTEXT:MISCELLANEOUS
|
|
:kbts_ShapeError
|
|
:ShapeError
|
|
kbts_shape_error kbts_ShapeError(kbts_shape_context *Context);
|
|
Get the first error that occurred on [Context].
|
|
|
|
Once a context is tagged with an error, most operations on it will do nothing.
|
|
Obviously, you can always destroy it.
|
|
|
|
:kbts_ShapeManualBreak
|
|
:ShapeManualBreak
|
|
void kbts_ShapeManualBreak(kbts_shape_context *Context);
|
|
Forces a run break at the current position in the Context.
|
|
|
|
This will flush the current segmentation state just like an end-of-text would,
|
|
and restart it as if it was at a start-of-text.
|
|
|
|
This will also generate a KBTS_BREAK_FLAG_MANUAL at the current position.
|
|
|
|
You do not need to be in manual break mode for this function to work.
|
|
|
|
:kbts_ShapeBeginManualRuns
|
|
:ShapeBeginManualRuns
|
|
void kbts_ShapeBeginManualRuns(kbts_shape_context *Context);
|
|
Disables the context's automatic segmentation, and enters a manual break mode.
|
|
|
|
:kbts_ShapeNextManualRun
|
|
:ShapeNextManualRun
|
|
void kbts_ShapeNextManualRun(kbts_shape_context *Context, kbts_direction Direction, kbts_script Script);
|
|
Add a run break at the current place in the input stream.
|
|
|
|
Since the context's segmentation is disabled, it cannot know which direction
|
|
and script to use, so you need to provide them with [Direction] and [Script].
|
|
|
|
Outside of manual break mode, this function is a no-op.
|
|
|
|
:kbts_ShapeEndManualRuns
|
|
:ShapeEndManualRuns
|
|
void kbts_ShapeEndManualRuns(kbts_shape_context *Context);
|
|
Ends manual break mode and re-enables the context's automatic segmentation.
|
|
|
|
Note that this will force natural break barriers too, just like an end-of-text
|
|
would.
|
|
|
|
Outside of manual break mode, this function is a no-op.
|
|
|
|
DIRECT SHAPING API
|
|
When trying to shape things yourself, there are four main pieces of state you will need:
|
|
- Font data (kbts_font)
|
|
- A shaping configuration (kbts_shape_config)
|
|
A shaping configuration holds a bunch of precomputed data for a given combination of
|
|
font, script and language.
|
|
You can think of it as a pipeline state in a modern graphics API.
|
|
In practice, you are only ever shaping text with a single active configuration.
|
|
|
|
Sometimes, creating two different shape configs from the same font, but from different
|
|
variation vectors will result in two identical configs. You can detect this case by
|
|
checking the configs' UID, which you can obtain directly from PlaceShapeConfig2 or
|
|
CreateShapeConfig2 or query with ShapeConfigUid.
|
|
- Glyph storage (kbts_glyph_storage)
|
|
Glyph storage fills two roles: it allocates and holds glyph data, and it also manages
|
|
a set of active glyphs.
|
|
The active glyph set part is used by the library. As a user, you only need to care
|
|
about the memory allocation part.
|
|
- Scratch memory (kbts_shape_scratchpad)
|
|
Unfortunately, shaping can have a very unpredictable memory footprint, so all shaping
|
|
operations require some amount of scratch space that we cannot compute beforehand.
|
|
|
|
The central function to call is this:
|
|
|
|
:kbts_ShapeDirect2
|
|
:ShapeDirect2
|
|
kbts_shape_error kbts_ShapeDirect2(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage,
|
|
kbts_direction RunDirection, kbts_s16 *VariationVectorNormalized, kbts_glyph_iterator *Output)
|
|
[RunDirection] is the direction of the specific run being shaped.
|
|
|
|
[VariationVectorNormalized], if it exists, is at least as big as the number
|
|
of variation axes in [Scratchpad]'s font. You can get a normalized variation
|
|
vector from kbts_NormalizeVariationVector.
|
|
|
|
If the [return value] is KBTS_SHAPE_ERROR_NONE, then the shaping operation
|
|
completed successfully.
|
|
|
|
Shaping output is returned in [Output]. You can go through the resulting glyphs
|
|
with kbts_GlyphIteratorNext.
|
|
|
|
Note that kbts_ShapeDirect does not care about the paragraph direction.
|
|
Glyphs are always returned in left-to-right order. In other words, RTL runs
|
|
are flipped so that visual order is consistent.
|
|
|
|
|
|
:kbts_ShapeDirect
|
|
:ShapeDirect
|
|
kbts_shape_error kbts_ShapeDirect(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage,
|
|
kbts_direction RunDirection, kbts_glyph_iterator *Output)
|
|
Equivalent to calling kbts_ShapeDirect2([Scratchpad], [Storage], [RunDirection], 0, [Output]).
|
|
|
|
The rest of the direct API is more or less about preparing the data you need to call
|
|
kbts_ShapeDirect.
|
|
|
|
DIRECT:FONT HANDLING
|
|
:kbts_FontCount
|
|
:FontCount
|
|
int kbts_FontCount(void *Data, int Size)
|
|
Parses the beginning of the file and returns the number of fonts contained
|
|
within the file data.
|
|
|
|
While most font files contain single fonts, font collections contain
|
|
several. This function will return 0 if [Data] is invalid, 1 if it represents
|
|
a single font, and possibly more if it represents a collection.
|
|
|
|
For all functions that require a font index, passing 0 is always safe no
|
|
matter the kind of file.
|
|
|
|
:kbts_FontFromFile
|
|
:FontFromFile
|
|
kbts_font kbts_FontFromFile(const char *FileName, int FontIndex,
|
|
kbts_allocator_function *Allocator, void *AllocatorData,
|
|
void **FileData, int *FileSize)
|
|
(This function is not available if KB_TEXT_SHAPE_NO_CRT is defined.)
|
|
Opens the file at [FileName], parses it and returns the [FontIndex]th font.
|
|
You can call kbts_FontIsValid to check if the [return value] is usable.
|
|
|
|
If [FileData] is non-zero, it is filled with a pointer to the file's contents.
|
|
This pointer is allocated using [Allocator]. If [FileData] is 0, it is freed
|
|
before the function returns.
|
|
If [FileSize] is non-zero, it is filled with the size of the file's contents.
|
|
|
|
If [FontIndex] is out of range, the [return value] is invalid.
|
|
|
|
:kbts_FontFromMemory
|
|
:FontFromMemory
|
|
kbts_font kbts_FontFromMemory(void *FileData, int FileSize, int FontIndex,
|
|
kbts_allocator_function *Allocator, void *AllocatorData)
|
|
Parses the [FontIndex]th font in [FileData].
|
|
You can call kbts_FontIsValid to check if the [return value] is usable.
|
|
|
|
:kbts_FontIsValid
|
|
:FontIsValid
|
|
int kbts_FontIsValid(kbts_font *Font)
|
|
Returns whether a font is usable.
|
|
|
|
:kbts_LoadFont
|
|
:LoadFont
|
|
kbts_load_font_error kbts_LoadFont(kbts_font *Font, kbts_load_font_state *State,
|
|
void *FontData, int FontDataSize, int FontIndex,
|
|
int *ScratchSize, int *OutputSize)
|
|
Parses the [FontIndex]th font in [FontData] and puts the result into [Font] and [State].
|
|
|
|
[State] needs to be zeroed before calling this function.
|
|
|
|
If the data represents a TrueType/OpenType font, we need to extract the data
|
|
we need and create some additional data structures. In this case, the [return
|
|
value] is KBTS_LOAD_FONT_ERROR_NEED_TO_CREATE_BLOB, and [ScratchSize] and
|
|
[OutputSize] are filled with the amount of memory we need to create our
|
|
blob. You can then initialize this blob with kbts_PlaceBlob.
|
|
|
|
If the data represents a kbts blob, then nothing needs to be done, and [Font] is
|
|
immediately usable.
|
|
|
|
Any value of [FontIndex] less than kbts_FontCount(FontData, FontDataSize) is
|
|
acceptable.
|
|
|
|
If we could not find any useful font data, the [return value] is
|
|
KBTS_LOAD_FONT_ERROR_INVALID_FONT.
|
|
|
|
:kbts_PlaceBlob
|
|
:PlaceBlob
|
|
kbts_load_font_error kbts_PlaceBlob(kbts_font *Font, kbts_load_font_state *State,
|
|
void *ScratchMemory, void *OutputMemory)
|
|
Creates a kbts blob from font data, and places it in [OutputMemory].
|
|
[Font] is the resulting font.
|
|
[State] is the state you passed into kbts_LoadFont.
|
|
[ScratchMemory] needs to be as big as the [ScratchSize] returned by kbts_LoadFont.
|
|
You can free this buffer once this function returns.
|
|
[OutputMemory] needs to be as big as the [OutputSize] returned by kbts_LoadFont.
|
|
This buffer will be used by [Font] until it is freed by kbts_FreeFont.
|
|
|
|
:kbts_FreeFont
|
|
:FreeFont
|
|
void kbts_FreeFont(kbts_font *Font)
|
|
If [Font] used allocators to allocate its data (for instance, if [Font] was
|
|
returned by kbts_FontFromFile), frees all of [Font]'s buffers.
|
|
Otherwise, does nothing.
|
|
|
|
:kbts_GetFontInfo2
|
|
:GetFontInfo2
|
|
void kbts_GetFontInfo2(kbts_font *Font, kbts_font_info2 *Info)
|
|
Writes a bunch of useful metadata about [Font] into [Info].
|
|
|
|
!!! WARNING: The Strings and StringLengths members of font_info only
|
|
support ASCII/UTF-8-encoded strings, which many font files
|
|
do not have. If you want to extract strings from a font,
|
|
use kbts_LookupFontString() instead.
|
|
|
|
Before calling this function, you must fill out [Info].Size to be
|
|
sizeof([Info]).
|
|
|
|
[Info] can be one of several types:
|
|
- kbts_font_info2 describes styling, name and licensing information.
|
|
We use a simplified representation for font weight and width that is fine for
|
|
classic font selection, e.g. "I need a bold font". OpenType fonts may feature
|
|
finer-grained metrics, and we currently do not expose/support those.
|
|
- kbts_font_info2_1 also includes metrics and bounding box information.
|
|
- kbts_font_info2_2 also includes capital height.
|
|
|
|
:kbts_font_style_flags
|
|
:font_style_flags
|
|
[Info]->StyleFlags can be:
|
|
KBTS_FONT_STYLE_FLAG_NONE (no useful style flags have been found)
|
|
KBTS_FONT_STYLE_FLAG_REGULAR
|
|
KBTS_FONT_STYLE_FLAG_BOLD
|
|
KBTS_FONT_STYLE_FLAG_ITALIC
|
|
A given font can be bold and italic at the same time, but probably not regular
|
|
and bold and probably not regular and italic.
|
|
|
|
If [Font] is not a valid font, or some information could not be found in the
|
|
font, then the respective members will be zeroed (except Size).
|
|
|
|
:kbts_GetFontInfo
|
|
:GetFontInfo
|
|
void kbts_GetFontInfo(kbts_font *Font, kbts_font_info *Info)
|
|
Equivalent to calling kbts_GetFontInfo2 with an Info struct of type
|
|
kbts_font_info2.
|
|
|
|
:kbts_WindowsIdsForLanguage
|
|
:WindowsIdsForLanguage
|
|
int kbts_WindowsIdsForLanguage(kbts_language Language, kbts_windows_language_id *Ids, int IdCapacity)
|
|
Writes a list of Windows language IDs that match [Language] to [Ids].
|
|
|
|
Windows language IDs are used to specify the locale/language of strings in a
|
|
font. You use them when calling LookupFontString().
|
|
|
|
IDs are written to [Ids] if [IdCapacity] is large enough. If it is not, then
|
|
nothing is written.
|
|
|
|
Returns how many IDs match [Language], and thus how big [IdCapacity] needs to be.
|
|
Does NOT return how many IDs were written.
|
|
|
|
:kbts_LookupFontString
|
|
:LookupFontString
|
|
int kbts_LookupFontString(kbts_font *Font,
|
|
kbts_font_info_string_id StringId, kbts_windows_language_id LanguageId,
|
|
char *String, int StringCapacity)
|
|
Extracts a string from [Font]'s name table corresponding to
|
|
[StringId], in the language specified by [LanguageId].
|
|
|
|
The resulting string is written to [String] in UTF-8.
|
|
If the string is longer than [StringCapacity], then only up to [StringCapacity]
|
|
bytes will be written.
|
|
|
|
The return value is the byte length of the string. It is NOT how many bytes were
|
|
written.
|
|
|
|
:kbts_GetVariationInfo
|
|
:GetVariationInfo
|
|
void kbts_GetVariationInfo(kbts_font *Font, int *AxisCount, int *InstanceCount)
|
|
Writes the number of variation axes contained by [Font] to [AxisCount],
|
|
and the number of variation instances to [InstanceCount].
|
|
|
|
You can then query axis information with kbts_GetVariationAxisInfo,
|
|
and instance information with kbts_GetVariationInstance.
|
|
|
|
:kbts_NormalizeVariationVector
|
|
:NormalizeVariationVector
|
|
void kbts_NormalizeVariationVector(kbts_font *Font, float *VariationVector,
|
|
kbts_s16 *VariationVectorNormalized)
|
|
Normalizes the variation coordinates in [VariationVector] for use with [Font],
|
|
and writes out the result to [VariationVectorNormalized].
|
|
|
|
[VariationVector] and [VariationVectorNormalized] should both be as big as the
|
|
number of variation axes in [Font].
|
|
|
|
:kbts_GetVariationAxisInfo
|
|
:GetVariationAxisInfo
|
|
int kbts_GetVariationAxisInfo(kbts_font *Font, int AxisIndex,
|
|
kbts_variation_axis_info *Info)
|
|
Gets the description of the [AxisIndex]th variation axis contained in [Font],
|
|
and writes it out to [Info].
|
|
|
|
Returns 1 if [AxisIndex] is in-bounds.
|
|
|
|
:kbts_GetVariationInstance
|
|
:GetVariationInstance
|
|
int kbts_GetVariationInstance(kbts_font *Font, int InstanceIndex,
|
|
kbts_variation_instance_info *Info, float *VariationVector)
|
|
Gets the description of the [InstanceIndex]th variation instance contained
|
|
in [Font], and writes it out to [Info].
|
|
|
|
If [VariationVector] is non-zero, it receives the variation vector
|
|
corresponding to the instance. As such, it must be as big as the number of
|
|
variation axes in [Font].
|
|
|
|
DIRECT:SHAPE CONFIG
|
|
:kbts_SizeOfShapeConfig2
|
|
:SizeOfShapeConfig2
|
|
int kbts_SizeOfShapeConfig2(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector)
|
|
Returns how large the buffer you pass into kbts_PlaceShapeConfig2 needs to be.
|
|
|
|
:kbts_PlaceShapeConfig2
|
|
:PlaceShapeConfig2
|
|
kbts_shape_config *kbts_PlaceShapeConfig2(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector,
|
|
void *Memory, kbts_uid *Uid)
|
|
Writes a shape config into [Memory] and returns a pointer to it.
|
|
[Memory] needs to be at least kbts_SizeOfShapeConfig2([Font], [Script], [Language], [VariationVector]) bytes.
|
|
|
|
If [Uid] is non-zero, then we write the resulting shape config's UID to it.
|
|
|
|
:kbts_CreateShapeConfig2
|
|
:CreateShapeConfig2
|
|
kbts_shape_config *kbts_CreateShapeConfig2(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector, kbts_allocator_function *Allocator, void *AllocatorData, kbts_uid *Uid)
|
|
Allocates and initializes a shape config.
|
|
|
|
If [Uid] is non-zero, then we write the resulting shape config's UID to it.
|
|
|
|
:kbts_SizeOfShapeConfig
|
|
:SizeOfShapeConfig
|
|
int kbts_SizeOfShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language)
|
|
Equivalent to kbts_SizeOfShapeConfig([Font], [Script], [Language], 0).
|
|
|
|
:kbts_PlaceShapeConfig
|
|
:PlaceShapeConfig
|
|
kbts_shape_config *kbts_PlaceShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language,
|
|
void *Memory)
|
|
Equivalent to kbts_PlaceShapeConfig2([Font], [Script], [Language], 0, [Memory], 0).
|
|
|
|
:kbts_CreateShapeConfig
|
|
:CreateShapeConfig
|
|
kbts_shape_config *kbts_CreateShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language,
|
|
kbts_allocator_function *Allocator, void *AllocatorData)
|
|
Equivalent to kbts_CreateShapeConfig2([Font], [Script], [Language], 0, [Allocator], [AllocatorData], 0).
|
|
|
|
:kbts_DestroyShapeConfig
|
|
:DestroyShapeConfig
|
|
void kbts_DestroyShapeConfig(kbts_shape_config *Config)
|
|
If [Config] was allocated in kbts_CreateShapeConfig, frees all of [Config]'s data.
|
|
Otherwise, nothing is done.
|
|
|
|
:kbts_ShapeConfigUid
|
|
:ShapeConfigUid
|
|
void kbts_ShapeConfigUid(kbts_shape_config *Config, kbts_uid *Uid)
|
|
Writes [Config]'s UID to [Uid].
|
|
|
|
DIRECT:SHAPE SCRATCHPAD
|
|
:kbts_SizeOfShapeScratchpad
|
|
:SizeOfShapeScratchpad
|
|
kbts_un kbts_SizeOfShapeScratchpad(kbts_shape_config *Config)
|
|
Returns how large a scratchpad for [Config] will be initially.
|
|
This is the size of the initial memory footprint, used to hold basic bookkeeping data.
|
|
A scratchpad can always dynamically allocate memory during shaping.
|
|
|
|
:kbts_PlaceShapeScratchpad
|
|
:PlaceShapeScratchpad
|
|
kbts_shape_scratchpad *kbts_PlaceShapeScratchpad(kbts_shape_config *Config,
|
|
void *Memory,
|
|
kbts_allocator_function *Allocator, void *AllocatorData)
|
|
Initializes a scratchpad for [Config] at [Memory], and returns a pointer to it.
|
|
[Memory] should be kbts_SizeOfShapeScratchpad(Config) big.
|
|
[Allocator] will be used by the scratchpad during shaping.
|
|
|
|
If [Memory] is null, then the [return value] is null.
|
|
|
|
:kbts_PlaceShapeScratchpadFixedMemory
|
|
:PlaceShapeScratchpadFixedMemory
|
|
kbts_shape_scratchpad *kbts_PlaceShapeScratchpadFixedMemory(kbts_shape_config *Config,
|
|
void *Memory, int Size)
|
|
Same as kbts_PlaceShapeScratchpad, except the buffer [Memory] of size [Size]
|
|
is used for both initialization and dynamic allocation.
|
|
|
|
If [Size] is not large enough, then the [return value] is null.
|
|
|
|
:kbts_CreateShapeScratchpad
|
|
:CreateShapeScratchpad
|
|
kbts_shape_scratchpad *kbts_CreateShapeScratchpad(kbts_shape_config *Config,
|
|
kbts_allocator_function *Allocator, void *AllocatorData)
|
|
Same as kbts_PlaceShapeScratchpad, except [Allocator] is used both for
|
|
initialization and for dynamic allocation.
|
|
|
|
If [Allocator] is null, then the default allocator is used.
|
|
|
|
:kbts_DestroyShapeScratchpad
|
|
:DestroyShapeScratchpad
|
|
void kbts_DestroyShapeScratchpad(kbts_shape_scratchpad *Scratchpad)
|
|
Frees all memory associated with [Scratchpad].
|
|
|
|
If [Scratchpad] itself was allocated with kbts_CreateShapeScratchpad, then
|
|
it will also free itself.
|
|
|
|
DIRECT:GLYPH STORAGE
|
|
kbts_glyph_storage is a public struct:
|
|
|
|
:kbts_glyph_storage
|
|
:glyph_storage
|
|
typedef struct kbts_glyph_storage
|
|
{
|
|
kbts_arena Arena;
|
|
|
|
kbts_glyph GlyphSentinel;
|
|
kbts_glyph FreeGlyphSentinel;
|
|
} kbts_glyph_storage;
|
|
|
|
A zeroed kbts_glyph_storage will auto-initialize itself when you try to use it.
|
|
|
|
Arena requires an allocator. By default, it will be initialized to KBTS_MALLOC
|
|
and KBTS_FREE.
|
|
You can specify your own allocator by writing to Arena.Allocator and
|
|
Arena.AllocatorData before trying to use a kbts_glyph_storage.
|
|
Alternatively, you can use kbts_InitializeGlyphStorage() to accomplish the
|
|
same thing.
|
|
|
|
:kbts_InitializeGlyphStorage
|
|
:InitializeGlyphStorage
|
|
int kbts_InitializeGlyphStorage(kbts_glyph_storage *Storage, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
Initializes [Storage] to use [Allocator] and [AllocatorData].
|
|
|
|
This is equivalent to setting [Storage]->Arena.Allocator and
|
|
[Storage]->Arena.AllocatorData, and setting all other members to 0.
|
|
|
|
The [return value] is non-zero if [Storage] is non-null.
|
|
|
|
:kbts_InitializeGlyphStorageFixedMemory
|
|
:InitializeGlyphStorageFixedMemory
|
|
int kbts_InitializeGlyphStorageFixedMemory(kbts_glyph_storage *Storage, void *Memory, int MemorySize)
|
|
Initializes [Storage] to use a fixed-size buffer of size [MemorySize] located at [Memory].
|
|
If [Storage] needs more memory than [MemorySize], allocations will fail.
|
|
|
|
The [return value] is non-zero if [Storage] is non-null and [MemorySize] is
|
|
large enough to initialize [Storage]'s arena. (Currently, this is 5 pointers'
|
|
worth of bytes.)
|
|
|
|
:kbts_PushGlyph
|
|
:PushGlyph
|
|
kbts_glyph *kbts_PushGlyph(kbts_glyph_storage *Storage,
|
|
kbts_font *Font, int Codepoint, kbts_glyph_config *Config, int UserId)
|
|
Adds a glyph to [Storage]'s active glyph set and returns a pointer to it.
|
|
|
|
[Font] is used to initialize the glyph's glyph ID. It is assumed that [Font] is
|
|
the same as the kbts_shape_config's Font field passed into kbts_ShapeDirect.
|
|
|
|
[Config] is the glyph's configuration and needs to stay live until kbts_ShapeDirect
|
|
completes. See DIRECT:GLYPH CONFIG for more details.
|
|
|
|
[UserId] is a user-provided unique identifier that you can get back once shaping
|
|
is done.
|
|
|
|
The [return value] might be zero if [Storage]'s allocator fails.
|
|
|
|
:kbts_ClearActiveGlyphs
|
|
:ClearActiveGlyphs
|
|
void kbts_ClearActiveGlyphs(kbts_glyph_storage *Storage)
|
|
Clears [Storage]'s active glyph set.
|
|
This does not free any memory; rather, it puts the active glyphs in a free list.
|
|
|
|
:kbts_FreeAllGlyphs
|
|
:FreeAllGlyphs
|
|
void kbts_FreeAllGlyphs(kbts_glyph_storage *Storage)
|
|
Frees all memory allocated by [Storage].
|
|
|
|
:kbts_CodepointToGlyph
|
|
:CodepointToGlyph
|
|
kbts_glyph kbts_CodepointToGlyph(kbts_font *Font, int Codepoint, kbts_glyph_config *Config, int UserId)
|
|
You can create glyphs without a glyph storage at all with this function.
|
|
|
|
:kbts_CodepointToGlyphId
|
|
:CodepointToGlyphId
|
|
int kbts_CodepointToGlyphId(kbts_font *Font, int Codepoint)
|
|
Gets the glyph ID corresponding to [Codepoint] from [Font].
|
|
A glyph ID of 0 means that the codepoint is not present in the font.
|
|
Note that this is not thorough enough to be a good font coverage test!
|
|
See OTHER:FONT COVERAGE TEST for this.
|
|
|
|
:kbts_ActiveGlyphIterator
|
|
:ActiveGlyphIterator
|
|
kbts_glyph_iterator kbts_ActiveGlyphIterator(kbts_glyph_storage *Storage)
|
|
Returns an iterator to traverse [Storage]'s active glyph set.
|
|
|
|
See OTHER:GLYPH ITERATION for more details on glyph iterators.
|
|
|
|
DIRECT:GLYPH CONFIG
|
|
The shaper figures out most of the work it needs to do based on the writing system
|
|
it is shaping. However, some fonts support optional, toggleable features, like
|
|
"make this text smallcaps". For things like this, you will want to create a
|
|
kbts_glyph_config. You can then pass it to glyph creation functions or write it to
|
|
the Config field of a kbts_glyph.
|
|
|
|
A kbts_glyph_config can hold any number of feature overrides. A feature override
|
|
is a feature tag and a value. Most of the time, you only care whether the value
|
|
is 0 or 1, but a few features actually care about the exact value. (You can think
|
|
of a feature that is like "when I am enabled, change this letter to one of these
|
|
alternatives". In that case, the value you provide in the feature override is used
|
|
as a one-based index into the array of alternatives.)
|
|
|
|
:kbts_SizeOfGlyphConfig
|
|
:SizeOfGlyphConfig
|
|
int kbts_SizeOfGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount)
|
|
Returns the buffer size needed to hold a kbts_glyph_config that describes [Overrides].
|
|
This size can vary a lot depending on the kind of feature overrides you specify.
|
|
Overrides with values of 0 or 1 are stored in a compact format, while other values
|
|
will be stored explicitly.
|
|
|
|
:kbts_PlaceGlyphConfig
|
|
:PlaceGlyphConfig
|
|
kbts_glyph_config *kbts_PlaceGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount, void *Memory)
|
|
Writes a kbts_glyph_config that describes [Overrides] into [Memory], and returns a
|
|
pointer to it.
|
|
The kbts_glyph_config uses its own representation for overrides, so you can modify
|
|
[Overrides] once this function returns.
|
|
|
|
:kbts_CreateGlyphConfig
|
|
:CreateGlyphConfig
|
|
kbts_glyph_config *kbts_CreateGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
Allocates a kbts_glyph_config that describes [Overrides] and returns a pointer to
|
|
it.
|
|
The kbts_glyph_config uses its own representation for overrides, so you can modify
|
|
[Overrides] once this function returns.
|
|
|
|
:kbts_DestroyGlyphConfig
|
|
:DestroyGlyphConfig
|
|
void kbts_DestroyGlyphConfig(kbts_glyph_config *Config)
|
|
If [Config] was allocated in kbts_CreateGlyphConfig, frees all of its data.
|
|
Otherwise, does nothing.
|
|
|
|
DIRECT:SEGMENTATION
|
|
kbts_break_state is the central struct used for segmentation. It contains all of the state
|
|
needed to perform fixed-memory segmentation of text.
|
|
|
|
:kbts_BreakBegin
|
|
:BreakBegin
|
|
void kbts_BreakBegin(kbts_break_state *State,
|
|
kbts_direction ParagraphDirection,
|
|
kbts_japanese_line_break_style JapaneseLineBreakStyle,
|
|
kbts_break_config_flags ConfigFlags)
|
|
Initializes [State] for segmentation.
|
|
|
|
[ParagraphDirection] is the top-level flow direction of your document or layout.
|
|
If [ParagraphDirection] is KBTS_DIRECTION_DONT_KNOW, then [State]'s
|
|
ParagraphDirection will be initialized to the first direction we find
|
|
while segmenting.
|
|
|
|
:kbts_japanese_line_break_style
|
|
:japanese_line_break_style
|
|
[JapaneseLineBreakStyle] can be one of the following:
|
|
|
|
KBTS_JAPANESE_LINE_BREAK_STYLE_STRICT
|
|
KBTS_JAPANESE_LINE_BREAK_STYLE_NORMAL
|
|
KBTS_JAPANESE_LINE_BREAK_STYLE_LOOSE
|
|
|
|
Japanese text contains "kinsoku" characters, around which breaking a line is
|
|
forbidden. Exactly which characters are "kinsoku" or not depends on the context:
|
|
|
|
- Strict style has the largest amount of kinsoku characters, which leads to
|
|
longer lines.
|
|
The Unicode standard does not define what strict style is used for.
|
|
Supposedly, it is used for anything that does not fall into the other
|
|
two categories of text.
|
|
|
|
- Loose style has the smallest amount of kinsoku characters, which leads
|
|
to smaller lines.
|
|
According to the Unicode standard, loose style is used for newspapers.
|
|
I assume it is also used for any other narrow column format.
|
|
|
|
- Normal style is somewhere in the middle.
|
|
According to the Unicode standard, normal style is used for books and
|
|
documents.
|
|
|
|
Note that, while the Unicode standard mentions all three of these styles, it
|
|
does not mention any differences between the normal and loose styles. As such,
|
|
normal and loose styles currently behave the same.
|
|
|
|
:kbts_kbts_break_config_flags
|
|
:kbts_break_config_flags
|
|
[ConfigFlags] can be a combination of the following:
|
|
|
|
KBTS_BREAK_CONFIG_FLAG_END_OF_TEXT_GENERATES_HARD_LINE_BREAK
|
|
The Unicode standard specifies that the end of a text should generate a
|
|
hard line break. However, this is an awkward rule to uphold in practical
|
|
contexts, because it makes the case where the text ends in a newline
|
|
ambiguous. So, by default, we disable it.
|
|
|
|
Without this flag (default behavior):
|
|
<start of text>\n<end of text> generates a hard line break at position 1
|
|
<start of text>A<end of text> generates no hard line break
|
|
|
|
With this flag (Unicode behavior):
|
|
<start of text>\n<end of text> generates a hard line break at position 1
|
|
<start of text>A<end of text> generates a hard line break at position 1
|
|
|
|
:kbts_BreakAddCodepoint
|
|
:BreakAddCodepoint
|
|
void kbts_BreakAddCodepoint(kbts_break_state *State, int Codepoint, int PositionIncrement, int EndOfText)
|
|
Feeds [Codepoint] to [State].
|
|
|
|
[PositionIncrement] is used to update an internal cursor and fill out
|
|
kbts_break's Position field. If you only care about codepoint indices, pass
|
|
1. Maybe you want to pass in the number of bytes it took to decode the
|
|
codepoint, though, to be able to directly index UTF-8 text.
|
|
|
|
If [EndOfText] is non-zero, kbts_BreakEnd is called after adding [Codepoint].
|
|
|
|
Every time you call kbts_BreakAddCodepoint, you need to empty the break
|
|
buffer by calling kbts_Break repeatedly.
|
|
|
|
:kbts_BreakEnd
|
|
:BreakEnd
|
|
void kbts_BreakEnd(kbts_break_state *State)
|
|
Flushes all pending breaks and finishes segmentation.
|
|
|
|
You then obtain breaks by repeatedly calling kbts_Break, just as you would
|
|
after kbts_BreakAddCodepoint.
|
|
|
|
:kbts_Break
|
|
:Break
|
|
int kbts_Break(kbts_break_state *State, kbts_break *Break)
|
|
If any breaks have been found, writes one to [Break] and returns a non-zero
|
|
value. If not, returns 0.
|
|
|
|
kbts_break looks like this:
|
|
|
|
typedef struct kbts_break
|
|
{
|
|
int Position;
|
|
kbts_break_flags Flags;
|
|
kbts_direction Direction; // Only valid if (Flags & KBTS_BREAK_FLAG_DIRECTION).
|
|
kbts_script Script; // Only valid if (Flags & KBTS_BREAK_FLAG_SCRIPT).
|
|
} kbts_break;
|
|
|
|
Position is the position of the break, informed by the PositionIncrement
|
|
you passed to kbts_BreakAddCodepoint.
|
|
|
|
Flags can be any combination of:
|
|
KBTS_BREAK_FLAG_DIRECTION
|
|
Indicates a change of direction.
|
|
|
|
KBTS_BREAK_FLAG_SCRIPT
|
|
Indicates a change of script.
|
|
|
|
KBTS_BREAK_FLAG_GRAPHEME
|
|
Indicates the start of a grapheme.
|
|
Unicode describes a grapheme as a visual unit. In practice, you care about
|
|
graphemes for font coverage testing and caret positioning.
|
|
|
|
The way you do grapheme-aware font coverage testing is you split your text
|
|
into graphemes, then, for each grapheme, check if it is supported by your
|
|
font. Grapheme boundaries are nice because they group codepoints that may
|
|
want to combine together, but it separates codepoints that probably won't
|
|
recombine, so they work as an synchronization point for font coverage.
|
|
|
|
Caret positioning typically works in graphemes, too. When the user presses
|
|
the right arrow, you would go to the next grapheme boundary instead of
|
|
naively going to the next codepoint.
|
|
|
|
KBTS_BREAK_FLAG_WORD
|
|
Indicates the start of a word.
|
|
|
|
KBTS_BREAK_FLAG_LINE_SOFT
|
|
A soft line break tells you where you are able to break lines.
|
|
In Unicode land, you cannot break a line without one of these!
|
|
|
|
KBTS_BREAK_FLAG_LINE_HARD
|
|
A hard line break should always be respected.
|
|
|
|
KBTS_BREAK_FLAG_MANUAL
|
|
This is used internally by the kbts_shape_context for manual segmentation.
|
|
(See kbts_ShapeBeginManualRuns for more details.)
|
|
|
|
!CAREFUL! For a given break type, breaks are guaranteed to be returned in order.
|
|
However, there is no such ordering guarantee between different types
|
|
of breaks. Each type of break is processed separately, and the
|
|
corresponding Unicode algorithms all require some kind of buffering
|
|
scheme to work in fixed memory, so, while any given buffer is consistent
|
|
with itself, we cannot order multiple buffers together.
|
|
|
|
:kbts_BreakEntireString
|
|
:BreakEntireString
|
|
void kbts_BreakEntireString(kbts_direction ParagraphDirection,
|
|
kbts_japanese_line_break_style JapaneseLineBreakStyle,
|
|
kbts_break_config_flags ConfigFlags,
|
|
void *Input, int InputSizeInBytes, kbts_text_format InputFormat,
|
|
kbts_break *Breaks, int BreakCapacity, int *BreakCount,
|
|
kbts_break_flags *BreakFlags, int BreakFlagCapacity, int *BreakFlagCount)
|
|
Goes through the entire buffer at [Input] and finds all breaks.
|
|
[Input] is of type [InputFormat], which can be one of:
|
|
KBTS_TEXT_FORMAT_UTF32
|
|
KBTS_TEXT_FORMAT_UTF8
|
|
|
|
Breaks will be written to [Breaks], up to [BreakCapacity]. Regardless of
|
|
whether [BreakCapacity] is large enough or not, the amount of breaks found
|
|
will be written to [BreakCount]. Unlike kbts_Break, here, [Breaks] are
|
|
guaranteed to be ordered.
|
|
|
|
[BreakFlags] is a parallel array to the input sequence. If a break is found
|
|
at position X, then BreakFlags[X] will be filled with the appropriate flags,
|
|
up to [BreakFlagCapacity]. Regardless of whether [BreakFlagCapacity] is large
|
|
enough or not, the required capacity is written to [BreakFlagCount].
|
|
|
|
:kbts_BreakEntireStringUtf32
|
|
:BreakEntireStringUtf32
|
|
void kbts_BreakEntireStringUtf32(kbts_direction ParagraphDirection,
|
|
kbts_japanese_line_break_style JapaneseLineBreakStyle,
|
|
kbts_break_config_flags ConfigFlags,
|
|
int *Utf32, int Utf32Count,
|
|
kbts_break *Breaks, int BreakCapacity, int *BreakCount,
|
|
kbts_break_flags *BreakFlags, int BreakFlagCapacity, int *BreakFlagCount)
|
|
Convenience wrapper for kbts_BreakEntireString for UTF-32 text.
|
|
|
|
:kbts_BreakEntireStringUtf8
|
|
:BreakEntireStringUtf8
|
|
void kbts_BreakEntireStringUtf8(kbts_direction ParagraphDirection,
|
|
kbts_japanese_line_break_style JapaneseLineBreakStyle,
|
|
kbts_break_config_flags ConfigFlags,
|
|
const char *Utf8, int Utf8Length,
|
|
kbts_break *Breaks, int BreakCapacity, int *BreakCount,
|
|
kbts_break_flags *BreakFlags, int BreakFlagCapacity, int *BreakFlagCount)
|
|
Convenience wrapper for kbts_BreakEntireString for UTF-8 text.
|
|
|
|
This wrapper passes the amount of bytes used to decode each codepoint into
|
|
kbts_BreakAddCodepoint's PositionIncrement argument. This means that break
|
|
positions written to [Breaks] point into the UTF-8 stream.
|
|
|
|
:kbts_GuessTextProperties
|
|
:GuessTextProperties
|
|
void kbts_GuessTextProperties(void *Text, int TextSizeInBytes, kbts_text_format Format,
|
|
kbts_direction *Direction, kbts_script *Script)
|
|
Goes through the input sequence at [Text], finds the first direction and
|
|
script, and writes them to [Direction] and [Script] respectively.
|
|
|
|
This is a quick-and-dirty way of finding out simple facts about your text.
|
|
However, the results only really make sense when you know [Input] is
|
|
mono-script and mono-direction.
|
|
|
|
:kbts_GuessTextPropertiesUtf32
|
|
:GuessTextPropertiesUtf32
|
|
void kbts_GuessTextPropertiesUtf32(const int *Utf32, int Utf32Count,
|
|
kbts_direction *Direction, kbts_script *Script)
|
|
Convenience wrapper for kbts_GuessTextProperties for UTF-32 text.
|
|
|
|
:kbts_GuessTextPropertiesUtf8
|
|
:GuessTextPropertiesUtf8
|
|
void kbts_GuessTextPropertiesUtf8(const char *Utf8, int Utf8Length,
|
|
kbts_direction *Direction, kbts_script *Script)
|
|
Convenience wrapper for kbts_GuessTextProperties for UTF-8 text.
|
|
|
|
OTHER APIS
|
|
OTHER:GLYPH ITERATION
|
|
:kbts_GlyphIteratorNext
|
|
:GlyphIteratorNext
|
|
int kbts_GlyphIteratorNext(kbts_glyph_iterator *It, kbts_glyph **Glyph)
|
|
Writes the next glyph to iterate over in [Glyph].
|
|
|
|
Once shaping is done, the interesting members of a glyph are:
|
|
- Id: the glyph index/id in the font.
|
|
- UserId: the user ID you passed in when creating the glyph.
|
|
This is typically some kind of codepoint index you can use to trace back
|
|
the glyph to your source text.
|
|
- AdvanceX/Y and OffsetX/Y: positioning data.
|
|
Here is how you might use them:
|
|
|
|
kbts_glyph *Glyph;
|
|
int CursorX = 0, CursorY = 0;
|
|
while(kbts_GlyphIteratorNext(&It, &Glyph))
|
|
{
|
|
int GlyphX = CursorX + Glyph->OffsetX;
|
|
int GlyphY = CursorY + Glyph->OffsetY;
|
|
|
|
CursorX += Glyph->AdvanceX;
|
|
CursorY += Glyph->AdvanceY;
|
|
}
|
|
|
|
You cannot assume that [Glyph] will stay valid if you free its glyph storage,
|
|
begin another shaping operation using the same glyph storage, or do any kind
|
|
of manipulation involving the glyph storage that holds this glyph. Likewise,
|
|
you should probably not assume that [Glyph] will stay valid after the next
|
|
call to kbts_GlyphIteratorNext.
|
|
|
|
The [return value] is 1 if we found a glyph to return, and 0 if we did not.
|
|
Once kbts_GlyphIteratorNext has returned 0, you can keep calling it and
|
|
it will keep returning 0.
|
|
|
|
:kbts_GlyphIteratorIsValid
|
|
:GlyphIteratorIsValid
|
|
int kbts_GlyphIteratorIsValid(kbts_glyph_iterator *It)
|
|
Returns whether there are still glyphs left to iterate over.
|
|
|
|
If this returns a non-zero value, then the next call to
|
|
kbts_GlyphIteratorNext will also return a non-zero value and write a valid
|
|
glyph.
|
|
|
|
OTHER:FONT COVERAGE TEST
|
|
To implement font fallback, you need to be able to know if a given span of text
|
|
is supported by a given font. However, this process is not as simple as it sounds.
|
|
Some Unicode codepoints have "canonical decompositions" and "canonical
|
|
recompositions" that are meant to describe different ways to represent the same
|
|
text, but with different codepoints. At the beginning of the shaping process,
|
|
shapers try all combinations until one is found that is fully supported by the
|
|
font. A font coverage test does this within a fixed memory footprint.
|
|
|
|
:kbts_FontCoverageTestBegin
|
|
:FontCoverageTestBegin
|
|
void kbts_FontCoverageTestBegin(kbts_font_coverage_test *Test, kbts_font *Font)
|
|
Initializes [Test] to test coverage with [Font].
|
|
|
|
:kbts_FontCoverageTestCodepoint
|
|
:FontCoverageTestCodepoint
|
|
void kbts_FontCoverageTestCodepoint(kbts_font_coverage_test *Test, int Codepoint)
|
|
Feeds [Codepoint] into [Test] and updates coverage information.
|
|
|
|
:kbts_FontCoverageTestEnd
|
|
:FontCoverageTestEnd
|
|
int kbts_FontCoverageTestEnd(kbts_font_coverage_test *Test)
|
|
Flushes the pending combinations not yet tested by [Test] and ends the coverage
|
|
test.
|
|
The [return value] is non-zero if the text is fully supported by the font,
|
|
whereas it is 0 if any glyph was not supported.
|
|
You can also check Test->Error to see if any glyph was unsupported.
|
|
|
|
OTHER:OTHER OTHER:MISC
|
|
:kbts_DecodeUtf8
|
|
:DecodeUtf8
|
|
kbts_decode kbts_DecodeUtf8(const char *Utf8, kbts_un Length)
|
|
Tries to decode a single codepoint from [Utf8].
|
|
kbts_decode looks like this:
|
|
|
|
typedef struct kbts_decode
|
|
{
|
|
int Codepoint;
|
|
|
|
int SourceCharactersConsumed;
|
|
int Valid;
|
|
} kbts_decode;
|
|
|
|
Codepoint is the decoded codepoint.
|
|
SourceCharactersConsumed is the amount of bytes that were read from [Utf8].
|
|
If decoding was successful, Valid is non-zero. Otherwise, it is zero.
|
|
Valid is zero if we run out of characters, or if the characters in [Utf8]
|
|
are invalid.
|
|
|
|
:kbts_DecodeUtf16
|
|
:DecodeUtf16
|
|
kbts_decode kbts_DecodeUtf16(const kbts_u16 *Utf16, kbts_un Length, kbts_decode_utf16_flags Flags)
|
|
Just like DecodeUtf8(), but for Utf16 input.
|
|
|
|
[Length] is the _character_ length of [Utf16], NOT its byte length.
|
|
[Flags] can be:
|
|
KBTS_DECODE_UTF16_FLAG_NONE = 0
|
|
KBTS_DECODE_UTF16_FLAG_BIG_ENDIAN = (1 << 0) // [Utf16] points to a big-endian buffer.
|
|
|
|
:kbts_EncodeUtf8
|
|
:EncodeUtf8
|
|
kbts_encode_utf8 kbts_EncodeUtf8(int Codepoint)
|
|
Tries to encode a single codepoint into a UTF-8 sequence of bytes.
|
|
kbts_encode looks like this:
|
|
|
|
typedef struct kbts_encode_utf8
|
|
{
|
|
char Encoded[4];
|
|
int EncodedLength;
|
|
int Valid;
|
|
} kbts_encode_utf8;
|
|
|
|
Encoded is the encoded sequence.
|
|
EncodedLength is the number of bytes needed to encode [Codepoint].
|
|
Valid is whether or not [Codepoint] is a valid codepoint to encode.
|
|
(All codepoints up to 0x10FFFF inclusive can be encoded.)
|
|
When Valid is 0, EncodedLength is also 0.
|
|
|
|
:kbts_ScriptDirection
|
|
:ScriptDirection
|
|
kbts_direction kbts_ScriptDirection(kbts_script Script)
|
|
Returns the default direction for a given script.
|
|
|
|
:kbts_ScriptIsComplex
|
|
:ScriptIsComplex
|
|
int kbts_ScriptIsComplex(kbts_script Script)
|
|
Returns whether a script is complex, i.e. if it requires complex shaper
|
|
support.
|
|
|
|
:kbts_ScriptTagToScript
|
|
:ScriptTagToScript
|
|
kbts_script kbts_ScriptTagToScript(kbts_script_tag Tag)
|
|
Returns a given script from a four-character tag.
|
|
A kbts_script_tag can be obtained either through the KBTS_SCRIPT_TAG_*
|
|
constants, or through the KBTS_FOURCC() macro, which creates a tag from
|
|
four characters.
|
|
|
|
LANGUAGE SUPPORT
|
|
Shaping is NOT supported for the following scripts:
|
|
Zawgyi: some fonts exist, but no standardized OpenType feature set seems to exist as of writing.
|
|
Syriac: Syriac Abbreviation Mark (0x070F) is not supported.
|
|
Egyptian Hieroglyphs, I think, although example text is hard to come by.
|
|
Word breaking is NOT supported for languages that require word dictionaries, like CJK.
|
|
|
|
FONT SUPPORT
|
|
Indic fonts using the Indic1 shaping model are not supported.
|
|
e.g., 'bng2' will work, but 'beng' will not.
|
|
The Indic v2 shaping model was released with OpenType 1.5 in May 2008.
|
|
Traditional Arabic Windows 3.1 fonts are not supported.
|
|
https://github.com/harfbuzz/harfbuzz/issues/681
|
|
Thai/Lao PUA fonts are not supported.
|
|
These are old fonts that use OS-specific codepages (PUA stands for [Unicode] "Private Use Area") and
|
|
pre-OpenType shaping.
|
|
https://linux.thai.net/~thep/th-otf/shaping.html
|
|
More generally, we try to be compatible with most well-formed fonts, but we try less hard than Harfbuzz
|
|
to be compatible with every font under the sun.
|
|
|
|
OTHER LIMITATIONS
|
|
Hinting is not supported.
|
|
Explicit direction control characters are not supported. This includes:
|
|
0x202A Left-to-right embedding
|
|
0x202B Right-to-left embedding
|
|
0x202D Left-to-right override
|
|
0x202E Right-to-left override
|
|
0x202C Pop directional formatting
|
|
0x2066 Left-to-right isolate
|
|
0x2067 Right-to-left isolate
|
|
0x2068 First strong isolate
|
|
0x2069 Pop directional isolate
|
|
See https://unicode.org/reports/tr9 for more information.
|
|
|
|
CONTRIBUTORS
|
|
Jimmy Lefevre Daniel Jennings github:HueHue44 github:JCash
|
|
github:loganamcnichols Antoine Gagnon github:dmarjenburgh github:pdoane
|
|
github:hollinwilkins Wassim Alhajomar . .
|
|
. . . .
|
|
. . . .
|
|
. . . .
|
|
. . . .
|
|
. . . .
|
|
. . . .
|
|
. . . .
|
|
|
|
VERSION HISTORY
|
|
2.33 - The context's shape_config cache now uses UIDs as a key, making it work with variations.
|
|
The context's caches now have proper eviction.
|
|
The parser now invalidates font tables one by one, rather than rejecting entire fonts when it finds one issue.
|
|
Added some bounds checking when resolving variation data.
|
|
Fixed a bug where format 1 pair positioning records read the wrong variation data.
|
|
Fixed a sign extension bug when reading 24-bit integers.
|
|
Fixed a desync between SizeOfGlyphConfig and PlaceGlyphConfig.
|
|
Fixed some superfluous zeroed breaks getting generated in BreakEntireString.
|
|
Fixed memory leaks when parsing invalid fonts with FontFromFile and FontFromMemory.
|
|
Fixed a string ID mapping issue when variation data reused built-in font strings.
|
|
CodepointToGlyphId now returns the codepoint itself if the font is invalid.
|
|
New symbol: KBTS_MEMMOVE
|
|
kb_text_shape now needs a functional memmove implementation.
|
|
You can #define the symbol to provide your own, otherwise we will #include <string.h>.
|
|
New enum member: KBTS_FONT_INFO_STRING_ID_RESERVED. This increments KBTS_FONT_INFO_STRING_ID_COUNT1 by 1.
|
|
2.32 - Various Unicode normalization performance improvements. Shaping can be up to 12% faster overall.
|
|
Add support for 24-bit integers in delta set index maps (these are a font variation thing).
|
|
Struct layout changes:
|
|
kbts_glyph
|
|
Removed "kbts_u64 Decomposition" field.
|
|
2.31 - Added a limit to the number of output glyphs that can be generated per input glyph. 256 by default, see KBTS_MAX_OUTPUT_GLYPHS_PER_INPUT_GLYPH. (Thanks github:dimenus)
|
|
New enum member: KBTS_SHAPE_ERROR_GENERATED_TOO_MANY_GLYPHS.
|
|
Fix manual overrides of automatic features (like frac, numr, dnom, ljmo, isol etc.) not working. (Thanks github:pdoane)
|
|
2.30a - Fix a case where resolving bracket scripts would collapse entire strings to the wrong script.
|
|
2.30 - Store font hashes in cache entries rather than indirectly. (Thanks Wassim Alhajomar and github:pdoane)
|
|
Accept GSUB and GPOS tables with null ScriptListOffset, FeatureListOffset or LookupListOffset as empty tables. (Thanks github:pdoane)
|
|
Remove two non-ASCII characters from a comment. (Thanks github:akien-mga)
|
|
Fix kbts_ShapeConfigUid not being properly defined. (Thanks github:Trider12)
|
|
More robustness improvements in font parsing.
|
|
Fix invalid fonts returning from LoadFont with LOAD_FONT_ERROR_NONE. (Thanks github:dimenus)
|
|
FontIsValid now tests for a null font pointer and a null blob pointer.
|
|
PlaceShapeConfig now returns 0 when Font->Blob is 0 or Font->Error is set instead of trying to read through the null pointer.
|
|
The ShapePushFontFromMemory functions now properly zero fonts before calling LoadFont.
|
|
kbts_LoadFont now sets the font's error code.
|
|
Bump MAX_SIMULTANEOUS_FEATURES up from 32 to 256.
|
|
Fix scriptless leading characters getting absorbed into larger runs in ShapeRun. (Thanks github:soufianekhiat)
|
|
2.29 - Some important bug fixes. I apologize to anyone who was disturbed by the 2.28 release.
|
|
Many robustness improvements. The library will detect a lot more malformed fonts. It is still not hardened, though.
|
|
Reduce scratch size for loading fonts.
|
|
2.28g - Fix GCC 15.2 warnings. Fix typo in version history.
|
|
2.28f - Removed many UB unaligned memory accesses.
|
|
2.28e - Fix word and line break positions with heterogenous-sized strings.
|
|
2.28d - Better cache keys in the context.
|
|
Fix an infinite loop in non-cluster Myanmar syllable splitting.
|
|
2.28c - Only perform single decomposition on unsupported glyphs.
|
|
2.28b - Make kbts_PlaceBlob not error out when State->ScratchSize is 0 and ScratchMemory is NULL.
|
|
Make kbts_PlaceBlob return KBTS_LOAD_FONT_ERROR_NONE when State->TotalSize is 0 and OutputMemory is 0.
|
|
Remove KBTS_CONTEXT_MAX_FONT_COUNT. The font stack now resizes dynamically in increments of KBTS_CONTEXT_FONTS_PER_BLOCK.
|
|
Interpret a GSUB or GPOS table with NULL ScriptListOffset, FeatureListOffset and LookupListOffset as empty.
|
|
Properly namespace kbts_lookup_list to kbts__lookup_list.
|
|
Improved script matching: handle 'dflt'; fall back to 'latn' if we don't match anything and no default was found.
|
|
Fix some Han characters not having a Script property.
|
|
Fix Hangul glyphs always having NULL UserId and Config after shaping.
|
|
Fix Hangul recomposition trying to compose with incorrect trailing characters.
|
|
Fix nested recompositions.
|
|
2.28a - Fix unaligned reads and NULL pointer offsets when reading variation data.
|
|
Fix minimum size computation for delta set index maps.
|
|
Fix various clang warnings.
|
|
2.28 - Add support for variable fonts.
|
|
New functions:
|
|
kbts_ShapePushFontFromFile2
|
|
kbts_ShapePushFontFromMemory2
|
|
kbts_ShapePushFont2
|
|
kbts_ShapeSetFontVariationVector
|
|
kbts_ShapeSetFontVariations
|
|
kbts_ShapeSetFontVariation
|
|
kbts_ShapePushGlobalVariation
|
|
kbts_ShapePopGlobalVariation
|
|
kbts_ShapeDirect2
|
|
kbts_GetVariationInfo
|
|
kbts_GetVariationAxisInfo
|
|
kbts_GetVariationInstance
|
|
kbts_NormalizeVariationVector
|
|
kbts_SizeOfShapeConfig2
|
|
kbts_PlaceShapeConfig2
|
|
kbts_CreateShapeConfig2
|
|
kbts_ShapeConfigUid
|
|
New enums: kbts_variation_axis_flags, kbts_variation_instance_flags.
|
|
Removed singleton recompositions from the normalization pass. This saves us ~60KiB of table data.
|
|
2.27 - Rename internal function kbts_ByteSwapValueRecord to kbts__ByteSwapValueRecord.
|
|
2.26c - Reorder language IDs returned from WindowsIdsForLanguage.
|
|
2.26b - In kbts_LookupFontString, return the string length even when StringCapacity is 0.
|
|
2.26a - Fix cmap4 compatibility regression introduced in 2.24.
|
|
2.26 - Deprecate font_info.Strings, .StringLengths.
|
|
To extract strings from fonts, use kbts_WindowsIdsForLanguage and kbts_LookupFontString.
|
|
These functions are compatible with Windows-encoded strings, which are by far the most
|
|
common type of string in OpenType fonts.
|
|
New functions: kbts_WindowsIdsForLanguage, kbts_LookupFontString, kbts_DecodeUtf16.
|
|
New enums: kbts_decode_utf16_flags, kbts_windows_language_id.
|
|
Extend kbts_font_info_string_id to contain more(all?) pre-defined OpenType string IDs.
|
|
Fix several typos in kbts_language.
|
|
2.25 - Check for empty input and context errors in segmentation updates.
|
|
Clean up mixed line endings.
|
|
2.24 - Improve cmap4 compatibility with old fonts.
|
|
2.23 - Improve direction inference at the end of paragraphs and for short paragraphs.
|
|
2.22 - Fix a segmentation bug where a line with an unknown script would inherit the next
|
|
line's script.
|
|
2.21 - Eliminate redundant typedefs for C99 compatibility.
|
|
2.20 - Properly check kbts__InputCodepoint return values.
|
|
Handle null shape configs in kbts_PlaceGlyphConfig.
|
|
2.19 - Fix the glyph config cache not taking shape_configs into account.
|
|
2.18 - Improved handling of default-ignorable codepoints.
|
|
2.17 - New function: kbts_PlaceShapeContextFixedMemory2.
|
|
2.16 - New type: kbts_shape_context_flags.
|
|
New functions: kbts_PlaceShapeContext2, kbts_CreateShapeContext2.
|
|
Fix a bug where ShapeCodepointIteratorNext() returned a null terminator when
|
|
the text ended on a block boundary.
|
|
Fix inconsistent break count/break flag count reporting in BreakEntireString.
|
|
2.15a - Fix GCC warnings
|
|
2.15 - Handle edge case when decomposing Thai/Lao Am vowels.
|
|
2.14 - Fix direction resolution for neutral characters surrounding digits.
|
|
2.13 - Extend NO_BREAK flag to include attached glyphs.
|
|
2.12 - Support fonts that use traditionally-GPOS features in GSUB.
|
|
2.11 - Reduce the size of Unicode lookup tables from ~577KiB to ~423KiB.
|
|
Fix a memory leak when recomposing glyphs in the shaper.
|
|
Remember shape and glyph configs in the shape context.
|
|
2.10 - Properly zero extended font_info2 types in GetFontInfo2.
|
|
Properly reset the glyph config cache in ShapeBegin.
|
|
2.09 - Fix use-after-free when a shape_scratchpad was freed after its respective shape_config.
|
|
Extended the GetFontInfo API to include metrics and bounding box information.
|
|
New types: kbts_font_info2, kbts_font_info2_1, kbts_font_info2_2.
|
|
New function: kbts_GetFontInfo2().
|
|
2.08 - Fix some UB.
|
|
2.07 - Performance improvements.
|
|
API CHANGES:
|
|
Struct layout changes for internal use: kbts_glyph, kbts_glyph_parent.
|
|
|
|
CONTEXT API
|
|
- kbts_shape_codepoint now holds bespoke feature overrides instead of a glyph config.
|
|
BEFORE:
|
|
typedef struct kbts_shape_codepoint
|
|
{
|
|
kbts_font *Font; // Only set when (BreakFlags & KBTS_BREAK_FLAG_GRAPHEME) != 0.
|
|
|
|
kbts_glyph_config *Config;
|
|
|
|
int Codepoint;
|
|
int UserId;
|
|
|
|
kbts_break_flags BreakFlags;
|
|
kbts_script Script; // Only set when (BreakFlags & KBTS_BREAK_FLAG_SCRIPT) != 0.
|
|
kbts_direction Direction; // Only set when (BreakFlags & KBTS_BREAK_FLAG_DIRECTION) != 0.
|
|
kbts_direction ParagraphDirection; // Only set when (BreakFlags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION) != 0.
|
|
} kbts_shape_codepoint;
|
|
AFTER:
|
|
typedef struct kbts_shape_codepoint
|
|
{
|
|
kbts_font *Font; // Only set when (BreakFlags & KBTS_BREAK_FLAG_GRAPHEME) != 0.
|
|
|
|
kbts_feature_override *FeatureOverrides;
|
|
int FeatureOverrideCount;
|
|
|
|
int Codepoint;
|
|
int UserId;
|
|
|
|
kbts_break_flags BreakFlags;
|
|
kbts_script Script; // Only set when (BreakFlags & KBTS_BREAK_FLAG_SCRIPT) != 0.
|
|
kbts_direction Direction; // Only set when (BreakFlags & KBTS_BREAK_FLAG_DIRECTION) != 0.
|
|
kbts_direction ParagraphDirection; // Only set when (BreakFlags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION) != 0.
|
|
} kbts_shape_codepoint;
|
|
|
|
DIRECT API
|
|
- Added a new (opaque pointer) type: kbts_shape_scratchpad.
|
|
This type contains all the runtime data needed for shaping according to a specific kbts_shape_config.
|
|
Unlike the kbts_shape_config, it is mutable, and so cannot be trivially shared across threads.
|
|
It can be reused across different shaping calls as long as they all use the same shape_config.
|
|
- Added functions to manage scratchpads:
|
|
kbts_un kbts_SizeOfShapeScratchpad(kbts_shape_config *Config)
|
|
kbts_shape_scratchpad *kbts_PlaceShapeScratchpad(kbts_shape_config *Config, void *Memory, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
kbts_shape_scratchpad *kbts_PlaceShapeScratchpadFixedMemory(kbts_shape_config *Config, void *Memory, int Size)
|
|
kbts_shape_scratchpad *kbts_CreateShapeScratchpad(kbts_shape_config *Config, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
void kbts_DestroyShapeScratchpad(kbts_shape_scratchpad *Scratchpad)
|
|
- kbts_ShapeDirect now takes a kbts_shape_scratchpad instead of a kbts_shape_config and an allocator.
|
|
BEFORE:
|
|
kbts_shape_error kbts_ShapeDirect(kbts_shape_config *Config, kbts_glyph_storage *Storage,
|
|
kbts_direction RunDirection,
|
|
kbts_allocator_function *Allocator, void *AllocatorData,
|
|
kbts_glyph_iterator *Output)
|
|
AFTER:
|
|
kbts_shape_error kbts_ShapeDirect(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage,
|
|
kbts_direction RunDirection, kbts_glyph_iterator *Output)
|
|
- Removed kbts_ShapeDirectFixedMemory. (Use kbts_PlaceShapeScratchpadFixedMemory instead.)
|
|
- Glyph configs now correspond to exactly one shape config.
|
|
BEFORE:
|
|
int kbts_SizeOfGlyphConfig(kbts_feature_override *Overrides, int OverrideCount)
|
|
kbts_glyph_config *kbts_PlaceGlyphConfig(kbts_feature_override *Overrides, int OverrideCount, void *Memory)
|
|
kbts_glyph_config *kbts_CreateGlyphConfig(kbts_feature_override *Overrides, int OverrideCount, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
AFTER:
|
|
int kbts_SizeOfGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount)
|
|
kbts_glyph_config *kbts_PlaceGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount, void *Memory)
|
|
kbts_glyph_config *kbts_CreateGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
2.06 - Faster GSUB and GPOS feature culling.
|
|
2.05 - Fix custom allocator initialization for kbts_shape_context.PermanentArena.
|
|
2.04 - Fix Indic syllable logic for small/single-character syllables.
|
|
Fix wrong indirection in pointer code in Indic syllable logic.
|
|
2.03 - Fix loading blobs directly, fix a parsing edge case in GPOS format 2 subtables.
|
|
2.02 - Improve globbing of cursive attachments.
|
|
2.01 - Add kbts_InitializeGlyphStorage and kbts_ScriptDirection.
|
|
Rename some private functions for better namespacing.
|
|
Delete some deprecated functions.
|
|
Bounds check in kbts_ScriptIsComplex.
|
|
Fix a couple pointer iteration bugs.
|
|
Fix some pedantic MSVC warnings.
|
|
Extend mirroring logic from brackets to any codepoint that has a Unicode mirror.
|
|
2.0 - Completely new API and implementation.
|
|
1.03 - New functions: kbts_FeatureTagToId(), kbts_FeatureOverrideFromTag(), kbts_EmptyGlyphConfig(), kbts_GlyphConfigOverrideFeature(), kbts_GlyphConfigOverrideFeatureFromTag(), kbts_ScriptTagToScript()
|
|
Unregistered features can now be overriden using their tags.
|
|
This is slower than overriding registered features, i.e. those that have a kbts_feature_id.
|
|
Compiler warning cleanup
|
|
1.02b - Feature control for GPOS features
|
|
Bounds checking in ReadFontHeader
|
|
1.02a - Positioning fix for format 2 GPOS pair adjustments
|
|
1.02 - Added per-glyph manual feature control through kbts_FeatureOverride(), kbts_GlyphConfig()
|
|
Added enum definitions for features cv01-cv99 and ss01-ss20
|
|
1.01 - Header cleanup and glyph output documentation
|
|
1.0 - Initial release
|
|
|
|
TODO
|
|
Word dictionaries for word breaking: CJK, etc.
|
|
'stch' feature.
|
|
|
|
LICENSE
|
|
zlib License
|
|
|
|
(C) Copyright 2024-2025 Jimmy Lefevre
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
warranty. In no event will the authors be held liable for any damages
|
|
arising from the use of this software.
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
including commercial applications, and to alter it and redistribute it
|
|
freely, subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
claim that you wrote the original software. If you use this software
|
|
in a product, an acknowledgment in the product documentation would be
|
|
appreciated but is not required.
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
misrepresented as being the original software.
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
*/
|
|
|
|
#ifndef KB_TEXT_SHAPE_INCLUDED
|
|
# define KB_TEXT_SHAPE_INCLUDED
|
|
|
|
# ifndef kbts_s64
|
|
# if defined(_MSC_VER) || defined(__BORLANDC__)
|
|
# define kbts_s64 __int64
|
|
# else
|
|
# define kbts_s64 long long
|
|
# endif
|
|
# endif
|
|
# ifndef kbts_u64
|
|
# if defined(_MSC_VER) || defined(__BORLANDC__)
|
|
# define kbts_u64 unsigned __int64
|
|
# else
|
|
# define kbts_u64 unsigned long long
|
|
# endif
|
|
# endif
|
|
# ifndef kbts_u32
|
|
# define kbts_u32 unsigned
|
|
# endif
|
|
# ifndef kbts_u16
|
|
# define kbts_u16 unsigned short
|
|
# endif
|
|
# ifndef kbts_s32
|
|
# define kbts_s32 int
|
|
# endif
|
|
# ifndef kbts_s16
|
|
# define kbts_s16 short
|
|
# endif
|
|
# ifndef kbts_u8
|
|
# define kbts_u8 unsigned char
|
|
# endif
|
|
# ifndef kbts_s8
|
|
# define kbts_s8 signed char
|
|
# endif
|
|
# ifndef kbts_b32
|
|
# define kbts_b32 int
|
|
# endif
|
|
|
|
# ifndef KB_TEXT_SHAPE_POINTER_SIZE
|
|
# if defined(i386) || defined(__i386__) || defined(_M_IX86) || defined(_M_ARM) || defined(__arm__) || defined(__x86) || (defined(__APPLE__) && defined(__ppc)) || \
|
|
(defined(__TOS_AIX__) && !defined(__64BIT))
|
|
# define KB_TEXT_SHAPE_POINTER_SIZE 4
|
|
# else
|
|
# define KB_TEXT_SHAPE_POINTER_SIZE 8
|
|
# endif
|
|
# endif
|
|
|
|
# if KB_TEXT_SHAPE_POINTER_SIZE == 4
|
|
# define kbts_un kbts_u32
|
|
# define kbts_sn kbts_s32
|
|
# define kbts_uptr kbts_u32
|
|
# else
|
|
# define kbts_un kbts_u64
|
|
# define kbts_sn kbts_s64
|
|
# define kbts_uptr kbts_u64
|
|
# endif
|
|
|
|
# ifdef __has_attribute
|
|
# if __has_attribute(fallthrough)
|
|
# define KBTS__FALLTHROUGH __attribute__((fallthrough))
|
|
# endif
|
|
# endif
|
|
# ifndef KBTS__FALLTHROUGH
|
|
# define KBTS__FALLTHROUGH
|
|
# endif
|
|
|
|
# ifndef KBTS_EXPORT
|
|
# ifdef KB_TEXT_SHAPE_STATIC
|
|
# define KBTS_EXPORT static
|
|
# else
|
|
# ifdef __cplusplus
|
|
# define KBTS_EXPORT extern "C"
|
|
# else
|
|
# define KBTS_EXPORT extern
|
|
# endif
|
|
# endif
|
|
# endif
|
|
|
|
# ifdef _MSC_VER
|
|
# define KBTS_INLINE static __forceinline
|
|
# define KBTS_NOINLINE static __declspec(noinline)
|
|
# define KBTS_ALIGNOF __alignof
|
|
# else
|
|
# ifdef __has_attribute
|
|
# if __has_attribute(always_inline)
|
|
# define KBTS_INLINE static inline __attribute__((always_inline))
|
|
# endif
|
|
# if __has_attribute(noinline)
|
|
# define KBTS_NOINLINE static __attribute__((noinline))
|
|
# endif
|
|
# endif
|
|
# define KBTS_ALIGNOF __alignof__
|
|
# endif
|
|
# ifndef KBTS_INLINE
|
|
# define KBTS_INLINE static inline
|
|
# endif
|
|
|
|
# define KBTS_FOURCC(A, B, C, D) ((kbts_u32)(A) | ((kbts_u32)(B) << 8) | ((kbts_u32)(C) << 16) | ((kbts_u32)(D) << 24))
|
|
|
|
typedef kbts_u16 kbts_windows_language_id;
|
|
enum kbts_windows_language_id_enum
|
|
{
|
|
KBTS_WINDOWS_LANGUAGE_ID_AFRIKAANS = 0x36, // af
|
|
KBTS_WINDOWS_LANGUAGE_ID_AFRIKAANS_SOUTH_AFRICA = 0x436, // af-ZA
|
|
KBTS_WINDOWS_LANGUAGE_ID_ALBANIAN = 0x1C, // sq
|
|
KBTS_WINDOWS_LANGUAGE_ID_ALBANIAN_ALBANIA = 0x41C, // sq-AL
|
|
KBTS_WINDOWS_LANGUAGE_ID_ALSATIAN = 0x84, // gsw
|
|
KBTS_WINDOWS_LANGUAGE_ID_ALSATIAN_FRANCE = 0x484, // gsw-FR
|
|
KBTS_WINDOWS_LANGUAGE_ID_AMHARIC = 0x5E, // am
|
|
KBTS_WINDOWS_LANGUAGE_ID_AMHARIC_ETHIOPIA = 0x45E, // am-ET
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC = 0x1, // ar
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_ALGERIA = 0x1401, // ar-DZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_BAHRAIN = 0x3C01, // ar-BH
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_EGYPT = 0xC01, // ar-EG
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_IRAQ = 0x801, // ar-IQ
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_JORDAN = 0x2C01, // ar-JO
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_KUWAIT = 0x3401, // ar-KW
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_LEBANON = 0x3001, // ar-LB
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_LIBYA = 0x1001, // ar-LY
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_MOROCCO = 0x1801, // ar-MA
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_OMAN = 0x2001, // ar-OM
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_QATAR = 0x4001, // ar-QA
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_SAUDI_ARABIA = 0x401, // ar-SA
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_SYRIA = 0x2801, // ar-SY
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_TUNISIA = 0x1C01, // ar-TN
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_UAE = 0x3801, // ar-AE
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARABIC_YEMEN = 0x2401, // ar-YE
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARMENIAN = 0x2B, // hy
|
|
KBTS_WINDOWS_LANGUAGE_ID_ARMENIAN_ARMENIA = 0x42B, // hy-AM
|
|
KBTS_WINDOWS_LANGUAGE_ID_ASSAMESE = 0x4D, // as
|
|
KBTS_WINDOWS_LANGUAGE_ID_ASSAMESE_INDIA = 0x44D, // as-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_AZERBAIJANI_CYRILLIC = 0x742C, // az-Cyrl
|
|
KBTS_WINDOWS_LANGUAGE_ID_AZERBAIJANI_CYRILLIC_AZERBAIJAN = 0x82C, // az-Cyrl-AZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_AZERBAIJANI_LATIN = 0x2C, // az
|
|
KBTS_WINDOWS_LANGUAGE_ID_AZERBAIJANI_LATIN_2 = 0x782C, // az-Latn
|
|
KBTS_WINDOWS_LANGUAGE_ID_AZERBAIJANI_LATIN_AZERBAIJAN = 0x42C, // az-Latn-AZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_BANGLA = 0x45, // bn
|
|
KBTS_WINDOWS_LANGUAGE_ID_BANGLA_BANGLADESH = 0x845, // bn-BD
|
|
KBTS_WINDOWS_LANGUAGE_ID_BANGLA_INDIA = 0x445, // bn-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_BASHKIR = 0x6D, // ba
|
|
KBTS_WINDOWS_LANGUAGE_ID_BASHKIR_RUSSIA = 0x46D, // ba-RU
|
|
KBTS_WINDOWS_LANGUAGE_ID_BASQUE = 0x2D, // eu
|
|
KBTS_WINDOWS_LANGUAGE_ID_BASQUE_SPAIN = 0x42D, // eu-ES
|
|
KBTS_WINDOWS_LANGUAGE_ID_BELARUSIAN = 0x23, // be
|
|
KBTS_WINDOWS_LANGUAGE_ID_BELARUSIAN_BELARUS = 0x423, // be-BY
|
|
KBTS_WINDOWS_LANGUAGE_ID_BOSNIAN_CYRILLIC = 0x641A, // bs-Cyrl
|
|
KBTS_WINDOWS_LANGUAGE_ID_BOSNIAN_CYRILLIC_BOSNIA_HERZEGOVINA = 0x201A, // bs-Cyrl-BA
|
|
KBTS_WINDOWS_LANGUAGE_ID_BOSNIAN_LATIN = 0x681A, // bs-Latn
|
|
KBTS_WINDOWS_LANGUAGE_ID_BOSNIAN_LATIN_2 = 0x781A, // bs
|
|
KBTS_WINDOWS_LANGUAGE_ID_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA = 0x141A, // bs-Latn-BA
|
|
KBTS_WINDOWS_LANGUAGE_ID_BRETON = 0x7E, // br
|
|
KBTS_WINDOWS_LANGUAGE_ID_BRETON_FRANCE = 0x47E, // br-FR
|
|
KBTS_WINDOWS_LANGUAGE_ID_BULGARIAN = 0x2, // bg
|
|
KBTS_WINDOWS_LANGUAGE_ID_BULGARIAN_BULGARIA = 0x402, // bg-BG
|
|
KBTS_WINDOWS_LANGUAGE_ID_BURMESE = 0x55, // my
|
|
KBTS_WINDOWS_LANGUAGE_ID_BURMESE_MYANMAR = 0x455, // my-MM
|
|
KBTS_WINDOWS_LANGUAGE_ID_CATALAN = 0x3, // ca
|
|
KBTS_WINDOWS_LANGUAGE_ID_CATALAN_SPAIN = 0x403, // ca-ES
|
|
KBTS_WINDOWS_LANGUAGE_ID_CENTRAL_ATLAS_TAMAZIGHT_ARABIC = 0x45F, // tzm-Arab-MA
|
|
KBTS_WINDOWS_LANGUAGE_ID_CENTRAL_KURDISH = 0x92, // ku
|
|
KBTS_WINDOWS_LANGUAGE_ID_CENTRAL_KURDISH_2 = 0x7c92, // ku-Arab
|
|
KBTS_WINDOWS_LANGUAGE_ID_CENTRAL_KURDISH_IRAQ = 0x492, // ku-Arab-IQ
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHEROKEE = 0x5C, // chr
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHEROKEE_2 = 0x7C5C, // chr-Cher
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHEROKEE_UNITED_STATES = 0x45C, // chr-Cher-US
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHINESE_SIMPLIFIED = 0x4, // zh-Hans
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHINESE_SIMPLIFIED_2 = 0x7804, // zh
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHINESE_SIMPLIFIED_PRC = 0x804, // zh-CN
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHINESE_SIMPLIFIED_SINGAPORE = 0x1004, // zh-SG
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHINESE_TRADITIONAL = 0x7C04, // zh-Hant
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHINESE_TRADITIONAL_HONG_KONG = 0xC04, // zh-HK
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHINESE_TRADITIONAL_MACAO = 0x1404, // zh-MO
|
|
KBTS_WINDOWS_LANGUAGE_ID_CHINESE_TRADITIONAL_TAIWAN = 0x404, // zh-TW
|
|
KBTS_WINDOWS_LANGUAGE_ID_CORSICAN = 0x83, // co
|
|
KBTS_WINDOWS_LANGUAGE_ID_CORSICAN_FRANCE = 0x483, // co-FR
|
|
KBTS_WINDOWS_LANGUAGE_ID_CROATIAN = 0x1A, // hr
|
|
KBTS_WINDOWS_LANGUAGE_ID_CROATIAN_CROATIA = 0x41A, // hr-HR
|
|
KBTS_WINDOWS_LANGUAGE_ID_CROATIAN_LATIN_BOSNIA_HERZEGOVINA = 0x101A, // hr-BA
|
|
KBTS_WINDOWS_LANGUAGE_ID_CZECH = 0x5, // cs
|
|
KBTS_WINDOWS_LANGUAGE_ID_CZECH_CZECHIA = 0x405, // cs-CZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_DANISH = 0x6, // da
|
|
KBTS_WINDOWS_LANGUAGE_ID_DANISH_DENMARK = 0x406, // da-DK
|
|
KBTS_WINDOWS_LANGUAGE_ID_DARI = 0x8C, // prs
|
|
KBTS_WINDOWS_LANGUAGE_ID_DARI_AFGHANISTAN = 0x48C, // prs-AF
|
|
KBTS_WINDOWS_LANGUAGE_ID_DIVEHI = 0x65, // dv
|
|
KBTS_WINDOWS_LANGUAGE_ID_DIVEHI_MALDIVES = 0x465, // dv-MV
|
|
KBTS_WINDOWS_LANGUAGE_ID_DUTCH = 0x13, // nl
|
|
KBTS_WINDOWS_LANGUAGE_ID_DUTCH_BELGIUM = 0x813, // nl-BE
|
|
KBTS_WINDOWS_LANGUAGE_ID_DUTCH_NETHERLANDS = 0x413, // nl-NL
|
|
KBTS_WINDOWS_LANGUAGE_ID_DZONGKHA_BHUTAN = 0xC51, // dz-BT
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH = 0x9, // en
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_AUSTRALIA = 0xC09, // en-AU
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_BELIZE = 0x2809, // en-BZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_CANADA = 0x1009, // en-CA
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_CARIBBEAN = 0x2409, // en-029
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_HONG_KONG = 0x3C09, // en-HK
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_INDIA = 0x4009, // en-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_IRELAND = 0x1809, // en-IE
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_JAMAICA = 0x2009, // en-JM
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_MALAYSIA = 0x4409, // en-MY
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_NEW_ZEALAND = 0x1409, // en-NZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_PHILIPPINES = 0x3409, // en-PH
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_SINGAPORE = 0x4809, // en-SG
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_SOUTH_AFRICA = 0x1C09, // en-ZA
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_TRINIDAD_TOBAGO = 0x2C09, // en-TT
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_UNITED_ARAB_EMIRATES = 0x4C09, // en-AE
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_UNITED_KINGDOM = 0x809, // en-GB
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_UNITED_STATES = 0x409, // en-US
|
|
KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_ZIMBABWE = 0x3009, // en-ZW
|
|
KBTS_WINDOWS_LANGUAGE_ID_ESTONIAN = 0x25, // et
|
|
KBTS_WINDOWS_LANGUAGE_ID_ESTONIAN_ESTONIA = 0x425, // et-EE
|
|
KBTS_WINDOWS_LANGUAGE_ID_FAROESE = 0x38, // fo
|
|
KBTS_WINDOWS_LANGUAGE_ID_FAROESE_FAROE_ISLANDS = 0x438, // fo-FO
|
|
KBTS_WINDOWS_LANGUAGE_ID_FILIPINO = 0x64, // fil
|
|
KBTS_WINDOWS_LANGUAGE_ID_FILIPINO_PHILIPPINES = 0x464, // fil-PH
|
|
KBTS_WINDOWS_LANGUAGE_ID_FINNISH = 0xB, // fi
|
|
KBTS_WINDOWS_LANGUAGE_ID_FINNISH_FINLAND = 0x40B, // fi-FI
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH = 0xC, // fr
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_BELGIUM = 0x80C, // fr-BE
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_CAMEROON = 0x2C0C, // fr-CM
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_CANADA = 0xC0C, // fr-CA
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_CARIBBEAN = 0x1C0C, // fr-029
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_DRC = 0x240C, // fr-CD
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_COTE_D_IVOIRE = 0x300C, // fr-CI
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_FRANCE = 0x40C, // fr-FR
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_HAITI = 0x3C0C, // fr-HT
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_LUXEMBOURG = 0x140C, // fr-LU
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_MALI = 0x340C, // fr-ML
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_MOROCCO = 0x380C, // fr-MA
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_MONACO = 0x180C, // fr-MC
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_REUNION = 0x200C, // fr-RE
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_SENEGAL = 0x280C, // fr-SN
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRENCH_SWITZERLAND = 0x100C, // fr-CH
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRISIAN = 0x62, // fy
|
|
KBTS_WINDOWS_LANGUAGE_ID_FRISIAN_NETHERLANDS = 0x462, // fy-NL
|
|
KBTS_WINDOWS_LANGUAGE_ID_FULAH = 0x67, // ff
|
|
KBTS_WINDOWS_LANGUAGE_ID_FULAH_LATIN = 0x7C67, // ff-Latn
|
|
KBTS_WINDOWS_LANGUAGE_ID_FULAH_NIGERIA = 0x467, // ff-NG
|
|
KBTS_WINDOWS_LANGUAGE_ID_FULAH_SENEGAL = 0x867, // ff-Latn-SN
|
|
KBTS_WINDOWS_LANGUAGE_ID_GALICIAN = 0x56, // gl
|
|
KBTS_WINDOWS_LANGUAGE_ID_GALICIAN_SPAIN = 0x456, // gl-ES
|
|
KBTS_WINDOWS_LANGUAGE_ID_GEORGIAN = 0x37, // ka
|
|
KBTS_WINDOWS_LANGUAGE_ID_GEORGIAN_GEORGIA = 0x437, // ka-GE
|
|
KBTS_WINDOWS_LANGUAGE_ID_GERMAN = 0x7, // de
|
|
KBTS_WINDOWS_LANGUAGE_ID_GERMAN_AUSTRIA = 0xC07, // de-AT
|
|
KBTS_WINDOWS_LANGUAGE_ID_GERMAN_GERMANY = 0x407, // de-DE
|
|
KBTS_WINDOWS_LANGUAGE_ID_GERMAN_LIECHTENSTEIN = 0x1407, // de-LI
|
|
KBTS_WINDOWS_LANGUAGE_ID_GERMAN_LUXEMBOURG = 0x1007, // de-LU
|
|
KBTS_WINDOWS_LANGUAGE_ID_GERMAN_SWITZERLAND = 0x807, // de-CH
|
|
KBTS_WINDOWS_LANGUAGE_ID_GREEK = 0x8, // el
|
|
KBTS_WINDOWS_LANGUAGE_ID_GREEK_GREECE = 0x408, // el-GR
|
|
KBTS_WINDOWS_LANGUAGE_ID_GREENLANDIC = 0x6F, // kl
|
|
KBTS_WINDOWS_LANGUAGE_ID_GREENLANDIC_GREENLAND = 0x46F, // kl-GL
|
|
KBTS_WINDOWS_LANGUAGE_ID_GUARANI = 0x74, // gn
|
|
KBTS_WINDOWS_LANGUAGE_ID_GUARANI_PARAGUAY = 0x474, // gn-PY
|
|
KBTS_WINDOWS_LANGUAGE_ID_GUJARATI = 0x47, // gu
|
|
KBTS_WINDOWS_LANGUAGE_ID_GUJARATI_INDIA = 0x447, // gu-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_HAUSA = 0x68, // ha
|
|
KBTS_WINDOWS_LANGUAGE_ID_HAUSA_LATIN = 0x7C68, // ha-Latn
|
|
KBTS_WINDOWS_LANGUAGE_ID_HAUSA_NIGERIA = 0x468, // ha-Latn-NG
|
|
KBTS_WINDOWS_LANGUAGE_ID_HAWAIIAN = 0x75, // haw
|
|
KBTS_WINDOWS_LANGUAGE_ID_HAWAIIAN_UNITED_STATES = 0x475, // haw-US
|
|
KBTS_WINDOWS_LANGUAGE_ID_HEBREW = 0xD, // he
|
|
KBTS_WINDOWS_LANGUAGE_ID_HEBREW_ISRAEL = 0x40D, // he-IL
|
|
KBTS_WINDOWS_LANGUAGE_ID_HINDI = 0x39, // hi
|
|
KBTS_WINDOWS_LANGUAGE_ID_HINDI_INDIA = 0x439, // hi-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_HUNGARIAN = 0xE, // hu
|
|
KBTS_WINDOWS_LANGUAGE_ID_HUNGARIAN_HUNGARY = 0x40E, // hu-HU
|
|
KBTS_WINDOWS_LANGUAGE_ID_ICELANDIC = 0xF, // is
|
|
KBTS_WINDOWS_LANGUAGE_ID_ICELANDIC_ICELAND = 0x40F, // is-IS
|
|
KBTS_WINDOWS_LANGUAGE_ID_IGBO = 0x70, // ig
|
|
KBTS_WINDOWS_LANGUAGE_ID_IGBO_NIGERIA = 0x470, // ig-NG
|
|
KBTS_WINDOWS_LANGUAGE_ID_INDONESIAN = 0x21, // id
|
|
KBTS_WINDOWS_LANGUAGE_ID_INDONESIAN_INDONESIA = 0x421, // id-ID
|
|
KBTS_WINDOWS_LANGUAGE_ID_INUKTITUT = 0x5D, // iu
|
|
KBTS_WINDOWS_LANGUAGE_ID_INUKTITUT_LATIN = 0x7C5D, // iu-Latn
|
|
KBTS_WINDOWS_LANGUAGE_ID_INUKTITUT_LATIN_CANADA = 0x85D, // iu-Latn-CA
|
|
KBTS_WINDOWS_LANGUAGE_ID_INUKTITUT_SYLLABICS = 0x785D, // iu-Cans
|
|
KBTS_WINDOWS_LANGUAGE_ID_INUKTITUT_SYLLABICS_CANADA = 0x45D, // iu-Cans-CA
|
|
KBTS_WINDOWS_LANGUAGE_ID_IRISH = 0x3C, // ga
|
|
KBTS_WINDOWS_LANGUAGE_ID_IRISH_IRELAND = 0x83C, // ga-IE
|
|
KBTS_WINDOWS_LANGUAGE_ID_ITALIAN = 0x10, // it
|
|
KBTS_WINDOWS_LANGUAGE_ID_ITALIAN_ITALY = 0x410, // it-IT
|
|
KBTS_WINDOWS_LANGUAGE_ID_ITALIAN_SWITZERLAND = 0x810, // it-CH
|
|
KBTS_WINDOWS_LANGUAGE_ID_JAPANESE = 0x11, // ja
|
|
KBTS_WINDOWS_LANGUAGE_ID_JAPANESE_JAPAN = 0x411, // ja-JP
|
|
KBTS_WINDOWS_LANGUAGE_ID_KANNADA = 0x4B, // kn
|
|
KBTS_WINDOWS_LANGUAGE_ID_KANNADA_INDIA = 0x44B, // kn-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_KANURI_LATIN_NIGERIA = 0x471, // kr-Latn-NG
|
|
KBTS_WINDOWS_LANGUAGE_ID_KASHMIRI = 0x60, // ks
|
|
KBTS_WINDOWS_LANGUAGE_ID_KASHMIRI_PERSO_ARABIC = 0x460, // ks-Arab
|
|
KBTS_WINDOWS_LANGUAGE_ID_KASHMIRI_DEVANAGARI_INDIA = 0x860, // ks-Deva-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_KAZAKH = 0x3F, // kk
|
|
KBTS_WINDOWS_LANGUAGE_ID_KAZAKH_KAZAKHSTAN = 0x43F, // kk-KZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_KHMER = 0x53, // km
|
|
KBTS_WINDOWS_LANGUAGE_ID_KHMER_CAMBODIA = 0x453, // km-KH
|
|
KBTS_WINDOWS_LANGUAGE_ID_KICHE = 0x86, // quc
|
|
KBTS_WINDOWS_LANGUAGE_ID_KICHE_GUATEMALA = 0x486, // quc-Latn-GT
|
|
KBTS_WINDOWS_LANGUAGE_ID_KINYARWANDA = 0x87, // rw
|
|
KBTS_WINDOWS_LANGUAGE_ID_KINYARWANDA_RWANDA = 0x487, // rw-RW
|
|
KBTS_WINDOWS_LANGUAGE_ID_KISWAHILI = 0x41, // sw
|
|
KBTS_WINDOWS_LANGUAGE_ID_KISWAHILI_KENYA = 0x441, // sw-KE
|
|
KBTS_WINDOWS_LANGUAGE_ID_KONKANI = 0x57, // kok
|
|
KBTS_WINDOWS_LANGUAGE_ID_KONKANI_INDIA = 0x457, // kok-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_KOREAN = 0x12, // ko
|
|
KBTS_WINDOWS_LANGUAGE_ID_KOREAN_KOREA = 0x412, // ko-KR
|
|
KBTS_WINDOWS_LANGUAGE_ID_KYRGYZ = 0x40, // ky
|
|
KBTS_WINDOWS_LANGUAGE_ID_KYRGYZ_KYRGYZSTAN = 0x440, // ky-KG
|
|
KBTS_WINDOWS_LANGUAGE_ID_LAO = 0x54, // lo
|
|
KBTS_WINDOWS_LANGUAGE_ID_LAO_PDR = 0x454, // lo-LA
|
|
KBTS_WINDOWS_LANGUAGE_ID_LATIN_VATICAN = 0x476, // la-VA
|
|
KBTS_WINDOWS_LANGUAGE_ID_LATVIAN = 0x26, // lv
|
|
KBTS_WINDOWS_LANGUAGE_ID_LATVIAN_LATVIA = 0x426, // lv-LV
|
|
KBTS_WINDOWS_LANGUAGE_ID_LITHUANIAN = 0x27, // lt
|
|
KBTS_WINDOWS_LANGUAGE_ID_LITHUANIAN_LITHUANIA = 0x427, // lt-LT
|
|
KBTS_WINDOWS_LANGUAGE_ID_LOWER_SORBIAN = 0x7C2E, // dsb
|
|
KBTS_WINDOWS_LANGUAGE_ID_LOWER_SORBIAN_GERMANY = 0x82E, // dsb-DE
|
|
KBTS_WINDOWS_LANGUAGE_ID_LUXEMBOURGISH = 0x6E, // lb
|
|
KBTS_WINDOWS_LANGUAGE_ID_LUXEMBOURGISH_LUXEMBOURG = 0x46E, // lb-LU
|
|
KBTS_WINDOWS_LANGUAGE_ID_MACEDONIAN = 0x2F, // mk
|
|
KBTS_WINDOWS_LANGUAGE_ID_MACEDONIAN_NORTH_MACEDONIA = 0x42F, // mk-MK
|
|
KBTS_WINDOWS_LANGUAGE_ID_MALAY = 0x3E, // ms
|
|
KBTS_WINDOWS_LANGUAGE_ID_MALAY_BRUNEI = 0x83E, // ms-BN
|
|
KBTS_WINDOWS_LANGUAGE_ID_MALAY_MALAYSIA = 0x43E, // ms-MY
|
|
KBTS_WINDOWS_LANGUAGE_ID_MALAYALAM = 0x4C, // ml
|
|
KBTS_WINDOWS_LANGUAGE_ID_MALAYALAM_INDIA = 0x44C, // ml-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_MALTESE = 0x3A, // mt
|
|
KBTS_WINDOWS_LANGUAGE_ID_MALTESE_MALTA = 0x43A, // mt-MT
|
|
KBTS_WINDOWS_LANGUAGE_ID_MAORI = 0x81, // mi
|
|
KBTS_WINDOWS_LANGUAGE_ID_MAORI_NEW_ZEALAND = 0x481, // mi-NZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_MAPUDUNGUN = 0x7A, // arn
|
|
KBTS_WINDOWS_LANGUAGE_ID_MAPUDUNGUN_CHILE = 0x47A, // arn-CL
|
|
KBTS_WINDOWS_LANGUAGE_ID_MARATHI = 0x4E, // mr
|
|
KBTS_WINDOWS_LANGUAGE_ID_MARATHI_INDIA = 0x44E, // mr-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_MOHAWK = 0x7C, // moh
|
|
KBTS_WINDOWS_LANGUAGE_ID_MOHAWK_CANADA = 0x47C, // moh-CA
|
|
KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN = 0x50, // mn
|
|
KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_CYRILLIC = 0x7850, // mn-Cyrl
|
|
KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_CYRILLIC_MONGOLIA = 0x450, // mn-MN
|
|
KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_TRADITIONAL = 0x7C50, // mn-Mong
|
|
KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_TRADITIONAL_PRC = 0x850, // mn-Mong-CN
|
|
KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_TRADITIONAL_MONGOLIA = 0xC50, // mn-Mong-MN
|
|
KBTS_WINDOWS_LANGUAGE_ID_NEPALI = 0x61, // ne
|
|
KBTS_WINDOWS_LANGUAGE_ID_NEPALI_INDIA = 0x861, // ne-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_NEPALI_NEPAL = 0x461, // ne-NP
|
|
KBTS_WINDOWS_LANGUAGE_ID_NORWEGIAN = 0x14, // no
|
|
KBTS_WINDOWS_LANGUAGE_ID_NORWEGIAN_BOKMAL = 0x7C14, // nb
|
|
KBTS_WINDOWS_LANGUAGE_ID_NORWEGIAN_BOKMAL_NORWAY = 0x414, // nb-NO
|
|
KBTS_WINDOWS_LANGUAGE_ID_NORWEGIAN_NYNORSK = 0x7814, // nn
|
|
KBTS_WINDOWS_LANGUAGE_ID_NORWEGIAN_NYNORSK_NORWAY = 0x814, // nn-NO
|
|
KBTS_WINDOWS_LANGUAGE_ID_OCCITAN = 0x82, // oc
|
|
KBTS_WINDOWS_LANGUAGE_ID_OCCITAN_FRANCE = 0x482, // oc-FR
|
|
KBTS_WINDOWS_LANGUAGE_ID_ODIA = 0x48, // or
|
|
KBTS_WINDOWS_LANGUAGE_ID_ODIA_INDIA = 0x448, // or-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_OROMO = 0x72, // om
|
|
KBTS_WINDOWS_LANGUAGE_ID_OROMO_ETHIOPIA = 0x472, // om-ET
|
|
KBTS_WINDOWS_LANGUAGE_ID_PASHTO = 0x63, // ps
|
|
KBTS_WINDOWS_LANGUAGE_ID_PASHTO_AFGHANISTAN = 0x463, // ps-AF
|
|
KBTS_WINDOWS_LANGUAGE_ID_PERSIAN = 0x29, // fa
|
|
KBTS_WINDOWS_LANGUAGE_ID_PERSIAN_IRAN = 0x429, // fa-IR
|
|
KBTS_WINDOWS_LANGUAGE_ID_POLISH = 0x15, // pl
|
|
KBTS_WINDOWS_LANGUAGE_ID_POLISH_POLAND = 0x415, // pl-PL
|
|
KBTS_WINDOWS_LANGUAGE_ID_PORTUGUESE = 0x16, // pt
|
|
KBTS_WINDOWS_LANGUAGE_ID_PORTUGUESE_BRAZIL = 0x416, // pt-BR
|
|
KBTS_WINDOWS_LANGUAGE_ID_PORTUGUESE_PORTUGAL = 0x816, // pt-PT
|
|
KBTS_WINDOWS_LANGUAGE_ID_PUNJABI = 0x46, // pa
|
|
KBTS_WINDOWS_LANGUAGE_ID_PUNJABI_ARABIC = 0x7C46, // pa-Arab
|
|
KBTS_WINDOWS_LANGUAGE_ID_PUNJABI_INDIA = 0x446, // pa-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_PUNJABI_PAKISTAN = 0x846, // pa-Arab-PK
|
|
KBTS_WINDOWS_LANGUAGE_ID_QUECHUA = 0x6B, // quz
|
|
KBTS_WINDOWS_LANGUAGE_ID_QUECHUA_BOLIVIA = 0x46B, // quz-BO
|
|
KBTS_WINDOWS_LANGUAGE_ID_QUECHUA_ECUADOR = 0x86B, // quz-EC
|
|
KBTS_WINDOWS_LANGUAGE_ID_QUECHUA_PERU = 0xC6B, // quz-PE
|
|
KBTS_WINDOWS_LANGUAGE_ID_ROMANIAN = 0x18, // ro
|
|
KBTS_WINDOWS_LANGUAGE_ID_ROMANIAN_MOLDOVA = 0x818, // ro-MD
|
|
KBTS_WINDOWS_LANGUAGE_ID_ROMANIAN_ROMANIA = 0x418, // ro-RO
|
|
KBTS_WINDOWS_LANGUAGE_ID_ROMANSH = 0x17, // rm
|
|
KBTS_WINDOWS_LANGUAGE_ID_ROMANSH_SWITZERLAND = 0x417, // rm-CH
|
|
KBTS_WINDOWS_LANGUAGE_ID_RUSSIAN = 0x19, // ru
|
|
KBTS_WINDOWS_LANGUAGE_ID_RUSSIAN_MOLDOVA = 0x819, // ru-MD
|
|
KBTS_WINDOWS_LANGUAGE_ID_RUSSIAN_RUSSIA = 0x419, // ru-RU
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAKHA = 0x85, // sah
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAKHA_RUSSIA = 0x485, // sah-RU
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_INARI = 0x703B, // smn
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_INARI_FINLAND = 0x243B, // smn-FI
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_LULE = 0x7C3B, // smj
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_LULE_NORWAY = 0x103B, // smj-NO
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_LULE_SWEDEN = 0x143B, // smj-SE
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_NORTHERN = 0x3B, // se
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_NORTHERN_FINLAND = 0xC3B, // se-FI
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_NORTHERN_NORWAY = 0x43B, // se-NO
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_NORTHERN_SWEDEN = 0x83B, // se-SE
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_SKOLT = 0x743B, // sms
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_SKOLT_FINLAND = 0x203B, // sms-FI
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_SOUTHERN = 0x783B, // sma
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_SOUTHERN_NORWAY = 0x183B, // sma-NO
|
|
KBTS_WINDOWS_LANGUAGE_ID_SAMI_SOUTHERN_SWEDEN = 0x1C3B, // sma-SE
|
|
KBTS_WINDOWS_LANGUAGE_ID_SANSKRIT = 0x4F, // sa
|
|
KBTS_WINDOWS_LANGUAGE_ID_SANSKRIT_INDIA = 0x44F, // sa-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_SCOTTISH_GAELIC = 0x91, // gd
|
|
KBTS_WINDOWS_LANGUAGE_ID_SCOTTISH_GAELIC_UNITED_KINGDOM = 0x491, // gd-GB
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC = 0x6C1A, // sr-Cyrl
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA = 0x1C1A, // sr-Cyrl-BA
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC_MONTENEGRO = 0x301A, // sr-Cyrl-ME
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC_SERBIA = 0x281A, // sr-Cyrl-RS
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC_SERBIA_MONTENEGRO = 0xC1A, // sr-Cyrl-CS
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN = 0x701A, // sr-Latn
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN = 0x7C1A, // sr
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN_BOSNIA_HERZEGOVINA = 0x181A, // sr-Latn-BA
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN_MONTENEGRO = 0x2C1A, // sr-Latn-ME
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN_SERBIA = 0x241A, // sr-Latn-RS
|
|
KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN_SERBIA_MONTENEGRO = 0x81A, // sr-Latn-CS
|
|
KBTS_WINDOWS_LANGUAGE_ID_SESOTHO_SA_LEBOA = 0x6C, // nso
|
|
KBTS_WINDOWS_LANGUAGE_ID_SESOTHO_SA_LEBOA_SOUTH_AFRICA = 0x46C, // nso-ZA
|
|
KBTS_WINDOWS_LANGUAGE_ID_SETSWANA = 0x32, // tn
|
|
KBTS_WINDOWS_LANGUAGE_ID_SETSWANA_BOTSWANA = 0x832, // tn-BW
|
|
KBTS_WINDOWS_LANGUAGE_ID_SETSWANA_SOUTH_AFRICA = 0x432, // tn-ZA
|
|
KBTS_WINDOWS_LANGUAGE_ID_SINDHI = 0x59, // sd
|
|
KBTS_WINDOWS_LANGUAGE_ID_SINDHI_ARABIC = 0x7C59, // sd-Arab
|
|
KBTS_WINDOWS_LANGUAGE_ID_SINDHI_PAKISTAN = 0x859, // sd-Arab-PK
|
|
KBTS_WINDOWS_LANGUAGE_ID_SINHALA = 0x5B, // si
|
|
KBTS_WINDOWS_LANGUAGE_ID_SINHALA_SRI_LANKA = 0x45B, // si-LK
|
|
KBTS_WINDOWS_LANGUAGE_ID_SLOVAK = 0x1B, // sk
|
|
KBTS_WINDOWS_LANGUAGE_ID_SLOVAK_SLOVAKIA = 0x41B, // sk-SK
|
|
KBTS_WINDOWS_LANGUAGE_ID_SLOVENIAN = 0x24, // sl
|
|
KBTS_WINDOWS_LANGUAGE_ID_SLOVENIAN_SLOVENIA = 0x424, // sl-SI
|
|
KBTS_WINDOWS_LANGUAGE_ID_SOMALI = 0x77, // so
|
|
KBTS_WINDOWS_LANGUAGE_ID_SOMALI_SOMALIA = 0x477, // so-SO
|
|
KBTS_WINDOWS_LANGUAGE_ID_SOTHO = 0x30, // st
|
|
KBTS_WINDOWS_LANGUAGE_ID_SOTHO_SOUTH_AFRICA = 0x430, // st-ZA
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH = 0xA, // es
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_ARGENTINA = 0x2C0A, // es-AR
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_VENEZUELA = 0x200A, // es-VE
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_BOLIVIA = 0x400A, // es-BO
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_CHILE = 0x340A, // es-CL
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_COLOMBIA = 0x240A, // es-CO
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_COSTA_RICA = 0x140A, // es-CR
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_CUBA = 0x5C0A, // es-CU
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_DOMINICAN_REPUBLIC = 0x1C0A, // es-DO
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_ECUADOR = 0x300A, // es-EC
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_EL_SALVADOR = 0x440A, // es-SV
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_GUATEMALA = 0x100A, // es-GT
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_HONDURAS = 0x480A, // es-HN
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_LATIN_AMERICA = 0x580A, // es-419
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_MEXICO = 0x80A, // es-MX
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_NICARAGUA = 0x4C0A, // es-NI
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_PANAMA = 0x180A, // es-PA
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_PARAGUAY = 0x3C0A, // es-PY
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_PERU = 0x280A, // es-PE
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_PUERTO_RICO = 0x500A, // es-PR
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_SPAIN_TRADITIONAL_SORT = 0x40A, // es-ES-tradnl
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_SPAIN = 0xC0A, // es-ES
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_UNITED_STATES = 0x540A, // es-US
|
|
KBTS_WINDOWS_LANGUAGE_ID_SPANISH_URUGUAY = 0x380A, // es-UY
|
|
KBTS_WINDOWS_LANGUAGE_ID_SWEDISH = 0x1D, // sv
|
|
KBTS_WINDOWS_LANGUAGE_ID_SWEDISH_FINLAND = 0x81D, // sv-FI
|
|
KBTS_WINDOWS_LANGUAGE_ID_SWEDISH_SWEDEN = 0x41D, // sv-SE
|
|
KBTS_WINDOWS_LANGUAGE_ID_SYRIAC = 0x5A, // syr
|
|
KBTS_WINDOWS_LANGUAGE_ID_SYRIAC_SYRIA = 0x45A, // syr-SY
|
|
KBTS_WINDOWS_LANGUAGE_ID_TAJIKI = 0x28, // tg
|
|
KBTS_WINDOWS_LANGUAGE_ID_TAJIKI_CYRILLIC = 0x7C28, // tg-Cyrl
|
|
KBTS_WINDOWS_LANGUAGE_ID_TAJIKI_CYRILLIC_TAJIKISTAN = 0x428, // tg-Cyrl-TJ
|
|
KBTS_WINDOWS_LANGUAGE_ID_TAMAZIGHT = 0x5F, // tzm
|
|
KBTS_WINDOWS_LANGUAGE_ID_TAMAZIGHT_LATIN = 0x7C5F, // tzm-Latn
|
|
KBTS_WINDOWS_LANGUAGE_ID_TAMAZIGHT_LATIN_ALGERIA = 0x85F, // tzm-Latn-DZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_TAMIL = 0x49, // ta
|
|
KBTS_WINDOWS_LANGUAGE_ID_TAMIL_INDIA = 0x449, // ta-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_TAMIL_SRI_LANKA = 0x849, // ta-LK
|
|
KBTS_WINDOWS_LANGUAGE_ID_TATAR = 0x44, // tt
|
|
KBTS_WINDOWS_LANGUAGE_ID_TATAR_RUSSIA = 0x444, // tt-RU
|
|
KBTS_WINDOWS_LANGUAGE_ID_TELUGU = 0x4A, // te
|
|
KBTS_WINDOWS_LANGUAGE_ID_TELUGU_INDIA = 0x44A, // te-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_THAI = 0x1E, // th
|
|
KBTS_WINDOWS_LANGUAGE_ID_THAI_THAILAND = 0x41E, // th-TH
|
|
KBTS_WINDOWS_LANGUAGE_ID_TIBETAN = 0x51, // bo
|
|
KBTS_WINDOWS_LANGUAGE_ID_TIBETAN_PRC = 0x451, // bo-CN
|
|
KBTS_WINDOWS_LANGUAGE_ID_TIGRINYA = 0x73, // ti
|
|
KBTS_WINDOWS_LANGUAGE_ID_TIGRINYA_ERITREA = 0x873, // ti-ER
|
|
KBTS_WINDOWS_LANGUAGE_ID_TIGRINYA_ETHIOPIA = 0x473, // ti-ET
|
|
KBTS_WINDOWS_LANGUAGE_ID_TSONGA = 0x31, // ts
|
|
KBTS_WINDOWS_LANGUAGE_ID_TSONGA_SOUTH_AFRICA = 0x431, // ts-ZA
|
|
KBTS_WINDOWS_LANGUAGE_ID_TURKISH = 0x1F, // tr
|
|
KBTS_WINDOWS_LANGUAGE_ID_TURKISH_TURKEY = 0x41F, // tr-TR
|
|
KBTS_WINDOWS_LANGUAGE_ID_TURKMEN = 0x42, // tk
|
|
KBTS_WINDOWS_LANGUAGE_ID_TURKMEN_TURKMENISTAN = 0x442, // tk-TM
|
|
KBTS_WINDOWS_LANGUAGE_ID_UKRAINIAN = 0x22, // uk
|
|
KBTS_WINDOWS_LANGUAGE_ID_UKRAINIAN_UKRAINE = 0x422, // uk-UA
|
|
KBTS_WINDOWS_LANGUAGE_ID_UPPER_SORBIAN = 0x2E, // hsb
|
|
KBTS_WINDOWS_LANGUAGE_ID_UPPER_SORBIAN_GERMANY = 0x42E, // hsb-DE
|
|
KBTS_WINDOWS_LANGUAGE_ID_URDU = 0x20, // ur
|
|
KBTS_WINDOWS_LANGUAGE_ID_URDU_INDIA = 0x820, // ur-IN
|
|
KBTS_WINDOWS_LANGUAGE_ID_URDU_PAKISTAN = 0x420, // ur-PK
|
|
KBTS_WINDOWS_LANGUAGE_ID_UYGHUR = 0x80, // ug
|
|
KBTS_WINDOWS_LANGUAGE_ID_UYGHUR_PRC = 0x480, // ug-CN
|
|
KBTS_WINDOWS_LANGUAGE_ID_UZBEK_CYRILLIC = 0x7843, // uz-Cyrl
|
|
KBTS_WINDOWS_LANGUAGE_ID_UZBEK_CYRILLIC_UZBEKISTAN = 0x843, // uz-Cyrl-UZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_UZBEK = 0x43, // uz
|
|
KBTS_WINDOWS_LANGUAGE_ID_UZBEK_LATIN = 0x7C43, // uz-Latn
|
|
KBTS_WINDOWS_LANGUAGE_ID_UZBEK_LATIN_UZBEKISTAN = 0x443, // uz-Latn-UZ
|
|
KBTS_WINDOWS_LANGUAGE_ID_VALENCIAN_SPAIN = 0x803, // ca-ES-valencia
|
|
KBTS_WINDOWS_LANGUAGE_ID_VENDA = 0x33, // ve
|
|
KBTS_WINDOWS_LANGUAGE_ID_VENDA_SOUTH_AFRICA = 0x433, // ve-ZA
|
|
KBTS_WINDOWS_LANGUAGE_ID_VIETNAMESE = 0x2A, // vi
|
|
KBTS_WINDOWS_LANGUAGE_ID_VIETNAMESE_VIETNAM = 0x42A, // vi-VN
|
|
KBTS_WINDOWS_LANGUAGE_ID_WELSH = 0x52, // cy
|
|
KBTS_WINDOWS_LANGUAGE_ID_WELSH_UNITED_KINGDOM = 0x452, // cy-GB
|
|
KBTS_WINDOWS_LANGUAGE_ID_WOLOF = 0x88, // wo
|
|
KBTS_WINDOWS_LANGUAGE_ID_WOLOF_SENEGAL = 0x488, // wo-SN
|
|
KBTS_WINDOWS_LANGUAGE_ID_XHOSA = 0x34, // xh
|
|
KBTS_WINDOWS_LANGUAGE_ID_XHOSA_SOUTH_AFRICA = 0x434, // xh-ZA
|
|
KBTS_WINDOWS_LANGUAGE_ID_YI = 0x78, // ii
|
|
KBTS_WINDOWS_LANGUAGE_ID_YI_PRC = 0x478, // ii-CN
|
|
KBTS_WINDOWS_LANGUAGE_ID_YIDDISH = 0x43D, // yi-001
|
|
KBTS_WINDOWS_LANGUAGE_ID_YORUBA = 0x6A, // yo
|
|
KBTS_WINDOWS_LANGUAGE_ID_YORUBA_NIGERIA = 0x46A, // yo-NG
|
|
KBTS_WINDOWS_LANGUAGE_ID_ZULU = 0x35, // zu
|
|
KBTS_WINDOWS_LANGUAGE_ID_ZULU_SOUTH_AFRICA = 0x435, // zu-ZA
|
|
};
|
|
|
|
typedef kbts_u32 kbts_language;
|
|
enum kbts_language_enum
|
|
{
|
|
KBTS_LANGUAGE_DONT_KNOW = 0,
|
|
|
|
KBTS_LANGUAGE_A_HMAO = KBTS_FOURCC('H', 'M', 'D', ' '),
|
|
KBTS_LANGUAGE_AARI = KBTS_FOURCC('A', 'R', 'I', ' '),
|
|
KBTS_LANGUAGE_ABAZA = KBTS_FOURCC('A', 'B', 'A', ' '),
|
|
KBTS_LANGUAGE_ABKHAZIAN = KBTS_FOURCC('A', 'B', 'K', ' '),
|
|
KBTS_LANGUAGE_ACHI = KBTS_FOURCC('A', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_ACHOLI = KBTS_FOURCC('A', 'C', 'H', ' '),
|
|
KBTS_LANGUAGE_ADYGHE = KBTS_FOURCC('A', 'D', 'Y', ' '),
|
|
KBTS_LANGUAGE_AFAR = KBTS_FOURCC('A', 'F', 'R', ' '),
|
|
KBTS_LANGUAGE_AFRIKAANS = KBTS_FOURCC('A', 'F', 'K', ' '),
|
|
KBTS_LANGUAGE_AGAW = KBTS_FOURCC('A', 'G', 'W', ' '),
|
|
KBTS_LANGUAGE_AITON = KBTS_FOURCC('A', 'I', 'O', ' '),
|
|
KBTS_LANGUAGE_AKAN = KBTS_FOURCC('A', 'K', 'A', ' '),
|
|
KBTS_LANGUAGE_ALBANIAN = KBTS_FOURCC('S', 'Q', 'I', ' '),
|
|
KBTS_LANGUAGE_ALSATIAN = KBTS_FOURCC('A', 'L', 'S', ' '),
|
|
KBTS_LANGUAGE_ALTAI = KBTS_FOURCC('A', 'L', 'T', ' '),
|
|
KBTS_LANGUAGE_ALUO = KBTS_FOURCC('Y', 'N', 'A', ' '),
|
|
KBTS_LANGUAGE_AMERICAN_PHONETIC = KBTS_FOURCC('A', 'P', 'P', 'H'),
|
|
KBTS_LANGUAGE_AMHARIC = KBTS_FOURCC('A', 'M', 'H', ' '),
|
|
KBTS_LANGUAGE_ANGLO_SAXON = KBTS_FOURCC('A', 'N', 'G', ' '),
|
|
KBTS_LANGUAGE_ARABIC = KBTS_FOURCC('A', 'R', 'A', ' '),
|
|
KBTS_LANGUAGE_ARAGONESE = KBTS_FOURCC('A', 'R', 'G', ' '),
|
|
KBTS_LANGUAGE_ARAKANESE = KBTS_FOURCC('A', 'R', 'K', ' '),
|
|
KBTS_LANGUAGE_ARAKWAL = KBTS_FOURCC('R', 'K', 'W', ' '),
|
|
KBTS_LANGUAGE_ARMENIAN = KBTS_FOURCC('H', 'Y', 'E', ' '),
|
|
KBTS_LANGUAGE_ARMENIAN_EAST = KBTS_FOURCC('H', 'Y', 'E', '0'),
|
|
KBTS_LANGUAGE_AROMANIAN = KBTS_FOURCC('R', 'U', 'P', ' '),
|
|
KBTS_LANGUAGE_ARPITAN = KBTS_FOURCC('F', 'R', 'P', ' '),
|
|
KBTS_LANGUAGE_ASSAMESE = KBTS_FOURCC('A', 'S', 'M', ' '),
|
|
KBTS_LANGUAGE_ASTURIAN = KBTS_FOURCC('A', 'S', 'T', ' '),
|
|
KBTS_LANGUAGE_ATHAPASKAN = KBTS_FOURCC('A', 'T', 'H', ' '),
|
|
KBTS_LANGUAGE_ATSINA = KBTS_FOURCC('A', 'T', 'S', ' '),
|
|
KBTS_LANGUAGE_AVAR = KBTS_FOURCC('A', 'V', 'R', ' '),
|
|
KBTS_LANGUAGE_AVATIME = KBTS_FOURCC('A', 'V', 'N', ' '),
|
|
KBTS_LANGUAGE_AWADHI = KBTS_FOURCC('A', 'W', 'A', ' '),
|
|
KBTS_LANGUAGE_AYMARA = KBTS_FOURCC('A', 'Y', 'M', ' '),
|
|
KBTS_LANGUAGE_AZERBAIJANI = KBTS_FOURCC('A', 'Z', 'E', ' '),
|
|
KBTS_LANGUAGE_BADAGA = KBTS_FOURCC('B', 'A', 'D', ' '),
|
|
KBTS_LANGUAGE_BAGHELKHANDI = KBTS_FOURCC('B', 'A', 'G', ' '),
|
|
KBTS_LANGUAGE_BAGRI = KBTS_FOURCC('B', 'G', 'Q', ' '),
|
|
KBTS_LANGUAGE_BALANTE = KBTS_FOURCC('B', 'L', 'N', ' '),
|
|
KBTS_LANGUAGE_BALINESE = KBTS_FOURCC('B', 'A', 'N', ' '),
|
|
KBTS_LANGUAGE_BALKAR = KBTS_FOURCC('B', 'A', 'L', ' '),
|
|
KBTS_LANGUAGE_BALTI = KBTS_FOURCC('B', 'L', 'T', ' '),
|
|
KBTS_LANGUAGE_BALUCHI = KBTS_FOURCC('B', 'L', 'I', ' '),
|
|
KBTS_LANGUAGE_BAMBARA = KBTS_FOURCC('B', 'M', 'B', ' '),
|
|
KBTS_LANGUAGE_BAMILEKE = KBTS_FOURCC('B', 'M', 'L', ' '),
|
|
KBTS_LANGUAGE_BANDA = KBTS_FOURCC('B', 'A', 'D', '0'),
|
|
KBTS_LANGUAGE_BANDJALANG = KBTS_FOURCC('B', 'D', 'Y', ' '),
|
|
KBTS_LANGUAGE_BANGLA = KBTS_FOURCC('B', 'E', 'N', ' '),
|
|
KBTS_LANGUAGE_BASHKIR = KBTS_FOURCC('B', 'S', 'H', ' '),
|
|
KBTS_LANGUAGE_BASQUE = KBTS_FOURCC('E', 'U', 'Q', ' '),
|
|
KBTS_LANGUAGE_BATAK = KBTS_FOURCC('B', 'T', 'K', ' '),
|
|
KBTS_LANGUAGE_BATAK_ALAS_KLUET = KBTS_FOURCC('B', 'T', 'Z', ' '),
|
|
KBTS_LANGUAGE_BATAK_ANGKOLA = KBTS_FOURCC('A', 'K', 'B', ' '),
|
|
KBTS_LANGUAGE_BATAK_DAIRI = KBTS_FOURCC('B', 'T', 'D', ' '),
|
|
KBTS_LANGUAGE_BATAK_KARO = KBTS_FOURCC('B', 'T', 'X', ' '),
|
|
KBTS_LANGUAGE_BATAK_MANDAILING = KBTS_FOURCC('B', 'T', 'M', ' '),
|
|
KBTS_LANGUAGE_BATAK_SIMALUNGUN = KBTS_FOURCC('B', 'T', 'S', ' '),
|
|
KBTS_LANGUAGE_BATAK_TOBA = KBTS_FOURCC('B', 'B', 'C', ' '),
|
|
KBTS_LANGUAGE_BAULE = KBTS_FOURCC('B', 'A', 'U', ' '),
|
|
KBTS_LANGUAGE_BAVARIAN = KBTS_FOURCC('B', 'A', 'R', ' '),
|
|
KBTS_LANGUAGE_BELARUSIAN = KBTS_FOURCC('B', 'E', 'L', ' '),
|
|
KBTS_LANGUAGE_BEMBA = KBTS_FOURCC('B', 'E', 'M', ' '),
|
|
KBTS_LANGUAGE_BENCH = KBTS_FOURCC('B', 'C', 'H', ' '),
|
|
KBTS_LANGUAGE_BERBER = KBTS_FOURCC('B', 'B', 'R', ' '),
|
|
KBTS_LANGUAGE_BETI = KBTS_FOURCC('B', 'T', 'I', ' '),
|
|
KBTS_LANGUAGE_BETTE_KURUMA = KBTS_FOURCC('X', 'U', 'B', ' '),
|
|
KBTS_LANGUAGE_BHILI = KBTS_FOURCC('B', 'H', 'I', ' '),
|
|
KBTS_LANGUAGE_BHOJPURI = KBTS_FOURCC('B', 'H', 'O', ' '),
|
|
KBTS_LANGUAGE_BHUTANESE = KBTS_FOURCC('D', 'Z', 'N', ' '),
|
|
KBTS_LANGUAGE_BIBLE_CREE = KBTS_FOURCC('B', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_BIKOL = KBTS_FOURCC('B', 'I', 'K', ' '),
|
|
KBTS_LANGUAGE_BILEN = KBTS_FOURCC('B', 'I', 'L', ' '),
|
|
KBTS_LANGUAGE_BISHNUPRIYA_MANIPURI = KBTS_FOURCC('B', 'P', 'Y', ' '),
|
|
KBTS_LANGUAGE_BISLAMA = KBTS_FOURCC('B', 'I', 'S', ' '),
|
|
KBTS_LANGUAGE_BLACKFOOT = KBTS_FOURCC('B', 'K', 'F', ' '),
|
|
KBTS_LANGUAGE_BODO = KBTS_FOURCC('B', 'R', 'X', ' '),
|
|
KBTS_LANGUAGE_BOSNIAN = KBTS_FOURCC('B', 'O', 'S', ' '),
|
|
KBTS_LANGUAGE_BOUYEI = KBTS_FOURCC('P', 'C', 'C', ' '),
|
|
KBTS_LANGUAGE_BRAHUI = KBTS_FOURCC('B', 'R', 'H', ' '),
|
|
KBTS_LANGUAGE_BRAJ_BHASHA = KBTS_FOURCC('B', 'R', 'I', ' '),
|
|
KBTS_LANGUAGE_BRETON = KBTS_FOURCC('B', 'R', 'E', ' '),
|
|
KBTS_LANGUAGE_BUGIS = KBTS_FOURCC('B', 'U', 'G', ' '),
|
|
KBTS_LANGUAGE_BULGARIAN = KBTS_FOURCC('B', 'G', 'R', ' '),
|
|
KBTS_LANGUAGE_BUMTHANGKHA = KBTS_FOURCC('K', 'J', 'Z', ' '),
|
|
KBTS_LANGUAGE_BURMESE = KBTS_FOURCC('B', 'R', 'M', ' '),
|
|
KBTS_LANGUAGE_BURUSHASKI = KBTS_FOURCC('B', 'S', 'K', ' '),
|
|
KBTS_LANGUAGE_CAJUN_FRENCH = KBTS_FOURCC('F', 'R', 'C', ' '),
|
|
KBTS_LANGUAGE_CARRIER = KBTS_FOURCC('C', 'R', 'R', ' '),
|
|
KBTS_LANGUAGE_CATALAN = KBTS_FOURCC('C', 'A', 'T', ' '),
|
|
KBTS_LANGUAGE_CAYUGA = KBTS_FOURCC('C', 'A', 'Y', ' '),
|
|
KBTS_LANGUAGE_CEBUANO = KBTS_FOURCC('C', 'E', 'B', ' '),
|
|
KBTS_LANGUAGE_CENTRAL_YUPIK = KBTS_FOURCC('E', 'S', 'U', ' '),
|
|
KBTS_LANGUAGE_CHAHA_GURAGE = KBTS_FOURCC('C', 'H', 'G', ' '),
|
|
KBTS_LANGUAGE_CHAMORRO = KBTS_FOURCC('C', 'H', 'A', ' '),
|
|
KBTS_LANGUAGE_CHATTISGARHI = KBTS_FOURCC('C', 'H', 'H', ' '),
|
|
KBTS_LANGUAGE_CHECHEN = KBTS_FOURCC('C', 'H', 'E', ' '),
|
|
KBTS_LANGUAGE_CHEROKEE = KBTS_FOURCC('C', 'H', 'R', ' '),
|
|
KBTS_LANGUAGE_CHEYENNE = KBTS_FOURCC('C', 'H', 'Y', ' '),
|
|
KBTS_LANGUAGE_CHICHEWA = KBTS_FOURCC('C', 'H', 'I', ' '),
|
|
KBTS_LANGUAGE_CHIGA = KBTS_FOURCC('C', 'G', 'G', ' '),
|
|
KBTS_LANGUAGE_CHIMILA = KBTS_FOURCC('C', 'B', 'G', ' '),
|
|
KBTS_LANGUAGE_CHIN = KBTS_FOURCC('Q', 'I', 'N', ' '),
|
|
KBTS_LANGUAGE_CHINANTEC = KBTS_FOURCC('C', 'C', 'H', 'N'),
|
|
KBTS_LANGUAGE_CHINESE_PHONETIC = KBTS_FOURCC('Z', 'H', 'P', ' '),
|
|
KBTS_LANGUAGE_CHINESE_SIMPLIFIED = KBTS_FOURCC('Z', 'H', 'S', ' '),
|
|
KBTS_LANGUAGE_CHINESE_TRADITIONAL = KBTS_FOURCC('Z', 'H', 'T', ' '),
|
|
KBTS_LANGUAGE_CHINESE_TRADITIONAL_HONG_KONG = KBTS_FOURCC('Z', 'H', 'H', ' '),
|
|
KBTS_LANGUAGE_CHINESE_TRADITIONAL_MACAO = KBTS_FOURCC('Z', 'H', 'T', 'M'),
|
|
KBTS_LANGUAGE_CHIPEWYAN = KBTS_FOURCC('C', 'H', 'P', ' '),
|
|
KBTS_LANGUAGE_CHITTAGONIAN = KBTS_FOURCC('C', 'T', 'G', ' '),
|
|
KBTS_LANGUAGE_CHOCTAW = KBTS_FOURCC('C', 'H', 'O', ' '),
|
|
KBTS_LANGUAGE_CHUKCHI = KBTS_FOURCC('C', 'H', 'K', ' '),
|
|
KBTS_LANGUAGE_CHURCH_SLAVONIC = KBTS_FOURCC('C', 'S', 'L', ' '),
|
|
KBTS_LANGUAGE_CHUUKESE = KBTS_FOURCC('C', 'H', 'K', '0'),
|
|
KBTS_LANGUAGE_CHUVASH = KBTS_FOURCC('C', 'H', 'U', ' '),
|
|
KBTS_LANGUAGE_COMORIAN = KBTS_FOURCC('C', 'M', 'R', ' '),
|
|
KBTS_LANGUAGE_COMOX = KBTS_FOURCC('C', 'O', 'O', ' '),
|
|
KBTS_LANGUAGE_COPTIC = KBTS_FOURCC('C', 'O', 'P', ' '),
|
|
KBTS_LANGUAGE_CORNISH = KBTS_FOURCC('C', 'O', 'R', ' '),
|
|
KBTS_LANGUAGE_CORSICAN = KBTS_FOURCC('C', 'O', 'S', ' '),
|
|
KBTS_LANGUAGE_CREE = KBTS_FOURCC('C', 'R', 'E', ' '),
|
|
KBTS_LANGUAGE_CREOLES = KBTS_FOURCC('C', 'P', 'P', ' '),
|
|
KBTS_LANGUAGE_CRIMEAN_TATAR = KBTS_FOURCC('C', 'R', 'T', ' '),
|
|
KBTS_LANGUAGE_CRIOULO = KBTS_FOURCC('K', 'E', 'A', ' '),
|
|
KBTS_LANGUAGE_CROATIAN = KBTS_FOURCC('H', 'R', 'V', ' '),
|
|
KBTS_LANGUAGE_CYPRIOT_ARABIC = KBTS_FOURCC('A', 'C', 'Y', ' '),
|
|
KBTS_LANGUAGE_CZECH = KBTS_FOURCC('C', 'S', 'Y', ' '),
|
|
KBTS_LANGUAGE_DAGBANI = KBTS_FOURCC('D', 'A', 'G', ' '),
|
|
KBTS_LANGUAGE_DAN = KBTS_FOURCC('D', 'N', 'J', ' '),
|
|
KBTS_LANGUAGE_DANGME = KBTS_FOURCC('D', 'N', 'G', ' '),
|
|
KBTS_LANGUAGE_DANISH = KBTS_FOURCC('D', 'A', 'N', ' '),
|
|
KBTS_LANGUAGE_DARGWA = KBTS_FOURCC('D', 'A', 'R', ' '),
|
|
KBTS_LANGUAGE_DARI = KBTS_FOURCC('D', 'R', 'I', ' '),
|
|
KBTS_LANGUAGE_DAYI = KBTS_FOURCC('D', 'A', 'X', ' '),
|
|
KBTS_LANGUAGE_DEFAULT = KBTS_FOURCC('d', 'f', 'l', 't'), // Can be DFLT too...
|
|
KBTS_LANGUAGE_DEHONG_DAI = KBTS_FOURCC('T', 'D', 'D', ' '),
|
|
KBTS_LANGUAGE_DHANGU = KBTS_FOURCC('D', 'H', 'G', ' '),
|
|
KBTS_LANGUAGE_DHIVEHI = KBTS_FOURCC('D', 'I', 'V', ' '),
|
|
KBTS_LANGUAGE_DHUWAL = KBTS_FOURCC('D', 'U', 'J', ' '),
|
|
KBTS_LANGUAGE_DIMLI = KBTS_FOURCC('D', 'I', 'Q', ' '),
|
|
KBTS_LANGUAGE_DINKA = KBTS_FOURCC('D', 'N', 'K', ' '),
|
|
KBTS_LANGUAGE_DIVEHI = KBTS_FOURCC('D', 'I', 'V', ' '),
|
|
KBTS_LANGUAGE_DJAMBARRPUYNGU = KBTS_FOURCC('D', 'J', 'R', '0'),
|
|
KBTS_LANGUAGE_DOGRI = KBTS_FOURCC('D', 'G', 'O', ' '),
|
|
KBTS_LANGUAGE_DOGRI_MACROLANGUAGE = KBTS_FOURCC('D', 'G', 'R', ' '),
|
|
KBTS_LANGUAGE_DUNGAN = KBTS_FOURCC('D', 'U', 'N', ' '),
|
|
KBTS_LANGUAGE_DUTCH = KBTS_FOURCC('N', 'L', 'D', ' '),
|
|
KBTS_LANGUAGE_DZONGKHA = KBTS_FOURCC('D', 'Z', 'N', ' '),
|
|
KBTS_LANGUAGE_EASTERN_ABENAKI = KBTS_FOURCC('A', 'A', 'Q', ' '),
|
|
KBTS_LANGUAGE_EASTERN_CHAM = KBTS_FOURCC('C', 'J', 'M', ' '),
|
|
KBTS_LANGUAGE_EASTERN_CREE = KBTS_FOURCC('E', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_EASTERN_MANINKAKAN = KBTS_FOURCC('E', 'M', 'K', ' '),
|
|
KBTS_LANGUAGE_EASTERN_PWO_KAREN = KBTS_FOURCC('K', 'J', 'P', ' '),
|
|
KBTS_LANGUAGE_EBIRA = KBTS_FOURCC('E', 'B', 'I', ' '),
|
|
KBTS_LANGUAGE_EDO = KBTS_FOURCC('E', 'D', 'O', ' '),
|
|
KBTS_LANGUAGE_EFIK = KBTS_FOURCC('E', 'F', 'I', ' '),
|
|
KBTS_LANGUAGE_EMBERA_BAUDO = KBTS_FOURCC('B', 'D', 'C', ' '),
|
|
KBTS_LANGUAGE_EMBERA_CATIO = KBTS_FOURCC('C', 'T', 'O', ' '),
|
|
KBTS_LANGUAGE_EMBERA_CHAMI = KBTS_FOURCC('C', 'M', 'I', ' '),
|
|
KBTS_LANGUAGE_EMBERA_TADO = KBTS_FOURCC('T', 'D', 'C', ' '),
|
|
KBTS_LANGUAGE_ENGLISH = KBTS_FOURCC('E', 'N', 'G', ' '),
|
|
KBTS_LANGUAGE_EPENA = KBTS_FOURCC('S', 'J', 'A', ' '),
|
|
KBTS_LANGUAGE_ERZYA = KBTS_FOURCC('E', 'R', 'Z', ' '),
|
|
KBTS_LANGUAGE_ESPERANTO = KBTS_FOURCC('N', 'T', 'O', ' '),
|
|
KBTS_LANGUAGE_ESTONIAN = KBTS_FOURCC('E', 'T', 'I', ' '),
|
|
KBTS_LANGUAGE_EVEN = KBTS_FOURCC('E', 'V', 'N', ' '),
|
|
KBTS_LANGUAGE_EVENKI = KBTS_FOURCC('E', 'V', 'K', ' '),
|
|
KBTS_LANGUAGE_EWE = KBTS_FOURCC('E', 'W', 'E', ' '),
|
|
KBTS_LANGUAGE_FALAM_CHIN = KBTS_FOURCC('H', 'A', 'L', ' '),
|
|
KBTS_LANGUAGE_FANG = KBTS_FOURCC('F', 'A', 'N', '0'),
|
|
KBTS_LANGUAGE_FANTI = KBTS_FOURCC('F', 'A', 'T', ' '),
|
|
KBTS_LANGUAGE_FAROESE = KBTS_FOURCC('F', 'O', 'S', ' '),
|
|
KBTS_LANGUAGE_FEFE = KBTS_FOURCC('F', 'M', 'P', ' '),
|
|
KBTS_LANGUAGE_FIJIAN = KBTS_FOURCC('F', 'J', 'I', ' '),
|
|
KBTS_LANGUAGE_FILIPINO = KBTS_FOURCC('P', 'I', 'L', ' '),
|
|
KBTS_LANGUAGE_FINNISH = KBTS_FOURCC('F', 'I', 'N', ' '),
|
|
KBTS_LANGUAGE_FLEMISH = KBTS_FOURCC('F', 'L', 'E', ' '),
|
|
KBTS_LANGUAGE_FON = KBTS_FOURCC('F', 'O', 'N', ' '),
|
|
KBTS_LANGUAGE_FOREST_ENETS = KBTS_FOURCC('F', 'N', 'E', ' '),
|
|
KBTS_LANGUAGE_FRENCH = KBTS_FOURCC('F', 'R', 'A', ' '),
|
|
KBTS_LANGUAGE_FRENCH_ANTILLEAN = KBTS_FOURCC('F', 'A', 'N', ' '),
|
|
KBTS_LANGUAGE_FRISIAN = KBTS_FOURCC('F', 'R', 'I', ' '),
|
|
KBTS_LANGUAGE_FRIULIAN = KBTS_FOURCC('F', 'R', 'L', ' '),
|
|
KBTS_LANGUAGE_FULAH = KBTS_FOURCC('F', 'U', 'L', ' '),
|
|
KBTS_LANGUAGE_FUTA = KBTS_FOURCC('F', 'T', 'A', ' '),
|
|
KBTS_LANGUAGE_GA = KBTS_FOURCC('G', 'A', 'D', ' '),
|
|
KBTS_LANGUAGE_GAGAUZ = KBTS_FOURCC('G', 'A', 'G', ' '),
|
|
KBTS_LANGUAGE_GALICIAN = KBTS_FOURCC('G', 'A', 'L', ' '),
|
|
KBTS_LANGUAGE_GANDA = KBTS_FOURCC('L', 'U', 'G', ' '),
|
|
KBTS_LANGUAGE_GARHWALI = KBTS_FOURCC('G', 'A', 'W', ' '),
|
|
KBTS_LANGUAGE_GARO = KBTS_FOURCC('G', 'R', 'O', ' '),
|
|
KBTS_LANGUAGE_GARSHUNI = KBTS_FOURCC('G', 'A', 'R', ' '),
|
|
KBTS_LANGUAGE_GEBA_KAREN = KBTS_FOURCC('K', 'V', 'Q', ' '),
|
|
KBTS_LANGUAGE_GEEZ = KBTS_FOURCC('G', 'E', 'Z', ' '),
|
|
KBTS_LANGUAGE_GEORGIAN = KBTS_FOURCC('K', 'A', 'T', ' '),
|
|
KBTS_LANGUAGE_GEPO = KBTS_FOURCC('Y', 'G', 'P', ' '),
|
|
KBTS_LANGUAGE_GERMAN = KBTS_FOURCC('D', 'E', 'U', ' '),
|
|
KBTS_LANGUAGE_GIKUYU = KBTS_FOURCC('K', 'I', 'K', ' '),
|
|
KBTS_LANGUAGE_GILAKI = KBTS_FOURCC('G', 'L', 'K', ' '),
|
|
KBTS_LANGUAGE_GILBERTESE = KBTS_FOURCC('G', 'I', 'L', '0'),
|
|
KBTS_LANGUAGE_GILYAK = KBTS_FOURCC('G', 'I', 'L', ' '),
|
|
KBTS_LANGUAGE_GITHABUL = KBTS_FOURCC('G', 'I', 'H', ' '),
|
|
KBTS_LANGUAGE_GOGO = KBTS_FOURCC('G', 'O', 'G', ' '),
|
|
KBTS_LANGUAGE_GONDI = KBTS_FOURCC('G', 'O', 'N', ' '),
|
|
KBTS_LANGUAGE_GREEK = KBTS_FOURCC('E', 'L', 'L', ' '),
|
|
KBTS_LANGUAGE_GREENLANDIC = KBTS_FOURCC('G', 'R', 'N', ' '),
|
|
KBTS_LANGUAGE_GUARANI = KBTS_FOURCC('G', 'U', 'A', ' '),
|
|
KBTS_LANGUAGE_GUINEA = KBTS_FOURCC('G', 'K', 'P', ' '),
|
|
KBTS_LANGUAGE_GUJARATI = KBTS_FOURCC('G', 'U', 'J', ' '),
|
|
KBTS_LANGUAGE_GUMATJ = KBTS_FOURCC('G', 'N', 'N', ' '),
|
|
KBTS_LANGUAGE_GUMUZ = KBTS_FOURCC('G', 'M', 'Z', ' '),
|
|
KBTS_LANGUAGE_GUPAPUYNGU = KBTS_FOURCC('G', 'U', 'F', ' '),
|
|
KBTS_LANGUAGE_GUSII = KBTS_FOURCC('G', 'U', 'Z', ' '),
|
|
KBTS_LANGUAGE_HAIDA = KBTS_FOURCC('H', 'A', 'I', '0'),
|
|
KBTS_LANGUAGE_HAITIAN_CREOLE = KBTS_FOURCC('H', 'A', 'I', ' '),
|
|
KBTS_LANGUAGE_HALKOMELEM = KBTS_FOURCC('H', 'U', 'R', ' '),
|
|
KBTS_LANGUAGE_HAMMER_BANNA = KBTS_FOURCC('H', 'B', 'N', ' '),
|
|
KBTS_LANGUAGE_HARARI = KBTS_FOURCC('H', 'R', 'I', ' '),
|
|
KBTS_LANGUAGE_HARAUTI = KBTS_FOURCC('H', 'A', 'R', ' '),
|
|
KBTS_LANGUAGE_HARYANVI = KBTS_FOURCC('B', 'G', 'C', ' '),
|
|
KBTS_LANGUAGE_HAUSA = KBTS_FOURCC('H', 'A', 'U', ' '),
|
|
KBTS_LANGUAGE_HAVASUPAI_WALAPAI_YAVAPAI = KBTS_FOURCC('Y', 'U', 'F', ' '),
|
|
KBTS_LANGUAGE_HAWAIIAN = KBTS_FOURCC('H', 'A', 'W', ' '),
|
|
KBTS_LANGUAGE_HAYA = KBTS_FOURCC('H', 'A', 'Y', ' '),
|
|
KBTS_LANGUAGE_HAZARAGI = KBTS_FOURCC('H', 'A', 'Z', ' '),
|
|
KBTS_LANGUAGE_HEBREW = KBTS_FOURCC('I', 'W', 'R', ' '),
|
|
KBTS_LANGUAGE_HEILTSUK = KBTS_FOURCC('H', 'E', 'I', ' '),
|
|
KBTS_LANGUAGE_HERERO = KBTS_FOURCC('H', 'E', 'R', ' '),
|
|
KBTS_LANGUAGE_HIGH_MARI = KBTS_FOURCC('H', 'M', 'A', ' '),
|
|
KBTS_LANGUAGE_HILIGAYNON = KBTS_FOURCC('H', 'I', 'L', ' '),
|
|
KBTS_LANGUAGE_HINDI = KBTS_FOURCC('H', 'I', 'N', ' '),
|
|
KBTS_LANGUAGE_HINDKO = KBTS_FOURCC('H', 'N', 'D', ' '),
|
|
KBTS_LANGUAGE_HIRI_MOTU = KBTS_FOURCC('H', 'M', 'O', ' '),
|
|
KBTS_LANGUAGE_HMONG = KBTS_FOURCC('H', 'M', 'N', ' '),
|
|
KBTS_LANGUAGE_HMONG_DAW = KBTS_FOURCC('M', 'W', 'W', ' '),
|
|
KBTS_LANGUAGE_HMONG_SHUAT = KBTS_FOURCC('H', 'M', 'Z', ' '),
|
|
KBTS_LANGUAGE_HO = KBTS_FOURCC('H', 'O', ' ', ' '),
|
|
KBTS_LANGUAGE_HUNGARIAN = KBTS_FOURCC('H', 'U', 'N', ' '),
|
|
KBTS_LANGUAGE_IBAN = KBTS_FOURCC('I', 'B', 'A', ' '),
|
|
KBTS_LANGUAGE_IBIBIO = KBTS_FOURCC('I', 'B', 'B', ' '),
|
|
KBTS_LANGUAGE_ICELANDIC = KBTS_FOURCC('I', 'S', 'L', ' '),
|
|
KBTS_LANGUAGE_IDO = KBTS_FOURCC('I', 'D', 'O', ' '),
|
|
KBTS_LANGUAGE_IGBO = KBTS_FOURCC('I', 'B', 'O', ' '),
|
|
KBTS_LANGUAGE_IJO = KBTS_FOURCC('I', 'J', 'O', ' '),
|
|
KBTS_LANGUAGE_ILOKANO = KBTS_FOURCC('I', 'L', 'O', ' '),
|
|
KBTS_LANGUAGE_INARI_SAMI = KBTS_FOURCC('I', 'S', 'M', ' '),
|
|
KBTS_LANGUAGE_INDONESIAN = KBTS_FOURCC('I', 'N', 'D', ' '),
|
|
KBTS_LANGUAGE_INGUSH = KBTS_FOURCC('I', 'N', 'G', ' '),
|
|
KBTS_LANGUAGE_INTERLINGUA = KBTS_FOURCC('I', 'N', 'A', ' '),
|
|
KBTS_LANGUAGE_INTERLINGUE = KBTS_FOURCC('I', 'L', 'E', ' '),
|
|
KBTS_LANGUAGE_INUKTITUT = KBTS_FOURCC('I', 'N', 'U', ' '),
|
|
KBTS_LANGUAGE_INUPIAT = KBTS_FOURCC('I', 'P', 'K', ' '),
|
|
KBTS_LANGUAGE_IPA_PHONETIC = KBTS_FOURCC('I', 'P', 'P', ' '),
|
|
KBTS_LANGUAGE_IRISH = KBTS_FOURCC('I', 'R', 'I', ' '),
|
|
KBTS_LANGUAGE_IRISH_TRADITIONAL = KBTS_FOURCC('I', 'R', 'T', ' '),
|
|
KBTS_LANGUAGE_IRULA = KBTS_FOURCC('I', 'R', 'U', ' '),
|
|
KBTS_LANGUAGE_ITALIAN = KBTS_FOURCC('I', 'T', 'A', ' '),
|
|
KBTS_LANGUAGE_JAMAICAN_CREOLE = KBTS_FOURCC('J', 'A', 'M', ' '),
|
|
KBTS_LANGUAGE_JAPANESE = KBTS_FOURCC('J', 'A', 'N', ' '),
|
|
KBTS_LANGUAGE_JAVANESE = KBTS_FOURCC('J', 'A', 'V', ' '),
|
|
KBTS_LANGUAGE_JENNU_KURUMA = KBTS_FOURCC('X', 'U', 'J', ' '),
|
|
KBTS_LANGUAGE_JUDEO_TAT = KBTS_FOURCC('J', 'D', 'T', ' '),
|
|
KBTS_LANGUAGE_JULA = KBTS_FOURCC('J', 'U', 'L', ' '),
|
|
KBTS_LANGUAGE_KABARDIAN = KBTS_FOURCC('K', 'A', 'B', ' '),
|
|
KBTS_LANGUAGE_KABYLE = KBTS_FOURCC('K', 'A', 'B', '0'),
|
|
KBTS_LANGUAGE_KACHCHI = KBTS_FOURCC('K', 'A', 'C', ' '),
|
|
KBTS_LANGUAGE_KADIWEU = KBTS_FOURCC('K', 'B', 'C', ' '),
|
|
KBTS_LANGUAGE_KALENJIN = KBTS_FOURCC('K', 'A', 'L', ' '),
|
|
KBTS_LANGUAGE_KALMYK = KBTS_FOURCC('K', 'L', 'M', ' '),
|
|
KBTS_LANGUAGE_KAMBA = KBTS_FOURCC('K', 'M', 'B', ' '),
|
|
KBTS_LANGUAGE_KANAUJI = KBTS_FOURCC('B', 'J', 'J', ' '),
|
|
KBTS_LANGUAGE_KANNADA = KBTS_FOURCC('K', 'A', 'N', ' '),
|
|
KBTS_LANGUAGE_KANURI = KBTS_FOURCC('K', 'N', 'R', ' '),
|
|
KBTS_LANGUAGE_KAQCHIKEL = KBTS_FOURCC('C', 'A', 'K', ' '),
|
|
KBTS_LANGUAGE_KARACHAY = KBTS_FOURCC('K', 'A', 'R', ' '),
|
|
KBTS_LANGUAGE_KARAIM = KBTS_FOURCC('K', 'R', 'M', ' '),
|
|
KBTS_LANGUAGE_KARAKALPAK = KBTS_FOURCC('K', 'R', 'K', ' '),
|
|
KBTS_LANGUAGE_KARELIAN = KBTS_FOURCC('K', 'R', 'L', ' '),
|
|
KBTS_LANGUAGE_KAREN = KBTS_FOURCC('K', 'R', 'N', ' '),
|
|
KBTS_LANGUAGE_KASHMIRI = KBTS_FOURCC('K', 'S', 'H', ' '),
|
|
KBTS_LANGUAGE_KASHUBIAN = KBTS_FOURCC('C', 'S', 'B', ' '),
|
|
KBTS_LANGUAGE_KATE = KBTS_FOURCC('K', 'M', 'G', ' '),
|
|
KBTS_LANGUAGE_KAZAKH = KBTS_FOURCC('K', 'A', 'Z', ' '),
|
|
KBTS_LANGUAGE_KEBENA = KBTS_FOURCC('K', 'E', 'B', ' '),
|
|
KBTS_LANGUAGE_KEKCHI = KBTS_FOURCC('K', 'E', 'K', ' '),
|
|
KBTS_LANGUAGE_KHAKASS = KBTS_FOURCC('K', 'H', 'A', ' '),
|
|
KBTS_LANGUAGE_KHAMTI_SHAN = KBTS_FOURCC('K', 'H', 'T', ' '),
|
|
KBTS_LANGUAGE_KHAMYANG = KBTS_FOURCC('K', 'S', 'U', ' '),
|
|
KBTS_LANGUAGE_KHANTY_KAZIM = KBTS_FOURCC('K', 'H', 'K', ' '),
|
|
KBTS_LANGUAGE_KHANTY_SHURISHKAR = KBTS_FOURCC('K', 'H', 'S', ' '),
|
|
KBTS_LANGUAGE_KHANTY_VAKHI = KBTS_FOURCC('K', 'H', 'V', ' '),
|
|
KBTS_LANGUAGE_KHASI = KBTS_FOURCC('K', 'S', 'I', ' '),
|
|
KBTS_LANGUAGE_KHENGKHA = KBTS_FOURCC('X', 'K', 'F', ' '),
|
|
KBTS_LANGUAGE_KHINALUG = KBTS_FOURCC('K', 'J', 'J', ' '),
|
|
KBTS_LANGUAGE_KHMER = KBTS_FOURCC('K', 'H', 'M', ' '),
|
|
KBTS_LANGUAGE_KHORASANI_TURKIC = KBTS_FOURCC('K', 'M', 'Z', ' '),
|
|
KBTS_LANGUAGE_KHOWAR = KBTS_FOURCC('K', 'H', 'W', ' '),
|
|
KBTS_LANGUAGE_KHUTSURI_GEORGIAN = KBTS_FOURCC('K', 'G', 'E', ' '),
|
|
KBTS_LANGUAGE_KICHE = KBTS_FOURCC('Q', 'U', 'C', ' '),
|
|
KBTS_LANGUAGE_KIKONGO = KBTS_FOURCC('K', 'O', 'N', ' '),
|
|
KBTS_LANGUAGE_KILDIN_SAMI = KBTS_FOURCC('K', 'S', 'M', ' '),
|
|
KBTS_LANGUAGE_KINYARWANDA = KBTS_FOURCC('R', 'U', 'A', ' '),
|
|
KBTS_LANGUAGE_KIRMANJKI = KBTS_FOURCC('K', 'I', 'U', ' '),
|
|
KBTS_LANGUAGE_KISII = KBTS_FOURCC('K', 'I', 'S', ' '),
|
|
KBTS_LANGUAGE_KITUBA = KBTS_FOURCC('M', 'K', 'W', ' '),
|
|
KBTS_LANGUAGE_KODAGU = KBTS_FOURCC('K', 'O', 'D', ' '),
|
|
KBTS_LANGUAGE_KOKNI = KBTS_FOURCC('K', 'K', 'N', ' '),
|
|
KBTS_LANGUAGE_KOMI = KBTS_FOURCC('K', 'O', 'M', ' '),
|
|
KBTS_LANGUAGE_KOMI_PERMYAK = KBTS_FOURCC('K', 'O', 'P', ' '),
|
|
KBTS_LANGUAGE_KOMI_ZYRIAN = KBTS_FOURCC('K', 'O', 'Z', ' '),
|
|
KBTS_LANGUAGE_KOMO = KBTS_FOURCC('K', 'M', 'O', ' '),
|
|
KBTS_LANGUAGE_KOMSO = KBTS_FOURCC('K', 'M', 'S', ' '),
|
|
KBTS_LANGUAGE_KONGO = KBTS_FOURCC('K', 'O', 'N', '0'),
|
|
KBTS_LANGUAGE_KONKANI = KBTS_FOURCC('K', 'O', 'K', ' '),
|
|
KBTS_LANGUAGE_KOORETE = KBTS_FOURCC('K', 'R', 'T', ' '),
|
|
KBTS_LANGUAGE_KOREAN = KBTS_FOURCC('K', 'O', 'R', ' '),
|
|
KBTS_LANGUAGE_KOREAN_OLD_HANGUL = KBTS_FOURCC('K', 'O', 'H', ' '),
|
|
KBTS_LANGUAGE_KORYAK = KBTS_FOURCC('K', 'Y', 'K', ' '),
|
|
KBTS_LANGUAGE_KOSRAEAN = KBTS_FOURCC('K', 'O', 'S', ' '),
|
|
KBTS_LANGUAGE_KPELLE = KBTS_FOURCC('K', 'P', 'L', ' '),
|
|
KBTS_LANGUAGE_KPELLE_LIBERIA = KBTS_FOURCC('X', 'P', 'E', ' '),
|
|
KBTS_LANGUAGE_KRIO = KBTS_FOURCC('K', 'R', 'I', ' '),
|
|
KBTS_LANGUAGE_KRYMCHAK = KBTS_FOURCC('J', 'C', 'T', ' '),
|
|
KBTS_LANGUAGE_KUANYAMA = KBTS_FOURCC('K', 'U', 'A', ' '),
|
|
KBTS_LANGUAGE_KUBE = KBTS_FOURCC('K', 'G', 'F', ' '),
|
|
KBTS_LANGUAGE_KUI = KBTS_FOURCC('K', 'U', 'I', ' '),
|
|
KBTS_LANGUAGE_KULVI = KBTS_FOURCC('K', 'U', 'K', ' '),
|
|
KBTS_LANGUAGE_KUMAONI = KBTS_FOURCC('K', 'M', 'N', ' '),
|
|
KBTS_LANGUAGE_KUMYK = KBTS_FOURCC('K', 'U', 'M', ' '),
|
|
KBTS_LANGUAGE_KURDISH = KBTS_FOURCC('K', 'U', 'R', ' '),
|
|
KBTS_LANGUAGE_KURUKH = KBTS_FOURCC('K', 'U', 'U', ' '),
|
|
KBTS_LANGUAGE_KUY = KBTS_FOURCC('K', 'U', 'Y', ' '),
|
|
KBTS_LANGUAGE_KWAKWALA = KBTS_FOURCC('K', 'W', 'K', ' '),
|
|
KBTS_LANGUAGE_KYRGYZ = KBTS_FOURCC('K', 'I', 'R', ' '),
|
|
KBTS_LANGUAGE_L_CREE = KBTS_FOURCC('L', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_LADAKHI = KBTS_FOURCC('L', 'D', 'K', ' '),
|
|
KBTS_LANGUAGE_LADIN = KBTS_FOURCC('L', 'A', 'D', ' '),
|
|
KBTS_LANGUAGE_LADINO = KBTS_FOURCC('J', 'U', 'D', ' '),
|
|
KBTS_LANGUAGE_LAHULI = KBTS_FOURCC('L', 'A', 'H', ' '),
|
|
KBTS_LANGUAGE_LAK = KBTS_FOURCC('L', 'A', 'K', ' '),
|
|
KBTS_LANGUAGE_LAKI = KBTS_FOURCC('L', 'K', 'I', ' '),
|
|
KBTS_LANGUAGE_LAMBANI = KBTS_FOURCC('L', 'A', 'M', ' '),
|
|
KBTS_LANGUAGE_LAMPUNG = KBTS_FOURCC('L', 'J', 'P', ' '),
|
|
KBTS_LANGUAGE_LAO = KBTS_FOURCC('L', 'A', 'O', ' '),
|
|
KBTS_LANGUAGE_LATIN = KBTS_FOURCC('L', 'A', 'T', ' '),
|
|
KBTS_LANGUAGE_LATVIAN = KBTS_FOURCC('L', 'V', 'I', ' '),
|
|
KBTS_LANGUAGE_LAZ = KBTS_FOURCC('L', 'A', 'Z', ' '),
|
|
KBTS_LANGUAGE_LELEMI = KBTS_FOURCC('L', 'E', 'F', ' '),
|
|
KBTS_LANGUAGE_LEZGI = KBTS_FOURCC('L', 'E', 'Z', ' '),
|
|
KBTS_LANGUAGE_LIGURIAN = KBTS_FOURCC('L', 'I', 'J', ' '),
|
|
KBTS_LANGUAGE_LIMBU = KBTS_FOURCC('L', 'M', 'B', ' '),
|
|
KBTS_LANGUAGE_LIMBURGISH = KBTS_FOURCC('L', 'I', 'M', ' '),
|
|
KBTS_LANGUAGE_LINGALA = KBTS_FOURCC('L', 'I', 'N', ' '),
|
|
KBTS_LANGUAGE_LIPO = KBTS_FOURCC('L', 'P', 'O', ' '),
|
|
KBTS_LANGUAGE_LISU = KBTS_FOURCC('L', 'I', 'S', ' '),
|
|
KBTS_LANGUAGE_LITHUANIAN = KBTS_FOURCC('L', 'T', 'H', ' '),
|
|
KBTS_LANGUAGE_LIV = KBTS_FOURCC('L', 'I', 'V', ' '),
|
|
KBTS_LANGUAGE_LOJBAN = KBTS_FOURCC('J', 'B', 'O', ' '),
|
|
KBTS_LANGUAGE_LOMA = KBTS_FOURCC('L', 'O', 'M', ' '),
|
|
KBTS_LANGUAGE_LOMBARD = KBTS_FOURCC('L', 'M', 'O', ' '),
|
|
KBTS_LANGUAGE_LOMWE = KBTS_FOURCC('L', 'M', 'W', ' '),
|
|
KBTS_LANGUAGE_LOW_MARI = KBTS_FOURCC('L', 'M', 'A', ' '),
|
|
KBTS_LANGUAGE_LOW_SAXON = KBTS_FOURCC('N', 'D', 'S', ' '),
|
|
KBTS_LANGUAGE_LOWER_SORBIAN = KBTS_FOURCC('L', 'S', 'B', ' '),
|
|
KBTS_LANGUAGE_LU = KBTS_FOURCC('X', 'B', 'D', ' '),
|
|
KBTS_LANGUAGE_LUBA_KATANGA = KBTS_FOURCC('L', 'U', 'B', ' '),
|
|
KBTS_LANGUAGE_LUBA_LULUA = KBTS_FOURCC('L', 'U', 'A', ' '),
|
|
KBTS_LANGUAGE_LULE_SAMI = KBTS_FOURCC('L', 'S', 'M', ' '),
|
|
KBTS_LANGUAGE_LUO = KBTS_FOURCC('L', 'U', 'O', ' '),
|
|
KBTS_LANGUAGE_LURI = KBTS_FOURCC('L', 'R', 'C', ' '),
|
|
KBTS_LANGUAGE_LUSHOOTSEED = KBTS_FOURCC('L', 'U', 'T', ' '),
|
|
KBTS_LANGUAGE_LUXEMBOURGISH = KBTS_FOURCC('L', 'T', 'Z', ' '),
|
|
KBTS_LANGUAGE_LUYIA = KBTS_FOURCC('L', 'U', 'H', ' '),
|
|
KBTS_LANGUAGE_MACEDONIAN = KBTS_FOURCC('M', 'K', 'D', ' '),
|
|
KBTS_LANGUAGE_MADURA = KBTS_FOURCC('M', 'A', 'D', ' '),
|
|
KBTS_LANGUAGE_MAGAHI = KBTS_FOURCC('M', 'A', 'G', ' '),
|
|
KBTS_LANGUAGE_MAITHILI = KBTS_FOURCC('M', 'T', 'H', ' '),
|
|
KBTS_LANGUAGE_MAJANG = KBTS_FOURCC('M', 'A', 'J', ' '),
|
|
KBTS_LANGUAGE_MAKASAR = KBTS_FOURCC('M', 'K', 'R', ' '),
|
|
KBTS_LANGUAGE_MAKHUWA = KBTS_FOURCC('M', 'A', 'K', ' '),
|
|
KBTS_LANGUAGE_MAKONDE = KBTS_FOURCC('K', 'D', 'E', ' '),
|
|
KBTS_LANGUAGE_MALAGASY = KBTS_FOURCC('M', 'L', 'G', ' '),
|
|
KBTS_LANGUAGE_MALAY = KBTS_FOURCC('M', 'L', 'Y', ' '),
|
|
KBTS_LANGUAGE_MALAYALAM = KBTS_FOURCC('M', 'A', 'L', ' '),
|
|
KBTS_LANGUAGE_MALAYALAM_REFORMED = KBTS_FOURCC('M', 'L', 'R', ' '),
|
|
KBTS_LANGUAGE_MALE = KBTS_FOURCC('M', 'L', 'E', ' '),
|
|
KBTS_LANGUAGE_MALINKE = KBTS_FOURCC('M', 'L', 'N', ' '),
|
|
KBTS_LANGUAGE_MALTESE = KBTS_FOURCC('M', 'T', 'S', ' '),
|
|
KBTS_LANGUAGE_MAM = KBTS_FOURCC('M', 'A', 'M', ' '),
|
|
KBTS_LANGUAGE_MANCHU = KBTS_FOURCC('M', 'C', 'H', ' '),
|
|
KBTS_LANGUAGE_MANDAR = KBTS_FOURCC('M', 'D', 'R', ' '),
|
|
KBTS_LANGUAGE_MANDINKA = KBTS_FOURCC('M', 'N', 'D', ' '),
|
|
KBTS_LANGUAGE_MANINKA = KBTS_FOURCC('M', 'N', 'K', ' '),
|
|
KBTS_LANGUAGE_MANIPURI = KBTS_FOURCC('M', 'N', 'I', ' '),
|
|
KBTS_LANGUAGE_MANO = KBTS_FOURCC('M', 'E', 'V', ' '),
|
|
KBTS_LANGUAGE_MANSI = KBTS_FOURCC('M', 'A', 'N', ' '),
|
|
KBTS_LANGUAGE_MANX = KBTS_FOURCC('M', 'N', 'X', ' '),
|
|
KBTS_LANGUAGE_MAORI = KBTS_FOURCC('M', 'R', 'I', ' '),
|
|
KBTS_LANGUAGE_MAPUDUNGUN = KBTS_FOURCC('M', 'A', 'P', ' '),
|
|
KBTS_LANGUAGE_MARATHI = KBTS_FOURCC('M', 'A', 'R', ' '),
|
|
KBTS_LANGUAGE_MARSHALLESE = KBTS_FOURCC('M', 'A', 'H', ' '),
|
|
KBTS_LANGUAGE_MARWARI = KBTS_FOURCC('M', 'A', 'W', ' '),
|
|
KBTS_LANGUAGE_MAYAN = KBTS_FOURCC('M', 'Y', 'N', ' '),
|
|
KBTS_LANGUAGE_MAZANDERANI = KBTS_FOURCC('M', 'Z', 'N', ' '),
|
|
KBTS_LANGUAGE_MBEMBE_TIGON = KBTS_FOURCC('N', 'Z', 'A', ' '),
|
|
KBTS_LANGUAGE_MBO = KBTS_FOURCC('M', 'B', 'O', ' '),
|
|
KBTS_LANGUAGE_MBUNDU = KBTS_FOURCC('M', 'B', 'N', ' '),
|
|
KBTS_LANGUAGE_MEDUMBA = KBTS_FOURCC('B', 'Y', 'V', ' '),
|
|
KBTS_LANGUAGE_MEEN = KBTS_FOURCC('M', 'E', 'N', ' '),
|
|
KBTS_LANGUAGE_MENDE = KBTS_FOURCC('M', 'D', 'E', ' '),
|
|
KBTS_LANGUAGE_MERU = KBTS_FOURCC('M', 'E', 'R', ' '),
|
|
KBTS_LANGUAGE_MEWATI = KBTS_FOURCC('W', 'T', 'M', ' '),
|
|
KBTS_LANGUAGE_MINANGKABAU = KBTS_FOURCC('M', 'I', 'N', ' '),
|
|
KBTS_LANGUAGE_MINJANGBAL = KBTS_FOURCC('X', 'J', 'B', ' '),
|
|
KBTS_LANGUAGE_MIRANDESE = KBTS_FOURCC('M', 'W', 'L', ' '),
|
|
KBTS_LANGUAGE_MIZO = KBTS_FOURCC('M', 'I', 'Z', ' '),
|
|
KBTS_LANGUAGE_MOHAWK = KBTS_FOURCC('M', 'O', 'H', ' '),
|
|
KBTS_LANGUAGE_MOKSHA = KBTS_FOURCC('M', 'O', 'K', ' '),
|
|
KBTS_LANGUAGE_MOLDAVIAN = KBTS_FOURCC('M', 'O', 'L', ' '),
|
|
KBTS_LANGUAGE_MON = KBTS_FOURCC('M', 'O', 'N', ' '),
|
|
KBTS_LANGUAGE_MONGOLIAN = KBTS_FOURCC('M', 'N', 'G', ' '),
|
|
KBTS_LANGUAGE_MOOSE_CREE = KBTS_FOURCC('M', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_MORISYEN = KBTS_FOURCC('M', 'F', 'E', ' '),
|
|
KBTS_LANGUAGE_MOROCCAN = KBTS_FOURCC('M', 'O', 'R', ' '),
|
|
KBTS_LANGUAGE_MOSSI = KBTS_FOURCC('M', 'P', 'S', ' '),
|
|
KBTS_LANGUAGE_MUNDARI = KBTS_FOURCC('M', 'U', 'N', ' '),
|
|
KBTS_LANGUAGE_MUSCOGEE = KBTS_FOURCC('M', 'U', 'S', ' '),
|
|
KBTS_LANGUAGE_N_CREE = KBTS_FOURCC('N', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_NAGA_ASSAMESE = KBTS_FOURCC('N', 'A', 'G', ' '),
|
|
KBTS_LANGUAGE_NAGARI = KBTS_FOURCC('N', 'G', 'R', ' '),
|
|
KBTS_LANGUAGE_NAHUATL = KBTS_FOURCC('N', 'A', 'H', ' '),
|
|
KBTS_LANGUAGE_NANAI = KBTS_FOURCC('N', 'A', 'N', ' '),
|
|
KBTS_LANGUAGE_NASKAPI = KBTS_FOURCC('N', 'A', 'S', ' '),
|
|
KBTS_LANGUAGE_NAURUAN = KBTS_FOURCC('N', 'A', 'U', ' '),
|
|
KBTS_LANGUAGE_NAVAJO = KBTS_FOURCC('N', 'A', 'V', ' '),
|
|
KBTS_LANGUAGE_NDAU = KBTS_FOURCC('N', 'D', 'C', ' '),
|
|
KBTS_LANGUAGE_NDEBELE = KBTS_FOURCC('N', 'D', 'B', ' '),
|
|
KBTS_LANGUAGE_NDONGA = KBTS_FOURCC('N', 'D', 'G', ' '),
|
|
KBTS_LANGUAGE_NEAPOLITAN = KBTS_FOURCC('N', 'A', 'P', ' '),
|
|
KBTS_LANGUAGE_NEPALI = KBTS_FOURCC('N', 'E', 'P', ' '),
|
|
KBTS_LANGUAGE_NEWARI = KBTS_FOURCC('N', 'E', 'W', ' '),
|
|
KBTS_LANGUAGE_NGBAKA = KBTS_FOURCC('N', 'G', 'A', ' '),
|
|
KBTS_LANGUAGE_NIGERIAN_FULFULDE = KBTS_FOURCC('F', 'U', 'V', ' '),
|
|
KBTS_LANGUAGE_NIMADI = KBTS_FOURCC('N', 'O', 'E', ' '),
|
|
KBTS_LANGUAGE_NISI = KBTS_FOURCC('N', 'I', 'S', ' '),
|
|
KBTS_LANGUAGE_NIUEAN = KBTS_FOURCC('N', 'I', 'U', ' '),
|
|
KBTS_LANGUAGE_NKO = KBTS_FOURCC('N', 'K', 'O', ' '),
|
|
KBTS_LANGUAGE_NOGAI = KBTS_FOURCC('N', 'O', 'G', ' '),
|
|
KBTS_LANGUAGE_NORFOLK = KBTS_FOURCC('P', 'I', 'H', ' '),
|
|
KBTS_LANGUAGE_NORTH_SLAVEY = KBTS_FOURCC('S', 'C', 'S', ' '),
|
|
KBTS_LANGUAGE_NORTHERN_EMBERA = KBTS_FOURCC('E', 'M', 'P', ' '),
|
|
KBTS_LANGUAGE_NORTHERN_SAMI = KBTS_FOURCC('N', 'S', 'M', ' '),
|
|
KBTS_LANGUAGE_NORTHERN_SOTHO = KBTS_FOURCC('N', 'S', 'O', ' '),
|
|
KBTS_LANGUAGE_NORTHERN_TAI = KBTS_FOURCC('N', 'T', 'A', ' '),
|
|
KBTS_LANGUAGE_NORWAY_HOUSE_CREE = KBTS_FOURCC('N', 'H', 'C', ' '),
|
|
KBTS_LANGUAGE_NORWEGIAN = KBTS_FOURCC('N', 'O', 'R', ' '),
|
|
KBTS_LANGUAGE_NORWEGIAN_NYNORSK = KBTS_FOURCC('N', 'Y', 'N', ' '),
|
|
KBTS_LANGUAGE_NOVIAL = KBTS_FOURCC('N', 'O', 'V', ' '),
|
|
KBTS_LANGUAGE_NUMANGGANG = KBTS_FOURCC('N', 'O', 'P', ' '),
|
|
KBTS_LANGUAGE_NUNAVIK_INUKTITUT = KBTS_FOURCC('I', 'N', 'U', ' '),
|
|
KBTS_LANGUAGE_NUU_CHAH_NULTH = KBTS_FOURCC('N', 'U', 'K', ' '),
|
|
KBTS_LANGUAGE_NYAMWEZI = KBTS_FOURCC('N', 'Y', 'M', ' '),
|
|
KBTS_LANGUAGE_NYANKOLE = KBTS_FOURCC('N', 'K', 'L', ' '),
|
|
KBTS_LANGUAGE_OCCITAN = KBTS_FOURCC('O', 'C', 'I', ' '),
|
|
KBTS_LANGUAGE_ODIA = KBTS_FOURCC('O', 'R', 'I', ' '),
|
|
KBTS_LANGUAGE_OJI_CREE = KBTS_FOURCC('O', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_OJIBWAY = KBTS_FOURCC('O', 'J', 'B', ' '),
|
|
KBTS_LANGUAGE_OLD_IRISH = KBTS_FOURCC('S', 'G', 'A', ' '),
|
|
KBTS_LANGUAGE_OLD_JAVANESE = KBTS_FOURCC('K', 'A', 'W', ' '),
|
|
KBTS_LANGUAGE_ONEIDA = KBTS_FOURCC('O', 'N', 'E', ' '),
|
|
KBTS_LANGUAGE_ONONDAGA = KBTS_FOURCC('O', 'N', 'O', ' '),
|
|
KBTS_LANGUAGE_OROMO = KBTS_FOURCC('O', 'R', 'O', ' '),
|
|
KBTS_LANGUAGE_OSSETIAN = KBTS_FOURCC('O', 'S', 'S', ' '),
|
|
KBTS_LANGUAGE_PA_O_KAREN = KBTS_FOURCC('B', 'L', 'K', ' '),
|
|
KBTS_LANGUAGE_PALAUAN = KBTS_FOURCC('P', 'A', 'U', ' '),
|
|
KBTS_LANGUAGE_PALAUNG = KBTS_FOURCC('P', 'L', 'G', ' '),
|
|
KBTS_LANGUAGE_PALESTINIAN_ARAMAIC = KBTS_FOURCC('P', 'A', 'A', ' '),
|
|
KBTS_LANGUAGE_PALI = KBTS_FOURCC('P', 'A', 'L', ' '),
|
|
KBTS_LANGUAGE_PALPA = KBTS_FOURCC('P', 'A', 'P', ' '),
|
|
KBTS_LANGUAGE_PAMPANGAN = KBTS_FOURCC('P', 'A', 'M', ' '),
|
|
KBTS_LANGUAGE_PANGASINAN = KBTS_FOURCC('P', 'A', 'G', ' '),
|
|
KBTS_LANGUAGE_PAPIAMENTU = KBTS_FOURCC('P', 'A', 'P', '0'),
|
|
KBTS_LANGUAGE_PASHTO = KBTS_FOURCC('P', 'A', 'S', ' '),
|
|
KBTS_LANGUAGE_PATTANI_MALAY = KBTS_FOURCC('M', 'F', 'A', ' '),
|
|
KBTS_LANGUAGE_PENNSYLVANIA_GERMAN = KBTS_FOURCC('P', 'D', 'C', ' '),
|
|
KBTS_LANGUAGE_PERSIAN = KBTS_FOURCC('F', 'A', 'R', ' '),
|
|
KBTS_LANGUAGE_PHAKE = KBTS_FOURCC('P', 'J', 'K', ' '),
|
|
KBTS_LANGUAGE_PICARD = KBTS_FOURCC('P', 'C', 'D', ' '),
|
|
KBTS_LANGUAGE_PIEMONTESE = KBTS_FOURCC('P', 'M', 'S', ' '),
|
|
KBTS_LANGUAGE_PILAGA = KBTS_FOURCC('P', 'L', 'G', ' '),
|
|
KBTS_LANGUAGE_PITE_SAMI = KBTS_FOURCC('S', 'J', 'E', ' '),
|
|
KBTS_LANGUAGE_POCOMCHI = KBTS_FOURCC('P', 'O', 'H', ' '),
|
|
KBTS_LANGUAGE_POHNPEIAN = KBTS_FOURCC('P', 'O', 'N', ' '),
|
|
KBTS_LANGUAGE_POLISH = KBTS_FOURCC('P', 'L', 'K', ' '),
|
|
KBTS_LANGUAGE_POLYTONIC_GREEK = KBTS_FOURCC('P', 'G', 'R', ' '),
|
|
KBTS_LANGUAGE_PORTUGUESE = KBTS_FOURCC('P', 'T', 'G', ' '),
|
|
KBTS_LANGUAGE_PROVENCAL = KBTS_FOURCC('P', 'R', 'O', ' '),
|
|
KBTS_LANGUAGE_PUNJABI = KBTS_FOURCC('P', 'A', 'N', ' '),
|
|
KBTS_LANGUAGE_QUECHUA = KBTS_FOURCC('Q', 'U', 'Z', ' '),
|
|
KBTS_LANGUAGE_QUECHUA_BOLIVIA = KBTS_FOURCC('Q', 'U', 'H', ' '),
|
|
KBTS_LANGUAGE_QUECHUA_ECUADOR = KBTS_FOURCC('Q', 'V', 'I', ' '),
|
|
KBTS_LANGUAGE_QUECHUA_PERU = KBTS_FOURCC('Q', 'W', 'H', ' '),
|
|
KBTS_LANGUAGE_R_CREE = KBTS_FOURCC('R', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_RAJASTHANI = KBTS_FOURCC('R', 'A', 'J', ' '),
|
|
KBTS_LANGUAGE_RAKHINE = KBTS_FOURCC('A', 'R', 'K', ' '),
|
|
KBTS_LANGUAGE_RAROTONGAN = KBTS_FOURCC('R', 'A', 'R', ' '),
|
|
KBTS_LANGUAGE_REJANG = KBTS_FOURCC('R', 'E', 'J', ' '),
|
|
KBTS_LANGUAGE_RIANG = KBTS_FOURCC('R', 'I', 'A', ' '),
|
|
KBTS_LANGUAGE_RIPUARIAN = KBTS_FOURCC('K', 'S', 'H', ' '),
|
|
KBTS_LANGUAGE_RITARUNGO = KBTS_FOURCC('R', 'I', 'T', ' '),
|
|
KBTS_LANGUAGE_ROHINGYA = KBTS_FOURCC('R', 'H', 'G', ' '),
|
|
KBTS_LANGUAGE_ROMANIAN = KBTS_FOURCC('R', 'O', 'M', ' '),
|
|
KBTS_LANGUAGE_ROMANSH = KBTS_FOURCC('R', 'M', 'S', ' '),
|
|
KBTS_LANGUAGE_ROMANY = KBTS_FOURCC('R', 'O', 'Y', ' '),
|
|
KBTS_LANGUAGE_ROTUMAN = KBTS_FOURCC('R', 'T', 'M', ' '),
|
|
KBTS_LANGUAGE_RUNDI = KBTS_FOURCC('R', 'U', 'N', ' '),
|
|
KBTS_LANGUAGE_RUSSIAN = KBTS_FOURCC('R', 'U', 'S', ' '),
|
|
KBTS_LANGUAGE_RUSSIAN_BURIAT = KBTS_FOURCC('R', 'B', 'U', ' '),
|
|
KBTS_LANGUAGE_RUSYN = KBTS_FOURCC('R', 'S', 'Y', ' '),
|
|
KBTS_LANGUAGE_SADRI = KBTS_FOURCC('S', 'A', 'D', ' '),
|
|
KBTS_LANGUAGE_SAKHA = KBTS_FOURCC('Y', 'A', 'K', ' '),
|
|
KBTS_LANGUAGE_SAMOAN = KBTS_FOURCC('S', 'M', 'O', ' '),
|
|
KBTS_LANGUAGE_SAMOGITIAN = KBTS_FOURCC('S', 'G', 'S', ' '),
|
|
KBTS_LANGUAGE_SAN_BLAS_KUNA = KBTS_FOURCC('C', 'U', 'K', ' '),
|
|
KBTS_LANGUAGE_SANGO = KBTS_FOURCC('S', 'G', 'O', ' '),
|
|
KBTS_LANGUAGE_SANSKRIT = KBTS_FOURCC('S', 'A', 'N', ' '),
|
|
KBTS_LANGUAGE_SANTALI = KBTS_FOURCC('S', 'A', 'T', ' '),
|
|
KBTS_LANGUAGE_SARAIKI = KBTS_FOURCC('S', 'R', 'K', ' '),
|
|
KBTS_LANGUAGE_SARDINIAN = KBTS_FOURCC('S', 'R', 'D', ' '),
|
|
KBTS_LANGUAGE_SASAK = KBTS_FOURCC('S', 'A', 'S', ' '),
|
|
KBTS_LANGUAGE_SATERLAND_FRISIAN = KBTS_FOURCC('S', 'T', 'Q', ' '),
|
|
KBTS_LANGUAGE_SAYISI = KBTS_FOURCC('S', 'A', 'Y', ' '),
|
|
KBTS_LANGUAGE_SCOTS = KBTS_FOURCC('S', 'C', 'I', ' '),
|
|
KBTS_LANGUAGE_SCOTTISH_GAELIC = KBTS_FOURCC('G', 'A', 'E', ' '),
|
|
KBTS_LANGUAGE_SEKOTA = KBTS_FOURCC('S', 'E', 'J', ' '),
|
|
KBTS_LANGUAGE_SELKUP = KBTS_FOURCC('S', 'E', 'L', ' '),
|
|
KBTS_LANGUAGE_SENA = KBTS_FOURCC('S', 'N', 'A', ' '),
|
|
KBTS_LANGUAGE_SENECA = KBTS_FOURCC('S', 'E', 'E', ' '),
|
|
KBTS_LANGUAGE_SERBIAN = KBTS_FOURCC('S', 'R', 'B', ' '),
|
|
KBTS_LANGUAGE_SERER = KBTS_FOURCC('S', 'R', 'R', ' '),
|
|
KBTS_LANGUAGE_SGAW_KAREN = KBTS_FOURCC('K', 'S', 'W', ' '),
|
|
KBTS_LANGUAGE_SHAN = KBTS_FOURCC('S', 'H', 'N', ' '),
|
|
KBTS_LANGUAGE_SHONA = KBTS_FOURCC('S', 'N', 'A', ' '),
|
|
KBTS_LANGUAGE_SIBE = KBTS_FOURCC('S', 'I', 'B', ' '),
|
|
KBTS_LANGUAGE_SICILIAN = KBTS_FOURCC('S', 'C', 'N', ' '),
|
|
KBTS_LANGUAGE_SIDAMO = KBTS_FOURCC('S', 'I', 'D', ' '),
|
|
KBTS_LANGUAGE_SILESIAN = KBTS_FOURCC('S', 'Z', 'L', ' '),
|
|
KBTS_LANGUAGE_SILTE_GURAGE = KBTS_FOURCC('S', 'I', 'G', ' '),
|
|
KBTS_LANGUAGE_SINDHI = KBTS_FOURCC('S', 'N', 'D', ' '),
|
|
KBTS_LANGUAGE_SINHALA = KBTS_FOURCC('S', 'N', 'H', ' '),
|
|
KBTS_LANGUAGE_SKOLT_SAMI = KBTS_FOURCC('S', 'K', 'S', ' '),
|
|
KBTS_LANGUAGE_SLAVEY = KBTS_FOURCC('S', 'L', 'A', ' '),
|
|
KBTS_LANGUAGE_SLOVAK = KBTS_FOURCC('S', 'K', 'Y', ' '),
|
|
KBTS_LANGUAGE_SLOVENIAN = KBTS_FOURCC('S', 'L', 'V', ' '),
|
|
KBTS_LANGUAGE_SMALL_FLOWERY_MIAO = KBTS_FOURCC('S', 'F', 'M', ' '),
|
|
KBTS_LANGUAGE_SODO_GURAGE = KBTS_FOURCC('S', 'O', 'G', ' '),
|
|
KBTS_LANGUAGE_SOGA = KBTS_FOURCC('X', 'O', 'G', ' '),
|
|
KBTS_LANGUAGE_SOMALI = KBTS_FOURCC('S', 'M', 'L', ' '),
|
|
KBTS_LANGUAGE_SONGE = KBTS_FOURCC('S', 'O', 'P', ' '),
|
|
KBTS_LANGUAGE_SONINKE = KBTS_FOURCC('S', 'N', 'K', ' '),
|
|
KBTS_LANGUAGE_SOUTH_SLAVEY = KBTS_FOURCC('S', 'S', 'L', ' '),
|
|
KBTS_LANGUAGE_SOUTHERN_KIWAI = KBTS_FOURCC('K', 'J', 'D', ' '),
|
|
KBTS_LANGUAGE_SOUTHERN_SAMI = KBTS_FOURCC('S', 'S', 'M', ' '),
|
|
KBTS_LANGUAGE_SOUTHERN_SOTHO = KBTS_FOURCC('S', 'O', 'T', ' '),
|
|
KBTS_LANGUAGE_SPANISH = KBTS_FOURCC('E', 'S', 'P', ' '),
|
|
KBTS_LANGUAGE_STANDARD_MOROCCAN_TAMAZIGHT = KBTS_FOURCC('Z', 'G', 'H', ' '),
|
|
KBTS_LANGUAGE_STRAITS_SALISH = KBTS_FOURCC('S', 'T', 'R', ' '),
|
|
KBTS_LANGUAGE_SUKUMA = KBTS_FOURCC('S', 'U', 'K', ' '),
|
|
KBTS_LANGUAGE_SUNDANESE = KBTS_FOURCC('S', 'U', 'N', ' '),
|
|
KBTS_LANGUAGE_SURI = KBTS_FOURCC('S', 'U', 'R', ' '),
|
|
KBTS_LANGUAGE_SUTU = KBTS_FOURCC('S', 'X', 'T', ' '),
|
|
KBTS_LANGUAGE_SVAN = KBTS_FOURCC('S', 'V', 'A', ' '),
|
|
KBTS_LANGUAGE_SWADAYA_ARAMAIC = KBTS_FOURCC('S', 'W', 'A', ' '),
|
|
KBTS_LANGUAGE_SWAHILI = KBTS_FOURCC('S', 'W', 'K', ' '),
|
|
KBTS_LANGUAGE_SWATI = KBTS_FOURCC('S', 'W', 'Z', ' '),
|
|
KBTS_LANGUAGE_SWEDISH = KBTS_FOURCC('S', 'V', 'E', ' '),
|
|
KBTS_LANGUAGE_SYLHETI = KBTS_FOURCC('S', 'Y', 'L', ' '),
|
|
KBTS_LANGUAGE_SYRIAC = KBTS_FOURCC('S', 'Y', 'R', ' '),
|
|
KBTS_LANGUAGE_SYRIAC_EASTERN = KBTS_FOURCC('S', 'Y', 'R', 'N'),
|
|
KBTS_LANGUAGE_SYRIAC_ESTRANGELA = KBTS_FOURCC('S', 'Y', 'R', 'E'),
|
|
KBTS_LANGUAGE_SYRIAC_WESTERN = KBTS_FOURCC('S', 'Y', 'R', 'J'),
|
|
KBTS_LANGUAGE_TABASARAN = KBTS_FOURCC('T', 'A', 'B', ' '),
|
|
KBTS_LANGUAGE_TACHELHIT = KBTS_FOURCC('S', 'H', 'I', ' '),
|
|
KBTS_LANGUAGE_TAGALOG = KBTS_FOURCC('T', 'G', 'L', ' '),
|
|
KBTS_LANGUAGE_TAHAGGART_TAMAHAQ = KBTS_FOURCC('T', 'H', 'V', ' '),
|
|
KBTS_LANGUAGE_TAHITIAN = KBTS_FOURCC('T', 'H', 'T', ' '),
|
|
KBTS_LANGUAGE_TAI_LAING = KBTS_FOURCC('T', 'J', 'L', ' '),
|
|
KBTS_LANGUAGE_TAJIKI = KBTS_FOURCC('T', 'A', 'J', ' '),
|
|
KBTS_LANGUAGE_TALYSH = KBTS_FOURCC('T', 'L', 'Y', ' '),
|
|
KBTS_LANGUAGE_TAMASHEK = KBTS_FOURCC('T', 'M', 'H', ' '),
|
|
KBTS_LANGUAGE_TAMASHEQ = KBTS_FOURCC('T', 'A', 'Q', ' '),
|
|
KBTS_LANGUAGE_TAMAZIGHT = KBTS_FOURCC('T', 'Z', 'M', ' '),
|
|
KBTS_LANGUAGE_TAMIL = KBTS_FOURCC('T', 'A', 'M', ' '),
|
|
KBTS_LANGUAGE_TARIFIT = KBTS_FOURCC('R', 'I', 'F', ' '),
|
|
KBTS_LANGUAGE_TATAR = KBTS_FOURCC('T', 'A', 'T', ' '),
|
|
KBTS_LANGUAGE_TAWALLAMMAT_TAMAJAQ = KBTS_FOURCC('T', 'T', 'Q', ' '),
|
|
KBTS_LANGUAGE_TAY = KBTS_FOURCC('T', 'Y', 'Z', ' '),
|
|
KBTS_LANGUAGE_TAYART_TAMAJEQ = KBTS_FOURCC('T', 'H', 'Z', ' '),
|
|
KBTS_LANGUAGE_TELUGU = KBTS_FOURCC('T', 'E', 'L', ' '),
|
|
KBTS_LANGUAGE_TEMNE = KBTS_FOURCC('T', 'M', 'N', ' '),
|
|
KBTS_LANGUAGE_TETUM = KBTS_FOURCC('T', 'E', 'T', ' '),
|
|
KBTS_LANGUAGE_TH_CREE = KBTS_FOURCC('T', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_THAI = KBTS_FOURCC('T', 'H', 'A', ' '),
|
|
KBTS_LANGUAGE_THAILAND_MON = KBTS_FOURCC('M', 'O', 'N', 'T'),
|
|
KBTS_LANGUAGE_THOMPSON = KBTS_FOURCC('T', 'H', 'P', ' '),
|
|
KBTS_LANGUAGE_TIBETAN = KBTS_FOURCC('T', 'I', 'B', ' '),
|
|
KBTS_LANGUAGE_TIGRE = KBTS_FOURCC('T', 'G', 'R', ' '),
|
|
KBTS_LANGUAGE_TIGRINYA = KBTS_FOURCC('T', 'G', 'Y', ' '),
|
|
KBTS_LANGUAGE_TIV = KBTS_FOURCC('T', 'I', 'V', ' '),
|
|
KBTS_LANGUAGE_TLINGIT = KBTS_FOURCC('T', 'L', 'I', ' '),
|
|
KBTS_LANGUAGE_TOBO = KBTS_FOURCC('T', 'B', 'V', ' '),
|
|
KBTS_LANGUAGE_TODO = KBTS_FOURCC('T', 'O', 'D', ' '),
|
|
KBTS_LANGUAGE_TOK_PISIN = KBTS_FOURCC('T', 'P', 'I', ' '),
|
|
KBTS_LANGUAGE_TOMA = KBTS_FOURCC('T', 'O', 'D', '0'),
|
|
KBTS_LANGUAGE_TONGA = KBTS_FOURCC('T', 'N', 'G', ' '),
|
|
KBTS_LANGUAGE_TONGAN = KBTS_FOURCC('T', 'G', 'N', ' '),
|
|
KBTS_LANGUAGE_TORKI = KBTS_FOURCC('A', 'Z', 'B', ' '),
|
|
KBTS_LANGUAGE_TSHANGLA = KBTS_FOURCC('T', 'S', 'J', ' '),
|
|
KBTS_LANGUAGE_TSONGA = KBTS_FOURCC('T', 'S', 'G', ' '),
|
|
KBTS_LANGUAGE_TSWANA = KBTS_FOURCC('T', 'N', 'A', ' '),
|
|
KBTS_LANGUAGE_TULU = KBTS_FOURCC('T', 'U', 'L', ' '),
|
|
KBTS_LANGUAGE_TUMBUKA = KBTS_FOURCC('T', 'U', 'M', ' '),
|
|
KBTS_LANGUAGE_TUNDRA_ENETS = KBTS_FOURCC('T', 'N', 'E', ' '),
|
|
KBTS_LANGUAGE_TURKISH = KBTS_FOURCC('T', 'R', 'K', ' '),
|
|
KBTS_LANGUAGE_TURKMEN = KBTS_FOURCC('T', 'K', 'M', ' '),
|
|
KBTS_LANGUAGE_TUROYO_ARAMAIC = KBTS_FOURCC('T', 'U', 'A', ' '),
|
|
KBTS_LANGUAGE_TUSCARORA = KBTS_FOURCC('T', 'U', 'S', ' '),
|
|
KBTS_LANGUAGE_TUVALU = KBTS_FOURCC('T', 'V', 'L', ' '),
|
|
KBTS_LANGUAGE_TUVIN = KBTS_FOURCC('T', 'U', 'V', ' '),
|
|
KBTS_LANGUAGE_TWI = KBTS_FOURCC('T', 'W', 'I', ' '),
|
|
KBTS_LANGUAGE_TZOTZIL = KBTS_FOURCC('T', 'Z', 'O', ' '),
|
|
KBTS_LANGUAGE_UDI = KBTS_FOURCC('U', 'D', 'I', ' '),
|
|
KBTS_LANGUAGE_UDMURT = KBTS_FOURCC('U', 'D', 'M', ' '),
|
|
KBTS_LANGUAGE_UKRAINIAN = KBTS_FOURCC('U', 'K', 'R', ' '),
|
|
KBTS_LANGUAGE_UMBUNDU = KBTS_FOURCC('U', 'M', 'B', ' '),
|
|
KBTS_LANGUAGE_UME_SAMI = KBTS_FOURCC('S', 'J', 'U', ' '),
|
|
KBTS_LANGUAGE_UPPER_SAXON = KBTS_FOURCC('S', 'X', 'U', ' '),
|
|
KBTS_LANGUAGE_UPPER_SORBIAN = KBTS_FOURCC('U', 'S', 'B', ' '),
|
|
KBTS_LANGUAGE_URALIC_PHONETIC = KBTS_FOURCC('U', 'P', 'P', ' '),
|
|
KBTS_LANGUAGE_URDU = KBTS_FOURCC('U', 'R', 'D', ' '),
|
|
KBTS_LANGUAGE_UYGHUR = KBTS_FOURCC('U', 'Y', 'G', ' '),
|
|
KBTS_LANGUAGE_UZBEK = KBTS_FOURCC('U', 'Z', 'B', ' '),
|
|
KBTS_LANGUAGE_VENDA = KBTS_FOURCC('V', 'E', 'N', ' '),
|
|
KBTS_LANGUAGE_VENETIAN = KBTS_FOURCC('V', 'E', 'C', ' '),
|
|
KBTS_LANGUAGE_VIETNAMESE = KBTS_FOURCC('V', 'I', 'T', ' '),
|
|
KBTS_LANGUAGE_VLAX_ROMANI = KBTS_FOURCC('R', 'M', 'Y', ' '),
|
|
KBTS_LANGUAGE_VOLAPUK = KBTS_FOURCC('V', 'O', 'L', ' '),
|
|
KBTS_LANGUAGE_VORO = KBTS_FOURCC('V', 'R', 'O', ' '),
|
|
KBTS_LANGUAGE_WA = KBTS_FOURCC('W', 'A', ' ', ' '),
|
|
KBTS_LANGUAGE_WACI_GBE = KBTS_FOURCC('W', 'C', 'I', ' '),
|
|
KBTS_LANGUAGE_WAGDI = KBTS_FOURCC('W', 'A', 'G', ' '),
|
|
KBTS_LANGUAGE_WAKHI = KBTS_FOURCC('W', 'B', 'L', ' '),
|
|
KBTS_LANGUAGE_WALLOON = KBTS_FOURCC('W', 'L', 'N', ' '),
|
|
KBTS_LANGUAGE_WARAY_WARAY = KBTS_FOURCC('W', 'A', 'R', ' '),
|
|
KBTS_LANGUAGE_WAYANAD_CHETTI = KBTS_FOURCC('C', 'T', 'T', ' '),
|
|
KBTS_LANGUAGE_WAYUU = KBTS_FOURCC('G', 'U', 'C', ' '),
|
|
KBTS_LANGUAGE_WELSH = KBTS_FOURCC('W', 'E', 'L', ' '),
|
|
KBTS_LANGUAGE_WENDAT = KBTS_FOURCC('W', 'D', 'T', ' '),
|
|
KBTS_LANGUAGE_WEST_CREE = KBTS_FOURCC('W', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_WESTERN_CHAM = KBTS_FOURCC('C', 'J', 'A', ' '),
|
|
KBTS_LANGUAGE_WESTERN_KAYAH = KBTS_FOURCC('K', 'Y', 'U', ' '),
|
|
KBTS_LANGUAGE_WESTERN_PANJABI = KBTS_FOURCC('P', 'N', 'B', ' '),
|
|
KBTS_LANGUAGE_WESTERN_PWO_KAREN = KBTS_FOURCC('P', 'W', 'O', ' '),
|
|
KBTS_LANGUAGE_WOLOF = KBTS_FOURCC('W', 'L', 'F', ' '),
|
|
KBTS_LANGUAGE_WOODS_CREE = KBTS_FOURCC('D', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_WUDING_LUQUAN_YI = KBTS_FOURCC('Y', 'W', 'Q', ' '),
|
|
KBTS_LANGUAGE_WYANDOT = KBTS_FOURCC('W', 'Y', 'N', ' '),
|
|
KBTS_LANGUAGE_XHOSA = KBTS_FOURCC('X', 'H', 'S', ' '),
|
|
KBTS_LANGUAGE_Y_CREE = KBTS_FOURCC('Y', 'C', 'R', ' '),
|
|
KBTS_LANGUAGE_YAO = KBTS_FOURCC('Y', 'A', 'O', ' '),
|
|
KBTS_LANGUAGE_YAPESE = KBTS_FOURCC('Y', 'A', 'P', ' '),
|
|
KBTS_LANGUAGE_YI_CLASSIC = KBTS_FOURCC('Y', 'I', 'C', ' '),
|
|
KBTS_LANGUAGE_YI_MODERN = KBTS_FOURCC('Y', 'I', 'M', ' '),
|
|
KBTS_LANGUAGE_YIDDISH = KBTS_FOURCC('J', 'I', 'I', ' '),
|
|
KBTS_LANGUAGE_YORUBA = KBTS_FOURCC('Y', 'B', 'A', ' '),
|
|
KBTS_LANGUAGE_ZAMBOANGA_CHAVACANO = KBTS_FOURCC('C', 'B', 'K', ' '),
|
|
KBTS_LANGUAGE_ZANDE = KBTS_FOURCC('Z', 'N', 'D', ' '),
|
|
KBTS_LANGUAGE_ZARMA = KBTS_FOURCC('D', 'J', 'R', ' '),
|
|
KBTS_LANGUAGE_ZAZAKI = KBTS_FOURCC('Z', 'Z', 'A', ' '),
|
|
KBTS_LANGUAGE_ZEALANDIC = KBTS_FOURCC('Z', 'E', 'A', ' '),
|
|
KBTS_LANGUAGE_ZHUANG = KBTS_FOURCC('Z', 'H', 'A', ' '),
|
|
KBTS_LANGUAGE_ZULU = KBTS_FOURCC('Z', 'U', 'L', ' '),
|
|
};
|
|
|
|
typedef kbts_u32 kbts_break_flags;
|
|
enum kbts_break_flags_enum
|
|
{
|
|
// Direction changes from left-to-right to right-to-left, or vice versa.
|
|
KBTS_BREAK_FLAG_DIRECTION = 1 << 0,
|
|
// Script changes.
|
|
// Note that some characters, such as digits, are used in multiple
|
|
// scripts and, as such, will not produce script breaks.
|
|
KBTS_BREAK_FLAG_SCRIPT = 1 << 1,
|
|
// Graphemes are "visual units". They may be composed of more than one codepoint.
|
|
// They are used as interaction boundaries in graphical interfaces, e.g. moving the
|
|
// caret.
|
|
KBTS_BREAK_FLAG_GRAPHEME = 1 << 2,
|
|
// In most scripts, words are broken up by whitespace, but Unicode word breaking has
|
|
// better script coverage and also handles some special cases that a simple stateless
|
|
// loop cannot handle.
|
|
KBTS_BREAK_FLAG_WORD = 1 << 3,
|
|
// By default, you are not allowed to break a line.
|
|
// Soft line breaks allow for line breaking, but do not require it.
|
|
// This is useful for when you are doing line wrapping.
|
|
KBTS_BREAK_FLAG_LINE_SOFT = 1 << 4,
|
|
// Hard line breaks are required. They signal the end of a paragraph.
|
|
// (In Unicode, there is no meaningful distinction between a line and a paragraph.
|
|
// a paragraph is pretty much just a line of text that can wrap.)
|
|
KBTS_BREAK_FLAG_LINE_HARD = 1 << 5,
|
|
// Used for manual segmentation in the context.
|
|
KBTS_BREAK_FLAG_MANUAL = 1 << 6,
|
|
|
|
KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION = 1 << 7,
|
|
|
|
KBTS_BREAK_FLAG_LINE = KBTS_BREAK_FLAG_LINE_SOFT | KBTS_BREAK_FLAG_LINE_HARD,
|
|
KBTS_BREAK_FLAG_ANY = KBTS_BREAK_FLAG_DIRECTION | KBTS_BREAK_FLAG_SCRIPT | KBTS_BREAK_FLAG_GRAPHEME | KBTS_BREAK_FLAG_WORD | KBTS_BREAK_FLAG_LINE_SOFT | KBTS_BREAK_FLAG_LINE_HARD,
|
|
};
|
|
|
|
// Japanese text contains "kinsoku" characters, around which breaking a line is forbidden.
|
|
// Exactly which characters are "kinsoku" or not depends on the context:
|
|
// - Strict style has the largest amount of kinsoku characters, which leads to longer lines.
|
|
// - Loose style has the smallest amount of kinsoku characters, which leads to smaller lines.
|
|
// - Normal style is somewhere in the middle.
|
|
// Note that, while the Unicode standard mentions all three of these styles, it does not mention
|
|
// any differences between the normal and loose styles.
|
|
// As such, normal and loose styles currently behave the same.
|
|
typedef kbts_u8 kbts_japanese_line_break_style;
|
|
enum kbts_japanese_line_break_style_enum
|
|
{
|
|
// The Unicode standard does not define what strict style is used for.
|
|
// Supposedly, it is used for anything that does not fall into the other two categories of text.
|
|
KBTS_JAPANESE_LINE_BREAK_STYLE_STRICT,
|
|
|
|
// Normal style is used for books and documents.
|
|
KBTS_JAPANESE_LINE_BREAK_STYLE_NORMAL,
|
|
|
|
// Loose style is used for newspapers, and (I assume) any other narrow column format.
|
|
KBTS_JAPANESE_LINE_BREAK_STYLE_LOOSE,
|
|
|
|
KBTS_JAPANESE_LINE_BREAK_STYLE_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_break_state_flags;
|
|
enum kbts_break_state_flags_enum
|
|
{
|
|
KBTS_BREAK_STATE_FLAG_STARTED = 1,
|
|
KBTS_BREAK_STATE_FLAG_END = 2,
|
|
|
|
// Bidirectional flags
|
|
KBTS_BREAK_STATE_FLAG_SAW_R_AFTER_L = 8,
|
|
KBTS_BREAK_STATE_FLAG_SAW_AL_AFTER_LR = 0x10,
|
|
KBTS_BREAK_STATE_FLAG_LAST_WAS_BRACKET = 0x20,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_shape_context_flags;
|
|
enum kbts_shape_context_flags_enum
|
|
{
|
|
KBTS_SHAPE_CONTEXT_FLAG_NONE,
|
|
|
|
KBTS_SHAPE_CONTEXT_FLAG_FONT_PRIORITY_BOTTOM_TO_TOP = (1 << 0), // Prioritize fonts that are pushed earlier, instead of the default which prioritizes fonts that are pushed later.
|
|
};
|
|
|
|
typedef kbts_u32 kbts_text_format;
|
|
enum kbts_text_format_enum
|
|
{
|
|
KBTS_TEXT_FORMAT_NONE,
|
|
|
|
KBTS_TEXT_FORMAT_UTF32,
|
|
KBTS_TEXT_FORMAT_UTF8,
|
|
|
|
KBTS_TEXT_FORMAT_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_direction;
|
|
enum kbts_direction_enum
|
|
{
|
|
KBTS_DIRECTION_DONT_KNOW,
|
|
KBTS_DIRECTION_LTR,
|
|
KBTS_DIRECTION_RTL,
|
|
|
|
KBTS_DIRECTION_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_orientation;
|
|
enum kbts_orientation_enum
|
|
{
|
|
KBTS_ORIENTATION_HORIZONTAL,
|
|
KBTS_ORIENTATION_VERTICAL,
|
|
|
|
KBTS_ORIENTATION_COUNT,
|
|
};
|
|
|
|
typedef kbts_u8 kbts_shaping_table;
|
|
enum kbts_shaping_table_enum
|
|
{
|
|
KBTS_SHAPING_TABLE_GSUB,
|
|
KBTS_SHAPING_TABLE_GPOS,
|
|
KBTS_SHAPING_TABLE_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_shape_error;
|
|
enum kbts_shape_error_enum
|
|
{
|
|
KBTS_SHAPE_ERROR_NONE,
|
|
KBTS_SHAPE_ERROR_INVALID_FONT,
|
|
KBTS_SHAPE_ERROR_GAVE_TEXT_BEFORE_CALLING_BEGIN,
|
|
KBTS_SHAPE_ERROR_OUT_OF_MEMORY,
|
|
KBTS_SHAPE_ERROR_GENERATED_TOO_MANY_GLYPHS,
|
|
|
|
KBTS_SHAPE_ERROR_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_allocator_op_kind;
|
|
enum kbts_allocator_op_kind_enum
|
|
{
|
|
KBTS_ALLOCATOR_OP_KIND_NONE,
|
|
KBTS_ALLOCATOR_OP_KIND_ALLOCATE,
|
|
KBTS_ALLOCATOR_OP_KIND_FREE,
|
|
|
|
KBTS_ALLOCATOR_OP_KIND_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_blob_table_id;
|
|
enum kbts_blob_table_id_enum
|
|
{
|
|
KBTS_BLOB_TABLE_ID_NONE,
|
|
KBTS_BLOB_TABLE_ID_HEAD,
|
|
KBTS_BLOB_TABLE_ID_CMAP,
|
|
KBTS_BLOB_TABLE_ID_GDEF,
|
|
KBTS_BLOB_TABLE_ID_GSUB,
|
|
KBTS_BLOB_TABLE_ID_GPOS,
|
|
KBTS_BLOB_TABLE_ID_HHEA,
|
|
KBTS_BLOB_TABLE_ID_VHEA,
|
|
KBTS_BLOB_TABLE_ID_HMTX,
|
|
KBTS_BLOB_TABLE_ID_VMTX,
|
|
KBTS_BLOB_TABLE_ID_MAXP,
|
|
KBTS_BLOB_TABLE_ID_OS2,
|
|
KBTS_BLOB_TABLE_ID_NAME,
|
|
KBTS_BLOB_TABLE_ID_FVAR,
|
|
KBTS_BLOB_TABLE_ID_AVAR,
|
|
KBTS_BLOB_TABLE_ID_MVAR,
|
|
KBTS_BLOB_TABLE_ID_HVAR,
|
|
KBTS_BLOB_TABLE_ID_VVAR,
|
|
|
|
KBTS_BLOB_TABLE_ID_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_load_font_error;
|
|
enum kbts_load_font_error_enum
|
|
{
|
|
KBTS_LOAD_FONT_ERROR_NONE,
|
|
KBTS_LOAD_FONT_ERROR_NEED_TO_CREATE_BLOB,
|
|
KBTS_LOAD_FONT_ERROR_INVALID_FONT,
|
|
KBTS_LOAD_FONT_ERROR_OUT_OF_MEMORY,
|
|
KBTS_LOAD_FONT_ERROR_COULD_NOT_OPEN_FILE,
|
|
KBTS_LOAD_FONT_ERROR_READ_ERROR,
|
|
|
|
KBTS_LOAD_FONT_ERROR_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_version;
|
|
enum kbts_version_enum
|
|
{
|
|
KBTS_VERSION_1_X,
|
|
KBTS_VERSION_2_0,
|
|
KBTS_VERSION_2_28, // Variable fonts
|
|
|
|
KBTS_VERSION_CURRENT = KBTS_VERSION_2_28,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_blob_version;
|
|
enum kbts_blob_version_enum
|
|
{
|
|
KBTS_BLOB_VERSION_INVALID,
|
|
KBTS_BLOB_VERSION_INITIAL,
|
|
KBTS_BLOB_VERSION_REMOVED_SUBTABLE_INFOS_ALIGNED_TABLES,
|
|
|
|
KBTS_BLOB_VERSION_CURRENT = KBTS_BLOB_VERSION_REMOVED_SUBTABLE_INFOS_ALIGNED_TABLES,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_font_style_flags;
|
|
enum kbts_font_style_flags_enum
|
|
{
|
|
KBTS_FONT_STYLE_FLAG_NONE,
|
|
|
|
KBTS_FONT_STYLE_FLAG_REGULAR = (1 << 0),
|
|
KBTS_FONT_STYLE_FLAG_ITALIC = (1 << 1),
|
|
KBTS_FONT_STYLE_FLAG_BOLD = (1 << 2),
|
|
};
|
|
|
|
typedef kbts_u32 kbts_font_weight;
|
|
enum kbts_font_weight_enum
|
|
{
|
|
KBTS_FONT_WEIGHT_UNKNOWN,
|
|
|
|
KBTS_FONT_WEIGHT_THIN,
|
|
KBTS_FONT_WEIGHT_EXTRA_LIGHT,
|
|
KBTS_FONT_WEIGHT_LIGHT,
|
|
KBTS_FONT_WEIGHT_NORMAL,
|
|
KBTS_FONT_WEIGHT_MEDIUM,
|
|
KBTS_FONT_WEIGHT_SEMI_BOLD,
|
|
KBTS_FONT_WEIGHT_BOLD,
|
|
KBTS_FONT_WEIGHT_EXTRA_BOLD,
|
|
KBTS_FONT_WEIGHT_BLACK,
|
|
|
|
KBTS_FONT_WEIGHT_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_font_width;
|
|
enum kbts_font_width_enum
|
|
{
|
|
KBTS_FONT_WIDTH_UNKNOWN,
|
|
|
|
KBTS_FONT_WIDTH_ULTRA_CONDENSED,
|
|
KBTS_FONT_WIDTH_EXTRA_CONDENSED,
|
|
KBTS_FONT_WIDTH_CONDENSED,
|
|
KBTS_FONT_WIDTH_SEMI_CONDENSED,
|
|
KBTS_FONT_WIDTH_NORMAL,
|
|
KBTS_FONT_WIDTH_SEMI_EXPANDED,
|
|
KBTS_FONT_WIDTH_EXPANDED,
|
|
KBTS_FONT_WIDTH_EXTRA_EXPANDED,
|
|
KBTS_FONT_WIDTH_ULTRA_EXPANDED,
|
|
|
|
KBTS_FONT_WIDTH_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_glyph_flags;
|
|
enum kbts_glyph_flags_enum
|
|
{
|
|
// These feature flags must coincide with kbts_joining_feature _and_ KBTS_FEATURE_FLAG!
|
|
KBTS_GLYPH_FLAG_ISOL = (1 << 0),
|
|
KBTS_GLYPH_FLAG_FINA = (1 << 1),
|
|
KBTS_GLYPH_FLAG_FIN2 = (1 << 2),
|
|
KBTS_GLYPH_FLAG_FIN3 = (1 << 3),
|
|
KBTS_GLYPH_FLAG_MEDI = (1 << 4),
|
|
KBTS_GLYPH_FLAG_MED2 = (1 << 5),
|
|
KBTS_GLYPH_FLAG_INIT = (1 << 6),
|
|
|
|
// These feature flags must coincide with FEATURE_FLAG!
|
|
KBTS_GLYPH_FLAG_LJMO = (1 << 7),
|
|
KBTS_GLYPH_FLAG_VJMO = (1 << 8),
|
|
KBTS_GLYPH_FLAG_TJMO = (1 << 9),
|
|
KBTS_GLYPH_FLAG_RPHF = (1 << 10),
|
|
KBTS_GLYPH_FLAG_BLWF = (1 << 11),
|
|
KBTS_GLYPH_FLAG_HALF = (1 << 12),
|
|
KBTS_GLYPH_FLAG_PSTF = (1 << 13),
|
|
KBTS_GLYPH_FLAG_ABVF = (1 << 14),
|
|
KBTS_GLYPH_FLAG_PREF = (1 << 15),
|
|
KBTS_GLYPH_FLAG_NUMR = (1 << 16),
|
|
KBTS_GLYPH_FLAG_FRAC = (1 << 17),
|
|
KBTS_GLYPH_FLAG_DNOM = (1 << 18),
|
|
KBTS_GLYPH_FLAG_CFAR = (1 << 19),
|
|
|
|
// These can be anything.
|
|
KBTS_GLYPH_FLAG_DO_NOT_DECOMPOSE = (1 << 20),
|
|
KBTS_GLYPH_FLAG_FIRST_IN_MULTIPLE_SUBSTITUTION = (1 << 21),
|
|
KBTS_GLYPH_FLAG_NO_BREAK = (1 << 22),
|
|
KBTS_GLYPH_FLAG_CURSIVE = (1 << 23),
|
|
KBTS_GLYPH_FLAG_GENERATED_BY_GSUB = (1 << 24),
|
|
KBTS_GLYPH_FLAG_USED_IN_GPOS = (1 << 25),
|
|
|
|
KBTS_GLYPH_FLAG_STCH_ENDPOINT = (1 << 26),
|
|
KBTS_GLYPH_FLAG_STCH_EXTENSION = (1 << 27),
|
|
|
|
KBTS_GLYPH_FLAG_LIGATURE = (1 << 28),
|
|
KBTS_GLYPH_FLAG_MULTIPLE_SUBSTITUTION = (1 << 29),
|
|
};
|
|
|
|
typedef kbts_u8 kbts_joining_feature;
|
|
enum kbts_joining_feature_enum
|
|
{
|
|
KBTS_JOINING_FEATURE_NONE,
|
|
|
|
// These must correspond with glyph_flags and FEATURE_IDs.
|
|
KBTS_JOINING_FEATURE_ISOL,
|
|
KBTS_JOINING_FEATURE_FINA,
|
|
KBTS_JOINING_FEATURE_FIN2,
|
|
KBTS_JOINING_FEATURE_FIN3,
|
|
KBTS_JOINING_FEATURE_MEDI,
|
|
KBTS_JOINING_FEATURE_MED2,
|
|
KBTS_JOINING_FEATURE_INIT,
|
|
|
|
KBTS_JOINING_FEATURE_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_user_id_generation_mode;
|
|
enum kbts_user_id_generation_mode_enum
|
|
{
|
|
KBTS_USER_ID_GENERATION_MODE_CODEPOINT_INDEX,
|
|
KBTS_USER_ID_GENERATION_MODE_SOURCE_INDEX,
|
|
|
|
KBTS_USER_ID_GENERATION_MODE_COUNT,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_break_config_flags;
|
|
enum kbts_break_config_flags_enum
|
|
{
|
|
KBTS_BREAK_CONFIG_FLAG_NONE,
|
|
|
|
KBTS_BREAK_CONFIG_FLAG_END_OF_TEXT_GENERATES_HARD_LINE_BREAK = 1,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_decode_utf16_flags;
|
|
enum kbts_decode_utf16_flags_enum
|
|
{
|
|
KBTS_DECODE_UTF16_FLAG_NONE = 0,
|
|
|
|
KBTS_DECODE_UTF16_FLAG_BIG_ENDIAN = (1 << 0),
|
|
};
|
|
|
|
typedef kbts_u32 kbts_font_info_string_id;
|
|
enum kbts_font_info_string_id_enum
|
|
{
|
|
KBTS_FONT_INFO_STRING_ID_NONE,
|
|
KBTS_FONT_INFO_STRING_ID_COPYRIGHT,
|
|
KBTS_FONT_INFO_STRING_ID_FAMILY,
|
|
KBTS_FONT_INFO_STRING_ID_SUBFAMILY,
|
|
KBTS_FONT_INFO_STRING_ID_UID,
|
|
KBTS_FONT_INFO_STRING_ID_FULL_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_VERSION,
|
|
KBTS_FONT_INFO_STRING_ID_POSTSCRIPT_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_TRADEMARK,
|
|
KBTS_FONT_INFO_STRING_ID_MANUFACTURER,
|
|
KBTS_FONT_INFO_STRING_ID_DESIGNER,
|
|
KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_FAMILY,
|
|
KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_SUBFAMILY,
|
|
|
|
// This is kept for legacy purposes so that the layout of kbts_font_info does not change.
|
|
KBTS_FONT_INFO_STRING_ID_COUNT0,
|
|
|
|
KBTS_FONT_INFO_STRING_ID_DESCRIPTION = KBTS_FONT_INFO_STRING_ID_COUNT0,
|
|
KBTS_FONT_INFO_STRING_ID_VENDOR_URL,
|
|
KBTS_FONT_INFO_STRING_ID_DESIGNER_URL,
|
|
KBTS_FONT_INFO_STRING_ID_LICENSE,
|
|
KBTS_FONT_INFO_STRING_ID_LICENSE_URL,
|
|
KBTS_FONT_INFO_STRING_ID_COMPATIBLE_FULL_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_SAMPLE_TEXT,
|
|
KBTS_FONT_INFO_STRING_ID_POSTSCRIPT_CID_FINDFONT_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_WWS_FAMILY_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_WWS_SUBFAMILY_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_LIGHT_BACKGROUND_PALETTE,
|
|
KBTS_FONT_INFO_STRING_ID_DARK_BACKGROUND_PALETTE,
|
|
KBTS_FONT_INFO_STRING_ID_VARIATIONS_POSTSCRIPT_NAME_PREFIX,
|
|
KBTS_FONT_INFO_STRING_ID_RESERVED,
|
|
|
|
KBTS_FONT_INFO_STRING_ID_COUNT1,
|
|
};
|
|
|
|
typedef kbts_u16 kbts_variation_axis_flags;
|
|
enum kbts_variation_axis_flags_enum
|
|
{
|
|
KBTS_VARIATION_AXIS_FLAG_NONE = 0,
|
|
KBTS_VARIATION_AXIS_FLAG_HIDDEN = (1 << 0),
|
|
};
|
|
|
|
typedef kbts_u32 kbts_variation_instance_flags;
|
|
enum kbts_variation_instance_flags_enum
|
|
{
|
|
KBTS_VARIATION_INSTANCE_FLAG_NONE = 0,
|
|
KBTS_VARIATION_INSTANCE_FLAG_HAS_POSTSCRIPT_NAME = (1 << 0),
|
|
};
|
|
|
|
#define KBTS_VARIATION_VALUE_UNSET -100000.0f
|
|
|
|
|
|
typedef kbts_u8 kbts_unicode_joining_type;
|
|
enum kbts_unicode_joining_type_enum
|
|
{
|
|
KBTS_UNICODE_JOINING_TYPE_NONE,
|
|
KBTS_UNICODE_JOINING_TYPE_LEFT,
|
|
KBTS_UNICODE_JOINING_TYPE_DUAL,
|
|
KBTS_UNICODE_JOINING_TYPE_FORCE,
|
|
KBTS_UNICODE_JOINING_TYPE_RIGHT,
|
|
KBTS_UNICODE_JOINING_TYPE_TRANSPARENT,
|
|
KBTS_UNICODE_JOINING_TYPE_COUNT,
|
|
};
|
|
|
|
typedef kbts_u8 kbts_unicode_flags;
|
|
enum kbts_unicode_flag_enum
|
|
{
|
|
KBTS_UNICODE_FLAG_MODIFIER_COMBINING_MARK = (1 << 0),
|
|
KBTS_UNICODE_FLAG_DEFAULT_IGNORABLE = (1 << 1),
|
|
KBTS_UNICODE_FLAG_OPEN_BRACKET = (1 << 2),
|
|
KBTS_UNICODE_FLAG_CLOSE_BRACKET = (1 << 3),
|
|
KBTS_UNICODE_FLAG_PART_OF_WORD = (1 << 4),
|
|
KBTS_UNICODE_FLAG_DECIMAL_DIGIT = (1 << 5),
|
|
KBTS_UNICODE_FLAG_NON_SPACING_MARK = (1 << 6),
|
|
KBTS_UNICODE_FLAG_RECOMPOSITION_RHS = (1 << 7),
|
|
|
|
KBTS_UNICODE_FLAG_MIRRORED = KBTS_UNICODE_FLAG_OPEN_BRACKET | KBTS_UNICODE_FLAG_CLOSE_BRACKET,
|
|
};
|
|
|
|
typedef kbts_u8 kbts_unicode_bidirectional_class;
|
|
enum kbts_unicode_bidirectional_class_enum
|
|
{
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_NI,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_BN, // Formatting characters need to be ignored.
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_L,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_R,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_NSM,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_AL,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_AN,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_EN,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_ES,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_ET,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_CS,
|
|
KBTS_UNICODE_BIDIRECTIONAL_CLASS_COUNT,
|
|
};
|
|
|
|
typedef kbts_u8 kbts_line_break_class;
|
|
enum kbts_line_break_class_enum
|
|
{
|
|
/* 0 */ KBTS_LINE_BREAK_CLASS_Onea,
|
|
/* 1 */ KBTS_LINE_BREAK_CLASS_Oea,
|
|
/* 2 */ KBTS_LINE_BREAK_CLASS_Ope,
|
|
/* 3 */ KBTS_LINE_BREAK_CLASS_BK,
|
|
/* 4 */ KBTS_LINE_BREAK_CLASS_CR,
|
|
/* 5 */ KBTS_LINE_BREAK_CLASS_LF,
|
|
/* 6 */ KBTS_LINE_BREAK_CLASS_NL,
|
|
/* 7 */ KBTS_LINE_BREAK_CLASS_SP,
|
|
/* 8 */ KBTS_LINE_BREAK_CLASS_ZW,
|
|
/* 9 */ KBTS_LINE_BREAK_CLASS_WJ,
|
|
/* 10 */ KBTS_LINE_BREAK_CLASS_GLnea,
|
|
/* 11 */ KBTS_LINE_BREAK_CLASS_GLea,
|
|
/* 12 */ KBTS_LINE_BREAK_CLASS_CLnea,
|
|
/* 13 */ KBTS_LINE_BREAK_CLASS_CLea,
|
|
/* 14 */ KBTS_LINE_BREAK_CLASS_CPnea,
|
|
/* 15 */ KBTS_LINE_BREAK_CLASS_CPea,
|
|
/* 16 */ KBTS_LINE_BREAK_CLASS_EXnea,
|
|
/* 17 */ KBTS_LINE_BREAK_CLASS_EXea,
|
|
/* 18 */ KBTS_LINE_BREAK_CLASS_SY,
|
|
/* 19 */ KBTS_LINE_BREAK_CLASS_BAnea,
|
|
/* 20 */ KBTS_LINE_BREAK_CLASS_BAea,
|
|
/* 21 */ KBTS_LINE_BREAK_CLASS_OPnea,
|
|
/* 22 */ KBTS_LINE_BREAK_CLASS_OPea,
|
|
/* 23 */ KBTS_LINE_BREAK_CLASS_QU,
|
|
/* 24 */ KBTS_LINE_BREAK_CLASS_QUPi,
|
|
/* 25 */ KBTS_LINE_BREAK_CLASS_QUPf,
|
|
/* 26 */ KBTS_LINE_BREAK_CLASS_IS,
|
|
/* 27 */ KBTS_LINE_BREAK_CLASS_NSnea,
|
|
/* 28 */ KBTS_LINE_BREAK_CLASS_NSea,
|
|
/* 29 */ KBTS_LINE_BREAK_CLASS_B2,
|
|
/* 30 */ KBTS_LINE_BREAK_CLASS_CB,
|
|
/* 31 */ KBTS_LINE_BREAK_CLASS_HY,
|
|
/* 32 */ KBTS_LINE_BREAK_CLASS_HYPHEN,
|
|
/* 33 */ KBTS_LINE_BREAK_CLASS_INnea,
|
|
/* 34 */ KBTS_LINE_BREAK_CLASS_INea,
|
|
/* 35 */ KBTS_LINE_BREAK_CLASS_BB,
|
|
/* 36 */ KBTS_LINE_BREAK_CLASS_HL,
|
|
/* 37 */ KBTS_LINE_BREAK_CLASS_ALnea,
|
|
/* 38 */ KBTS_LINE_BREAK_CLASS_ALea,
|
|
/* 39 */ KBTS_LINE_BREAK_CLASS_NU,
|
|
/* 40 */ KBTS_LINE_BREAK_CLASS_PRnea,
|
|
/* 41 */ KBTS_LINE_BREAK_CLASS_PRea,
|
|
/* 42 */ KBTS_LINE_BREAK_CLASS_IDnea,
|
|
/* 43 */ KBTS_LINE_BREAK_CLASS_IDea,
|
|
/* 44 */ KBTS_LINE_BREAK_CLASS_IDpe,
|
|
/* 45 */ KBTS_LINE_BREAK_CLASS_EBnea,
|
|
/* 46 */ KBTS_LINE_BREAK_CLASS_EBea,
|
|
/* 47 */ KBTS_LINE_BREAK_CLASS_EM,
|
|
/* 48 */ KBTS_LINE_BREAK_CLASS_POnea,
|
|
/* 49 */ KBTS_LINE_BREAK_CLASS_POea,
|
|
/* 50 */ KBTS_LINE_BREAK_CLASS_JL,
|
|
/* 51 */ KBTS_LINE_BREAK_CLASS_JV,
|
|
/* 52 */ KBTS_LINE_BREAK_CLASS_JT,
|
|
/* 53 */ KBTS_LINE_BREAK_CLASS_H2,
|
|
/* 54 */ KBTS_LINE_BREAK_CLASS_H3,
|
|
/* 55 */ KBTS_LINE_BREAK_CLASS_AP,
|
|
/* 56 */ KBTS_LINE_BREAK_CLASS_AK,
|
|
/* 57 */ KBTS_LINE_BREAK_CLASS_DOTTED_CIRCLE,
|
|
/* 58 */ KBTS_LINE_BREAK_CLASS_AS,
|
|
/* 59 */ KBTS_LINE_BREAK_CLASS_VF,
|
|
/* 60 */ KBTS_LINE_BREAK_CLASS_VI,
|
|
/* 61 */ KBTS_LINE_BREAK_CLASS_RI,
|
|
|
|
/* 62 */ KBTS_LINE_BREAK_CLASS_COUNT,
|
|
|
|
/* 63 */ KBTS_LINE_BREAK_CLASS_CM,
|
|
/* 64 */ KBTS_LINE_BREAK_CLASS_ZWJ,
|
|
|
|
// CJ resolves to either NS or ID depending on the (Japanese) line break style.
|
|
// NS is strict line breaking, used for long lines.
|
|
// ID is normal line breaking, used for normal body text.
|
|
/* 65 */ KBTS_LINE_BREAK_CLASS_CJ,
|
|
|
|
/* 66 */ KBTS_LINE_BREAK_CLASS_SOT,
|
|
/* 67 */ KBTS_LINE_BREAK_CLASS_EOT,
|
|
};
|
|
|
|
// @Cleanup: Merge EX and FO.
|
|
typedef kbts_u8 kbts_word_break_class;
|
|
enum kbts_word_break_class_enum
|
|
{
|
|
KBTS_WORD_BREAK_CLASS_Onep,
|
|
KBTS_WORD_BREAK_CLASS_Oep,
|
|
KBTS_WORD_BREAK_CLASS_CR,
|
|
KBTS_WORD_BREAK_CLASS_LF,
|
|
KBTS_WORD_BREAK_CLASS_NL,
|
|
KBTS_WORD_BREAK_CLASS_EX,
|
|
KBTS_WORD_BREAK_CLASS_ZWJ,
|
|
KBTS_WORD_BREAK_CLASS_RI,
|
|
KBTS_WORD_BREAK_CLASS_FO,
|
|
KBTS_WORD_BREAK_CLASS_KA,
|
|
KBTS_WORD_BREAK_CLASS_HL,
|
|
KBTS_WORD_BREAK_CLASS_ALnep,
|
|
KBTS_WORD_BREAK_CLASS_ALep,
|
|
KBTS_WORD_BREAK_CLASS_SQ,
|
|
KBTS_WORD_BREAK_CLASS_DQ,
|
|
KBTS_WORD_BREAK_CLASS_MNL,
|
|
KBTS_WORD_BREAK_CLASS_ML,
|
|
KBTS_WORD_BREAK_CLASS_MN,
|
|
KBTS_WORD_BREAK_CLASS_NM,
|
|
KBTS_WORD_BREAK_CLASS_ENL,
|
|
KBTS_WORD_BREAK_CLASS_WSS,
|
|
|
|
KBTS_WORD_BREAK_CLASS_SOT,
|
|
};
|
|
|
|
// Unicode defines scripts and languages.
|
|
// A language belongs to a single script, and a script belongs to a single writing system.
|
|
// On top of these, OpenType defines shapers, which are basically just designations for
|
|
// specific code paths that are taken depending on which script is being shapen.
|
|
//
|
|
// Some scripts, like Latin and Cyrillic, need relatively few operations, while complex
|
|
// scripts like Arabic and Indic scripts have specific processing steps that need to happen
|
|
// in order to obtain a correct result.
|
|
//
|
|
// These sequences of operations are _not_ described in the font file itself. The shaping
|
|
// code needs to know which script it is shaping, and implement all of those passes itself.
|
|
// That is why you, as a user, have to care about this.
|
|
//
|
|
// When creating shape_config, you can either pass in a known script, or you can specify
|
|
// SCRIPT_DONT_KNOW and let the library figure it out.
|
|
// While SCRIPT_DONT_KNOW may look appealing, it is worth noting that we can only infer
|
|
// the _script_, and not the language, of the text you pass in.
|
|
// This means that you might miss out on language-specific features when you use it.
|
|
typedef kbts_u32 kbts_shaper;
|
|
enum kbts_shaper_enum
|
|
{
|
|
KBTS_SHAPER_DEFAULT,
|
|
KBTS_SHAPER_ARABIC,
|
|
KBTS_SHAPER_HANGUL,
|
|
KBTS_SHAPER_HEBREW,
|
|
KBTS_SHAPER_INDIC,
|
|
KBTS_SHAPER_KHMER,
|
|
KBTS_SHAPER_MYANMAR,
|
|
KBTS_SHAPER_TIBETAN,
|
|
KBTS_SHAPER_USE,
|
|
|
|
KBTS_SHAPER_COUNT,
|
|
};
|
|
#define KBTS_MAXIMUM_RECOMPOSITION_PARENTS 19
|
|
#define KBTS_MAXIMUM_CODEPOINT_SCRIPTS 23
|
|
typedef kbts_u32 kbts_script_tag;
|
|
enum kbts_script_tag_enum
|
|
{
|
|
KBTS_SCRIPT_TAG_DONT_KNOW = KBTS_FOURCC(' ', ' ', ' ', ' '),
|
|
KBTS_SCRIPT_TAG_ADLAM = KBTS_FOURCC('a', 'd', 'l', 'm'),
|
|
KBTS_SCRIPT_TAG_AHOM = KBTS_FOURCC('a', 'h', 'o', 'm'),
|
|
KBTS_SCRIPT_TAG_ANATOLIAN_HIEROGLYPHS = KBTS_FOURCC('h', 'l', 'u', 'w'),
|
|
KBTS_SCRIPT_TAG_ARABIC = KBTS_FOURCC('a', 'r', 'a', 'b'),
|
|
KBTS_SCRIPT_TAG_ARMENIAN = KBTS_FOURCC('a', 'r', 'm', 'n'),
|
|
KBTS_SCRIPT_TAG_AVESTAN = KBTS_FOURCC('a', 'v', 's', 't'),
|
|
KBTS_SCRIPT_TAG_BALINESE = KBTS_FOURCC('b', 'a', 'l', 'i'),
|
|
KBTS_SCRIPT_TAG_BAMUM = KBTS_FOURCC('b', 'a', 'm', 'u'),
|
|
KBTS_SCRIPT_TAG_BASSA_VAH = KBTS_FOURCC('b', 'a', 's', 's'),
|
|
KBTS_SCRIPT_TAG_BATAK = KBTS_FOURCC('b', 'a', 't', 'k'),
|
|
KBTS_SCRIPT_TAG_BENGALI = KBTS_FOURCC('b', 'n', 'g', '2'),
|
|
KBTS_SCRIPT_TAG_BHAIKSUKI = KBTS_FOURCC('b', 'h', 'k', 's'),
|
|
KBTS_SCRIPT_TAG_BOPOMOFO = KBTS_FOURCC('b', 'o', 'p', 'o'),
|
|
KBTS_SCRIPT_TAG_BRAHMI = KBTS_FOURCC('b', 'r', 'a', 'h'),
|
|
KBTS_SCRIPT_TAG_BUGINESE = KBTS_FOURCC('b', 'u', 'g', 'i'),
|
|
KBTS_SCRIPT_TAG_BUHID = KBTS_FOURCC('b', 'u', 'h', 'd'),
|
|
KBTS_SCRIPT_TAG_CANADIAN_SYLLABICS = KBTS_FOURCC('c', 'a', 'n', 's'),
|
|
KBTS_SCRIPT_TAG_CARIAN = KBTS_FOURCC('c', 'a', 'r', 'i'),
|
|
KBTS_SCRIPT_TAG_CAUCASIAN_ALBANIAN = KBTS_FOURCC('a', 'g', 'h', 'b'),
|
|
KBTS_SCRIPT_TAG_CHAKMA = KBTS_FOURCC('c', 'a', 'k', 'm'),
|
|
KBTS_SCRIPT_TAG_CHAM = KBTS_FOURCC('c', 'h', 'a', 'm'),
|
|
KBTS_SCRIPT_TAG_CHEROKEE = KBTS_FOURCC('c', 'h', 'e', 'r'),
|
|
KBTS_SCRIPT_TAG_CHORASMIAN = KBTS_FOURCC('c', 'h', 'r', 's'),
|
|
KBTS_SCRIPT_TAG_CJK_IDEOGRAPHIC = KBTS_FOURCC('h', 'a', 'n', 'i'),
|
|
KBTS_SCRIPT_TAG_COPTIC = KBTS_FOURCC('c', 'o', 'p', 't'),
|
|
KBTS_SCRIPT_TAG_CYPRIOT_SYLLABARY = KBTS_FOURCC('c', 'p', 'r', 't'),
|
|
KBTS_SCRIPT_TAG_CYPRO_MINOAN = KBTS_FOURCC('c', 'p', 'm', 'n'),
|
|
KBTS_SCRIPT_TAG_CYRILLIC = KBTS_FOURCC('c', 'y', 'r', 'l'),
|
|
KBTS_SCRIPT_TAG_DEFAULT = KBTS_FOURCC('D', 'F', 'L', 'T'),
|
|
KBTS_SCRIPT_TAG_DEFAULT2 = KBTS_FOURCC('D', 'F', 'L', 'T'),
|
|
KBTS_SCRIPT_TAG_DESERET = KBTS_FOURCC('d', 's', 'r', 't'),
|
|
KBTS_SCRIPT_TAG_DEVANAGARI = KBTS_FOURCC('d', 'e', 'v', '2'),
|
|
KBTS_SCRIPT_TAG_DIVES_AKURU = KBTS_FOURCC('d', 'i', 'a', 'k'),
|
|
KBTS_SCRIPT_TAG_DOGRA = KBTS_FOURCC('d', 'o', 'g', 'r'),
|
|
KBTS_SCRIPT_TAG_DUPLOYAN = KBTS_FOURCC('d', 'u', 'p', 'l'),
|
|
KBTS_SCRIPT_TAG_EGYPTIAN_HIEROGLYPHS = KBTS_FOURCC('e', 'g', 'y', 'p'),
|
|
KBTS_SCRIPT_TAG_ELBASAN = KBTS_FOURCC('e', 'l', 'b', 'a'),
|
|
KBTS_SCRIPT_TAG_ELYMAIC = KBTS_FOURCC('e', 'l', 'y', 'm'),
|
|
KBTS_SCRIPT_TAG_ETHIOPIC = KBTS_FOURCC('e', 't', 'h', 'i'),
|
|
KBTS_SCRIPT_TAG_GARAY = KBTS_FOURCC('g', 'a', 'r', 'a'),
|
|
KBTS_SCRIPT_TAG_GEORGIAN = KBTS_FOURCC('g', 'e', 'o', 'r'),
|
|
KBTS_SCRIPT_TAG_GLAGOLITIC = KBTS_FOURCC('g', 'l', 'a', 'g'),
|
|
KBTS_SCRIPT_TAG_GOTHIC = KBTS_FOURCC('g', 'o', 't', 'h'),
|
|
KBTS_SCRIPT_TAG_GRANTHA = KBTS_FOURCC('g', 'r', 'a', 'n'),
|
|
KBTS_SCRIPT_TAG_GREEK = KBTS_FOURCC('g', 'r', 'e', 'k'),
|
|
KBTS_SCRIPT_TAG_GUJARATI = KBTS_FOURCC('g', 'j', 'r', '2'),
|
|
KBTS_SCRIPT_TAG_GUNJALA_GONDI = KBTS_FOURCC('g', 'o', 'n', 'g'),
|
|
KBTS_SCRIPT_TAG_GURMUKHI = KBTS_FOURCC('g', 'u', 'r', '2'),
|
|
KBTS_SCRIPT_TAG_GURUNG_KHEMA = KBTS_FOURCC('g', 'u', 'k', 'h'),
|
|
KBTS_SCRIPT_TAG_HANGUL = KBTS_FOURCC('h', 'a', 'n', 'g'),
|
|
KBTS_SCRIPT_TAG_HANIFI_ROHINGYA = KBTS_FOURCC('r', 'o', 'h', 'g'),
|
|
KBTS_SCRIPT_TAG_HANUNOO = KBTS_FOURCC('h', 'a', 'n', 'o'),
|
|
KBTS_SCRIPT_TAG_HATRAN = KBTS_FOURCC('h', 'a', 't', 'r'),
|
|
KBTS_SCRIPT_TAG_HEBREW = KBTS_FOURCC('h', 'e', 'b', 'r'),
|
|
KBTS_SCRIPT_TAG_HIRAGANA = KBTS_FOURCC('k', 'a', 'n', 'a'),
|
|
KBTS_SCRIPT_TAG_IMPERIAL_ARAMAIC = KBTS_FOURCC('a', 'r', 'm', 'i'),
|
|
KBTS_SCRIPT_TAG_INSCRIPTIONAL_PAHLAVI = KBTS_FOURCC('p', 'h', 'l', 'i'),
|
|
KBTS_SCRIPT_TAG_INSCRIPTIONAL_PARTHIAN = KBTS_FOURCC('p', 'r', 't', 'i'),
|
|
KBTS_SCRIPT_TAG_JAVANESE = KBTS_FOURCC('j', 'a', 'v', 'a'),
|
|
KBTS_SCRIPT_TAG_KAITHI = KBTS_FOURCC('k', 't', 'h', 'i'),
|
|
KBTS_SCRIPT_TAG_KANNADA = KBTS_FOURCC('k', 'n', 'd', '2'),
|
|
KBTS_SCRIPT_TAG_KATAKANA = KBTS_FOURCC('k', 'a', 'n', 'a'),
|
|
KBTS_SCRIPT_TAG_KAWI = KBTS_FOURCC('k', 'a', 'w', 'i'),
|
|
KBTS_SCRIPT_TAG_KAYAH_LI = KBTS_FOURCC('k', 'a', 'l', 'i'),
|
|
KBTS_SCRIPT_TAG_KHAROSHTHI = KBTS_FOURCC('k', 'h', 'a', 'r'),
|
|
KBTS_SCRIPT_TAG_KHITAN_SMALL_SCRIPT = KBTS_FOURCC('k', 'i', 't', 's'),
|
|
KBTS_SCRIPT_TAG_KHMER = KBTS_FOURCC('k', 'h', 'm', 'r'),
|
|
KBTS_SCRIPT_TAG_KHOJKI = KBTS_FOURCC('k', 'h', 'o', 'j'),
|
|
KBTS_SCRIPT_TAG_KHUDAWADI = KBTS_FOURCC('s', 'i', 'n', 'd'),
|
|
KBTS_SCRIPT_TAG_KIRAT_RAI = KBTS_FOURCC('k', 'r', 'a', 'i'),
|
|
KBTS_SCRIPT_TAG_LAO = KBTS_FOURCC('l', 'a', 'o', ' '),
|
|
KBTS_SCRIPT_TAG_LATIN = KBTS_FOURCC('l', 'a', 't', 'n'),
|
|
KBTS_SCRIPT_TAG_LEPCHA = KBTS_FOURCC('l', 'e', 'p', 'c'),
|
|
KBTS_SCRIPT_TAG_LIMBU = KBTS_FOURCC('l', 'i', 'm', 'b'),
|
|
KBTS_SCRIPT_TAG_LINEAR_A = KBTS_FOURCC('l', 'i', 'n', 'a'),
|
|
KBTS_SCRIPT_TAG_LINEAR_B = KBTS_FOURCC('l', 'i', 'n', 'b'),
|
|
KBTS_SCRIPT_TAG_LISU = KBTS_FOURCC('l', 'i', 's', 'u'),
|
|
KBTS_SCRIPT_TAG_LYCIAN = KBTS_FOURCC('l', 'y', 'c', 'i'),
|
|
KBTS_SCRIPT_TAG_LYDIAN = KBTS_FOURCC('l', 'y', 'd', 'i'),
|
|
KBTS_SCRIPT_TAG_MAHAJANI = KBTS_FOURCC('m', 'a', 'h', 'j'),
|
|
KBTS_SCRIPT_TAG_MAKASAR = KBTS_FOURCC('m', 'a', 'k', 'a'),
|
|
KBTS_SCRIPT_TAG_MALAYALAM = KBTS_FOURCC('m', 'l', 'm', '2'),
|
|
KBTS_SCRIPT_TAG_MANDAIC = KBTS_FOURCC('m', 'a', 'n', 'd'),
|
|
KBTS_SCRIPT_TAG_MANICHAEAN = KBTS_FOURCC('m', 'a', 'n', 'i'),
|
|
KBTS_SCRIPT_TAG_MARCHEN = KBTS_FOURCC('m', 'a', 'r', 'c'),
|
|
KBTS_SCRIPT_TAG_MASARAM_GONDI = KBTS_FOURCC('g', 'o', 'n', 'm'),
|
|
KBTS_SCRIPT_TAG_MEDEFAIDRIN = KBTS_FOURCC('m', 'e', 'd', 'f'),
|
|
KBTS_SCRIPT_TAG_MEETEI_MAYEK = KBTS_FOURCC('m', 't', 'e', 'i'),
|
|
KBTS_SCRIPT_TAG_MENDE_KIKAKUI = KBTS_FOURCC('m', 'e', 'n', 'd'),
|
|
KBTS_SCRIPT_TAG_MEROITIC_CURSIVE = KBTS_FOURCC('m', 'e', 'r', 'c'),
|
|
KBTS_SCRIPT_TAG_MEROITIC_HIEROGLYPHS = KBTS_FOURCC('m', 'e', 'r', 'o'),
|
|
KBTS_SCRIPT_TAG_MIAO = KBTS_FOURCC('p', 'l', 'r', 'd'),
|
|
KBTS_SCRIPT_TAG_MODI = KBTS_FOURCC('m', 'o', 'd', 'i'),
|
|
KBTS_SCRIPT_TAG_MONGOLIAN = KBTS_FOURCC('m', 'o', 'n', 'g'),
|
|
KBTS_SCRIPT_TAG_MRO = KBTS_FOURCC('m', 'r', 'o', 'o'),
|
|
KBTS_SCRIPT_TAG_MULTANI = KBTS_FOURCC('m', 'u', 'l', 't'),
|
|
KBTS_SCRIPT_TAG_MYANMAR = KBTS_FOURCC('m', 'y', 'm', '2'),
|
|
KBTS_SCRIPT_TAG_NABATAEAN = KBTS_FOURCC('n', 'b', 'a', 't'),
|
|
KBTS_SCRIPT_TAG_NAG_MUNDARI = KBTS_FOURCC('n', 'a', 'g', 'm'),
|
|
KBTS_SCRIPT_TAG_NANDINAGARI = KBTS_FOURCC('n', 'a', 'n', 'd'),
|
|
KBTS_SCRIPT_TAG_NEWA = KBTS_FOURCC('n', 'e', 'w', 'a'),
|
|
KBTS_SCRIPT_TAG_NEW_TAI_LUE = KBTS_FOURCC('t', 'a', 'l', 'u'),
|
|
KBTS_SCRIPT_TAG_NKO = KBTS_FOURCC('n', 'k', 'o', ' '),
|
|
KBTS_SCRIPT_TAG_NUSHU = KBTS_FOURCC('n', 's', 'h', 'u'),
|
|
KBTS_SCRIPT_TAG_NYIAKENG_PUACHUE_HMONG = KBTS_FOURCC('h', 'm', 'n', 'p'),
|
|
KBTS_SCRIPT_TAG_OGHAM = KBTS_FOURCC('o', 'g', 'a', 'm'),
|
|
KBTS_SCRIPT_TAG_OL_CHIKI = KBTS_FOURCC('o', 'l', 'c', 'k'),
|
|
KBTS_SCRIPT_TAG_OL_ONAL = KBTS_FOURCC('o', 'n', 'a', 'o'),
|
|
KBTS_SCRIPT_TAG_OLD_ITALIC = KBTS_FOURCC('i', 't', 'a', 'l'),
|
|
KBTS_SCRIPT_TAG_OLD_HUNGARIAN = KBTS_FOURCC('h', 'u', 'n', 'g'),
|
|
KBTS_SCRIPT_TAG_OLD_NORTH_ARABIAN = KBTS_FOURCC('n', 'a', 'r', 'b'),
|
|
KBTS_SCRIPT_TAG_OLD_PERMIC = KBTS_FOURCC('p', 'e', 'r', 'm'),
|
|
KBTS_SCRIPT_TAG_OLD_PERSIAN_CUNEIFORM = KBTS_FOURCC('x', 'p', 'e', 'o'),
|
|
KBTS_SCRIPT_TAG_OLD_SOGDIAN = KBTS_FOURCC('s', 'o', 'g', 'o'),
|
|
KBTS_SCRIPT_TAG_OLD_SOUTH_ARABIAN = KBTS_FOURCC('s', 'a', 'r', 'b'),
|
|
KBTS_SCRIPT_TAG_OLD_TURKIC = KBTS_FOURCC('o', 'r', 'k', 'h'),
|
|
KBTS_SCRIPT_TAG_OLD_UYGHUR = KBTS_FOURCC('o', 'u', 'g', 'r'),
|
|
KBTS_SCRIPT_TAG_ODIA = KBTS_FOURCC('o', 'r', 'y', '2'),
|
|
KBTS_SCRIPT_TAG_OSAGE = KBTS_FOURCC('o', 's', 'g', 'e'),
|
|
KBTS_SCRIPT_TAG_OSMANYA = KBTS_FOURCC('o', 's', 'm', 'a'),
|
|
KBTS_SCRIPT_TAG_PAHAWH_HMONG = KBTS_FOURCC('h', 'm', 'n', 'g'),
|
|
KBTS_SCRIPT_TAG_PALMYRENE = KBTS_FOURCC('p', 'a', 'l', 'm'),
|
|
KBTS_SCRIPT_TAG_PAU_CIN_HAU = KBTS_FOURCC('p', 'a', 'u', 'c'),
|
|
KBTS_SCRIPT_TAG_PHAGS_PA = KBTS_FOURCC('p', 'h', 'a', 'g'),
|
|
KBTS_SCRIPT_TAG_PHOENICIAN = KBTS_FOURCC('p', 'h', 'n', 'x'),
|
|
KBTS_SCRIPT_TAG_PSALTER_PAHLAVI = KBTS_FOURCC('p', 'h', 'l', 'p'),
|
|
KBTS_SCRIPT_TAG_REJANG = KBTS_FOURCC('r', 'j', 'n', 'g'),
|
|
KBTS_SCRIPT_TAG_RUNIC = KBTS_FOURCC('r', 'u', 'n', 'r'),
|
|
KBTS_SCRIPT_TAG_SAMARITAN = KBTS_FOURCC('s', 'a', 'm', 'r'),
|
|
KBTS_SCRIPT_TAG_SAURASHTRA = KBTS_FOURCC('s', 'a', 'u', 'r'),
|
|
KBTS_SCRIPT_TAG_SHARADA = KBTS_FOURCC('s', 'h', 'r', 'd'),
|
|
KBTS_SCRIPT_TAG_SHAVIAN = KBTS_FOURCC('s', 'h', 'a', 'w'),
|
|
KBTS_SCRIPT_TAG_SIDDHAM = KBTS_FOURCC('s', 'i', 'd', 'd'),
|
|
KBTS_SCRIPT_TAG_SIGN_WRITING = KBTS_FOURCC('s', 'g', 'n', 'w'),
|
|
KBTS_SCRIPT_TAG_SOGDIAN = KBTS_FOURCC('s', 'o', 'g', 'd'),
|
|
KBTS_SCRIPT_TAG_SINHALA = KBTS_FOURCC('s', 'i', 'n', 'h'),
|
|
KBTS_SCRIPT_TAG_SORA_SOMPENG = KBTS_FOURCC('s', 'o', 'r', 'a'),
|
|
KBTS_SCRIPT_TAG_SOYOMBO = KBTS_FOURCC('s', 'o', 'y', 'o'),
|
|
KBTS_SCRIPT_TAG_SUMERO_AKKADIAN_CUNEIFORM = KBTS_FOURCC('x', 's', 'u', 'x'),
|
|
KBTS_SCRIPT_TAG_SUNDANESE = KBTS_FOURCC('s', 'u', 'n', 'd'),
|
|
KBTS_SCRIPT_TAG_SUNUWAR = KBTS_FOURCC('s', 'u', 'n', 'u'),
|
|
KBTS_SCRIPT_TAG_SYLOTI_NAGRI = KBTS_FOURCC('s', 'y', 'l', 'o'),
|
|
KBTS_SCRIPT_TAG_SYRIAC = KBTS_FOURCC('s', 'y', 'r', 'c'),
|
|
KBTS_SCRIPT_TAG_TAGALOG = KBTS_FOURCC('t', 'g', 'l', 'g'),
|
|
KBTS_SCRIPT_TAG_TAGBANWA = KBTS_FOURCC('t', 'a', 'g', 'b'),
|
|
KBTS_SCRIPT_TAG_TAI_LE = KBTS_FOURCC('t', 'a', 'l', 'e'),
|
|
KBTS_SCRIPT_TAG_TAI_THAM = KBTS_FOURCC('l', 'a', 'n', 'a'),
|
|
KBTS_SCRIPT_TAG_TAI_VIET = KBTS_FOURCC('t', 'a', 'v', 't'),
|
|
KBTS_SCRIPT_TAG_TAKRI = KBTS_FOURCC('t', 'a', 'k', 'r'),
|
|
KBTS_SCRIPT_TAG_TAMIL = KBTS_FOURCC('t', 'm', 'l', '2'),
|
|
KBTS_SCRIPT_TAG_TANGSA = KBTS_FOURCC('t', 'n', 's', 'a'),
|
|
KBTS_SCRIPT_TAG_TANGUT = KBTS_FOURCC('t', 'a', 'n', 'g'),
|
|
KBTS_SCRIPT_TAG_TELUGU = KBTS_FOURCC('t', 'e', 'l', '2'),
|
|
KBTS_SCRIPT_TAG_THAANA = KBTS_FOURCC('t', 'h', 'a', 'a'),
|
|
KBTS_SCRIPT_TAG_THAI = KBTS_FOURCC('t', 'h', 'a', 'i'),
|
|
KBTS_SCRIPT_TAG_TIBETAN = KBTS_FOURCC('t', 'i', 'b', 't'),
|
|
KBTS_SCRIPT_TAG_TIFINAGH = KBTS_FOURCC('t', 'f', 'n', 'g'),
|
|
KBTS_SCRIPT_TAG_TIRHUTA = KBTS_FOURCC('t', 'i', 'r', 'h'),
|
|
KBTS_SCRIPT_TAG_TODHRI = KBTS_FOURCC('t', 'o', 'd', 'r'),
|
|
KBTS_SCRIPT_TAG_TOTO = KBTS_FOURCC('t', 'o', 't', 'o'),
|
|
KBTS_SCRIPT_TAG_TULU_TIGALARI = KBTS_FOURCC('t', 'u', 't', 'g'),
|
|
KBTS_SCRIPT_TAG_UGARITIC_CUNEIFORM = KBTS_FOURCC('u', 'g', 'a', 'r'),
|
|
KBTS_SCRIPT_TAG_VAI = KBTS_FOURCC('v', 'a', 'i', ' '),
|
|
KBTS_SCRIPT_TAG_VITHKUQI = KBTS_FOURCC('v', 'i', 't', 'h'),
|
|
KBTS_SCRIPT_TAG_WANCHO = KBTS_FOURCC('w', 'c', 'h', 'o'),
|
|
KBTS_SCRIPT_TAG_WARANG_CITI = KBTS_FOURCC('w', 'a', 'r', 'a'),
|
|
KBTS_SCRIPT_TAG_YEZIDI = KBTS_FOURCC('y', 'e', 'z', 'i'),
|
|
KBTS_SCRIPT_TAG_YI = KBTS_FOURCC('y', 'i', ' ', ' '),
|
|
KBTS_SCRIPT_TAG_ZANABAZAR_SQUARE = KBTS_FOURCC('z', 'a', 'n', 'b'),
|
|
};
|
|
|
|
typedef kbts_u32 kbts_script;
|
|
enum kbts_script_enum
|
|
{
|
|
KBTS_SCRIPT_DONT_KNOW,
|
|
KBTS_SCRIPT_ADLAM,
|
|
KBTS_SCRIPT_AHOM,
|
|
KBTS_SCRIPT_ANATOLIAN_HIEROGLYPHS,
|
|
KBTS_SCRIPT_ARABIC,
|
|
KBTS_SCRIPT_ARMENIAN,
|
|
KBTS_SCRIPT_AVESTAN,
|
|
KBTS_SCRIPT_BALINESE,
|
|
KBTS_SCRIPT_BAMUM,
|
|
KBTS_SCRIPT_BASSA_VAH,
|
|
KBTS_SCRIPT_BATAK,
|
|
KBTS_SCRIPT_BENGALI,
|
|
KBTS_SC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T,
|
|
};
|
|
|
|
typedef kbts_u32 kbts_feature_tag;
|
|
enum kbts_feature_tag_enum
|
|
{
|
|
KBTS_FEATURE_TAG_UNREGISTERED = KBTS_FOURCC(0, 0, 0, 0), // Features that aren't pre-defined in the OpenType spec
|
|
KBTS_FEATURE_TAG_isol = KBTS_FOURCC('i', 's', 'o', 'l'), // Isolated Forms
|
|
KBTS_FEATURE_TAG_fina = KBTS_FOURCC('f', 'i', 'n', 'a'), // Terminal Forms
|
|
KBTS_FEATURE_TAG_fin2 = KBTS_FOURCC('f', 'i', 'n', '2'), // Terminal Forms #2
|
|
KBTS_FEATURE_TAG_fin3 = KBTS_FOURCC('f', 'i', 'n', '3'), // Terminal Forms #3
|
|
KBTS_FEATURE_TAG_medi = KBTS_FOURCC('m', 'e', 'd', 'i'), // Medial Forms
|
|
KBTS_FEATURE_TAG_med2 = KBTS_FOURCC('m', 'e', 'd', '2'), // Medial Forms #2
|
|
KBTS_FEATURE_TAG_init = KBTS_FOURCC('i', 'n', 'i', 't'), // Initial Forms
|
|
KBTS_FEATURE_TAG_ljmo = KBTS_FOURCC('l', 'j', 'm', 'o'), // Leading Jamo Forms
|
|
KBTS_FEATURE_TAG_vjmo = KBTS_FOURCC('v', 'j', 'm', 'o'), // Vowel Jamo Forms
|
|
KBTS_FEATURE_TAG_tjmo = KBTS_FOURCC('t', 'j', 'm', 'o'), // Trailing Jamo Forms
|
|
KBTS_FEATURE_TAG_rphf = KBTS_FOURCC('r', 'p', 'h', 'f'), // Reph Form
|
|
KBTS_FEATURE_TAG_blwf = KBTS_FOURCC('b', 'l', 'w', 'f'), // Below-base Forms
|
|
KBTS_FEATURE_TAG_half = KBTS_FOURCC('h', 'a', 'l', 'f'), // Half Forms
|
|
KBTS_FEATURE_TAG_pstf = KBTS_FOURCC('p', 's', 't', 'f'), // Post-base Forms
|
|
KBTS_FEATURE_TAG_abvf = KBTS_FOURCC('a', 'b', 'v', 'f'), // Above-base Forms
|
|
KBTS_FEATURE_TAG_pref = KBTS_FOURCC('p', 'r', 'e', 'f'), // Pre-base Forms
|
|
KBTS_FEATURE_TAG_numr = KBTS_FOURCC('n', 'u', 'm', 'r'), // Numerators
|
|
KBTS_FEATURE_TAG_frac = KBTS_FOURCC('f', 'r', 'a', 'c'), // Fractions
|
|
KBTS_FEATURE_TAG_dnom = KBTS_FOURCC('d', 'n', 'o', 'm'), // Denominators
|
|
KBTS_FEATURE_TAG_cfar = KBTS_FOURCC('c', 'f', 'a', 'r'), // Conjunct Form After Ro
|
|
KBTS_FEATURE_TAG_aalt = KBTS_FOURCC('a', 'a', 'l', 't'), // Access All Alternates
|
|
KBTS_FEATURE_TAG_abvm = KBTS_FOURCC('a', 'b', 'v', 'm'), // Above-base Mark Positioning
|
|
KBTS_FEATURE_TAG_abvs = KBTS_FOURCC('a', 'b', 'v', 's'), // Above-base Substitutions
|
|
KBTS_FEATURE_TAG_afrc = KBTS_FOURCC('a', 'f', 'r', 'c'), // Alternative Fractions
|
|
KBTS_FEATURE_TAG_akhn = KBTS_FOURCC('a', 'k', 'h', 'n'), // Akhand
|
|
KBTS_FEATURE_TAG_apkn = KBTS_FOURCC('a', 'p', 'k', 'n'), // Kerning for Alternate Proportional Widths
|
|
KBTS_FEATURE_TAG_blwm = KBTS_FOURCC('b', 'l', 'w', 'm'), // Below-base Mark Positioning
|
|
KBTS_FEATURE_TAG_blws = KBTS_FOURCC('b', 'l', 'w', 's'), // Below-base Substitutions
|
|
KBTS_FEATURE_TAG_calt = KBTS_FOURCC('c', 'a', 'l', 't'), // Contextual Alternates
|
|
KBTS_FEATURE_TAG_case = KBTS_FOURCC('c', 'a', 's', 'e'), // Case-sensitive Forms
|
|
KBTS_FEATURE_TAG_ccmp = KBTS_FOURCC('c', 'c', 'm', 'p'), // Glyph Composition / Decomposition
|
|
KBTS_FEATURE_TAG_chws = KBTS_FOURCC('c', 'h', 'w', 's'), // Contextual Half-width Spacing
|
|
KBTS_FEATURE_TAG_cjct = KBTS_FOURCC('c', 'j', 'c', 't'), // Conjunct Forms
|
|
KBTS_FEATURE_TAG_clig = KBTS_FOURCC('c', 'l', 'i', 'g'), // Contextual Ligatures
|
|
KBTS_FEATURE_TAG_cpct = KBTS_FOURCC('c', 'p', 'c', 't'), // Centered CJK Punctuation
|
|
KBTS_FEATURE_TAG_cpsp = KBTS_FOURCC('c', 'p', 's', 'p'), // Capital Spacing
|
|
KBTS_FEATURE_TAG_cswh = KBTS_FOURCC('c', 's', 'w', 'h'), // Contextual Swash
|
|
KBTS_FEATURE_TAG_curs = KBTS_FOURCC('c', 'u', 'r', 's'), // Cursive Positioning
|
|
KBTS_FEATURE_TAG_cv01 = KBTS_FOURCC('c', 'v', '0', '1'), // Character Variant 1
|
|
KBTS_FEATURE_TAG_cv02 = KBTS_FOURCC('c', 'v', '0', '2'), // Character Variant 2
|
|
KBTS_FEATURE_TAG_cv03 = KBTS_FOURCC('c', 'v', '0', '3'), // Character Variant 3
|
|
KBTS_FEATURE_TAG_cv04 = KBTS_FOURCC('c', 'v', '0', '4'), // Character Variant 4
|
|
KBTS_FEATURE_TAG_cv05 = KBTS_FOURCC('c', 'v', '0', '5'), // Character Variant 5
|
|
KBTS_FEATURE_TAG_cv06 = KBTS_FOURCC('c', 'v', '0', '6'), // Character Variant 6
|
|
KBTS_FEATURE_TAG_cv07 = KBTS_FOURCC('c', 'v', '0', '7'), // Character Variant 7
|
|
KBTS_FEATURE_TAG_cv08 = KBTS_FOURCC('c', 'v', '0', '8'), // Character Variant 8
|
|
KBTS_FEATURE_TAG_cv09 = KBTS_FOURCC('c', 'v', '0', '9'), // Character Variant 9
|
|
KBTS_FEATURE_TAG_cv10 = KBTS_FOURCC('c', 'v', '1', '0'), // Character Variant 10
|
|
KBTS_FEATURE_TAG_cv11 = KBTS_FOURCC('c', 'v', '1', '1'), // Character Variant 11
|
|
KBTS_FEATURE_TAG_cv12 = KBTS_FOURCC('c', 'v', '1', '2'), // Character Variant 12
|
|
KBTS_FEATURE_TAG_cv13 = KBTS_FOURCC('c', 'v', '1', '3'), // Character Variant 13
|
|
KBTS_FEATURE_TAG_cv14 = KBTS_FOURCC('c', 'v', '1', '4'), // Character Variant 14
|
|
KBTS_FEATURE_TAG_cv15 = KBTS_FOURCC('c', 'v', '1', '5'), // Character Variant 15
|
|
KBTS_FEATURE_TAG_cv16 = KBTS_FOURCC('c', 'v', '1', '6'), // Character Variant 16
|
|
KBTS_FEATURE_TAG_cv17 = KBTS_FOURCC('c', 'v', '1', '7'), // Character Variant 17
|
|
KBTS_FEATURE_TAG_cv18 = KBTS_FOURCC('c', 'v', '1', '8'), // Character Variant 18
|
|
KBTS_FEATURE_TAG_cv19 = KBTS_FOURCC('c', 'v', '1', '9'), // Character Variant 19
|
|
KBTS_FEATURE_TAG_cv20 = KBTS_FOURCC('c', 'v', '2', '0'), // Character Variant 20
|
|
KBTS_FEATURE_TAG_cv21 = KBTS_FOURCC('c', 'v', '2', '1'), // Character Variant 21
|
|
KBTS_FEATURE_TAG_cv22 = KBTS_FOURCC('c', 'v', '2', '2'), // Character Variant 22
|
|
KBTS_FEATURE_TAG_cv23 = KBTS_FOURCC('c', 'v', '2', '3'), // Character Variant 23
|
|
KBTS_FEATURE_TAG_cv24 = KBTS_FOURCC('c', 'v', '2', '4'), // Character Variant 24
|
|
KBTS_FEATURE_TAG_cv25 = KBTS_FOURCC('c', 'v', '2', '5'), // Character Variant 25
|
|
KBTS_FEATURE_TAG_cv26 = KBTS_FOURCC('c', 'v', '2', '6'), // Character Variant 26
|
|
KBTS_FEATURE_TAG_cv27 = KBTS_FOURCC('c', 'v', '2', '7'), // Character Variant 27
|
|
KBTS_FEATURE_TAG_cv28 = KBTS_FOURCC('c', 'v', '2', '8'), // Character Variant 28
|
|
KBTS_FEATURE_TAG_cv29 = KBTS_FOURCC('c', 'v', '2', '9'), // Character Variant 29
|
|
KBTS_FEATURE_TAG_cv30 = KBTS_FOURCC('c', 'v', '3', '0'), // Character Variant 30
|
|
KBTS_FEATURE_TAG_cv31 = KBTS_FOURCC('c', 'v', '3', '1'), // Character Variant 31
|
|
KBTS_FEATURE_TAG_cv32 = KBTS_FOURCC('c', 'v', '3', '2'), // Character Variant 32
|
|
KBTS_FEATURE_TAG_cv33 = KBTS_FOURCC('c', 'v', '3', '3'), // Character Variant 33
|
|
KBTS_FEATURE_TAG_cv34 = KBTS_FOURCC('c', 'v', '3', '4'), // Character Variant 34
|
|
KBTS_FEATURE_TAG_cv35 = KBTS_FOURCC('c', 'v', '3', '5'), // Character Variant 35
|
|
KBTS_FEATURE_TAG_cv36 = KBTS_FOURCC('c', 'v', '3', '6'), // Character Variant 36
|
|
KBTS_FEATURE_TAG_cv37 = KBTS_FOURCC('c', 'v', '3', '7'), // Character Variant 37
|
|
KBTS_FEATURE_TAG_cv38 = KBTS_FOURCC('c', 'v', '3', '8'), // Character Variant 38
|
|
KBTS_FEATURE_TAG_cv39 = KBTS_FOURCC('c', 'v', '3', '9'), // Character Variant 39
|
|
KBTS_FEATURE_TAG_cv40 = KBTS_FOURCC('c', 'v', '4', '0'), // Character Variant 40
|
|
KBTS_FEATURE_TAG_cv41 = KBTS_FOURCC('c', 'v', '4', '1'), // Character Variant 41
|
|
KBTS_FEATURE_TAG_cv42 = KBTS_FOURCC('c', 'v', '4', '2'), // Character Variant 42
|
|
KBTS_FEATURE_TAG_cv43 = KBTS_FOURCC('c', 'v', '4', '3'), // Character Variant 43
|
|
KBTS_FEATURE_TAG_cv44 = KBTS_FOURCC('c', 'v', '4', '4'), // Character Variant 44
|
|
KBTS_FEATURE_TAG_cv45 = KBTS_FOURCC('c', 'v', '4', '5'), // Character Variant 45
|
|
KBTS_FEATURE_TAG_cv46 = KBTS_FOURCC('c', 'v', '4', '6'), // Character Variant 46
|
|
KBTS_FEATURE_TAG_cv47 = KBTS_FOURCC('c', 'v', '4', '7'), // Character Variant 47
|
|
KBTS_FEATURE_TAG_cv48 = KBTS_FOURCC('c', 'v', '4', '8'), // Character Variant 48
|
|
KBTS_FEATURE_TAG_cv49 = KBTS_FOURCC('c', 'v', '4', '9'), // Character Variant 49
|
|
KBTS_FEATURE_TAG_cv50 = KBTS_FOURCC('c', 'v', '5', '0'), // Character Variant 50
|
|
KBTS_FEATURE_TAG_cv51 = KBTS_FOURCC('c', 'v', '5', '1'), // Character Variant 51
|
|
KBTS_FEATURE_TAG_cv52 = KBTS_FOURCC('c', 'v', '5', '2'), // Character Variant 52
|
|
KBTS_FEATURE_TAG_cv53 = KBTS_FOURCC('c', 'v', '5', '3'), // Character Variant 53
|
|
KBTS_FEATURE_TAG_cv54 = KBTS_FOURCC('c', 'v', '5', '4'), // Character Variant 54
|
|
KBTS_FEATURE_TAG_cv55 = KBTS_FOURCC('c', 'v', '5', '5'), // Character Variant 55
|
|
KBTS_FEATURE_TAG_cv56 = KBTS_FOURCC('c', 'v', '5', '6'), // Character Variant 56
|
|
KBTS_FEATURE_TAG_cv57 = KBTS_FOURCC('c', 'v', '5', '7'), // Character Variant 57
|
|
KBTS_FEATURE_TAG_cv58 = KBTS_FOURCC('c', 'v', '5', '8'), // Character Variant 58
|
|
KBTS_FEATURE_TAG_cv59 = KBTS_FOURCC('c', 'v', '5', '9'), // Character Variant 59
|
|
KBTS_FEATURE_TAG_cv60 = KBTS_FOURCC('c', 'v', '6', '0'), // Character Variant 60
|
|
KBTS_FEATURE_TAG_cv61 = KBTS_FOURCC('c', 'v', '6', '1'), // Character Variant 61
|
|
KBTS_FEATURE_TAG_cv62 = KBTS_FOURCC('c', 'v', '6', '2'), // Character Variant 62
|
|
KBTS_FEATURE_TAG_cv63 = KBTS_FOURCC('c', 'v', '6', '3'), // Character Variant 63
|
|
KBTS_FEATURE_TAG_cv64 = KBTS_FOURCC('c', 'v', '6', '4'), // Character Variant 64
|
|
KBTS_FEATURE_TAG_cv65 = KBTS_FOURCC('c', 'v', '6', '5'), // Character Variant 65
|
|
KBTS_FEATURE_TAG_cv66 = KBTS_FOURCC('c', 'v', '6', '6'), // Character Variant 66
|
|
KBTS_FEATURE_TAG_cv67 = KBTS_FOURCC('c', 'v', '6', '7'), // Character Variant 67
|
|
KBTS_FEATURE_TAG_cv68 = KBTS_FOURCC('c', 'v', '6', '8'), // Character Variant 68
|
|
KBTS_FEATURE_TAG_cv69 = KBTS_FOURCC('c', 'v', '6', '9'), // Character Variant 69
|
|
KBTS_FEATURE_TAG_cv70 = KBTS_FOURCC('c', 'v', '7', '0'), // Character Variant 70
|
|
KBTS_FEATURE_TAG_cv71 = KBTS_FOURCC('c', 'v', '7', '1'), // Character Variant 71
|
|
KBTS_FEATURE_TAG_cv72 = KBTS_FOURCC('c', 'v', '7', '2'), // Character Variant 72
|
|
KBTS_FEATURE_TAG_cv73 = KBTS_FOURCC('c', 'v', '7', '3'), // Character Variant 73
|
|
KBTS_FEATURE_TAG_cv74 = KBTS_FOURCC('c', 'v', '7', '4'), // Character Variant 74
|
|
KBTS_FEATURE_TAG_cv75 = KBTS_FOURCC('c', 'v', '7', '5'), // Character Variant 75
|
|
KBTS_FEATURE_TAG_cv76 = KBTS_FOURCC('c', 'v', '7', '6'), // Character Variant 76
|
|
KBTS_FEATURE_TAG_cv77 = KBTS_FOURCC('c', 'v', '7', '7'), // Character Variant 77
|
|
KBTS_FEATURE_TAG_cv78 = KBTS_FOURCC('c', 'v', '7', '8'), // Character Variant 78
|
|
KBTS_FEATURE_TAG_cv79 = KBTS_FOURCC('c', 'v', '7', '9'), // Character Variant 79
|
|
KBTS_FEATURE_TAG_cv80 = KBTS_FOURCC('c', 'v', '8', '0'), // Character Variant 80
|
|
KBTS_FEATURE_TAG_cv81 = KBTS_FOURCC('c', 'v', '8', '1'), // Character Variant 81
|
|
KBTS_FEATURE_TAG_cv82 = KBTS_FOURCC('c', 'v', '8', '2'), // Character Variant 82
|
|
KBTS_FEATURE_TAG_cv83 = KBTS_FOURCC('c', 'v', '8', '3'), // Character Variant 83
|
|
KBTS_FEATURE_TAG_cv84 = KBTS_FOURCC('c', 'v', '8', '4'), // Character Variant 84
|
|
KBTS_FEATURE_TAG_cv85 = KBTS_FOURCC('c', 'v', '8', '5'), // Character Variant 85
|
|
KBTS_FEATURE_TAG_cv86 = KBTS_FOURCC('c', 'v', '8', '6'), // Character Variant 86
|
|
KBTS_FEATURE_TAG_cv87 = KBTS_FOURCC('c', 'v', '8', '7'), // Character Variant 87
|
|
KBTS_FEATURE_TAG_cv88 = KBTS_FOURCC('c', 'v', '8', '8'), // Character Variant 88
|
|
KBTS_FEATURE_TAG_cv89 = KBTS_FOURCC('c', 'v', '8', '9'), // Character Variant 89
|
|
KBTS_FEATURE_TAG_cv90 = KBTS_FOURCC('c', 'v', '9', '0'), // Character Variant 90
|
|
KBTS_FEATURE_TAG_cv91 = KBTS_FOURCC('c', 'v', '9', '1'), // Character Variant 91
|
|
KBTS_FEATURE_TAG_cv92 = KBTS_FOURCC('c', 'v', '9', '2'), // Character Variant 92
|
|
KBTS_FEATURE_TAG_cv93 = KBTS_FOURCC('c', 'v', '9', '3'), // Character Variant 93
|
|
KBTS_FEATURE_TAG_cv94 = KBTS_FOURCC('c', 'v', '9', '4'), // Character Variant 94
|
|
KBTS_FEATURE_TAG_cv95 = KBTS_FOURCC('c', 'v', '9', '5'), // Character Variant 95
|
|
KBTS_FEATURE_TAG_cv96 = KBTS_FOURCC('c', 'v', '9', '6'), // Character Variant 96
|
|
KBTS_FEATURE_TAG_cv97 = KBTS_FOURCC('c', 'v', '9', '7'), // Character Variant 97
|
|
KBTS_FEATURE_TAG_cv98 = KBTS_FOURCC('c', 'v', '9', '8'), // Character Variant 98
|
|
KBTS_FEATURE_TAG_cv99 = KBTS_FOURCC('c', 'v', '9', '9'), // Character Variant 99
|
|
KBTS_FEATURE_TAG_c2pc = KBTS_FOURCC('c', '2', 'p', 'c'), // Petite Capitals From Capitals
|
|
KBTS_FEATURE_TAG_c2sc = KBTS_FOURCC('c', '2', 's', 'c'), // Small Capitals From Capitals
|
|
KBTS_FEATURE_TAG_dist = KBTS_FOURCC('d', 'i', 's', 't'), // Distances
|
|
KBTS_FEATURE_TAG_dlig = KBTS_FOURCC('d', 'l', 'i', 'g'), // Discretionary Ligatures
|
|
KBTS_FEATURE_TAG_dtls = KBTS_FOURCC('d', 't', 'l', 's'), // Dotless Forms
|
|
KBTS_FEATURE_TAG_expt = KBTS_FOURCC('e', 'x', 'p', 't'), // Expert Forms
|
|
KBTS_FEATURE_TAG_falt = KBTS_FOURCC('f', 'a', 'l', 't'), // Final Glyph on Line Alternates
|
|
KBTS_FEATURE_TAG_flac = KBTS_FOURCC('f', 'l', 'a', 'c'), // Flattened Accent Forms
|
|
KBTS_FEATURE_TAG_fwid = KBTS_FOURCC('f', 'w', 'i', 'd'), // Full Widths
|
|
KBTS_FEATURE_TAG_haln = KBTS_FOURCC('h', 'a', 'l', 'n'), // Halant Forms
|
|
KBTS_FEATURE_TAG_halt = KBTS_FOURCC('h', 'a', 'l', 't'), // Alternate Half Widths
|
|
KBTS_FEATURE_TAG_hist = KBTS_FOURCC('h', 'i', 's', 't'), // Historical Forms
|
|
KBTS_FEATURE_TAG_hkna = KBTS_FOURCC('h', 'k', 'n', 'a'), // Horizontal Kana Alternates
|
|
KBTS_FEATURE_TAG_hlig = KBTS_FOURCC('h', 'l', 'i', 'g'), // Historical Ligatures
|
|
KBTS_FEATURE_TAG_hngl = KBTS_FOURCC('h', 'n', 'g', 'l'), // Hangul
|
|
KBTS_FEATURE_TAG_hojo = KBTS_FOURCC('h', 'o', 'j', 'o'), // Hojo Kanji Forms (JIS X 0212-1990 Kanji Forms)
|
|
KBTS_FEATURE_TAG_hwid = KBTS_FOURCC('h', 'w', 'i', 'd'), // Half Widths
|
|
KBTS_FEATURE_TAG_ital = KBTS_FOURCC('i', 't', 'a', 'l'), // Italics
|
|
KBTS_FEATURE_TAG_jalt = KBTS_FOURCC('j', 'a', 'l', 't'), // Justification Alternates
|
|
KBTS_FEATURE_TAG_jp78 = KBTS_FOURCC('j', 'p', '7', '8'), // JIS78 Forms
|
|
KBTS_FEATURE_TAG_jp83 = KBTS_FOURCC('j', 'p', '8', '3'), // JIS83 Forms
|
|
KBTS_FEATURE_TAG_jp90 = KBTS_FOURCC('j', 'p', '9', '0'), // JIS90 Forms
|
|
KBTS_FEATURE_TAG_jp04 = KBTS_FOURCC('j', 'p', '0', '4'), // JIS2004 Forms
|
|
KBTS_FEATURE_TAG_kern = KBTS_FOURCC('k', 'e', 'r', 'n'), // Kerning
|
|
KBTS_FEATURE_TAG_lfbd = KBTS_FOURCC('l', 'f', 'b', 'd'), // Left Bounds
|
|
KBTS_FEATURE_TAG_liga = KBTS_FOURCC('l', 'i', 'g', 'a'), // Standard Ligatures
|
|
KBTS_FEATURE_TAG_lnum = KBTS_FOURCC('l', 'n', 'u', 'm'), // Lining Figures
|
|
KBTS_FEATURE_TAG_locl = KBTS_FOURCC('l', 'o', 'c', 'l'), // Localized Forms
|
|
KBTS_FEATURE_TAG_ltra = KBTS_FOURCC('l', 't', 'r', 'a'), // Left-to-right Alternates
|
|
KBTS_FEATURE_TAG_ltrm = KBTS_FOURCC('l', 't', 'r', 'm'), // Left-to-right Mirrored Forms
|
|
KBTS_FEATURE_TAG_mark = KBTS_FOURCC('m', 'a', 'r', 'k'), // Mark Positioning
|
|
KBTS_FEATURE_TAG_mgrk = KBTS_FOURCC('m', 'g', 'r', 'k'), // Mathematical Greek
|
|
KBTS_FEATURE_TAG_mkmk = KBTS_FOURCC('m', 'k', 'm', 'k'), // Mark to Mark Positioning
|
|
KBTS_FEATURE_TAG_mset = KBTS_FOURCC('m', 's', 'e', 't'), // Mark Positioning via Substitution
|
|
KBTS_FEATURE_TAG_nalt = KBTS_FOURCC('n', 'a', 'l', 't'), // Alternate Annotation Forms
|
|
KBTS_FEATURE_TAG_nlck = KBTS_FOURCC('n', 'l', 'c', 'k'), // NLC Kanji Forms
|
|
KBTS_FEATURE_TAG_nukt = KBTS_FOURCC('n', 'u', 'k', 't'), // Nukta Forms
|
|
KBTS_FEATURE_TAG_onum = KBTS_FOURCC('o', 'n', 'u', 'm'), // Oldstyle Figures
|
|
KBTS_FEATURE_TAG_opbd = KBTS_FOURCC('o', 'p', 'b', 'd'), // Optical Bounds
|
|
KBTS_FEATURE_TAG_ordn = KBTS_FOURCC('o', 'r', 'd', 'n'), // Ordinals
|
|
KBTS_FEATURE_TAG_ornm = KBTS_FOURCC('o', 'r', 'n', 'm'), // Ornaments
|
|
KBTS_FEATURE_TAG_palt = KBTS_FOURCC('p', 'a', 'l', 't'), // Proportional Alternate Widths
|
|
KBTS_FEATURE_TAG_pcap = KBTS_FOURCC('p', 'c', 'a', 'p'), // Petite Capitals
|
|
KBTS_FEATURE_TAG_pkna = KBTS_FOURCC('p', 'k', 'n', 'a'), // Proportional Kana
|
|
KBTS_FEATURE_TAG_pnum = KBTS_FOURCC('p', 'n', 'u', 'm'), // Proportional Figures
|
|
KBTS_FEATURE_TAG_pres = KBTS_FOURCC('p', 'r', 'e', 's'), // Pre-base Substitutions
|
|
KBTS_FEATURE_TAG_psts = KBTS_FOURCC('p', 's', 't', 's'), // Post-base Substitutions
|
|
KBTS_FEATURE_TAG_pwid = KBTS_FOURCC('p', 'w', 'i', 'd'), // Proportional Widths
|
|
KBTS_FEATURE_TAG_qwid = KBTS_FOURCC('q', 'w', 'i', 'd'), // Quarter Widths
|
|
KBTS_FEATURE_TAG_rand = KBTS_FOURCC('r', 'a', 'n', 'd'), // Randomize
|
|
KBTS_FEATURE_TAG_rclt = KBTS_FOURCC('r', 'c', 'l', 't'), // Required Contextual Alternates
|
|
KBTS_FEATURE_TAG_rkrf = KBTS_FOURCC('r', 'k', 'r', 'f'), // Rakar Forms
|
|
KBTS_FEATURE_TAG_rlig = KBTS_FOURCC('r', 'l', 'i', 'g'), // Required Ligatures
|
|
KBTS_FEATURE_TAG_rtbd = KBTS_FOURCC('r', 't', 'b', 'd'), // Right Bounds
|
|
KBTS_FEATURE_TAG_rtla = KBTS_FOURCC('r', 't', 'l', 'a'), // Right-to-left Alternates
|
|
KBTS_FEATURE_TAG_rtlm = KBTS_FOURCC('r', 't', 'l', 'm'), // Right-to-left Mirrored Forms
|
|
KBTS_FEATURE_TAG_ruby = KBTS_FOURCC('r', 'u', 'b', 'y'), // Ruby Notation Forms
|
|
KBTS_FEATURE_TAG_rvrn = KBTS_FOURCC('r', 'v', 'r', 'n'), // Required Variation Alternates
|
|
KBTS_FEATURE_TAG_salt = KBTS_FOURCC('s', 'a', 'l', 't'), // Stylistic Alternates
|
|
KBTS_FEATURE_TAG_sinf = KBTS_FOURCC('s', 'i', 'n', 'f'), // Scientific Inferiors
|
|
KBTS_FEATURE_TAG_size = KBTS_FOURCC('s', 'i', 'z', 'e'), // Optical size
|
|
KBTS_FEATURE_TAG_smcp = KBTS_FOURCC('s', 'm', 'c', 'p'), // Small Capitals
|
|
KBTS_FEATURE_TAG_smpl = KBTS_FOURCC('s', 'm', 'p', 'l'), // Simplified Forms
|
|
KBTS_FEATURE_TAG_ss01 = KBTS_FOURCC('s', 's', '0', '1'), // Stylistic Set 1
|
|
KBTS_FEATURE_TAG_ss02 = KBTS_FOURCC('s', 's', '0', '2'), // Stylistic Set 2
|
|
KBTS_FEATURE_TAG_ss03 = KBTS_FOURCC('s', 's', '0', '3'), // Stylistic Set 3
|
|
KBTS_FEATURE_TAG_ss04 = KBTS_FOURCC('s', 's', '0', '4'), // Stylistic Set 4
|
|
KBTS_FEATURE_TAG_ss05 = KBTS_FOURCC('s', 's', '0', '5'), // Stylistic Set 5
|
|
KBTS_FEATURE_TAG_ss06 = KBTS_FOURCC('s', 's', '0', '6'), // Stylistic Set 6
|
|
KBTS_FEATURE_TAG_ss07 = KBTS_FOURCC('s', 's', '0', '7'), // Stylistic Set 7
|
|
KBTS_FEATURE_TAG_ss08 = KBTS_FOURCC('s', 's', '0', '8'), // Stylistic Set 8
|
|
KBTS_FEATURE_TAG_ss09 = KBTS_FOURCC('s', 's', '0', '9'), // Stylistic Set 9
|
|
KBTS_FEATURE_TAG_ss10 = KBTS_FOURCC('s', 's', '1', '0'), // Stylistic Set 10
|
|
KBTS_FEATURE_TAG_ss11 = KBTS_FOURCC('s', 's', '1', '1'), // Stylistic Set 11
|
|
KBTS_FEATURE_TAG_ss12 = KBTS_FOURCC('s', 's', '1', '2'), // Stylistic Set 12
|
|
KBTS_FEATURE_TAG_ss13 = KBTS_FOURCC('s', 's', '1', '3'), // Stylistic Set 13
|
|
KBTS_FEATURE_TAG_ss14 = KBTS_FOURCC('s', 's', '1', '4'), // Stylistic Set 14
|
|
KBTS_FEATURE_TAG_ss15 = KBTS_FOURCC('s', 's', '1', '5'), // Stylistic Set 15
|
|
KBTS_FEATURE_TAG_ss16 = KBTS_FOURCC('s', 's', '1', '6'), // Stylistic Set 16
|
|
KBTS_FEATURE_TAG_ss17 = KBTS_FOURCC('s', 's', '1', '7'), // Stylistic Set 17
|
|
KBTS_FEATURE_TAG_ss18 = KBTS_FOURCC('s', 's', '1', '8'), // Stylistic Set 18
|
|
KBTS_FEATURE_TAG_ss19 = KBTS_FOURCC('s', 's', '1', '9'), // Stylistic Set 19
|
|
KBTS_FEATURE_TAG_ss20 = KBTS_FOURCC('s', 's', '2', '0'), // Stylistic Set 20
|
|
KBTS_FEATURE_TAG_ssty = KBTS_FOURCC('s', 's', 't', 'y'), // Math Script-style Alternates
|
|
KBTS_FEATURE_TAG_stch = KBTS_FOURCC('s', 't', 'c', 'h'), // Stretching Glyph Decomposition
|
|
KBTS_FEATURE_TAG_subs = KBTS_FOURCC('s', 'u', 'b', 's'), // Subscript
|
|
KBTS_FEATURE_TAG_sups = KBTS_FOURCC('s', 'u', 'p', 's'), // Superscript
|
|
KBTS_FEATURE_TAG_swsh = KBTS_FOURCC('s', 'w', 's', 'h'), // Swash
|
|
KBTS_FEATURE_TAG_test = KBTS_FOURCC('t', 'e', 's', 't'), // Test features, only for development
|
|
KBTS_FEATURE_TAG_titl = KBTS_FOURCC('t', 'i', 't', 'l'), // Titling
|
|
KBTS_FEATURE_TAG_tnam = KBTS_FOURCC('t', 'n', 'a', 'm'), // Traditional Name Forms
|
|
KBTS_FEATURE_TAG_tnum = KBTS_FOURCC('t', 'n', 'u', 'm'), // Tabular Figures
|
|
KBTS_FEATURE_TAG_trad = KBTS_FOURCC('t', 'r', 'a', 'd'), // Traditional Forms
|
|
KBTS_FEATURE_TAG_twid = KBTS_FOURCC('t', 'w', 'i', 'd'), // Third Widths
|
|
KBTS_FEATURE_TAG_unic = KBTS_FOURCC('u', 'n', 'i', 'c'), // Unicase
|
|
KBTS_FEATURE_TAG_valt = KBTS_FOURCC('v', 'a', 'l', 't'), // Alternate Vertical Metrics
|
|
KBTS_FEATURE_TAG_vapk = KBTS_FOURCC('v', 'a', 'p', 'k'), // Kerning for Alternate Proportional Vertical Metrics
|
|
KBTS_FEATURE_TAG_vatu = KBTS_FOURCC('v', 'a', 't', 'u'), // Vattu Variants
|
|
KBTS_FEATURE_TAG_vchw = KBTS_FOURCC('v', 'c', 'h', 'w'), // Vertical Contextual Half-width Spacing
|
|
KBTS_FEATURE_TAG_vert = KBTS_FOURCC('v', 'e', 'r', 't'), // Vertical Alternates
|
|
KBTS_FEATURE_TAG_vhal = KBTS_FOURCC('v', 'h', 'a', 'l'), // Alternate Vertical Half Metrics
|
|
KBTS_FEATURE_TAG_vkna = KBTS_FOURCC('v', 'k', 'n', 'a'), // Vertical Kana Alternates
|
|
KBTS_FEATURE_TAG_vkrn = KBTS_FOURCC('v', 'k', 'r', 'n'), // Vertical Kerning
|
|
KBTS_FEATURE_TAG_vpal = KBTS_FOURCC('v', 'p', 'a', 'l'), // Proportional Alternate Vertical Metrics
|
|
KBTS_FEATURE_TAG_vrt2 = KBTS_FOURCC('v', 'r', 't', '2'), // Vertical Alternates and Rotation
|
|
KBTS_FEATURE_TAG_vrtr = KBTS_FOURCC('v', 'r', 't', 'r'), // Vertical Alternates for Rotation
|
|
KBTS_FEATURE_TAG_zero = KBTS_FOURCC('z', 'e', 'r', 'o'), // Slashed Zero
|
|
};
|
|
|
|
typedef struct kbts__gdef kbts__gdef;
|
|
typedef struct kbts__cmap_14 kbts__cmap_14;
|
|
typedef struct kbts__gsub_gpos kbts__gsub_gpos;
|
|
typedef struct kbts__maxp kbts__maxp;
|
|
typedef struct kbts__hea kbts__hea;
|
|
typedef struct kbts_shaper_properties kbts_shaper_properties;
|
|
typedef struct kbts__feature kbts__feature;
|
|
typedef struct kbts__head kbts__head;
|
|
typedef struct kbts__langsys kbts__langsys;
|
|
typedef struct kbts_shape_config kbts_shape_config;
|
|
typedef struct kbts_glyph kbts_glyph;
|
|
typedef struct kbts_glyph_config kbts_glyph_config;
|
|
typedef struct kbts_shape_context kbts_shape_context;
|
|
typedef struct kbts_glyph_storage kbts_glyph_storage;
|
|
typedef struct kbts_shape_scratchpad kbts_shape_scratchpad;
|
|
|
|
typedef struct kbts_allocator_op_allocate
|
|
{
|
|
void *Pointer;
|
|
kbts_u32 Size;
|
|
} kbts_allocator_op_allocate;
|
|
|
|
typedef struct kbts_allocator_op_free
|
|
{
|
|
void *Pointer;
|
|
} kbts_allocator_op_free;
|
|
|
|
typedef struct kbts_allocator_op
|
|
{
|
|
kbts_allocator_op_kind Kind;
|
|
|
|
union
|
|
{
|
|
kbts_allocator_op_allocate Allocate;
|
|
kbts_allocator_op_free Free;
|
|
};
|
|
} kbts_allocator_op;
|
|
|
|
typedef void kbts_allocator_function(void *Data, kbts_allocator_op *Op);
|
|
|
|
typedef struct kbts_blob_table
|
|
{
|
|
kbts_u32 OffsetFromStartOfFile;
|
|
kbts_u32 Length;
|
|
} kbts_blob_table;
|
|
|
|
typedef struct kbts_load_font_state
|
|
{
|
|
void *FontData;
|
|
kbts_u32 FontDataSize;
|
|
|
|
kbts_blob_table Tables[KBTS_BLOB_TABLE_ID_COUNT];
|
|
kbts_u32 LookupCount;
|
|
kbts_u32 LookupSubtableCount;
|
|
kbts_u32 GlyphCount;
|
|
kbts_u32 ScratchSize;
|
|
|
|
kbts_u32 GlyphLookupMatrixSizeInBytes;
|
|
kbts_u32 GlyphLookupSubtableMatrixSizeInBytes;
|
|
kbts_u32 TotalSize;
|
|
} kbts_load_font_state;
|
|
|
|
typedef struct kbts_blob_header
|
|
{
|
|
kbts_u32 Magic;
|
|
kbts_u32 Version;
|
|
|
|
kbts_u32 LookupCount;
|
|
kbts_u32 LookupSubtableCount;
|
|
kbts_u32 GlyphCount;
|
|
|
|
kbts_u32 GposLookupIndexOffset;
|
|
|
|
kbts_u32 GlyphLookupMatrixOffsetFromStartOfFile;
|
|
kbts_u32 GlyphLookupSubtableMatrixOffsetFromStartOfFile;
|
|
kbts_u32 LookupSubtableIndexOffsetsOffsetFromStartOfFile;
|
|
kbts_u32 SubtableInfosOffsetFromStartOfFile;
|
|
|
|
kbts_blob_table Tables[KBTS_BLOB_TABLE_ID_COUNT];
|
|
} kbts_blob_header;
|
|
|
|
typedef struct kbts_font
|
|
{
|
|
kbts_allocator_function *Allocator;
|
|
void *AllocatorData;
|
|
|
|
kbts_blob_header *Blob;
|
|
kbts_u16 *Cmap;
|
|
kbts__cmap_14 *Cmap14;
|
|
|
|
kbts__gsub_gpos *ShapingTables[KBTS_SHAPING_TABLE_COUNT];
|
|
|
|
void *UserData;
|
|
|
|
kbts_load_font_error Error;
|
|
} kbts_font;
|
|
|
|
typedef struct kbts_font_info
|
|
{
|
|
char *Strings[KBTS_FONT_INFO_STRING_ID_COUNT0];
|
|
kbts_u16 StringLengths[KBTS_FONT_INFO_STRING_ID_COUNT0];
|
|
|
|
kbts_font_style_flags StyleFlags;
|
|
kbts_font_weight Weight;
|
|
kbts_font_width Width;
|
|
} kbts_font_info;
|
|
|
|
typedef struct kbts_font_info2
|
|
{
|
|
kbts_u32 Size;
|
|
|
|
char *Strings[KBTS_FONT_INFO_STRING_ID_COUNT0];
|
|
kbts_u16 StringLengths[KBTS_FONT_INFO_STRING_ID_COUNT0];
|
|
|
|
kbts_font_style_flags StyleFlags;
|
|
kbts_font_weight Weight;
|
|
kbts_font_width Width;
|
|
} kbts_font_info2;
|
|
|
|
typedef struct kbts_font_info2_1
|
|
{
|
|
kbts_font_info2 Base;
|
|
|
|
kbts_u16 UnitsPerEm;
|
|
|
|
kbts_s16 XMin;
|
|
kbts_s16 YMin;
|
|
kbts_s16 XMax;
|
|
kbts_s16 YMax;
|
|
|
|
kbts_s16 Ascent;
|
|
kbts_s16 Descent;
|
|
kbts_s16 LineGap;
|
|
} kbts_font_info2_1;
|
|
|
|
typedef struct kbts_font_info2_2
|
|
{
|
|
kbts_font_info2 Base;
|
|
|
|
// _1
|
|
kbts_u16 UnitsPerEm;
|
|
|
|
kbts_s16 XMin;
|
|
kbts_s16 YMin;
|
|
kbts_s16 XMax;
|
|
kbts_s16 YMax;
|
|
|
|
kbts_s16 Ascent;
|
|
kbts_s16 Descent;
|
|
kbts_s16 LineGap;
|
|
|
|
// _2
|
|
|
|
// For now, this is just OS2.sCapHeight.
|
|
// If/when this is zero, we might consider trying to communicate a useful height instead of simply passing the zero along.
|
|
kbts_s16 CapitalHeight;
|
|
} kbts_font_info2_2;
|
|
|
|
typedef struct kbts_feature_override
|
|
{
|
|
kbts_feature_tag Tag;
|
|
int Value;
|
|
} kbts_feature_override;
|
|
|
|
typedef struct kbts_variation
|
|
{
|
|
kbts_u32 Tag;
|
|
float Value;
|
|
} kbts_variation;
|
|
|
|
typedef struct kbts_break
|
|
{
|
|
// The break code mostly works in relative positions, but we convert to absolute positions for the user.
|
|
// That way, breaks can be trivially stored and compared and such and it just works.
|
|
int Position;
|
|
kbts_break_flags Flags;
|
|
kbts_direction Direction; // Only valid if (Flags & KBTS_BREAK_FLAG_DIRECTION).
|
|
kbts_direction ParagraphDirection; // Only valid if (Flags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION).
|
|
kbts_script Script; // Only valid if (Flags & KBTS_BREAK_FLAG_SCRIPT).
|
|
} kbts_break;
|
|
|
|
typedef struct kbts_bracket
|
|
{
|
|
kbts_u32 Codepoint;
|
|
kbts_u32 Position;
|
|
kbts_u8 Direction;
|
|
kbts_u8 Script;
|
|
} kbts_bracket;
|
|
|
|
// In the worst case, a single call to BreakAddCodepoint would generate 4 breaks.
|
|
// We buffer breaks to reorder them before returning them to the user.
|
|
// This potentially requires infinite memory, which we don't have, so you may want to tweak this constant,
|
|
// although, really, if the defaults don't work, then you have likely found very strange/adversarial text.
|
|
typedef struct kbts_break_state
|
|
{
|
|
kbts_break Breaks[8];
|
|
kbts_u32 BreakCount;
|
|
|
|
kbts_direction ParagraphDirection;
|
|
kbts_direction UserParagraphDirection;
|
|
|
|
kbts_u32 CurrentPosition;
|
|
kbts_u32 ParagraphStartPosition;
|
|
|
|
kbts_u32 LastScriptBreakPosition;
|
|
kbts_u32 LastDirectionBreakPosition;
|
|
kbts_u8 LastScriptBreakScript;
|
|
kbts_u8 LastDirectionBreakDirection;
|
|
|
|
kbts_s16 ScriptPositionOffset;
|
|
kbts_u32 ScriptCount;
|
|
kbts_u8 ScriptSet[KBTS_MAXIMUM_CODEPOINT_SCRIPTS];
|
|
|
|
kbts_bracket Brackets[64];
|
|
kbts_u32 BracketCount;
|
|
kbts_break_state_flags Flags;
|
|
|
|
kbts_u32 FlagState; // u8(kbts_break_flags)x4
|
|
kbts_s16 PositionOffset2;
|
|
kbts_s16 PositionOffset3;
|
|
|
|
kbts_u32 WordBreakHistory; // u8x4
|
|
kbts_u16 WordBreaks; // u4x4
|
|
kbts_u16 WordUnbreaks; // u4x4
|
|
kbts_s16 WordBreak2PositionOffset;
|
|
|
|
kbts_u64 LineBreaks; // u16x4
|
|
// Instead of staying synchronized with LineBreaks/LineUnbreaks,
|
|
// this advances every character always.
|
|
// (This is only needed because ZWJ can create an unbreak while simultaneously being ignored.)
|
|
kbts_u64 LineUnbreaksAsync; // u16x4
|
|
kbts_u64 LineUnbreaks; // u16x4
|
|
kbts_u32 LineBreakHistory; // u8(line_break_class)x4
|
|
kbts_s16 LineBreak2PositionOffset;
|
|
kbts_s16 LineBreak3PositionOffset;
|
|
|
|
kbts_u8 LastDirection;
|
|
kbts_u8 BidirectionalClass2;
|
|
kbts_u8 BidirectionalClass1;
|
|
kbts_s16 Bidirectional1PositionOffset;
|
|
kbts_s16 Bidirectional2PositionOffset; // Unused
|
|
|
|
kbts_japanese_line_break_style JapaneseLineBreakStyle;
|
|
kbts_break_config_flags ConfigFlags;
|
|
kbts_u8 GraphemeBreakState;
|
|
kbts_u8 LastLineBreakClass;
|
|
kbts_u8 LastWordBreakClass;
|
|
kbts_u8 LastWordBreakClassIncludingIgnored;
|
|
} kbts_break_state;
|
|
|
|
typedef struct kbts_decode
|
|
{
|
|
int Codepoint;
|
|
|
|
int SourceCharactersConsumed;
|
|
int Valid;
|
|
} kbts_decode;
|
|
|
|
typedef struct kbts_encode_utf8
|
|
{
|
|
char Encoded[4];
|
|
int EncodedLength;
|
|
int Valid;
|
|
} kbts_encode_utf8;
|
|
|
|
typedef struct kbts_glyph_classes
|
|
{
|
|
kbts_u16 Class;
|
|
kbts_u16 MarkAttachmentClass;
|
|
} kbts_glyph_classes;
|
|
|
|
typedef struct kbts__bucketed_glyph kbts__bucketed_glyph;
|
|
struct kbts_glyph
|
|
{
|
|
kbts_glyph *Prev;
|
|
kbts_glyph *Next;
|
|
|
|
kbts_u32 Codepoint;
|
|
kbts_u16 Id; // Glyph index. This is what you want to use to query outline data.
|
|
kbts_u16 Uid;
|
|
|
|
// This field is kept and returned as-is throughout the shaping process.
|
|
// When you are using the context API, it contains a codepoint index always!
|
|
// To get the original user ID with the context API, you need to get the corresponding kbts_shape_codepoint
|
|
// with kbts_ShapeGetShapeCodepoint(Context, Glyph->UserIdOrCodepointIndex, ...);
|
|
int UserIdOrCodepointIndex;
|
|
|
|
// Used by GPOS
|
|
kbts_s32 OffsetX;
|
|
kbts_s32 OffsetY;
|
|
kbts_s32 AdvanceX;
|
|
kbts_s32 AdvanceY;
|
|
|
|
// Earlier on, we used to assume that, if a glyph had no advance, or had the MARK glyph class, then
|
|
// it could be handled as a mark in layout operations. This is inaccurate.
|
|
// Unicode makes a distinction between attached marks and standalone marks. For our purposes, attached
|
|
// marks are marks that have found a valid base character to attach to. In practice, this means that the
|
|
// font contains a valid display position/configuration for it in the current context.
|
|
// In contrast, standalone marks are marks that aren't attached to anything. Fonts may still have glyphs
|
|
// for them, in which case we want to display those just like regular glyphs that take up horizontal space
|
|
// on the line. When fonts don't have glyphs for them, they simply stay around as zero-width glyphs.
|
|
// Standalone marks have notably different behavior compared to attached marks, and so, once we start
|
|
// applying positioning features, it becomes worthwhile to track exactly which glyph has attached to which.
|
|
struct kbts_glyph *AttachGlyph; // Set by GPOS attachments.
|
|
|
|
kbts_glyph_config *Config;
|
|
|
|
kbts_glyph_classes Classes;
|
|
|
|
kbts_glyph_flags Flags;
|
|
|
|
kbts_u32 ParentInfo;
|
|
|
|
kbts__bucketed_glyph *Bucketed;
|
|
kbts_u32 SortKey;
|
|
kbts_u32 SortKeyInterval;
|
|
kbts_u16 BucketedBucketIndex;
|
|
|
|
// This is set by GSUB and used by GPOS.
|
|
// A 0-index means that we should attach to the last component in the ligature.
|
|
//
|
|
// From the Microsoft docs:
|
|
// To correctly access the subtables, the client must keep track of the component associated with the mark.
|
|
//
|
|
// For a given mark assigned to a particular class, the appropriate base attachment point is determined by which
|
|
// ligature component the mark is associated with. This is dependent on the original character string and subsequent
|
|
// character- or glyph-sequence processing, not the font data alone. While a text-layout client is performing any
|
|
// character-based preprocessing or any glyph-substitution operations using the GSUB table, the text-layout client
|
|
// must keep track of associations of marks to particular ligature-glyph components.
|
|
kbts_u16 LigatureUid;
|
|
kbts_u16 LigatureComponentIndexPlusOne;
|
|
kbts_u16 LigatureComponentCount;
|
|
|
|
// Set in GSUB and used in GPOS, for STCH.
|
|
kbts_joining_feature JoiningFeature;
|
|
|
|
// Unicode properties filled in by CodepointToGlyph.
|
|
kbts_unicode_joining_type JoiningType;
|
|
kbts_u8 UnicodeFlags;
|
|
kbts_u8 SyllabicClass;
|
|
kbts_u8 SyllabicPosition;
|
|
kbts_u8 UseClass;
|
|
kbts_u8 CombiningClass;
|
|
|
|
kbts_u8 MarkOrdering; // Only used temporarily in NORMALIZE for Arabic mark reordering.
|
|
};
|
|
|
|
typedef struct kbts_shape_codepoint
|
|
{
|
|
kbts_font *Font; // Only set when (BreakFlags & KBTS_BREAK_FLAG_GRAPHEME) != 0.
|
|
|
|
kbts_feature_override *FeatureOverrides;
|
|
int FeatureOverrideCount;
|
|
|
|
int Codepoint;
|
|
int UserId;
|
|
|
|
kbts_break_flags BreakFlags;
|
|
kbts_script Script; // Only set when (BreakFlags & KBTS_BREAK_FLAG_SCRIPT) != 0.
|
|
kbts_direction Direction; // Only set when (BreakFlags & KBTS_BREAK_FLAG_DIRECTION) != 0.
|
|
kbts_direction ParagraphDirection; // Only set when (BreakFlags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION) != 0.
|
|
} kbts_shape_codepoint;
|
|
|
|
typedef struct kbts_shape_codepoint2
|
|
{
|
|
int Size;
|
|
int Padding0;
|
|
|
|
kbts_font *Font; // Only set when (BreakFlags & KBTS_BREAK_FLAG_GRAPHEME) != 0.
|
|
float *VariationVector; // Only set when (BreakFlags & KBTS_BREAK_FLAG_GRAPHEME) != 0.
|
|
|
|
kbts_feature_override *FeatureOverrides;
|
|
int FeatureOverrideCount;
|
|
|
|
int Codepoint;
|
|
int UserId;
|
|
|
|
kbts_break_flags BreakFlags;
|
|
kbts_script Script; // Only set when (BreakFlags & KBTS_BREAK_FLAG_SCRIPT) != 0.
|
|
kbts_direction Direction; // Only set when (BreakFlags & KBTS_BREAK_FLAG_DIRECTION) != 0.
|
|
kbts_direction ParagraphDirection; // Only set when (BreakFlags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION) != 0.
|
|
} kbts_shape_codepoint2;
|
|
|
|
typedef struct kbts__shape_codepoint kbts__shape_codepoint;
|
|
typedef struct kbts_shape_codepoint_iterator
|
|
{
|
|
kbts__shape_codepoint *Codepoint;
|
|
kbts_shape_context *Context;
|
|
|
|
kbts_u32 EndBlockIndex;
|
|
kbts_u32 OnePastLastCodepointIndex;
|
|
kbts_u32 BlockIndex;
|
|
kbts_u32 CodepointIndex;
|
|
kbts_u32 CurrentBlockCodepointCount;
|
|
kbts_u32 FlatCodepointIndex;
|
|
} kbts_shape_codepoint_iterator;
|
|
|
|
typedef struct kbts_glyph_iterator
|
|
{
|
|
kbts_glyph_storage *GlyphStorage;
|
|
kbts_glyph *CurrentGlyph;
|
|
|
|
int LastAdvanceX;
|
|
int X;
|
|
int Y;
|
|
} kbts_glyph_iterator;
|
|
|
|
typedef struct kbts_arena_block_header
|
|
{
|
|
struct kbts_arena_block_header *Prev;
|
|
struct kbts_arena_block_header *Next;
|
|
} kbts_arena_block_header;
|
|
|
|
typedef struct kbts_arena
|
|
{
|
|
kbts_allocator_function *Allocator;
|
|
void *AllocatorData;
|
|
|
|
kbts_arena_block_header BlockSentinel;
|
|
kbts_arena_block_header FreeBlockSentinel;
|
|
|
|
int Error;
|
|
} kbts_arena;
|
|
|
|
struct kbts_glyph_storage
|
|
{
|
|
kbts_arena Arena;
|
|
|
|
kbts_glyph GlyphSentinel;
|
|
kbts_glyph FreeGlyphSentinel;
|
|
|
|
int Error;
|
|
};
|
|
|
|
typedef struct kbts_glyph_parent
|
|
{
|
|
kbts_u32 Codepoint;
|
|
kbts_u32 Codepoint1;
|
|
} kbts_glyph_parent;
|
|
|
|
typedef struct kbts_font_coverage_test
|
|
{
|
|
kbts_font *Font;
|
|
kbts_u32 BaseCodepoint;
|
|
|
|
int CurrentBaseError;
|
|
int Error;
|
|
|
|
kbts_glyph_parent BaseParents[KBTS_MAXIMUM_RECOMPOSITION_PARENTS];
|
|
kbts_u32 BaseParentCount;
|
|
} kbts_font_coverage_test;
|
|
|
|
typedef struct kbts_run
|
|
{
|
|
kbts_font *Font;
|
|
kbts_script Script;
|
|
kbts_direction ParagraphDirection;
|
|
kbts_direction Direction;
|
|
kbts_break_flags Flags;
|
|
|
|
kbts_glyph_iterator Glyphs;
|
|
} kbts_run;
|
|
|
|
typedef struct kbts_run2
|
|
{
|
|
// kbts_run:
|
|
kbts_font *Font;
|
|
kbts_script Script;
|
|
kbts_direction ParagraphDirection;
|
|
kbts_direction Direction;
|
|
kbts_break_flags Flags;
|
|
|
|
kbts_glyph_iterator Glyphs;
|
|
|
|
// New fields:
|
|
float *VariationVector;
|
|
} kbts_run2;
|
|
|
|
typedef struct kbts_uid
|
|
{
|
|
kbts_u32 Data[4];
|
|
} kbts_uid;
|
|
|
|
typedef struct kbts_variation_axis_info
|
|
{
|
|
kbts_u32 Tag;
|
|
float MinimumValue;
|
|
float DefaultValue;
|
|
float MaximumValue;
|
|
kbts_variation_axis_flags Flags;
|
|
kbts_u16 NameStringId;
|
|
} kbts_variation_axis_info;
|
|
|
|
typedef struct kbts_variation_instance_info
|
|
{
|
|
kbts_u16 SubfamilyNameStringId;
|
|
kbts_u16 PostscriptNameStringId;
|
|
kbts_variation_instance_flags Flags;
|
|
} kbts_variation_instance_info;
|
|
|
|
//
|
|
// Context API
|
|
// The context can do everything for you. It is pretty convenient!
|
|
//
|
|
|
|
KBTS_EXPORT int kbts_SizeOfShapeContext(void);
|
|
KBTS_EXPORT kbts_shape_context *kbts_PlaceShapeContext2(kbts_allocator_function *Allocator, void *AllocatorData, void *Memory, kbts_shape_context_flags Flags);
|
|
KBTS_EXPORT kbts_shape_context *kbts_PlaceShapeContext(kbts_allocator_function *Allocator, void *AllocatorData, void *Memory);
|
|
KBTS_EXPORT kbts_shape_context *kbts_PlaceShapeContextFixedMemory2(void *Memory, int Size, kbts_shape_context_flags Flags);
|
|
KBTS_EXPORT kbts_shape_context *kbts_PlaceShapeContextFixedMemory(void *Memory, int Size);
|
|
KBTS_EXPORT kbts_shape_context *kbts_CreateShapeContext2(kbts_allocator_function *Allocator, void *AllocatorData, kbts_shape_context_flags Flags);
|
|
KBTS_EXPORT kbts_shape_context *kbts_CreateShapeContext(kbts_allocator_function *Allocator, void *AllocatorData);
|
|
KBTS_EXPORT void kbts_DestroyShapeContext(kbts_shape_context *Context);
|
|
#ifndef KB_TEXT_SHAPE_NO_CRT
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFontFromFile2(kbts_shape_context *Context, const char *FileName, int FontIndex, kbts_variation *Variations, int VariationCount, kbts_u32 *ContextFontHandle);
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFontFromFile(kbts_shape_context *Context, const char *FileName, int FontIndex);
|
|
#endif
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFontFromMemory2(kbts_shape_context *Context, void *Memory, int Size, int FontIndex, kbts_variation *Variations, int VariationCount, kbts_u32 *ContextFontHandle);
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFontFromMemory(kbts_shape_context *Context, void *Memory, int Size, int FontIndex);
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFont2(kbts_shape_context *Context, kbts_font *Font, kbts_variation *Variations, int VariationCount, kbts_u32 *ContextFontHandle);
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFont(kbts_shape_context *Context, kbts_font *Font);
|
|
KBTS_EXPORT kbts_font *kbts_ShapePopFont(kbts_shape_context *Context);
|
|
KBTS_EXPORT void kbts_ShapeBegin(kbts_shape_context *Context, kbts_direction ParagraphDirection, kbts_language Language);
|
|
KBTS_EXPORT void kbts_ShapeEnd(kbts_shape_context *Context);
|
|
KBTS_EXPORT int kbts_ShapeRun(kbts_shape_context *Context, kbts_run *Run);
|
|
KBTS_EXPORT void kbts_ShapePushFeature(kbts_shape_context *Context, kbts_u32 FeatureTag, int Value);
|
|
KBTS_EXPORT int kbts_ShapePopFeature(kbts_shape_context *Context, kbts_u32 FeatureTag);
|
|
KBTS_EXPORT void kbts_ShapeCodepoint(kbts_shape_context *Context, int Codepoint);
|
|
KBTS_EXPORT void kbts_ShapeCodepointWithUserId(kbts_shape_context *Context, int Codepoint, int UserId);
|
|
KBTS_EXPORT void kbts_ShapeUtf32(kbts_shape_context *Context, int *Utf32, int Length);
|
|
KBTS_EXPORT void kbts_ShapeUtf32WithUserId(kbts_shape_context *Context, int *Utf32, int Length, int UserId, int UserIdIncrement);
|
|
KBTS_EXPORT void kbts_ShapeUtf8(kbts_shape_context *Context, const char *Utf8, int Length, kbts_user_id_generation_mode UserIdGenerationMode);
|
|
KBTS_EXPORT void kbts_ShapeUtf8WithUserId(kbts_shape_context *Context, const char *Utf8, int Length, int UserId, kbts_user_id_generation_mode UserIdGenerationMode);
|
|
KBTS_EXPORT kbts_shape_error kbts_ShapeError(kbts_shape_context *Context);
|
|
KBTS_EXPORT void kbts_ShapeBeginManualRuns(kbts_shape_context *Context);
|
|
KBTS_EXPORT void kbts_ShapeNextManualRun(kbts_shape_context *Context, kbts_direction Direction, kbts_script Script);
|
|
KBTS_EXPORT void kbts_ShapeEndManualRuns(kbts_shape_context *Context);
|
|
KBTS_EXPORT void kbts_ShapeManualBreak(kbts_shape_context *Context);
|
|
KBTS_EXPORT kbts_shape_codepoint_iterator kbts_ShapeCurrentCodepointsIterator(kbts_shape_context *Context);
|
|
KBTS_EXPORT int kbts_ShapeCodepointIteratorIsValid(kbts_shape_codepoint_iterator *It);
|
|
KBTS_EXPORT int kbts_ShapeCodepointIteratorNext2(kbts_shape_codepoint_iterator *It, kbts_shape_codepoint2 *Codepoint, int *CodepointIndex);
|
|
KBTS_EXPORT int kbts_ShapeCodepointIteratorNext(kbts_shape_codepoint_iterator *It, kbts_shape_codepoint *Codepoint, int *CodepointIndex);
|
|
KBTS_EXPORT int kbts_ShapeGetShapeCodepoint2(kbts_shape_context *Context, int CodepointIndex, kbts_shape_codepoint2 *Codepoint);
|
|
KBTS_EXPORT int kbts_ShapeGetShapeCodepoint(kbts_shape_context *Context, int CodepointIndex, kbts_shape_codepoint *Codepoint);
|
|
KBTS_EXPORT int kbts_ShapeSetFontVariationVector(kbts_shape_context *Context, kbts_u32 ContextFontHandle, float *VariationVector);
|
|
KBTS_EXPORT int kbts_ShapeSetFontVariation(kbts_shape_context *Context, kbts_u32 ContextFontHandle, kbts_u32 Tag, float Value);
|
|
KBTS_EXPORT int kbts_ShapePushGlobalVariation(kbts_shape_context *Context, kbts_u32 Tag, float Value);
|
|
KBTS_EXPORT int kbts_ShapePopGlobalVariation(kbts_shape_context *Context, kbts_u32 Tag);
|
|
|
|
|
|
//
|
|
// Direct API
|
|
//
|
|
|
|
KBTS_EXPORT kbts_shape_error kbts_ShapeDirect2(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage, kbts_direction RunDirection, kbts_s16 *VariationVectorNormalized, kbts_glyph_iterator *Output);
|
|
KBTS_EXPORT kbts_shape_error kbts_ShapeDirect(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage, kbts_direction RunDirection, kbts_glyph_iterator *Output);
|
|
|
|
// A font holds all data that corresponds to a given font file.
|
|
#ifndef KB_TEXT_SHAPE_NO_CRT
|
|
KBTS_EXPORT kbts_font kbts_FontFromFile(const char *FileName, int FontIndex, kbts_allocator_function *Allocator, void *AllocatorData, void **FileData, int *FileSize);
|
|
#endif
|
|
KBTS_EXPORT int kbts_FontCount(void *FileData, int FileSize);
|
|
KBTS_EXPORT kbts_font kbts_FontFromMemory(void *FileData, int FileSize, int FontIndex, kbts_allocator_function *Allocator, void *AllocatorData);
|
|
KBTS_EXPORT void kbts_FreeFont(kbts_font *Font);
|
|
KBTS_EXPORT int kbts_FontIsValid(kbts_font *Font);
|
|
KBTS_EXPORT kbts_load_font_error kbts_LoadFont(kbts_font *Font, kbts_load_font_state *State, void *FontData, int FontDataSize, int FontIndex, int *ScratchSize_, int *OutputSize_);
|
|
KBTS_EXPORT kbts_load_font_error kbts_PlaceBlob(kbts_font *Font, kbts_load_font_state *State, void *ScratchMemory, void *OutputMemory);
|
|
|
|
// Fetching font information
|
|
KBTS_EXPORT void kbts_GetFontInfo2(kbts_font *Font, kbts_font_info2 *Info);
|
|
KBTS_EXPORT void kbts_GetFontInfo(kbts_font *Font, kbts_font_info *Info);
|
|
KBTS_EXPORT void kbts_GetVariationInfo(kbts_font *Font, int *AxisCount, int *InstanceCount);
|
|
KBTS_EXPORT void kbts_NormalizeVariationVector(kbts_font *Font, float *VariationVector, kbts_s16 *VariationVectorNormalized);
|
|
KBTS_EXPORT int kbts_WindowsIdsForLanguage(kbts_language Language, kbts_windows_language_id *Ids, int IdCapacity);
|
|
KBTS_EXPORT int kbts_LookupFontString(kbts_font *Font, kbts_font_info_string_id StringId, kbts_windows_language_id LanguageId, char *String, int StringCapacity);
|
|
|
|
// A shape_config is a bag of pre-computed data for a specific shaping setup.
|
|
KBTS_EXPORT int kbts_SizeOfShapeConfig2(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector);
|
|
KBTS_EXPORT int kbts_SizeOfShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language);
|
|
KBTS_EXPORT kbts_shape_config *kbts_PlaceShapeConfig2(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector, void *Memory, kbts_uid *Uid);
|
|
KBTS_EXPORT kbts_shape_config *kbts_PlaceShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language, void *Memory);
|
|
KBTS_EXPORT kbts_shape_config *kbts_CreateShapeConfig2(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector, kbts_allocator_function *Allocator, void *AllocatorData, kbts_uid *Uid);
|
|
KBTS_EXPORT kbts_shape_config *kbts_CreateShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language, kbts_allocator_function *Allocator, void *AllocatorData);
|
|
KBTS_EXPORT void kbts_ShapeConfigUid(kbts_shape_config *Config, kbts_uid *Uid);
|
|
KBTS_EXPORT void kbts_DestroyShapeConfig(kbts_shape_config *Config);
|
|
|
|
// A glyph_storage holds and recycles glyph data.
|
|
KBTS_EXPORT int kbts_InitializeGlyphStorage(kbts_glyph_storage *Storage, kbts_allocator_function *Allocator, void *AllocatorData);
|
|
KBTS_EXPORT int kbts_InitializeGlyphStorageFixedMemory(kbts_glyph_storage *Storage, void *Memory, int MemorySize);
|
|
KBTS_EXPORT kbts_glyph *kbts_PushGlyph(kbts_glyph_storage *Storage, kbts_font *Font, int Codepoint, kbts_glyph_config *Config, int UserId);
|
|
KBTS_EXPORT void kbts_ClearActiveGlyphs(kbts_glyph_storage *Storage);
|
|
KBTS_EXPORT void kbts_FreeAllGlyphs(kbts_glyph_storage *Storage);
|
|
KBTS_EXPORT kbts_glyph kbts_CodepointToGlyph(kbts_font *Font, int Codepoint, kbts_glyph_config *Config, int UserId);
|
|
KBTS_EXPORT int kbts_CodepointToGlyphId(kbts_font *Font, int Codepoint);
|
|
KBTS_EXPORT kbts_glyph_iterator kbts_ActiveGlyphIterator(kbts_glyph_storage *Storage);
|
|
|
|
// A glyph_config specifies glyph-specific shaping parameters.
|
|
// A single glyph_config can be shared by multiple glyphs.
|
|
KBTS_EXPORT int kbts_SizeOfGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount);
|
|
KBTS_EXPORT kbts_glyph_config *kbts_PlaceGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount, void *Memory);
|
|
KBTS_EXPORT kbts_glyph_config *kbts_CreateGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount, kbts_allocator_function *Allocator, void *AllocatorData);
|
|
KBTS_EXPORT void kbts_DestroyGlyphConfig(kbts_glyph_config *Config);
|
|
|
|
// A shape_scratchpad holds all transient runtime shaping data.
|
|
// While the shape_config is immutable and can be trivially shared among threads, a
|
|
// shape_scratchpad is mutable and needs to be per-thread.
|
|
KBTS_EXPORT kbts_un kbts_SizeOfShapeScratchpad(kbts_shape_config *Config);
|
|
KBTS_EXPORT kbts_shape_scratchpad *kbts_PlaceShapeScratchpad(kbts_shape_config *Config, void *Memory, kbts_allocator_function *Allocator, void *AllocatorData);
|
|
KBTS_EXPORT kbts_shape_scratchpad *kbts_PlaceShapeScratchpadFixedMemory(kbts_shape_config *Config, void *Memory, int Size);
|
|
KBTS_EXPORT kbts_shape_scratchpad *kbts_CreateShapeScratchpad(kbts_shape_config *Config, kbts_allocator_function *Allocator, void *AllocatorData);
|
|
KBTS_EXPORT void kbts_DestroyShapeScratchpad(kbts_shape_scratchpad *Scratchpad);
|
|
|
|
//
|
|
// Glyph iterator
|
|
//
|
|
|
|
KBTS_EXPORT int kbts_GlyphIteratorNext(kbts_glyph_iterator *It, kbts_glyph **Glyph);
|
|
KBTS_EXPORT int kbts_GlyphIteratorIsValid(kbts_glyph_iterator *It);
|
|
|
|
//
|
|
// Segmentation
|
|
//
|
|
|
|
// This is a quick guess that stops at the first glyph that has a strong script/direction associated to it.
|
|
// It is convenient, but only works if you are sure your input text is mono-script and mono-direction.
|
|
KBTS_EXPORT void kbts_GuessTextProperties(void *Text, int TextSizeInBytes, kbts_text_format Format, kbts_direction *Direction, kbts_script *Script);
|
|
KBTS_EXPORT void kbts_GuessTextPropertiesUtf32(const int *Utf32, int Utf32Count, kbts_direction *Direction, kbts_script *Script);
|
|
KBTS_EXPORT void kbts_GuessTextPropertiesUtf8(const char *Utf8, int Utf8Length, kbts_direction *Direction, kbts_script *Script);
|
|
|
|
KBTS_EXPORT void kbts_BreakBegin(kbts_break_state *State, kbts_direction ParagraphDirection, kbts_japanese_line_break_style JapaneseLineBreakStyle, kbts_break_config_flags ConfigFlags);
|
|
KBTS_EXPORT void kbts_BreakAddCodepoint(kbts_break_state *State, int Codepoint, int PositionIncrement, int EndOfText);
|
|
KBTS_EXPORT void kbts_BreakEnd(kbts_break_state *State);
|
|
KBTS_EXPORT int kbts_Break(kbts_break_state *State, kbts_break *Break);
|
|
KBTS_EXPORT void kbts_BreakEntireString(kbts_direction Direction, kbts_japanese_line_break_style JapaneseLineBreakStyle, kbts_break_config_flags ConfigFlags, const void *Input, int InputSizeInBytes, kbts_text_format InputFormat, kbts_break *Breaks, int BreakCapacity, int *BreakCount, kbts_break_flags *BreakFlags, int BreakFlagCapacity, int *BreakFlagCount);
|
|
KBTS_EXPORT void kbts_BreakEntireStringUtf32(kbts_direction Direction, kbts_japanese_line_break_style JapaneseLineBreakStyle, kbts_break_config_flags ConfigFlags, const int *Utf32, int Utf32Count, kbts_break *Breaks, int BreakCapacity, int *BreakCount, kbts_break_flags *BreakFlags, int BreakFlagCapacity, int *BreakFlagCount);
|
|
KBTS_EXPORT void kbts_BreakEntireStringUtf8(kbts_direction Direction, kbts_japanese_line_break_style JapaneseLineBreakStyle, kbts_break_config_flags ConfigFlags, const char *Utf8, int Utf8Length, kbts_break *Breaks, int BreakCapacity, int *BreakCount, kbts_break_flags *BreakFlags, int BreakFlagCapacity, int *BreakFlagCount);
|
|
|
|
//
|
|
// Other stuff
|
|
//
|
|
|
|
// Quick test for font support of a sequence of codepoints.
|
|
KBTS_EXPORT void kbts_FontCoverageTestBegin(kbts_font_coverage_test *Test, kbts_font *Font);
|
|
KBTS_EXPORT void kbts_FontCoverageTestCodepoint(kbts_font_coverage_test *Test, int Codepoint);
|
|
KBTS_EXPORT int kbts_FontCoverageTestEnd(kbts_font_coverage_test *Test);
|
|
|
|
KBTS_EXPORT kbts_decode kbts_DecodeUtf8(const char *Utf8, kbts_un Length);
|
|
KBTS_EXPORT kbts_decode kbts_DecodeUtf16(const kbts_u16 *Utf16, kbts_un Length, kbts_decode_utf16_flags Flags);
|
|
KBTS_EXPORT kbts_encode_utf8 kbts_EncodeUtf8(int Codepoint);
|
|
KBTS_EXPORT kbts_direction kbts_ScriptDirection(kbts_script Script);
|
|
KBTS_EXPORT int kbts_ScriptIsComplex(kbts_script Script);
|
|
KBTS_EXPORT kbts_script kbts_ScriptTagToScript(kbts_script_tag Tag);
|
|
|
|
#endif
|
|
|
|
#ifdef KB_TEXT_SHAPE_IMPLEMENTATION
|
|
#ifdef _MSC_VER
|
|
#define KBTS__UNUSED(X) (void)sizeof((X))
|
|
#define KBTS__RESTRICT __restrict
|
|
#else
|
|
#define KBTS__UNUSED(X) (void)(X)
|
|
#define KBTS__RESTRICT __restrict__
|
|
#endif
|
|
#define KBTS__FOR(I, Start, End) for(kbts_un I = (Start); I < (End); ++I)
|
|
#ifdef __cplusplus
|
|
# define KBTS__ZERO {}
|
|
#else
|
|
# define KBTS__ZERO {0}
|
|
#endif
|
|
#define KBTS__ZERO_TYPE(X) KBTS_MEMSET((X), 0, sizeof(*(X)))
|
|
#define KBTS__MAX(A, B) (((A) < (B)) ? (B) : (A))
|
|
#define KBTS__MIN(A, B) (((A) < (B)) ? (A) : (B))
|
|
#define KBTS__IDIV_ROUND_UP(A, B) (((A) + ((B) - 1)) / (B))
|
|
#define KBTS__ROUND_UP_POW2(A, B) (((A) + ((B) - 1)) & ~((B) - 1))
|
|
#define KBTS__ARRAY_LENGTH(A) (sizeof(A)/sizeof(*(A)))
|
|
#define KBTS__POINTER_AFTER(Type, X) ((Type *)((X) + 1))
|
|
#define KBTS__POINTER_OFFSET(Type, Base, Offset) ((Type *)((char *)(Base) + (Offset)))
|
|
#define KBTS__POINTER_DIFF32(Pointer, Base) ((kbts_u32)((kbts_uptr)(Pointer) - (kbts_uptr)(Base)))
|
|
#define KBTS__POINTER_DIFF(Pointer, Base) ((kbts_un)((kbts_uptr)(Pointer) - (kbts_uptr)(Base)))
|
|
#define KBTS__ALIGN_POINTER(Type, Pointer, Align) (Type *)(((kbts_un)(Pointer) + ((Align) - 1)) & ~((Align) - 1))
|
|
#define KBTS__PASTE_1(A, B) A##B
|
|
#define KBTS__PASTE_0(A, B) KBTS__PASTE_1(A, B)
|
|
#define KBTS__PASTE(A, B) KBTS__PASTE_0(A, B)
|
|
#define KBTS__IN_SET(X, Set) ((1u << (X)) & (Set))
|
|
#define KBTS__SET32_0(Arg) | (1u << (Arg)) KBTS__SET32_1
|
|
#define KBTS__SET32_1(Arg) | (1u << (Arg)) KBTS__SET32_0
|
|
#define KBTS__SET32_0End
|
|
#define KBTS__SET32_1End
|
|
#define KBTS__SET32(Args) (0u KBTS__PASTE(KBTS__SET32_0 Args, End))
|
|
#define KBTS__IN_SET64(X, Set) ((1ull << (X)) & (Set))
|
|
#define KBTS__SET64_0(Arg) | (1ull << (Arg)) KBTS__SET64_1
|
|
#define KBTS__SET64_1(Arg) | (1ull << (Arg)) KBTS__SET64_0
|
|
#define KBTS__SET64_0End
|
|
#define KBTS__SET64_1End
|
|
#define KBTS__SET64(Args) (0u KBTS__PASTE(KBTS__SET64_0 Args, End))
|
|
#define KBTS__U32BE(X) kbts__ByteSwap32((X))
|
|
#define KBTS__U32LE(X) (X)
|
|
#define KBTS__BIT_WIDTH(Type) (sizeof(Type)*8)
|
|
|
|
#define KBTS__DELETED_SORT_KEY 0xFFFFFFFF
|
|
|
|
#define KBTS__BUCKETED_GLYPHS_PER_BLOCK 64
|
|
#define KBTS_LOOKUP_STACK_SIZE 32
|
|
|
|
#ifndef KBTS_ASSERT
|
|
# ifndef KB_TEXT_SHAPE_NO_CRT
|
|
# include <assert.h>
|
|
# define KBTS_ASSERT(Cond) assert(Cond)
|
|
# else
|
|
# define KBTS_ASSERT(Cond)
|
|
# endif
|
|
#endif
|
|
|
|
#ifndef KB_TEXT_SHAPE_NO_CRT
|
|
#include <stdio.h>
|
|
#endif
|
|
|
|
#ifndef KBTS_MEMSET
|
|
#include <string.h>
|
|
#define KBTS_MEMSET memset
|
|
#endif
|
|
|
|
#ifndef KBTS_MEMCPY
|
|
#include <string.h>
|
|
#define KBTS_MEMCPY memcpy
|
|
#endif
|
|
|
|
#ifndef KBTS_MEMMOVE
|
|
#include <string.h>
|
|
#define KBTS_MEMMOVE memmove
|
|
#endif
|
|
|
|
#ifndef KB_TEXT_SHAPE_NO_CRT
|
|
#ifndef KBTS_MALLOC
|
|
#include <stdlib.h>
|
|
#define KBTS_MALLOC(Data, Size) malloc((Size))
|
|
#define KBTS_FREE(Data, Pointer) free((Pointer))
|
|
#endif
|
|
#else
|
|
#ifndef KBTS_MALLOC
|
|
// Nerf the default allocator to a null allocator.
|
|
#define KBTS_MALLOC(Data, Size) 0
|
|
#define KBTS_FREE(Data, Pointer)
|
|
#endif
|
|
#endif
|
|
|
|
#define KBTS__VARIATION_NORMALIZATION_COMPATIBILITY
|
|
|
|
#ifdef KBTS__VARIATION_NORMALIZATION_COMPATIBILITY
|
|
#define KBTS__ROUND_COMPATIBILITY
|
|
#endif
|
|
|
|
#ifndef kbts__ByteSwap16
|
|
# if defined(_MSC_VER) && !defined(__clang__)
|
|
#include <intrin.h>
|
|
KBTS_INLINE kbts_u16 kbts__ByteSwap16(kbts_u16 X)
|
|
{
|
|
kbts_u16 Result = (kbts_u16)((X >> 8) | (X << 8));
|
|
return Result;
|
|
}
|
|
KBTS_INLINE kbts_u32 kbts__ByteSwap32(kbts_u32 X)
|
|
{
|
|
kbts_u32 Result = (X >> 24) |
|
|
((X & 0xFF0000) >> 8) |
|
|
((X & 0xFF00) << 8) |
|
|
((X & 0xFF) << 24);
|
|
return Result;
|
|
}
|
|
# define kbts__PopCount32(X) (kbts_un)__popcnt(X)
|
|
# elif defined(__clang__) || defined(__GNUC__)
|
|
# define kbts__ByteSwap16(X) __builtin_bswap16(X)
|
|
# define kbts__ByteSwap32(X) __builtin_bswap32(X)
|
|
# define kbts__PopCount32(X) (kbts_un)__builtin_popcount(X)
|
|
# else
|
|
# error Unsupported compiler!
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef _M_IX86_FP
|
|
#if _M_IX86_FP >= 1
|
|
#ifndef KBTS_SSE
|
|
#define KBTS_SSE
|
|
#endif
|
|
|
|
#if _M_IX86_FP >= 2
|
|
#ifndef KBTS_SSE2
|
|
#define KBTS_SSE2
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef __AVX__
|
|
#ifndef KBTS_AVX
|
|
#define KBTS_AVX
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef KBTS_SSE2
|
|
#include <xmmintrin.h>
|
|
#endif
|
|
#ifdef KBTS_AVX
|
|
#include <smmintrin.h>
|
|
#endif
|
|
|
|
#ifndef kbts__Round32
|
|
#if defined(KBTS_SSE2) && !defined(KBTS__ROUND_COMPATIBILITY)
|
|
KBTS_INLINE kbts_s32 kbts__Round32(float X)
|
|
{
|
|
kbts_s32 Result = _mm_cvtss_si32(_mm_set_ss(X));
|
|
return Result;
|
|
}
|
|
#else
|
|
KBTS_INLINE kbts_s32 kbts__Round32(float X)
|
|
{
|
|
int Result = (int)X;
|
|
float ResultF = (float)Result;
|
|
if((ResultF != X) && (X < 0))
|
|
{
|
|
Result -= 1;
|
|
ResultF -= 1;
|
|
}
|
|
|
|
// When the fractional part == 0.5f, round towards +infinity.
|
|
if((X - ResultF) >= 0.5f)
|
|
{
|
|
Result += 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef kbts__Floor32
|
|
#ifdef KBTS_AVX
|
|
KBTS_INLINE kbts_s32 kbts__Floor32(float X)
|
|
{
|
|
kbts_s32 Result = _mm_cvtss_si32(_mm_floor_ps(_mm_set_ss(X)));
|
|
return Result;
|
|
}
|
|
#else
|
|
KBTS_INLINE kbts_s32 kbts__Floor32(float X)
|
|
{
|
|
int Result = (int)X;
|
|
float ResultF = (float)Result;
|
|
if((ResultF != X) && (X < 0))
|
|
{
|
|
Result -= 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef kbts__MsbPositionOrZero32
|
|
# if defined(_MSC_VER) && !defined(__clang__)
|
|
#include <intrin.h>
|
|
KBTS_INLINE kbts_u32 kbts__MsbPositionOrZero32(kbts_u32 X)
|
|
{
|
|
unsigned long Result;
|
|
if(!_BitScanReverse(&Result, X))
|
|
{
|
|
Result = 0;
|
|
}
|
|
return (kbts_u32)Result;
|
|
}
|
|
KBTS_INLINE kbts_u32 kbts__LsbPositionOrBitWidth32(kbts_u32 X)
|
|
{
|
|
unsigned long Result;
|
|
if(!_BitScanForward(&Result, X))
|
|
{
|
|
Result = 32;
|
|
}
|
|
return (kbts_u32)Result;
|
|
}
|
|
# elif defined(__clang__) || defined(__GNUC__)
|
|
KBTS_INLINE kbts_u32 kbts__MsbPositionOrZero32(kbts_u32 X)
|
|
{
|
|
kbts_u32 Result = 0;
|
|
if(X)
|
|
{
|
|
Result = 31 - __builtin_clz(X);
|
|
}
|
|
return Result;
|
|
}
|
|
KBTS_INLINE kbts_u32 kbts__LsbPositionOrBitWidth32(kbts_u32 X)
|
|
{
|
|
kbts_u32 Result = 32;
|
|
if(X)
|
|
{
|
|
Result = __builtin_ctz(X);
|
|
}
|
|
return Result;
|
|
}
|
|
# else
|
|
# error Unsupported compiler!
|
|
# endif
|
|
#endif
|
|
|
|
#define KBTS__FEATURE_FLAG0(Feature) (1ull << KBTS__FEATURE_ID_##Feature)
|
|
#define KBTS__FEATURE_FLAG1(Feature) (1ull << (KBTS__FEATURE_ID_##Feature - 64))
|
|
#define KBTS__FEATURE_FLAG2(Feature) (1ull << (KBTS__FEATURE_ID_##Feature - 128))
|
|
#define KBTS__FEATURE_FLAG3(Feature) (1ull << (KBTS__FEATURE_ID_##Feature - 192))
|
|
|
|
// #define KBTS_SANITY_CHECK
|
|
// #define KBTS_DUMP
|
|
|
|
#ifdef KBTS_DUMP
|
|
#define KBTS_DUMPF(...) printf(__VA_ARGS__), fflush(stdout)
|
|
#else
|
|
#define KBTS_DUMPF(...)
|
|
#endif
|
|
|
|
#ifndef KBTS_INSTRUMENT_BLOCK_BEGIN
|
|
#define KBTS_INSTRUMENT_BLOCK_BEGIN(Name)
|
|
#define KBTS_INSTRUMENT_BLOCK_END(Name)
|
|
#define KBTS_INSTRUMENT_FUNCTION_BEGIN
|
|
#define KBTS_INSTRUMENT_FUNCTION_END
|
|
#endif
|
|
|
|
#define KBTS__GLYPH_FEATURE_MASK ((KBTS_GLYPH_FLAG_CFAR << 1) - 1)
|
|
// In USE, glyphs are mostly not pre-flagged for feature application.
|
|
// However, we do want to flag rphf/pref results for reordering, so we want to
|
|
// keep all of the flags as usual, and only use these feature flags for filtering.
|
|
#define KBTS__USE_GLYPH_FEATURE_MASK (KBTS_GLYPH_FLAG_ISOL | KBTS_GLYPH_FLAG_FINA | KBTS_GLYPH_FLAG_FIN2 | KBTS_GLYPH_FLAG_FIN3 | \
|
|
KBTS_GLYPH_FLAG_MEDI | KBTS_GLYPH_FLAG_MED2 | KBTS_GLYPH_FLAG_INIT | KBTS_GLYPH_FLAG_NUMR | \
|
|
KBTS_GLYPH_FLAG_DNOM | KBTS_GLYPH_FLAG_FRAC)
|
|
#define KBTS__JOINING_FEATURE_MASK (KBTS_GLYPH_FLAG_ISOL | KBTS_GLYPH_FLAG_FINA | KBTS_GLYPH_FLAG_FIN2 | KBTS_GLYPH_FLAG_FIN3 | \
|
|
KBTS_GLYPH_FLAG_MEDI | KBTS_GLYPH_FLAG_MED2 | KBTS_GLYPH_FLAG_INIT)
|
|
#define KBTS__JOINING_FEATURE_TO_GLYPH_FLAG(Feature) (1 << ((Feature) - 1))
|
|
|
|
typedef kbts_u8 kbts__reph_position;
|
|
enum kbts__reph_position_enum
|
|
{
|
|
KBTS__REPH_POSITION_AFTER_POST,
|
|
KBTS__REPH_POSITION_BEFORE_POST,
|
|
KBTS__REPH_POSITION_BEFORE_SUBJOINED,
|
|
KBTS__REPH_POSITION_AFTER_SUBJOINED,
|
|
KBTS__REPH_POSITION_AFTER_MAIN,
|
|
|
|
KBTS__REPH_POSITION_COUNT,
|
|
};
|
|
|
|
typedef kbts_u8 kbts__reph_encoding;
|
|
enum kbts__reph_encoding_enum
|
|
{
|
|
KBTS__REPH_ENCODING_IMPLICIT,
|
|
KBTS__REPH_ENCODING_EXPLICIT,
|
|
KBTS__REPH_ENCODING_LOGICAL_REPHA,
|
|
KBTS__REPH_ENCODING_VISUAL_REPHA,
|
|
|
|
KBTS__REPH_ENCODING_COUNT,
|
|
};
|
|
|
|
typedef kbts_u8 kbts__syllabic_position;
|
|
enum kbts__syllabic_position_enum
|
|
{
|
|
KBTS__SYLLABIC_POSITION_NONE,
|
|
|
|
KBTS__SYLLABIC_POSITION_RA_TO_BECOME_REPH,
|
|
|
|
KBTS__SYLLABIC_POSITION_PREBASE_MATRA,
|
|
KBTS__SYLLABIC_POSITION_PREBASE_CONSONANT,
|
|
|
|
KBTS__SYLLABIC_POSITION_SYLLABLE_BASE,
|
|
KBTS__SYLLABIC_POSITION_AFTER_MAIN,
|
|
|
|
KBTS__SYLLABIC_POSITION_ABOVEBASE_CONSONANT,
|
|
|
|
KBTS__SYLLABIC_POSITION_BEFORE_SUBJOINED,
|
|
KBTS__SYLLABIC_POSITION_BELOWBASE_CONSONANT,
|
|
KBTS__SYLLABIC_POSITION_AFTER_SUBJOINED,
|
|
|
|
KBTS__SYLLABIC_POSITION_BEFORE_POST,
|
|
KBTS__SYLLABIC_POSITION_POSTBASE_CONSONANT,
|
|
KBTS__SYLLABIC_POSITION_AFTER_POST,
|
|
|
|
KBTS__SYLLABIC_POSITION_FINAL_CONSONANT,
|
|
KBTS__SYLLABIC_POSITION_SMVD,
|
|
|
|
KBTS__SYLLABIC_POSITION_COUNT,
|
|
};
|
|
|
|
|
|
typedef kbts_u32 kbts__feature_id;
|
|
enum kbts__feature_id_enum
|
|
{
|
|
KBTS__FEATURE_ID_UNREGISTERED, // Features that aren't pre-defined in the OpenType spec
|
|
KBTS__FEATURE_ID_isol, // Isolated Forms
|
|
KBTS__FEATURE_ID_fina, // Terminal Forms
|
|
KBTS__FEATURE_ID_fin2, // Terminal Forms #2
|
|
KBTS__FEATURE_ID_fin3, // Terminal Forms #3
|
|
KBTS__FEATURE_ID_medi, // Medial Forms
|
|
KBTS__FEATURE_ID_med2, // Medial Forms #2
|
|
KBTS__FEATURE_ID_init, // Initial Forms
|
|
KBTS__FEATURE_ID_ljmo, // Leading Jamo Forms
|
|
KBTS__FEATURE_ID_vjmo, // Vowel Jamo Forms
|
|
KBTS__FEATURE_ID_tjmo, // Trailing Jamo Forms
|
|
KBTS__FEATURE_ID_rphf, // Reph Form
|
|
KBTS__FEATURE_ID_blwf, // Below-base Forms
|
|
KBTS__FEATURE_ID_half, // Half Forms
|
|
KBTS__FEATURE_ID_pstf, // Post-base Forms
|
|
KBTS__FEATURE_ID_abvf, // Above-base Forms
|
|
KBTS__FEATURE_ID_pref, // Pre-base Forms
|
|
KBTS__FEATURE_ID_numr, // Numerators
|
|
KBTS__FEATURE_ID_frac, // Fractions
|
|
KBTS__FEATURE_ID_dnom, // Denominators
|
|
KBTS__FEATURE_ID_cfar, // Conjunct Form After Ro
|
|
KBTS__FEATURE_ID_aalt, // Access All Alternates
|
|
KBTS__FEATURE_ID_abvm, // Above-base Mark Positioning
|
|
KBTS__FEATURE_ID_abvs, // Above-base Substitutions
|
|
KBTS__FEATURE_ID_afrc, // Alternative Fractions
|
|
KBTS__FEATURE_ID_akhn, // Akhand
|
|
KBTS__FEATURE_ID_apkn, // Kerning for Alternate Proportional Widths
|
|
KBTS__FEATURE_ID_blwm, // Below-base Mark Positioning
|
|
KBTS__FEATURE_ID_blws, // Below-base Substitutions
|
|
KBTS__FEATURE_ID_calt, // Contextual Alternates
|
|
KBTS__FEATURE_ID_case, // Case-sensitive Forms
|
|
KBTS__FEATURE_ID_ccmp, // Glyph Composition / Decomposition
|
|
KBTS__FEATURE_ID_chws, // Contextual Half-width Spacing
|
|
KBTS__FEATURE_ID_cjct, // Conjunct Forms
|
|
KBTS__FEATURE_ID_clig, // Contextual Ligatures
|
|
KBTS__FEATURE_ID_cpct, // Centered CJK Punctuation
|
|
KBTS__FEATURE_ID_cpsp, // Capital Spacing
|
|
KBTS__FEATURE_ID_cswh, // Contextual Swash
|
|
KBTS__FEATURE_ID_curs, // Cursive Positioning
|
|
KBTS__FEATURE_ID_cv01, // Character Variant 1
|
|
KBTS__FEATURE_ID_cv02, // Character Variant 2
|
|
KBTS__FEATURE_ID_cv03, // Character Variant 3
|
|
KBTS__FEATURE_ID_cv04, // Character Variant 4
|
|
KBTS__FEATURE_ID_cv05, // Character Variant 5
|
|
KBTS__FEATURE_ID_cv06, // Character Variant 6
|
|
KBTS__FEATURE_ID_cv07, // Character Variant 7
|
|
KBTS__FEATURE_ID_cv08, // Character Variant 8
|
|
KBTS__FEATURE_ID_cv09, // Character Variant 9
|
|
KBTS__FEATURE_ID_cv10, // Character Variant 10
|
|
KBTS__FEATURE_ID_cv11, // Character Variant 11
|
|
KBTS__FEATURE_ID_cv12, // Character Variant 12
|
|
KBTS__FEATURE_ID_cv13, // Character Variant 13
|
|
KBTS__FEATURE_ID_cv14, // Character Variant 14
|
|
KBTS__FEATURE_ID_cv15, // Character Variant 15
|
|
KBTS__FEATURE_ID_cv16, // Character Variant 16
|
|
KBTS__FEATURE_ID_cv17, // Character Variant 17
|
|
KBTS__FEATURE_ID_cv18, // Character Variant 18
|
|
KBTS__FEATURE_ID_cv19, // Character Variant 19
|
|
KBTS__FEATURE_ID_cv20, // Character Variant 20
|
|
KBTS__FEATURE_ID_cv21, // Character Variant 21
|
|
KBTS__FEATURE_ID_cv22, // Character Variant 22
|
|
KBTS__FEATURE_ID_cv23, // Character Variant 23
|
|
KBTS__FEATURE_ID_cv24, // Character Variant 24
|
|
KBTS__FEATURE_ID_cv25, // Character Variant 25
|
|
KBTS__FEATURE_ID_cv26, // Character Variant 26
|
|
KBTS__FEATURE_ID_cv27, // Character Variant 27
|
|
KBTS__FEATURE_ID_cv28, // Character Variant 28
|
|
KBTS__FEATURE_ID_cv29, // Character Variant 29
|
|
KBTS__FEATURE_ID_cv30, // Character Variant 30
|
|
KBTS__FEATURE_ID_cv31, // Character Variant 31
|
|
KBTS__FEATURE_ID_cv32, // Character Variant 32
|
|
KBTS__FEATURE_ID_cv33, // Character Variant 33
|
|
KBTS__FEATURE_ID_cv34, // Character Variant 34
|
|
KBTS__FEATURE_ID_cv35, // Character Variant 35
|
|
KBTS__FEATURE_ID_cv36, // Character Variant 36
|
|
KBTS__FEATURE_ID_cv37, // Character Variant 37
|
|
KBTS__FEATURE_ID_cv38, // Character Variant 38
|
|
KBTS__FEATURE_ID_cv39, // Character Variant 39
|
|
KBTS__FEATURE_ID_cv40, // Character Variant 40
|
|
KBTS__FEATURE_ID_cv41, // Character Variant 41
|
|
KBTS__FEATURE_ID_cv42, // Character Variant 42
|
|
KBTS__FEATURE_ID_cv43, // Character Variant 43
|
|
KBTS__FEATURE_ID_cv44, // Character Variant 44
|
|
KBTS__FEATURE_ID_cv45, // Character Variant 45
|
|
KBTS__FEATURE_ID_cv46, // Character Variant 46
|
|
KBTS__FEATURE_ID_cv47, // Character Variant 47
|
|
KBTS__FEATURE_ID_cv48, // Character Variant 48
|
|
KBTS__FEATURE_ID_cv49, // Character Variant 49
|
|
KBTS__FEATURE_ID_cv50, // Character Variant 50
|
|
KBTS__FEATURE_ID_cv51, // Character Variant 51
|
|
KBTS__FEATURE_ID_cv52, // Character Variant 52
|
|
KBTS__FEATURE_ID_cv53, // Character Variant 53
|
|
KBTS__FEATURE_ID_cv54, // Character Variant 54
|
|
KBTS__FEATURE_ID_cv55, // Character Variant 55
|
|
KBTS__FEATURE_ID_cv56, // Character Variant 56
|
|
KBTS__FEATURE_ID_cv57, // Character Variant 57
|
|
KBTS__FEATURE_ID_cv58, // Character Variant 58
|
|
KBTS__FEATURE_ID_cv59, // Character Variant 59
|
|
KBTS__FEATURE_ID_cv60, // Character Variant 60
|
|
KBTS__FEATURE_ID_cv61, // Character Variant 61
|
|
KBTS__FEATURE_ID_cv62, // Character Variant 62
|
|
KBTS__FEATURE_ID_cv63, // Character Variant 63
|
|
KBTS__FEATURE_ID_cv64, // Character Variant 64
|
|
KBTS__FEATURE_ID_cv65, // Character Variant 65
|
|
KBTS__FEATURE_ID_cv66, // Character Variant 66
|
|
KBTS__FEATURE_ID_cv67, // Character Variant 67
|
|
KBTS__FEATURE_ID_cv68, // Character Variant 68
|
|
KBTS__FEATURE_ID_cv69, // Character Variant 69
|
|
KBTS__FEATURE_ID_cv70, // Character Variant 70
|
|
KBTS__FEATURE_ID_cv71, // Character Variant 71
|
|
KBTS__FEATURE_ID_cv72, // Character Variant 72
|
|
KBTS__FEATURE_ID_cv73, // Character Variant 73
|
|
KBTS__FEATURE_ID_cv74, // Character Variant 74
|
|
KBTS__FEATURE_ID_cv75, // Character Variant 75
|
|
KBTS__FEATURE_ID_cv76, // Character Variant 76
|
|
KBTS__FEATURE_ID_cv77, // Character Variant 77
|
|
KBTS__FEATURE_ID_cv78, // Character Variant 78
|
|
KBTS__FEATURE_ID_cv79, // Character Variant 79
|
|
KBTS__FEATURE_ID_cv80, // Character Variant 80
|
|
KBTS__FEATURE_ID_cv81, // Character Variant 81
|
|
KBTS__FEATURE_ID_cv82, // Character Variant 82
|
|
KBTS__FEATURE_ID_cv83, // Character Variant 83
|
|
KBTS__FEATURE_ID_cv84, // Character Variant 84
|
|
KBTS__FEATURE_ID_cv85, // Character Variant 85
|
|
KBTS__FEATURE_ID_cv86, // Character Variant 86
|
|
KBTS__FEATURE_ID_cv87, // Character Variant 87
|
|
KBTS__FEATURE_ID_cv88, // Character Variant 88
|
|
KBTS__FEATURE_ID_cv89, // Character Variant 89
|
|
KBTS__FEATURE_ID_cv90, // Character Variant 90
|
|
KBTS__FEATURE_ID_cv91, // Character Variant 91
|
|
KBTS__FEATURE_ID_cv92, // Character Variant 92
|
|
KBTS__FEATURE_ID_cv93, // Character Variant 93
|
|
KBTS__FEATURE_ID_cv94, // Character Variant 94
|
|
KBTS__FEATURE_ID_cv95, // Character Variant 95
|
|
KBTS__FEATURE_ID_cv96, // Character Variant 96
|
|
KBTS__FEATURE_ID_cv97, // Character Variant 97
|
|
KBTS__FEATURE_ID_cv98, // Character Variant 98
|
|
KBTS__FEATURE_ID_cv99, // Character Variant 99
|
|
KBTS__FEATURE_ID_c2pc, // Petite Capitals From Capitals
|
|
KBTS__FEATURE_ID_c2sc, // Small Capitals From Capitals
|
|
KBTS__FEATURE_ID_dist, // Distances
|
|
KBTS__FEATURE_ID_dlig, // Discretionary Ligatures
|
|
KBTS__FEATURE_ID_dtls, // Dotless Forms
|
|
KBTS__FEATURE_ID_expt, // Expert Forms
|
|
KBTS__FEATURE_ID_falt, // Final Glyph on Line Alternates
|
|
KBTS__FEATURE_ID_flac, // Flattened Accent Forms
|
|
KBTS__FEATURE_ID_fwid, // Full Widths
|
|
KBTS__FEATURE_ID_haln, // Halant Forms
|
|
KBTS__FEATURE_ID_halt, // Alternate Half Widths
|
|
KBTS__FEATURE_ID_hist, // Historical Forms
|
|
KBTS__FEATURE_ID_hkna, // Horizontal Kana Alternates
|
|
KBTS__FEATURE_ID_hlig, // Historical Ligatures
|
|
KBTS__FEATURE_ID_hngl, // Hangul
|
|
KBTS__FEATURE_ID_hojo, // Hojo Kanji Forms (JIS X 0212-1990 Kanji Forms)
|
|
KBTS__FEATURE_ID_hwid, // Half Widths
|
|
KBTS__FEATURE_ID_ital, // Italics
|
|
KBTS__FEATURE_ID_jalt, // Justification Alternates
|
|
KBTS__FEATURE_ID_jp78, // JIS78 Forms
|
|
KBTS__FEATURE_ID_jp83, // JIS83 Forms
|
|
KBTS__FEATURE_ID_jp90, // JIS90 Forms
|
|
KBTS__FEATURE_ID_jp04, // JIS2004 Forms
|
|
KBTS__FEATURE_ID_kern, // Kerning
|
|
KBTS__FEATURE_ID_lfbd, // Left Bounds
|
|
KBTS__FEATURE_ID_liga, // Standard Ligatures
|
|
KBTS__FEATURE_ID_lnum, // Lining Figures
|
|
KBTS__FEATURE_ID_locl, // Localized Forms
|
|
KBTS__FEATURE_ID_ltra, // Left-to-right Alternates
|
|
KBTS__FEATURE_ID_ltrm, // Left-to-right Mirrored Forms
|
|
KBTS__FEATURE_ID_mark, // Mark Positioning
|
|
KBTS__FEATURE_ID_mgrk, // Mathematical Greek
|
|
KBTS__FEATURE_ID_mkmk, // Mark to Mark Positioning
|
|
KBTS__FEATURE_ID_mset, // Mark Positioning via Substitution
|
|
KBTS__FEATURE_ID_nalt, // Alternate Annotation Forms
|
|
KBTS__FEATURE_ID_nlck, // NLC Kanji Forms
|
|
KBTS__FEATURE_ID_nukt, // Nukta Forms
|
|
KBTS__FEATURE_ID_onum, // Oldstyle Figures
|
|
KBTS__FEATURE_ID_opbd, // Optical Bounds
|
|
KBTS__FEATURE_ID_ordn, // Ordinals
|
|
KBTS__FEATURE_ID_ornm, // Ornaments
|
|
KBTS__FEATURE_ID_palt, // Proportional Alternate Widths
|
|
KBTS__FEATURE_ID_pcap, // Petite Capitals
|
|
KBTS__FEATURE_ID_pkna, // Proportional Kana
|
|
KBTS__FEATURE_ID_pnum, // Proportional Figures
|
|
KBTS__FEATURE_ID_pres, // Pre-base Substitutions
|
|
KBTS__FEATURE_ID_psts, // Post-base Substitutions
|
|
KBTS__FEATURE_ID_pwid, // Proportional Widths
|
|
KBTS__FEATURE_ID_qwid, // Quarter Widths
|
|
KBTS__FEATURE_ID_rand, // Randomize
|
|
KBTS__FEATURE_ID_rclt, // Required Contextual Alternates
|
|
KBTS__FEATURE_ID_rkrf, // Rakar Forms
|
|
KBTS__FEATURE_ID_rlig, // Required Ligatures
|
|
KBTS__FEATURE_ID_rtbd, // Right Bounds
|
|
KBTS__FEATURE_ID_rtla, // Right-to-left Alternates
|
|
KBTS__FEATURE_ID_rtlm, // Right-to-left Mirrored Forms
|
|
KBTS__FEATURE_ID_ruby, // Ruby Notation Forms
|
|
KBTS__FEATURE_ID_rvrn, // Required Variation Alternates
|
|
KBTS__FEATURE_ID_salt, // Stylistic Alternates
|
|
KBTS__FEATURE_ID_sinf, // Scientific Inferiors
|
|
KBTS__FEATURE_ID_size, // Optical size
|
|
KBTS__FEATURE_ID_smcp, // Small Capitals
|
|
KBTS__FEATURE_ID_smpl, // Simplified Forms
|
|
KBTS__FEATURE_ID_ss01, // Stylistic Set 1
|
|
KBTS__FEATURE_ID_ss02, // Stylistic Set 2
|
|
KBTS__FEATURE_ID_ss03, // Stylistic Set 3
|
|
KBTS__FEATURE_ID_ss04, // Stylistic Set 4
|
|
KBTS__FEATURE_ID_ss05, // Stylistic Set 5
|
|
KBTS__FEATURE_ID_ss06, // Stylistic Set 6
|
|
KBTS__FEATURE_ID_ss07, // Stylistic Set 7
|
|
KBTS__FEATURE_ID_ss08, // Stylistic Set 8
|
|
KBTS__FEATURE_ID_ss09, // Stylistic Set 9
|
|
KBTS__FEATURE_ID_ss10, // Stylistic Set 10
|
|
KBTS__FEATURE_ID_ss11, // Stylistic Set 11
|
|
KBTS__FEATURE_ID_ss12, // Stylistic Set 12
|
|
KBTS__FEATURE_ID_ss13, // Stylistic Set 13
|
|
KBTS__FEATURE_ID_ss14, // Stylistic Set 14
|
|
KBTS__FEATURE_ID_ss15, // Stylistic Set 15
|
|
KBTS__FEATURE_ID_ss16, // Stylistic Set 16
|
|
KBTS__FEATURE_ID_ss17, // Stylistic Set 17
|
|
KBTS__FEATURE_ID_ss18, // Stylistic Set 18
|
|
KBTS__FEATURE_ID_ss19, // Stylistic Set 19
|
|
KBTS__FEATURE_ID_ss20, // Stylistic Set 20
|
|
KBTS__FEATURE_ID_ssty, // Math Script-style Alternates
|
|
KBTS__FEATURE_ID_stch, // Stretching Glyph Decomposition
|
|
KBTS__FEATURE_ID_subs, // Subscript
|
|
KBTS__FEATURE_ID_sups, // Superscript
|
|
KBTS__FEATURE_ID_swsh, // Swash
|
|
KBTS__FEATURE_ID_test, // Test features, only for development
|
|
KBTS__FEATURE_ID_titl, // Titling
|
|
KBTS__FEATURE_ID_tnam, // Traditional Name Forms
|
|
KBTS__FEATURE_ID_tnum, // Tabular Figures
|
|
KBTS__FEATURE_ID_trad, // Traditional Forms
|
|
KBTS__FEATURE_ID_twid, // Third Widths
|
|
KBTS__FEATURE_ID_unic, // Unicase
|
|
KBTS__FEATURE_ID_valt, // Alternate Vertical Metrics
|
|
KBTS__FEATURE_ID_vapk, // Kerning for Alternate Proportional Vertical Metrics
|
|
KBTS__FEATURE_ID_vatu, // Vattu Variants
|
|
KBTS__FEATURE_ID_vchw, // Vertical Contextual Half-width Spacing
|
|
KBTS__FEATURE_ID_vert, // Vertical Alternates
|
|
KBTS__FEATURE_ID_vhal, // Alternate Vertical Half Metrics
|
|
KBTS__FEATURE_ID_vkna, // Vertical Kana Alternates
|
|
KBTS__FEATURE_ID_vkrn, // Vertical Kerning
|
|
KBTS__FEATURE_ID_vpal, // Proportional Alternate Vertical Metrics
|
|
KBTS__FEATURE_ID_vrt2, // Vertical Alternates and Rotation
|
|
KBTS__FEATURE_ID_vrtr, // Vertical Alternates for Rotation
|
|
KBTS__FEATURE_ID_zero, // Slashed Zero
|
|
KBTS__FEATURE_ID_COUNT,
|
|
};
|
|
|
|
typedef struct kbts__feature_set
|
|
{
|
|
kbts_u64 Flags[(KBTS__FEATURE_ID_COUNT + 63) / 64];
|
|
} kbts__feature_set;
|
|
typedef kbts_u8 kbts__op_kind;
|
|
enum kbts__op_kind_enum
|
|
{
|
|
KBTS__OP_KIND_END,
|
|
KBTS__OP_KIND_PRE_NORMALIZE_DOTTED_CIRCLES,
|
|
KBTS__OP_KIND_NORMALIZE,
|
|
KBTS__OP_KIND_NORMALIZE_HANGUL,
|
|
KBTS__OP_KIND_FLAG_JOINING_LETTERS,
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
KBTS__OP_KIND_STCH_POSTPASS,
|
|
KBTS__OP_KIND_BEGIN_CLUSTER,
|
|
KBTS__OP_KIND_END_CLUSTER,
|
|
KBTS__OP_KIND_END_SYLLABLE,
|
|
KBTS__OP_KIND_COUNT,
|
|
};
|
|
typedef struct kbts__feature_stage
|
|
{
|
|
kbts_u32 FeatureCount;
|
|
kbts__feature_set Features;
|
|
} kbts__feature_stage;
|
|
typedef struct kbts__op_list
|
|
{
|
|
kbts_u32 TotalFeatureCount;
|
|
kbts_u32 FeatureStageCount;
|
|
kbts__feature_stage *FeatureStages;
|
|
kbts_u32 OpCount;
|
|
kbts__op_kind *Ops;
|
|
} kbts__op_list;
|
|
static kbts__op_kind kbts__Ops_Default[] = {
|
|
KBTS__OP_KIND_NORMALIZE,
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
};
|
|
static kbts__feature_stage kbts__FeatureStages_Default[] = {
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rvrn)}}},
|
|
{19, {{0ull | KBTS__FEATURE_FLAG0(frac) | KBTS__FEATURE_FLAG0(numr) | KBTS__FEATURE_FLAG0(dnom) | KBTS__FEATURE_FLAG0(ccmp) | KBTS__FEATURE_FLAG0(clig) | KBTS__FEATURE_FLAG0(calt) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(ltra) | KBTS__FEATURE_FLAG2(ltrm) | KBTS__FEATURE_FLAG2(locl) | KBTS__FEATURE_FLAG2(rlig) | KBTS__FEATURE_FLAG2(liga) | KBTS__FEATURE_FLAG2(rclt) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
};
|
|
static kbts__op_list kbts__OpList_Default = {27, KBTS__ARRAY_LENGTH(kbts__FeatureStages_Default), kbts__FeatureStages_Default, KBTS__ARRAY_LENGTH(kbts__Ops_Default), kbts__Ops_Default};
|
|
static kbts__op_kind kbts__Ops_Hangul[] = {
|
|
KBTS__OP_KIND_NORMALIZE,
|
|
KBTS__OP_KIND_NORMALIZE_HANGUL,
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
};
|
|
static kbts__feature_stage kbts__FeatureStages_Hangul[] = {
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rvrn)}}},
|
|
{21, {{0ull | KBTS__FEATURE_FLAG0(frac) | KBTS__FEATURE_FLAG0(numr) | KBTS__FEATURE_FLAG0(dnom) | KBTS__FEATURE_FLAG0(ljmo) | KBTS__FEATURE_FLAG0(vjmo) | KBTS__FEATURE_FLAG0(tjmo) | KBTS__FEATURE_FLAG0(ccmp) | KBTS__FEATURE_FLAG0(clig) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(ltra) | KBTS__FEATURE_FLAG2(ltrm) | KBTS__FEATURE_FLAG2(rlig) | KBTS__FEATURE_FLAG2(liga) | KBTS__FEATURE_FLAG2(locl) | KBTS__FEATURE_FLAG2(rclt) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
};
|
|
static kbts__op_list kbts__OpList_Hangul = {29, KBTS__ARRAY_LENGTH(kbts__FeatureStages_Hangul), kbts__FeatureStages_Hangul, KBTS__ARRAY_LENGTH(kbts__Ops_Hangul), kbts__Ops_Hangul};
|
|
static kbts__op_kind kbts__Ops_ArabicRclt[] = {
|
|
KBTS__OP_KIND_NORMALIZE,
|
|
KBTS__OP_KIND_FLAG_JOINING_LETTERS,
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_STCH_POSTPASS,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
};
|
|
static kbts__feature_stage kbts__FeatureStages_ArabicRclt[] = {
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rvrn)}}},
|
|
{5, {{0ull | KBTS__FEATURE_FLAG0(frac) | KBTS__FEATURE_FLAG0(numr) | KBTS__FEATURE_FLAG0(dnom), 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rtla) | KBTS__FEATURE_FLAG3(rtlm)}}},
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(stch)}}},
|
|
{2, {{0ull | KBTS__FEATURE_FLAG0(ccmp), 0ull, 0ull | KBTS__FEATURE_FLAG2(locl), 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(isol), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(fina), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(fin2), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(fin3), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(medi), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(med2), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(init), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull, 0ull, 0ull | KBTS__FEATURE_FLAG2(rlig), 0ull}}},
|
|
{12, {{0ull | KBTS__FEATURE_FLAG0(calt) | KBTS__FEATURE_FLAG0(clig) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(liga) | KBTS__FEATURE_FLAG2(mset) | KBTS__FEATURE_FLAG2(rclt) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
};
|
|
static kbts__op_list kbts__OpList_ArabicRclt = {36, KBTS__ARRAY_LENGTH(kbts__FeatureStages_ArabicRclt), kbts__FeatureStages_ArabicRclt, KBTS__ARRAY_LENGTH(kbts__Ops_ArabicRclt), kbts__Ops_ArabicRclt};
|
|
static kbts__op_kind kbts__Ops_ArabicNoRclt[] = {
|
|
KBTS__OP_KIND_NORMALIZE,
|
|
KBTS__OP_KIND_FLAG_JOINING_LETTERS,
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_STCH_POSTPASS,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
};
|
|
static kbts__feature_stage kbts__FeatureStages_ArabicNoRclt[] = {
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rvrn)}}},
|
|
{5, {{0ull | KBTS__FEATURE_FLAG0(frac) | KBTS__FEATURE_FLAG0(numr) | KBTS__FEATURE_FLAG0(dnom), 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rtla) | KBTS__FEATURE_FLAG3(rtlm)}}},
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(stch)}}},
|
|
{2, {{0ull | KBTS__FEATURE_FLAG0(ccmp), 0ull, 0ull | KBTS__FEATURE_FLAG2(locl), 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(isol), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(fina), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(fin2), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(fin3), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(medi), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(med2), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(init), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull, 0ull, 0ull | KBTS__FEATURE_FLAG2(rlig), 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(calt), 0ull, 0ull, 0ull}}},
|
|
{10, {{0ull | KBTS__FEATURE_FLAG0(clig) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(liga) | KBTS__FEATURE_FLAG2(mset) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
};
|
|
static kbts__op_list kbts__OpList_ArabicNoRclt = {35, KBTS__ARRAY_LENGTH(kbts__FeatureStages_ArabicNoRclt), kbts__FeatureStages_ArabicNoRclt, KBTS__ARRAY_LENGTH(kbts__Ops_ArabicNoRclt), kbts__Ops_ArabicNoRclt};
|
|
static kbts__op_kind kbts__Ops_Indic[] = {
|
|
KBTS__OP_KIND_PRE_NORMALIZE_DOTTED_CIRCLES,
|
|
KBTS__OP_KIND_NORMALIZE,
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_BEGIN_CLUSTER,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_END_CLUSTER,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_END_SYLLABLE,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
};
|
|
static kbts__feature_stage kbts__FeatureStages_Indic[] = {
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rvrn)}}},
|
|
{5, {{0ull | KBTS__FEATURE_FLAG0(frac) | KBTS__FEATURE_FLAG0(numr) | KBTS__FEATURE_FLAG0(dnom), 0ull, 0ull | KBTS__FEATURE_FLAG2(ltra) | KBTS__FEATURE_FLAG2(ltrm), 0ull}}},
|
|
{1, {{0ull, 0ull, 0ull | KBTS__FEATURE_FLAG2(nukt), 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(akhn), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(rphf), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull, 0ull, 0ull | KBTS__FEATURE_FLAG2(rkrf), 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(pref), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(blwf), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(abvf), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(half), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(pstf), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(vatu)}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(cjct), 0ull, 0ull, 0ull}}},
|
|
{6, {{0ull | KBTS__FEATURE_FLAG0(abvs) | KBTS__FEATURE_FLAG0(blws) | KBTS__FEATURE_FLAG0(init), 0ull, 0ull | KBTS__FEATURE_FLAG2(haln) | KBTS__FEATURE_FLAG2(pres) | KBTS__FEATURE_FLAG2(psts), 0ull}}},
|
|
{12, {{0ull | KBTS__FEATURE_FLAG0(calt) | KBTS__FEATURE_FLAG0(clig) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(locl) | KBTS__FEATURE_FLAG2(rlig) | KBTS__FEATURE_FLAG2(rclt) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern), 0ull}}},
|
|
};
|
|
static kbts__op_list kbts__OpList_Indic = {42, KBTS__ARRAY_LENGTH(kbts__FeatureStages_Indic), kbts__FeatureStages_Indic, KBTS__ARRAY_LENGTH(kbts__Ops_Indic), kbts__Ops_Indic};
|
|
static kbts__op_kind kbts__Ops_Khmer[] = {
|
|
KBTS__OP_KIND_PRE_NORMALIZE_DOTTED_CIRCLES,
|
|
KBTS__OP_KIND_NORMALIZE,
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_BEGIN_CLUSTER,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_END_CLUSTER,
|
|
KBTS__OP_KIND_END_SYLLABLE,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
};
|
|
static kbts__feature_stage kbts__FeatureStages_Khmer[] = {
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rvrn)}}},
|
|
{5, {{0ull | KBTS__FEATURE_FLAG0(frac) | KBTS__FEATURE_FLAG0(numr) | KBTS__FEATURE_FLAG0(dnom), 0ull, 0ull | KBTS__FEATURE_FLAG2(ltra) | KBTS__FEATURE_FLAG2(ltrm), 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(ccmp) | KBTS__FEATURE_FLAG0(pref) | KBTS__FEATURE_FLAG0(blwf) | KBTS__FEATURE_FLAG0(abvf) | KBTS__FEATURE_FLAG0(pstf) | KBTS__FEATURE_FLAG0(cfar), 0ull, 0ull | KBTS__FEATURE_FLAG2(locl), 0ull}}},
|
|
{15, {{0ull | KBTS__FEATURE_FLAG0(abvs) | KBTS__FEATURE_FLAG0(blws) | KBTS__FEATURE_FLAG0(calt) | KBTS__FEATURE_FLAG0(clig) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(pres) | KBTS__FEATURE_FLAG2(psts) | KBTS__FEATURE_FLAG2(rclt) | KBTS__FEATURE_FLAG2(rlig) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk), 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk), 0ull}}},
|
|
};
|
|
static kbts__op_list kbts__OpList_Khmer = {35, KBTS__ARRAY_LENGTH(kbts__FeatureStages_Khmer), kbts__FeatureStages_Khmer, KBTS__ARRAY_LENGTH(kbts__Ops_Khmer), kbts__Ops_Khmer};
|
|
static kbts__op_kind kbts__Ops_Myanmar[] = {
|
|
KBTS__OP_KIND_PRE_NORMALIZE_DOTTED_CIRCLES,
|
|
KBTS__OP_KIND_NORMALIZE,
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_BEGIN_CLUSTER,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_END_CLUSTER,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_END_SYLLABLE,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
};
|
|
static kbts__feature_stage kbts__FeatureStages_Myanmar[] = {
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rvrn)}}},
|
|
{5, {{0ull | KBTS__FEATURE_FLAG0(frac) | KBTS__FEATURE_FLAG0(numr) | KBTS__FEATURE_FLAG0(dnom), 0ull, 0ull | KBTS__FEATURE_FLAG2(ltra) | KBTS__FEATURE_FLAG2(ltrm), 0ull}}},
|
|
{2, {{0ull | KBTS__FEATURE_FLAG0(ccmp), 0ull, 0ull | KBTS__FEATURE_FLAG2(locl), 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(rphf), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(pref), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(blwf), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(pstf), 0ull, 0ull, 0ull}}},
|
|
{16, {{0ull | KBTS__FEATURE_FLAG0(abvs) | KBTS__FEATURE_FLAG0(blws) | KBTS__FEATURE_FLAG0(calt) | KBTS__FEATURE_FLAG0(clig) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(pres) | KBTS__FEATURE_FLAG2(psts) | KBTS__FEATURE_FLAG2(rlig) | KBTS__FEATURE_FLAG2(liga) | KBTS__FEATURE_FLAG2(rclt) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk), 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk), 0ull}}},
|
|
};
|
|
static kbts__op_list kbts__OpList_Myanmar = {35, KBTS__ARRAY_LENGTH(kbts__FeatureStages_Myanmar), kbts__FeatureStages_Myanmar, KBTS__ARRAY_LENGTH(kbts__Ops_Myanmar), kbts__Ops_Myanmar};
|
|
static kbts__op_kind kbts__Ops_Tibetan[] = {
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
};
|
|
static kbts__feature_stage kbts__FeatureStages_Tibetan[] = {
|
|
{1, {{0ull, 0ull, 0ull | KBTS__FEATURE_FLAG2(locl), 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(ccmp), 0ull, 0ull, 0ull}}},
|
|
{8, {{0ull | KBTS__FEATURE_FLAG0(abvs) | KBTS__FEATURE_FLAG0(blws) | KBTS__FEATURE_FLAG0(calt) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm), 0ull, 0ull | KBTS__FEATURE_FLAG2(liga) | KBTS__FEATURE_FLAG2(kern) | KBTS__FEATURE_FLAG2(mkmk), 0ull}}},
|
|
{4, {{0ull | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm), 0ull, 0ull | KBTS__FEATURE_FLAG2(kern) | KBTS__FEATURE_FLAG2(mkmk), 0ull}}},
|
|
};
|
|
static kbts__op_list kbts__OpList_Tibetan = {14, KBTS__ARRAY_LENGTH(kbts__FeatureStages_Tibetan), kbts__FeatureStages_Tibetan, KBTS__ARRAY_LENGTH(kbts__Ops_Tibetan), kbts__Ops_Tibetan};
|
|
static kbts__op_kind kbts__Ops_Use[] = {
|
|
KBTS__OP_KIND_PRE_NORMALIZE_DOTTED_CIRCLES,
|
|
KBTS__OP_KIND_NORMALIZE,
|
|
KBTS__OP_KIND_FLAG_JOINING_LETTERS,
|
|
KBTS__OP_KIND_BEGIN_GSUB,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_BEGIN_CLUSTER,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_END_CLUSTER,
|
|
KBTS__OP_KIND_END_SYLLABLE,
|
|
KBTS__OP_KIND_GSUB_FEATURES,
|
|
KBTS__OP_KIND_GSUB_FEATURES_WITH_USER,
|
|
KBTS__OP_KIND_GPOS_METRICS,
|
|
KBTS__OP_KIND_GPOS_FEATURES,
|
|
KBTS__OP_KIND_POST_GPOS_FIXUP,
|
|
};
|
|
static kbts__feature_stage kbts__FeatureStages_Use[] = {
|
|
{1, {{0ull, 0ull, 0ull, 0ull | KBTS__FEATURE_FLAG3(rvrn)}}},
|
|
{5, {{0ull | KBTS__FEATURE_FLAG0(frac) | KBTS__FEATURE_FLAG0(numr) | KBTS__FEATURE_FLAG0(dnom), 0ull, 0ull | KBTS__FEATURE_FLAG2(ltra) | KBTS__FEATURE_FLAG2(ltrm), 0ull}}},
|
|
{4, {{0ull | KBTS__FEATURE_FLAG0(ccmp) | KBTS__FEATURE_FLAG0(akhn), 0ull, 0ull | KBTS__FEATURE_FLAG2(locl) | KBTS__FEATURE_FLAG2(nukt), 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(rphf), 0ull, 0ull, 0ull}}},
|
|
{1, {{0ull | KBTS__FEATURE_FLAG0(pref), 0ull, 0ull, 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(abvf) | KBTS__FEATURE_FLAG0(blwf) | KBTS__FEATURE_FLAG0(cjct) | KBTS__FEATURE_FLAG0(half) | KBTS__FEATURE_FLAG0(pstf), 0ull, 0ull | KBTS__FEATURE_FLAG2(rkrf), 0ull | KBTS__FEATURE_FLAG3(vatu)}}},
|
|
{4, {{0ull | KBTS__FEATURE_FLAG0(fina) | KBTS__FEATURE_FLAG0(init) | KBTS__FEATURE_FLAG0(isol) | KBTS__FEATURE_FLAG0(medi), 0ull, 0ull, 0ull}}},
|
|
{24, {{0ull | KBTS__FEATURE_FLAG0(abvs) | KBTS__FEATURE_FLAG0(blws) | KBTS__FEATURE_FLAG0(calt) | KBTS__FEATURE_FLAG0(clig) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs) | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(haln) | KBTS__FEATURE_FLAG2(pres) | KBTS__FEATURE_FLAG2(psts) | KBTS__FEATURE_FLAG2(liga) | KBTS__FEATURE_FLAG2(rclt) | KBTS__FEATURE_FLAG2(rlig) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk) | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk), 0ull}}},
|
|
{7, {{0ull | KBTS__FEATURE_FLAG0(abvm) | KBTS__FEATURE_FLAG0(blwm) | KBTS__FEATURE_FLAG0(curs), 0ull, 0ull | KBTS__FEATURE_FLAG2(dist) | KBTS__FEATURE_FLAG2(kern) | KBTS__FEATURE_FLAG2(mark) | KBTS__FEATURE_FLAG2(mkmk), 0ull}}},
|
|
};
|
|
static kbts__op_list kbts__OpList_Use = {54, KBTS__ARRAY_LENGTH(kbts__FeatureStages_Use), kbts__FeatureStages_Use, KBTS__ARRAY_LENGTH(kbts__Ops_Use), kbts__Ops_Use};
|
|
#define KBTS__MAXIMUM_DECOMPOSITION_CODEPOINTS 6
|
|
typedef struct kbts__script_properties {
|
|
kbts_u32 Tag;
|
|
kbts_shaper Shaper;
|
|
} kbts__script_properties;
|
|
|
|
static kbts__script_properties kbts__ScriptProperties[KBTS_SCRIPT_COUNT] = {
|
|
{KBTS_FOURCC(' ', ' ', ' ', ' '), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('a', 'd', 'l', 'm'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('a', 'h', 'o', 'm'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('h', 'l', 'u', 'w'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('a', 'r', 'a', 'b'), KBTS_SHAPER_ARABIC},
|
|
{KBTS_FOURCC('a', 'r', 'm', 'n'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('a', 'v', 's', 't'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('b', 'a', 'l', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('b', 'a', 'm', 'u'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('b', 'a', 's', 's'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('b', 'a', 't', 'k'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('b', 'n', 'g', '2'), KBTS_SHAPER_INDIC},
|
|
{KBTS_FOURCC('b', 'h', 'k', 's'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('b', 'o', 'p', 'o'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('b', 'r', 'a', 'h'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('b', 'u', 'g', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('b', 'u', 'h', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('c', 'a', 'n', 's'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('c', 'a', 'r', 'i'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('a', 'g', 'h', 'b'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('c', 'a', 'k', 'm'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('c', 'h', 'a', 'm'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('c', 'h', 'e', 'r'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('c', 'h', 'r', 's'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('h', 'a', 'n', 'i'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('c', 'o', 'p', 't'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('c', 'p', 'r', 't'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('c', 'p', 'm', 'n'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('c', 'y', 'r', 'l'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('D', 'F', 'L', 'T'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('D', 'F', 'L', 'T'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('d', 's', 'r', 't'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('d', 'e', 'v', '2'), KBTS_SHAPER_INDIC},
|
|
{KBTS_FOURCC('d', 'i', 'a', 'k'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('d', 'o', 'g', 'r'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('d', 'u', 'p', 'l'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('e', 'g', 'y', 'p'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('e', 'l', 'b', 'a'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('e', 'l', 'y', 'm'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('e', 't', 'h', 'i'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('g', 'a', 'r', 'a'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('g', 'e', 'o', 'r'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('g', 'l', 'a', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('g', 'o', 't', 'h'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('g', 'r', 'a', 'n'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('g', 'r', 'e', 'k'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('g', 'j', 'r', '2'), KBTS_SHAPER_INDIC},
|
|
{KBTS_FOURCC('g', 'o', 'n', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('g', 'u', 'r', '2'), KBTS_SHAPER_INDIC},
|
|
{KBTS_FOURCC('g', 'u', 'k', 'h'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('h', 'a', 'n', 'g'), KBTS_SHAPER_HANGUL},
|
|
{KBTS_FOURCC('r', 'o', 'h', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('h', 'a', 'n', 'o'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('h', 'a', 't', 'r'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('h', 'e', 'b', 'r'), KBTS_SHAPER_HEBREW},
|
|
{KBTS_FOURCC('k', 'a', 'n', 'a'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('a', 'r', 'm', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('p', 'h', 'l', 'i'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('p', 'r', 't', 'i'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('j', 'a', 'v', 'a'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('k', 't', 'h', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('k', 'n', 'd', '2'), KBTS_SHAPER_INDIC},
|
|
{KBTS_FOURCC('k', 'a', 'n', 'a'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('k', 'a', 'w', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('k', 'a', 'l', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('k', 'h', 'a', 'r'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('k', 'i', 't', 's'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('k', 'h', 'm', 'r'), KBTS_SHAPER_KHMER},
|
|
{KBTS_FOURCC('k', 'h', 'o', 'j'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'i', 'n', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('k', 'r', 'a', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('l', 'a', 'o', ' '), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('l', 'a', 't', 'n'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('l', 'e', 'p', 'c'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('l', 'i', 'm', 'b'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('l', 'i', 'n', 'a'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('l', 'i', 'n', 'b'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('l', 'i', 's', 'u'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('l', 'y', 'c', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('l', 'y', 'd', 'i'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('m', 'a', 'h', 'j'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'a', 'k', 'a'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'l', 'm', '2'), KBTS_SHAPER_INDIC},
|
|
{KBTS_FOURCC('m', 'a', 'n', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'a', 'n', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'a', 'r', 'c'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('g', 'o', 'n', 'm'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'e', 'd', 'f'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 't', 'e', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'e', 'n', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'e', 'r', 'c'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'e', 'r', 'o'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('p', 'l', 'r', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'o', 'd', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'o', 'n', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'r', 'o', 'o'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('m', 'u', 'l', 't'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('m', 'y', 'm', '2'), KBTS_SHAPER_MYANMAR},
|
|
{KBTS_FOURCC('n', 'b', 'a', 't'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('n', 'a', 'g', 'm'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('n', 'a', 'n', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('n', 'e', 'w', 'a'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'a', 'l', 'u'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('n', 'k', 'o', ' '), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('n', 's', 'h', 'u'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('h', 'm', 'n', 'p'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('o', 'g', 'a', 'm'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('o', 'l', 'c', 'k'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('o', 'n', 'a', 'o'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('i', 't', 'a', 'l'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('h', 'u', 'n', 'g'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('n', 'a', 'r', 'b'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('p', 'e', 'r', 'm'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('x', 'p', 'e', 'o'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'o', 'g', 'o'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'a', 'r', 'b'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('o', 'r', 'k', 'h'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('o', 'u', 'g', 'r'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('o', 'r', 'y', '2'), KBTS_SHAPER_INDIC},
|
|
{KBTS_FOURCC('o', 's', 'g', 'e'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('o', 's', 'm', 'a'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('h', 'm', 'n', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('p', 'a', 'l', 'm'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('p', 'a', 'u', 'c'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('p', 'h', 'a', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('p', 'h', 'n', 'x'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('p', 'h', 'l', 'p'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('r', 'j', 'n', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('r', 'u', 'n', 'r'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('s', 'a', 'm', 'r'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('s', 'a', 'u', 'r'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'h', 'r', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'h', 'a', 'w'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('s', 'i', 'd', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'g', 'n', 'w'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'o', 'g', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'i', 'n', 'h'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'o', 'r', 'a'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'o', 'y', 'o'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('x', 's', 'u', 'x'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'u', 'n', 'd'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'u', 'n', 'u'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'y', 'l', 'o'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('s', 'y', 'r', 'c'), KBTS_SHAPER_ARABIC},
|
|
{KBTS_FOURCC('t', 'g', 'l', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'a', 'g', 'b'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'a', 'l', 'e'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('l', 'a', 'n', 'a'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'a', 'v', 't'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'a', 'k', 'r'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'm', 'l', '2'), KBTS_SHAPER_INDIC},
|
|
{KBTS_FOURCC('t', 'n', 's', 'a'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'a', 'n', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'e', 'l', '2'), KBTS_SHAPER_INDIC},
|
|
{KBTS_FOURCC('t', 'h', 'a', 'a'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('t', 'h', 'a', 'i'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('t', 'i', 'b', 't'), KBTS_SHAPER_TIBETAN},
|
|
{KBTS_FOURCC('t', 'f', 'n', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'i', 'r', 'h'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'o', 'd', 'r'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'o', 't', 'o'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('t', 'u', 't', 'g'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('u', 'g', 'a', 'r'), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('v', 'a', 'i', ' '), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('v', 'i', 't', 'h'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('w', 'c', 'h', 'o'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('w', 'a', 'r', 'a'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('y', 'e', 'z', 'i'), KBTS_SHAPER_USE},
|
|
{KBTS_FOURCC('y', 'i', ' ', ' '), KBTS_SHAPER_DEFAULT},
|
|
{KBTS_FOURCC('z', 'a', 'n', 'b'), KBTS_SHAPER_USE},
|
|
};
|
|
|
|
KBTS_EXPORT kbts_script kbts_ScriptTagToScript(kbts_script_tag Tag)
|
|
{
|
|
kbts_script Result = 0;
|
|
switch(Tag)
|
|
{
|
|
case KBTS_SCRIPT_TAG_DONT_KNOW: Result = KBTS_SCRIPT_DONT_KNOW; break;
|
|
case KBTS_SCRIPT_TAG_ADLAM: Result = KBTS_SCRIPT_ADLAM; break;
|
|
case KBTS_SCRIPT_TAG_AHOM: Result = KBTS_SCRIPT_AHOM; break;
|
|
case KBTS_SCRIPT_TAG_ANATOLIAN_HIEROGLYPHS: Result = KBTS_SCRIPT_ANATOLIAN_HIEROGLYPHS; break;
|
|
case KBTS_SCRIPT_TAG_ARABIC: Result = KBTS_SCRIPT_ARABIC; break;
|
|
case KBTS_SCRIPT_TAG_ARMENIAN: Result = KBTS_SCRIPT_ARMENIAN; break;
|
|
case KBTS_SCRIPT_TAG_AVESTAN: Result = KBTS_SCRIPT_AVESTAN; break;
|
|
case KBTS_SCRIPT_TAG_BALINESE: Result = KBTS_SCRIPT_BALINESE; break;
|
|
case KBTS_SCRIPT_TAG_BAMUM: Result = KBTS_SCRIPT_BAMUM; break;
|
|
case KBTS_SCRIPT_TAG_BASSA_VAH: Result = KBTS_SCRIPT_BASSA_VAH; break;
|
|
case KBTS_SCRIPT_TAG_BATAK: Result = KBTS_SCRIPT_BATAK; break;
|
|
case KBTS_SCRIPT_TAG_BENGALI: Result = KBTS_SCRIPT_BENGALI; break;
|
|
case KBTS_SCRIPT_TAG_BHAIKSUKI: Result = KBTS_SCRIPT_BHAIKSUKI; break;
|
|
case KBTS_SCRIPT_TAG_BOPOMOFO: Result = KBTS_SCRIPT_BOPOMOFO; break;
|
|
case KBTS_SCRIPT_TAG_BRAHMI: Result = KBTS_SCRIPT_BRAHMI; break;
|
|
case KBTS_SCRIPT_TAG_BUGINESE: Result = KBTS_SCRIPT_BUGINESE; break;
|
|
case KBTS_SCRIPT_TAG_BUHID: Result = KBTS_SCRIPT_BUHID; break;
|
|
case KBTS_SCRIPT_TAG_CANADIAN_SYLLABICS: Result = KBTS_SCRIPT_CANADIAN_SYLLABICS; break;
|
|
case KBTS_SCRIPT_TAG_CARIAN: Result = KBTS_SCRIPT_CARIAN; break;
|
|
case KBTS_SCRIPT_TAG_CAUCASIAN_ALBANIAN: Result = KBTS_SCRIPT_CAUCASIAN_ALBANIAN; break;
|
|
case KBTS_SCRIPT_TAG_CHAKMA: Result = KBTS_SCRIPT_CHAKMA; break;
|
|
case KBTS_SCRIPT_TAG_CHAM: Result = KBTS_SCRIPT_CHAM; break;
|
|
case KBTS_SCRIPT_TAG_CHEROKEE: Result = KBTS_SCRIPT_CHEROKEE; break;
|
|
case KBTS_SCRIPT_TAG_CHORASMIAN: Result = KBTS_SCRIPT_CHORASMIAN; break;
|
|
case KBTS_SCRIPT_TAG_CJK_IDEOGRAPHIC: Result = KBTS_SCRIPT_CJK_IDEOGRAPHIC; break;
|
|
case KBTS_SCRIPT_TAG_COPTIC: Result = KBTS_SCRIPT_COPTIC; break;
|
|
case KBTS_SCRIPT_TAG_CYPRIOT_SYLLABARY: Result = KBTS_SCRIPT_CYPRIOT_SYLLABARY; break;
|
|
case KBTS_SCRIPT_TAG_CYPRO_MINOAN: Result = KBTS_SCRIPT_CYPRO_MINOAN; break;
|
|
case KBTS_SCRIPT_TAG_CYRILLIC: Result = KBTS_SCRIPT_CYRILLIC; break;
|
|
case KBTS_SCRIPT_TAG_DEFAULT: Result = KBTS_SCRIPT_DEFAULT; break;
|
|
case KBTS_SCRIPT_TAG_DESERET: Result = KBTS_SCRIPT_DESERET; break;
|
|
case KBTS_SCRIPT_TAG_DEVANAGARI: Result = KBTS_SCRIPT_DEVANAGARI; break;
|
|
case KBTS_SCRIPT_TAG_DIVES_AKURU: Result = KBTS_SCRIPT_DIVES_AKURU; break;
|
|
case KBTS_SCRIPT_TAG_DOGRA: Result = KBTS_SCRIPT_DOGRA; break;
|
|
case KBTS_SCRIPT_TAG_DUPLOYAN: Result = KBTS_SCRIPT_DUPLOYAN; break;
|
|
case KBTS_SCRIPT_TAG_EGYPTIAN_HIEROGLYPHS: Result = KBTS_SCRIPT_EGYPTIAN_HIEROGLYPHS; break;
|
|
case KBTS_SCRIPT_TAG_ELBASAN: Result = KBTS_SCRIPT_ELBASAN; break;
|
|
case KBTS_SCRIPT_TAG_ELYMAIC: Result = KBTS_SCRIPT_ELYMAIC; break;
|
|
case KBTS_SCRIPT_TAG_ETHIOPIC: Result = KBTS_SCRIPT_ETHIOPIC; break;
|
|
case KBTS_SCRIPT_TAG_GARAY: Result = KBTS_SCRIPT_GARAY; break;
|
|
case KBTS_SCRIPT_TAG_GEORGIAN: Result = KBTS_SCRIPT_GEORGIAN; break;
|
|
case KBTS_SCRIPT_TAG_GLAGOLITIC: Result = KBTS_SCRIPT_GLAGOLITIC; break;
|
|
case KBTS_SCRIPT_TAG_GOTHIC: Result = KBTS_SCRIPT_GOTHIC; break;
|
|
case KBTS_SCRIPT_TAG_GRANTHA: Result = KBTS_SCRIPT_GRANTHA; break;
|
|
case KBTS_SCRIPT_TAG_GREEK: Result = KBTS_SCRIPT_GREEK; break;
|
|
case KBTS_SCRIPT_TAG_GUJARATI: Result = KBTS_SCRIPT_GUJARATI; break;
|
|
case KBTS_SCRIPT_TAG_GUNJALA_GONDI: Result = KBTS_SCRIPT_GUNJALA_GONDI; break;
|
|
case KBTS_SCRIPT_TAG_GURMUKHI: Result = KBTS_SCRIPT_GURMUKHI; break;
|
|
case KBTS_SCRIPT_TAG_GURUNG_KHEMA: Result = KBTS_SCRIPT_GURUNG_KHEMA; break;
|
|
case KBTS_SCRIPT_TAG_HANGUL: Result = KBTS_SCRIPT_HANGUL; break;
|
|
case KBTS_SCRIPT_TAG_HANIFI_ROHINGYA: Result = KBTS_SCRIPT_HANIFI_ROHINGYA; break;
|
|
case KBTS_SCRIPT_TAG_HANUNOO: Result = KBTS_SCRIPT_HANUNOO; break;
|
|
case KBTS_SCRIPT_TAG_HATRAN: Result = KBTS_SCRIPT_HATRAN; break;
|
|
case KBTS_SCRIPT_TAG_HEBREW: Result = KBTS_SCRIPT_HEBREW; break;
|
|
case KBTS_SCRIPT_TAG_HIRAGANA: Result = KBTS_SCRIPT_HIRAGANA; break;
|
|
case KBTS_SCRIPT_TAG_IMPERIAL_ARAMAIC: Result = KBTS_SCRIPT_IMPERIAL_ARAMAIC; break;
|
|
case KBTS_SCRIPT_TAG_INSCRIPTIONAL_PAHLAVI: Result = KBTS_SCRIPT_INSCRIPTIONAL_PAHLAVI; break;
|
|
case KBTS_SCRIPT_TAG_INSCRIPTIONAL_PARTHIAN: Result = KBTS_SCRIPT_INSCRIPTIONAL_PARTHIAN; break;
|
|
case KBTS_SCRIPT_TAG_JAVANESE: Result = KBTS_SCRIPT_JAVANESE; break;
|
|
case KBTS_SCRIPT_TAG_KAITHI: Result = KBTS_SCRIPT_KAITHI; break;
|
|
case KBTS_SCRIPT_TAG_KANNADA: Result = KBTS_SCRIPT_KANNADA; break;
|
|
case KBTS_SCRIPT_TAG_KAWI: Result = KBTS_SCRIPT_KAWI; break;
|
|
case KBTS_SCRIPT_TAG_KAYAH_LI: Result = KBTS_SCRIPT_KAYAH_LI; break;
|
|
case KBTS_SCRIPT_TAG_KHAROSHTHI: Result = KBTS_SCRIPT_KHAROSHTHI; break;
|
|
case KBTS_SCRIPT_TAG_KHITAN_SMALL_SCRIPT: Result = KBTS_SCRIPT_KHITAN_SMALL_SCRIPT; break;
|
|
case KBTS_SCRIPT_TAG_KHMER: Result = KBTS_SCRIPT_KHMER; break;
|
|
case KBTS_SCRIPT_TAG_KHOJKI: Result = KBTS_SCRIPT_KHOJKI; break;
|
|
case KBTS_SCRIPT_TAG_KHUDAWADI: Result = KBTS_SCRIPT_KHUDAWADI; break;
|
|
case KBTS_SCRIPT_TAG_KIRAT_RAI: Result = KBTS_SCRIPT_KIRAT_RAI; break;
|
|
case KBTS_SCRIPT_TAG_LAO: Result = KBTS_SCRIPT_LAO; break;
|
|
case KBTS_SCRIPT_TAG_LATIN: Result = KBTS_SCRIPT_LATIN; break;
|
|
case KBTS_SCRIPT_TAG_LEPCHA: Result = KBTS_SCRIPT_LEPCHA; break;
|
|
case KBTS_SCRIPT_TAG_LIMBU: Result = KBTS_SCRIPT_LIMBU; break;
|
|
case KBTS_SCRIPT_TAG_LINEAR_A: Result = KBTS_SCRIPT_LINEAR_A; break;
|
|
case KBTS_SCRIPT_TAG_LINEAR_B: Result = KBTS_SCRIPT_LINEAR_B; break;
|
|
case KBTS_SCRIPT_TAG_LISU: Result = KBTS_SCRIPT_LISU; break;
|
|
case KBTS_SCRIPT_TAG_LYCIAN: Result = KBTS_SCRIPT_LYCIAN; break;
|
|
case KBTS_SCRIPT_TAG_LYDIAN: Result = KBTS_SCRIPT_LYDIAN; break;
|
|
case KBTS_SCRIPT_TAG_MAHAJANI: Result = KBTS_SCRIPT_MAHAJANI; break;
|
|
case KBTS_SCRIPT_TAG_MAKASAR: Result = KBTS_SCRIPT_MAKASAR; break;
|
|
case KBTS_SCRIPT_TAG_MALAYALAM: Result = KBTS_SCRIPT_MALAYALAM; break;
|
|
case KBTS_SCRIPT_TAG_MANDAIC: Result = KBTS_SCRIPT_MANDAIC; break;
|
|
case KBTS_SCRIPT_TAG_MANICHAEAN: Result = KBTS_SCRIPT_MANICHAEAN; break;
|
|
case KBTS_SCRIPT_TAG_MARCHEN: Result = KBTS_SCRIPT_MARCHEN; break;
|
|
case KBTS_SCRIPT_TAG_MASARAM_GONDI: Result = KBTS_SCRIPT_MASARAM_GONDI; break;
|
|
case KBTS_SCRIPT_TAG_MEDEFAIDRIN: Result = KBTS_SCRIPT_MEDEFAIDRIN; break;
|
|
case KBTS_SCRIPT_TAG_MEETEI_MAYEK: Result = KBTS_SCRIPT_MEETEI_MAYEK; break;
|
|
case KBTS_SCRIPT_TAG_MENDE_KIKAKUI: Result = KBTS_SCRIPT_MENDE_KIKAKUI; break;
|
|
case KBTS_SCRIPT_TAG_MEROITIC_CURSIVE: Result = KBTS_SCRIPT_MEROITIC_CURSIVE; break;
|
|
case KBTS_SCRIPT_TAG_MEROITIC_HIEROGLYPHS: Result = KBTS_SCRIPT_MEROITIC_HIEROGLYPHS; break;
|
|
case KBTS_SCRIPT_TAG_MIAO: Result = KBTS_SCRIPT_MIAO; break;
|
|
case KBTS_SCRIPT_TAG_MODI: Result = KBTS_SCRIPT_MODI; break;
|
|
case KBTS_SCRIPT_TAG_MONGOLIAN: Result = KBTS_SCRIPT_MONGOLIAN; break;
|
|
case KBTS_SCRIPT_TAG_MRO: Result = KBTS_SCRIPT_MRO; break;
|
|
case KBTS_SCRIPT_TAG_MULTANI: Result = KBTS_SCRIPT_MULTANI; break;
|
|
case KBTS_SCRIPT_TAG_MYANMAR: Result = KBTS_SCRIPT_MYANMAR; break;
|
|
case KBTS_SCRIPT_TAG_NABATAEAN: Result = KBTS_SCRIPT_NABATAEAN; break;
|
|
case KBTS_SCRIPT_TAG_NAG_MUNDARI: Result = KBTS_SCRIPT_NAG_MUNDARI; break;
|
|
case KBTS_SCRIPT_TAG_NANDINAGARI: Result = KBTS_SCRIPT_NANDINAGARI; break;
|
|
case KBTS_SCRIPT_TAG_NEWA: Result = KBTS_SCRIPT_NEWA; break;
|
|
case KBTS_SCRIPT_TAG_NEW_TAI_LUE: Result = KBTS_SCRIPT_NEW_TAI_LUE; break;
|
|
case KBTS_SCRIPT_TAG_NKO: Result = KBTS_SCRIPT_NKO; break;
|
|
case KBTS_SCRIPT_TAG_NUSHU: Result = KBTS_SCRIPT_NUSHU; break;
|
|
case KBTS_SCRIPT_TAG_NYIAKENG_PUACHUE_HMONG: Result = KBTS_SCRIPT_NYIAKENG_PUACHUE_HMONG; break;
|
|
case KBTS_SCRIPT_TAG_OGHAM: Result = KBTS_SCRIPT_OGHAM; break;
|
|
case KBTS_SCRIPT_TAG_OL_CHIKI: Result = KBTS_SCRIPT_OL_CHIKI; break;
|
|
case KBTS_SCRIPT_TAG_OL_ONAL: Result = KBTS_SCRIPT_OL_ONAL; break;
|
|
case KBTS_SCRIPT_TAG_OLD_ITALIC: Result = KBTS_SCRIPT_OLD_ITALIC; break;
|
|
case KBTS_SCRIPT_TAG_OLD_HUNGARIAN: Result = KBTS_SCRIPT_OLD_HUNGARIAN; break;
|
|
case KBTS_SCRIPT_TAG_OLD_NORTH_ARABIAN: Result = KBTS_SCRIPT_OLD_NORTH_ARABIAN; break;
|
|
case KBTS_SCRIPT_TAG_OLD_PERMIC: Result = KBTS_SCRIPT_OLD_PERMIC; break;
|
|
case KBTS_SCRIPT_TAG_OLD_PERSIAN_CUNEIFORM: Result = KBTS_SCRIPT_OLD_PERSIAN_CUNEIFORM; break;
|
|
case KBTS_SCRIPT_TAG_OLD_SOGDIAN: Result = KBTS_SCRIPT_OLD_SOGDIAN; break;
|
|
case KBTS_SCRIPT_TAG_OLD_SOUTH_ARABIAN: Result = KBTS_SCRIPT_OLD_SOUTH_ARABIAN; break;
|
|
case KBTS_SCRIPT_TAG_OLD_TURKIC: Result = KBTS_SCRIPT_OLD_TURKIC; break;
|
|
case KBTS_SCRIPT_TAG_OLD_UYGHUR: Result = KBTS_SCRIPT_OLD_UYGHUR; break;
|
|
case KBTS_SCRIPT_TAG_ODIA: Result = KBTS_SCRIPT_ODIA; break;
|
|
case KBTS_SCRIPT_TAG_OSAGE: Result = KBTS_SCRIPT_OSAGE; break;
|
|
case KBTS_SCRIPT_TAG_OSMANYA: Result = KBTS_SCRIPT_OSMANYA; break;
|
|
case KBTS_SCRIPT_TAG_PAHAWH_HMONG: Result = KBTS_SCRIPT_PAHAWH_HMONG; break;
|
|
case KBTS_SCRIPT_TAG_PALMYRENE: Result = KBTS_SCRIPT_PALMYRENE; break;
|
|
case KBTS_SCRIPT_TAG_PAU_CIN_HAU: Result = KBTS_SCRIPT_PAU_CIN_HAU; break;
|
|
case KBTS_SCRIPT_TAG_PHAGS_PA: Result = KBTS_SCRIPT_PHAGS_PA; break;
|
|
case KBTS_SCRIPT_TAG_PHOENICIAN: Result = KBTS_SCRIPT_PHOENICIAN; break;
|
|
case KBTS_SCRIPT_TAG_PSALTER_PAHLAVI: Result = KBTS_SCRIPT_PSALTER_PAHLAVI; break;
|
|
case KBTS_SCRIPT_TAG_REJANG: Result = KBTS_SCRIPT_REJANG; break;
|
|
case KBTS_SCRIPT_TAG_RUNIC: Result = KBTS_SCRIPT_RUNIC; break;
|
|
case KBTS_SCRIPT_TAG_SAMARITAN: Result = KBTS_SCRIPT_SAMARITAN; break;
|
|
case KBTS_SCRIPT_TAG_SAURASHTRA: Result = KBTS_SCRIPT_SAURASHTRA; break;
|
|
case KBTS_SCRIPT_TAG_SHARADA: Result = KBTS_SCRIPT_SHARADA; break;
|
|
case KBTS_SCRIPT_TAG_SHAVIAN: Result = KBTS_SCRIPT_SHAVIAN; break;
|
|
case KBTS_SCRIPT_TAG_SIDDHAM: Result = KBTS_SCRIPT_SIDDHAM; break;
|
|
case KBTS_SCRIPT_TAG_SIGN_WRITING: Result = KBTS_SCRIPT_SIGN_WRITING; break;
|
|
case KBTS_SCRIPT_TAG_SOGDIAN: Result = KBTS_SCRIPT_SOGDIAN; break;
|
|
case KBTS_SCRIPT_TAG_SINHALA: Result = KBTS_SCRIPT_SINHALA; break;
|
|
case KBTS_SCRIPT_TAG_SORA_SOMPENG: Result = KBTS_SCRIPT_SORA_SOMPENG; break;
|
|
case KBTS_SCRIPT_TAG_SOYOMBO: Result = KBTS_SCRIPT_SOYOMBO; break;
|
|
case KBTS_SCRIPT_TAG_SUMERO_AKKADIAN_CUNEIFORM: Result = KBTS_SCRIPT_SUMERO_AKKADIAN_CUNEIFORM; break;
|
|
case KBTS_SCRIPT_TAG_SUNDANESE: Result = KBTS_SCRIPT_SUNDANESE; break;
|
|
case KBTS_SCRIPT_TAG_SUNUWAR: Result = KBTS_SCRIPT_SUNUWAR; break;
|
|
case KBTS_SCRIPT_TAG_SYLOTI_NAGRI: Result = KBTS_SCRIPT_SYLOTI_NAGRI; break;
|
|
case KBTS_SCRIPT_TAG_SYRIAC: Result = KBTS_SCRIPT_SYRIAC; break;
|
|
case KBTS_SCRIPT_TAG_TAGALOG: Result = KBTS_SCRIPT_TAGALOG; break;
|
|
case KBTS_SCRIPT_TAG_TAGBANWA: Result = KBTS_SCRIPT_TAGBANWA; break;
|
|
case KBTS_SCRIPT_TAG_TAI_LE: Result = KBTS_SCRIPT_TAI_LE; break;
|
|
case KBTS_SCRIPT_TAG_TAI_THAM: Result = KBTS_SCRIPT_TAI_THAM; break;
|
|
case KBTS_SCRIPT_TAG_TAI_VIET: Result = KBTS_SCRIPT_TAI_VIET; break;
|
|
case KBTS_SCRIPT_TAG_TAKRI: Result = KBTS_SCRIPT_TAKRI; break;
|
|
case KBTS_SCRIPT_TAG_TAMIL: Result = KBTS_SCRIPT_TAMIL; break;
|
|
case KBTS_SCRIPT_TAG_TANGSA: Result = KBTS_SCRIPT_TANGSA; break;
|
|
case KBTS_SCRIPT_TAG_TANGUT: Result = KBTS_SCRIPT_TANGUT; break;
|
|
case KBTS_SCRIPT_TAG_TELUGU: Result = KBTS_SCRIPT_TELUGU; break;
|
|
case KBTS_SCRIPT_TAG_THAANA: Result = KBTS_SCRIPT_THAANA; break;
|
|
case KBTS_SCRIPT_TAG_THAI: Result = KBTS_SCRIPT_THAI; break;
|
|
case KBTS_SCRIPT_TAG_TIBETAN: Result = KBTS_SCRIPT_TIBETAN; break;
|
|
case KBTS_SCRIPT_TAG_TIFINAGH: Result = KBTS_SCRIPT_TIFINAGH; break;
|
|
case KBTS_SCRIPT_TAG_TIRHUTA: Result = KBTS_SCRIPT_TIRHUTA; break;
|
|
case KBTS_SCRIPT_TAG_TODHRI: Result = KBTS_SCRIPT_TODHRI; break;
|
|
case KBTS_SCRIPT_TAG_TOTO: Result = KBTS_SCRIPT_TOTO; break;
|
|
case KBTS_SCRIPT_TAG_TULU_TIGALARI: Result = KBTS_SCRIPT_TULU_TIGALARI; break;
|
|
case KBTS_SCRIPT_TAG_UGARITIC_CUNEIFORM: Result = KBTS_SCRIPT_UGARITIC_CUNEIFORM; break;
|
|
case KBTS_SCRIPT_TAG_VAI: Result = KBTS_SCRIPT_VAI; break;
|
|
case KBTS_SCRIPT_TAG_VITHKUQI: Result = KBTS_SCRIPT_VITHKUQI; break;
|
|
case KBTS_SCRIPT_TAG_WANCHO: Result = KBTS_SCRIPT_WANCHO; break;
|
|
case KBTS_SCRIPT_TAG_WARANG_CITI: Result = KBTS_SCRIPT_WARANG_CITI; break;
|
|
case KBTS_SCRIPT_TAG_YEZIDI: Result = KBTS_SCRIPT_YEZIDI; break;
|
|
case KBTS_SCRIPT_TAG_YI: Result = KBTS_SCRIPT_YI; break;
|
|
case KBTS_SCRIPT_TAG_ZANABAZAR_SQUARE: Result = KBTS_SCRIPT_ZANABAZAR_SQUARE; break;
|
|
default: break;
|
|
}
|
|
return Result;
|
|
}
|
|
|
|
static kbts__feature_id kbts__FeatureTagToId(kbts_feature_tag Tag)
|
|
{
|
|
kbts__feature_id Result = 0;
|
|
switch(Tag)
|
|
{
|
|
case KBTS_FEATURE_TAG_isol: Result = KBTS__FEATURE_ID_isol; break;
|
|
case KBTS_FEATURE_TAG_fina: Result = KBTS__FEATURE_ID_fina; break;
|
|
case KBTS_FEATURE_TAG_fin2: Result = KBTS__FEATURE_ID_fin2; break;
|
|
case KBTS_FEATURE_TAG_fin3: Result = KBTS__FEATURE_ID_fin3; break;
|
|
case KBTS_FEATURE_TAG_medi: Result = KBTS__FEATURE_ID_medi; break;
|
|
case KBTS_FEATURE_TAG_med2: Result = KBTS__FEATURE_ID_med2; break;
|
|
case KBTS_FEATURE_TAG_init: Result = KBTS__FEATURE_ID_init; break;
|
|
case KBTS_FEATURE_TAG_ljmo: Result = KBTS__FEATURE_ID_ljmo; break;
|
|
case KBTS_FEATURE_TAG_vjmo: Result = KBTS__FEATURE_ID_vjmo; break;
|
|
case KBTS_FEATURE_TAG_tjmo: Result = KBTS__FEATURE_ID_tjmo; break;
|
|
case KBTS_FEATURE_TAG_rphf: Result = KBTS__FEATURE_ID_rphf; break;
|
|
case KBTS_FEATURE_TAG_blwf: Result = KBTS__FEATURE_ID_blwf; break;
|
|
case KBTS_FEATURE_TAG_half: Result = KBTS__FEATURE_ID_half; break;
|
|
case KBTS_FEATURE_TAG_pstf: Result = KBTS__FEATURE_ID_pstf; break;
|
|
case KBTS_FEATURE_TAG_abvf: Result = KBTS__FEATURE_ID_abvf; break;
|
|
case KBTS_FEATURE_TAG_pref: Result = KBTS__FEATURE_ID_pref; break;
|
|
case KBTS_FEATURE_TAG_numr: Result = KBTS__FEATURE_ID_numr; break;
|
|
case KBTS_FEATURE_TAG_frac: Result = KBTS__FEATURE_ID_frac; break;
|
|
case KBTS_FEATURE_TAG_dnom: Result = KBTS__FEATURE_ID_dnom; break;
|
|
case KBTS_FEATURE_TAG_cfar: Result = KBTS__FEATURE_ID_cfar; break;
|
|
case KBTS_FEATURE_TAG_aalt: Result = KBTS__FEATURE_ID_aalt; break;
|
|
case KBTS_FEATURE_TAG_abvm: Result = KBTS__FEATURE_ID_abvm; break;
|
|
case KBTS_FEATURE_TAG_abvs: Result = KBTS__FEATURE_ID_abvs; break;
|
|
case KBTS_FEATURE_TAG_afrc: Result = KBTS__FEATURE_ID_afrc; break;
|
|
case KBTS_FEATURE_TAG_akhn: Result = KBTS__FEATURE_ID_akhn; break;
|
|
case KBTS_FEATURE_TAG_apkn: Result = KBTS__FEATURE_ID_apkn; break;
|
|
case KBTS_FEATURE_TAG_blwm: Result = KBTS__FEATURE_ID_blwm; break;
|
|
case KBTS_FEATURE_TAG_blws: Result = KBTS__FEATURE_ID_blws; break;
|
|
case KBTS_FEATURE_TAG_calt: Result = KBTS__FEATURE_ID_calt; break;
|
|
case KBTS_FEATURE_TAG_case: Result = KBTS__FEATURE_ID_case; break;
|
|
case KBTS_FEATURE_TAG_ccmp: Result = KBTS__FEATURE_ID_ccmp; break;
|
|
case KBTS_FEATURE_TAG_chws: Result = KBTS__FEATURE_ID_chws; break;
|
|
case KBTS_FEATURE_TAG_cjct: Result = KBTS__FEATURE_ID_cjct; break;
|
|
case KBTS_FEATURE_TAG_clig: Result = KBTS__FEATURE_ID_clig; break;
|
|
case KBTS_FEATURE_TAG_cpct: Result = KBTS__FEATURE_ID_cpct; break;
|
|
case KBTS_FEATURE_TAG_cpsp: Result = KBTS__FEATURE_ID_cpsp; break;
|
|
case KBTS_FEATURE_TAG_cswh: Result = KBTS__FEATURE_ID_cswh; break;
|
|
case KBTS_FEATURE_TAG_curs: Result = KBTS__FEATURE_ID_curs; break;
|
|
case KBTS_FEATURE_TAG_cv01: Result = KBTS__FEATURE_ID_cv01; break;
|
|
case KBTS_FEATURE_TAG_cv02: Result = KBTS__FEATURE_ID_cv02; break;
|
|
case KBTS_FEATURE_TAG_cv03: Result = KBTS__FEATURE_ID_cv03; break;
|
|
case KBTS_FEATURE_TAG_cv04: Result = KBTS__FEATURE_ID_cv04; break;
|
|
case KBTS_FEATURE_TAG_cv05: Result = KBTS__FEATURE_ID_cv05; break;
|
|
case KBTS_FEATURE_TAG_cv06: Result = KBTS__FEATURE_ID_cv06; break;
|
|
case KBTS_FEATURE_TAG_cv07: Result = KBTS__FEATURE_ID_cv07; break;
|
|
case KBTS_FEATURE_TAG_cv08: Result = KBTS__FEATURE_ID_cv08; break;
|
|
case KBTS_FEATURE_TAG_cv09: Result = KBTS__FEATURE_ID_cv09; break;
|
|
case KBTS_FEATURE_TAG_cv10: Result = KBTS__FEATURE_ID_cv10; break;
|
|
case KBTS_FEATURE_TAG_cv11: Result = KBTS__FEATURE_ID_cv11; break;
|
|
case KBTS_FEATURE_TAG_cv12: Result = KBTS__FEATURE_ID_cv12; break;
|
|
case KBTS_FEATURE_TAG_cv13: Result = KBTS__FEATURE_ID_cv13; break;
|
|
case KBTS_FEATURE_TAG_cv14: Result = KBTS__FEATURE_ID_cv14; break;
|
|
case KBTS_FEATURE_TAG_cv15: Result = KBTS__FEATURE_ID_cv15; break;
|
|
case KBTS_FEATURE_TAG_cv16: Result = KBTS__FEATURE_ID_cv16; break;
|
|
case KBTS_FEATURE_TAG_cv17: Result = KBTS__FEATURE_ID_cv17; break;
|
|
case KBTS_FEATURE_TAG_cv18: Result = KBTS__FEATURE_ID_cv18; break;
|
|
case KBTS_FEATURE_TAG_cv19: Result = KBTS__FEATURE_ID_cv19; break;
|
|
case KBTS_FEATURE_TAG_cv20: Result = KBTS__FEATURE_ID_cv20; break;
|
|
case KBTS_FEATURE_TAG_cv21: Result = KBTS__FEATURE_ID_cv21; break;
|
|
case KBTS_FEATURE_TAG_cv22: Result = KBTS__FEATURE_ID_cv22; break;
|
|
case KBTS_FEATURE_TAG_cv23: Result = KBTS__FEATURE_ID_cv23; break;
|
|
case KBTS_FEATURE_TAG_cv24: Result = KBTS__FEATURE_ID_cv24; break;
|
|
case KBTS_FEATURE_TAG_cv25: Result = KBTS__FEATURE_ID_cv25; break;
|
|
case KBTS_FEATURE_TAG_cv26: Result = KBTS__FEATURE_ID_cv26; break;
|
|
case KBTS_FEATURE_TAG_cv27: Result = KBTS__FEATURE_ID_cv27; break;
|
|
case KBTS_FEATURE_TAG_cv28: Result = KBTS__FEATURE_ID_cv28; break;
|
|
case KBTS_FEATURE_TAG_cv29: Result = KBTS__FEATURE_ID_cv29; break;
|
|
case KBTS_FEATURE_TAG_cv30: Result = KBTS__FEATURE_ID_cv30; break;
|
|
case KBTS_FEATURE_TAG_cv31: Result = KBTS__FEATURE_ID_cv31; break;
|
|
case KBTS_FEATURE_TAG_cv32: Result = KBTS__FEATURE_ID_cv32; break;
|
|
case KBTS_FEATURE_TAG_cv33: Result = KBTS__FEATURE_ID_cv33; break;
|
|
case KBTS_FEATURE_TAG_cv34: Result = KBTS__FEATURE_ID_cv34; break;
|
|
case KBTS_FEATURE_TAG_cv35: Result = KBTS__FEATURE_ID_cv35; break;
|
|
case KBTS_FEATURE_TAG_cv36: Result = KBTS__FEATURE_ID_cv36; break;
|
|
case KBTS_FEATURE_TAG_cv37: Result = KBTS__FEATURE_ID_cv37; break;
|
|
case KBTS_FEATURE_TAG_cv38: Result = KBTS__FEATURE_ID_cv38; break;
|
|
case KBTS_FEATURE_TAG_cv39: Result = KBTS__FEATURE_ID_cv39; break;
|
|
case KBTS_FEATURE_TAG_cv40: Result = KBTS__FEATURE_ID_cv40; break;
|
|
case KBTS_FEATURE_TAG_cv41: Result = KBTS__FEATURE_ID_cv41; break;
|
|
case KBTS_FEATURE_TAG_cv42: Result = KBTS__FEATURE_ID_cv42; break;
|
|
case KBTS_FEATURE_TAG_cv43: Result = KBTS__FEATURE_ID_cv43; break;
|
|
case KBTS_FEATURE_TAG_cv44: Result = KBTS__FEATURE_ID_cv44; break;
|
|
case KBTS_FEATURE_TAG_cv45: Result = KBTS__FEATURE_ID_cv45; break;
|
|
case KBTS_FEATURE_TAG_cv46: Result = KBTS__FEATURE_ID_cv46; break;
|
|
case KBTS_FEATURE_TAG_cv47: Result = KBTS__FEATURE_ID_cv47; break;
|
|
case KBTS_FEATURE_TAG_cv48: Result = KBTS__FEATURE_ID_cv48; break;
|
|
case KBTS_FEATURE_TAG_cv49: Result = KBTS__FEATURE_ID_cv49; break;
|
|
case KBTS_FEATURE_TAG_cv50: Result = KBTS__FEATURE_ID_cv50; break;
|
|
case KBTS_FEATURE_TAG_cv51: Result = KBTS__FEATURE_ID_cv51; break;
|
|
case KBTS_FEATURE_TAG_cv52: Result = KBTS__FEATURE_ID_cv52; break;
|
|
case KBTS_FEATURE_TAG_cv53: Result = KBTS__FEATURE_ID_cv53; break;
|
|
case KBTS_FEATURE_TAG_cv54: Result = KBTS__FEATURE_ID_cv54; break;
|
|
case KBTS_FEATURE_TAG_cv55: Result = KBTS__FEATURE_ID_cv55; break;
|
|
case KBTS_FEATURE_TAG_cv56: Result = KBTS__FEATURE_ID_cv56; break;
|
|
case KBTS_FEATURE_TAG_cv57: Result = KBTS__FEATURE_ID_cv57; break;
|
|
case KBTS_FEATURE_TAG_cv58: Result = KBTS__FEATURE_ID_cv58; break;
|
|
case KBTS_FEATURE_TAG_cv59: Result = KBTS__FEATURE_ID_cv59; break;
|
|
case KBTS_FEATURE_TAG_cv60: Result = KBTS__FEATURE_ID_cv60; break;
|
|
case KBTS_FEATURE_TAG_cv61: Result = KBTS__FEATURE_ID_cv61; break;
|
|
case KBTS_FEATURE_TAG_cv62: Result = KBTS__FEATURE_ID_cv62; break;
|
|
case KBTS_FEATURE_TAG_cv63: Result = KBTS__FEATURE_ID_cv63; break;
|
|
case KBTS_FEATURE_TAG_cv64: Result = KBTS__FEATURE_ID_cv64; break;
|
|
case KBTS_FEATURE_TAG_cv65: Result = KBTS__FEATURE_ID_cv65; break;
|
|
case KBTS_FEATURE_TAG_cv66: Result = KBTS__FEATURE_ID_cv66; break;
|
|
case KBTS_FEATURE_TAG_cv67: Result = KBTS__FEATURE_ID_cv67; break;
|
|
case KBTS_FEATURE_TAG_cv68: Result = KBTS__FEATURE_ID_cv68; break;
|
|
case KBTS_FEATURE_TAG_cv69: Result = KBTS__FEATURE_ID_cv69; break;
|
|
case KBTS_FEATURE_TAG_cv70: Result = KBTS__FEATURE_ID_cv70; break;
|
|
case KBTS_FEATURE_TAG_cv71: Result = KBTS__FEATURE_ID_cv71; break;
|
|
case KBTS_FEATURE_TAG_cv72: Result = KBTS__FEATURE_ID_cv72; break;
|
|
case KBTS_FEATURE_TAG_cv73: Result = KBTS__FEATURE_ID_cv73; break;
|
|
case KBTS_FEATURE_TAG_cv74: Result = KBTS__FEATURE_ID_cv74; break;
|
|
case KBTS_FEATURE_TAG_cv75: Result = KBTS__FEATURE_ID_cv75; break;
|
|
case KBTS_FEATURE_TAG_cv76: Result = KBTS__FEATURE_ID_cv76; break;
|
|
case KBTS_FEATURE_TAG_cv77: Result = KBTS__FEATURE_ID_cv77; break;
|
|
case KBTS_FEATURE_TAG_cv78: Result = KBTS__FEATURE_ID_cv78; break;
|
|
case KBTS_FEATURE_TAG_cv79: Result = KBTS__FEATURE_ID_cv79; break;
|
|
case KBTS_FEATURE_TAG_cv80: Result = KBTS__FEATURE_ID_cv80; break;
|
|
case KBTS_FEATURE_TAG_cv81: Result = KBTS__FEATURE_ID_cv81; break;
|
|
case KBTS_FEATURE_TAG_cv82: Result = KBTS__FEATURE_ID_cv82; break;
|
|
case KBTS_FEATURE_TAG_cv83: Result = KBTS__FEATURE_ID_cv83; break;
|
|
case KBTS_FEATURE_TAG_cv84: Result = KBTS__FEATURE_ID_cv84; break;
|
|
case KBTS_FEATURE_TAG_cv85: Result = KBTS__FEATURE_ID_cv85; break;
|
|
case KBTS_FEATURE_TAG_cv86: Result = KBTS__FEATURE_ID_cv86; break;
|
|
case KBTS_FEATURE_TAG_cv87: Result = KBTS__FEATURE_ID_cv87; break;
|
|
case KBTS_FEATURE_TAG_cv88: Result = KBTS__FEATURE_ID_cv88; break;
|
|
case KBTS_FEATURE_TAG_cv89: Result = KBTS__FEATURE_ID_cv89; break;
|
|
case KBTS_FEATURE_TAG_cv90: Result = KBTS__FEATURE_ID_cv90; break;
|
|
case KBTS_FEATURE_TAG_cv91: Result = KBTS__FEATURE_ID_cv91; break;
|
|
case KBTS_FEATURE_TAG_cv92: Result = KBTS__FEATURE_ID_cv92; break;
|
|
case KBTS_FEATURE_TAG_cv93: Result = KBTS__FEATURE_ID_cv93; break;
|
|
case KBTS_FEATURE_TAG_cv94: Result = KBTS__FEATURE_ID_cv94; break;
|
|
case KBTS_FEATURE_TAG_cv95: Result = KBTS__FEATURE_ID_cv95; break;
|
|
case KBTS_FEATURE_TAG_cv96: Result = KBTS__FEATURE_ID_cv96; break;
|
|
case KBTS_FEATURE_TAG_cv97: Result = KBTS__FEATURE_ID_cv97; break;
|
|
case KBTS_FEATURE_TAG_cv98: Result = KBTS__FEATURE_ID_cv98; break;
|
|
case KBTS_FEATURE_TAG_cv99: Result = KBTS__FEATURE_ID_cv99; break;
|
|
case KBTS_FEATURE_TAG_c2pc: Result = KBTS__FEATURE_ID_c2pc; break;
|
|
case KBTS_FEATURE_TAG_c2sc: Result = KBTS__FEATURE_ID_c2sc; break;
|
|
case KBTS_FEATURE_TAG_dist: Result = KBTS__FEATURE_ID_dist; break;
|
|
case KBTS_FEATURE_TAG_dlig: Result = KBTS__FEATURE_ID_dlig; break;
|
|
case KBTS_FEATURE_TAG_dtls: Result = KBTS__FEATURE_ID_dtls; break;
|
|
case KBTS_FEATURE_TAG_expt: Result = KBTS__FEATURE_ID_expt; break;
|
|
case KBTS_FEATURE_TAG_falt: Result = KBTS__FEATURE_ID_falt; break;
|
|
case KBTS_FEATURE_TAG_flac: Result = KBTS__FEATURE_ID_flac; break;
|
|
case KBTS_FEATURE_TAG_fwid: Result = KBTS__FEATURE_ID_fwid; break;
|
|
case KBTS_FEATURE_TAG_haln: Result = KBTS__FEATURE_ID_haln; break;
|
|
case KBTS_FEATURE_TAG_halt: Result = KBTS__FEATURE_ID_halt; break;
|
|
case KBTS_FEATURE_TAG_hist: Result = KBTS__FEATURE_ID_hist; break;
|
|
case KBTS_FEATURE_TAG_hkna: Result = KBTS__FEATURE_ID_hkna; break;
|
|
case KBTS_FEATURE_TAG_hlig: Result = KBTS__FEATURE_ID_hlig; break;
|
|
case KBTS_FEATURE_TAG_hngl: Result = KBTS__FEATURE_ID_hngl; break;
|
|
case KBTS_FEATURE_TAG_hojo: Result = KBTS__FEATURE_ID_hojo; break;
|
|
case KBTS_FEATURE_TAG_hwid: Result = KBTS__FEATURE_ID_hwid; break;
|
|
case KBTS_FEATURE_TAG_ital: Result = KBTS__FEATURE_ID_ital; break;
|
|
case KBTS_FEATURE_TAG_jalt: Result = KBTS__FEATURE_ID_jalt; break;
|
|
case KBTS_FEATURE_TAG_jp78: Result = KBTS__FEATURE_ID_jp78; break;
|
|
case KBTS_FEATURE_TAG_jp83: Result = KBTS__FEATURE_ID_jp83; break;
|
|
case KBTS_FEATURE_TAG_jp90: Result = KBTS__FEATURE_ID_jp90; break;
|
|
case KBTS_FEATURE_TAG_jp04: Result = KBTS__FEATURE_ID_jp04; break;
|
|
case KBTS_FEATURE_TAG_kern: Result = KBTS__FEATURE_ID_kern; break;
|
|
case KBTS_FEATURE_TAG_lfbd: Result = KBTS__FEATURE_ID_lfbd; break;
|
|
case KBTS_FEATURE_TAG_liga: Result = KBTS__FEATURE_ID_liga; break;
|
|
case KBTS_FEATURE_TAG_lnum: Result = KBTS__FEATURE_ID_lnum; break;
|
|
case KBTS_FEATURE_TAG_locl: Result = KBTS__FEATURE_ID_locl; break;
|
|
case KBTS_FEATURE_TAG_ltra: Result = KBTS__FEATURE_ID_ltra; break;
|
|
case KBTS_FEATURE_TAG_ltrm: Result = KBTS__FEATURE_ID_ltrm; break;
|
|
case KBTS_FEATURE_TAG_mark: Result = KBTS__FEATURE_ID_mark; break;
|
|
case KBTS_FEATURE_TAG_mgrk: Result = KBTS__FEATURE_ID_mgrk; break;
|
|
case KBTS_FEATURE_TAG_mkmk: Result = KBTS__FEATURE_ID_mkmk; break;
|
|
case KBTS_FEATURE_TAG_mset: Result = KBTS__FEATURE_ID_mset; break;
|
|
case KBTS_FEATURE_TAG_nalt: Result = KBTS__FEATURE_ID_nalt; break;
|
|
case KBTS_FEATURE_TAG_nlck: Result = KBTS__FEATURE_ID_nlck; break;
|
|
case KBTS_FEATURE_TAG_nukt: Result = KBTS__FEATURE_ID_nukt; break;
|
|
case KBTS_FEATURE_TAG_onum: Result = KBTS__FEATURE_ID_onum; break;
|
|
case KBTS_FEATURE_TAG_opbd: Result = KBTS__FEATURE_ID_opbd; break;
|
|
case KBTS_FEATURE_TAG_ordn: Result = KBTS__FEATURE_ID_ordn; break;
|
|
case KBTS_FEATURE_TAG_ornm: Result = KBTS__FEATURE_ID_ornm; break;
|
|
case KBTS_FEATURE_TAG_palt: Result = KBTS__FEATURE_ID_palt; break;
|
|
case KBTS_FEATURE_TAG_pcap: Result = KBTS__FEATURE_ID_pcap; break;
|
|
case KBTS_FEATURE_TAG_pkna: Result = KBTS__FEATURE_ID_pkna; break;
|
|
case KBTS_FEATURE_TAG_pnum: Result = KBTS__FEATURE_ID_pnum; break;
|
|
case KBTS_FEATURE_TAG_pres: Result = KBTS__FEATURE_ID_pres; break;
|
|
case KBTS_FEATURE_TAG_psts: Result = KBTS__FEATURE_ID_psts; break;
|
|
case KBTS_FEATURE_TAG_pwid: Result = KBTS__FEATURE_ID_pwid; break;
|
|
case KBTS_FEATURE_TAG_qwid: Result = KBTS__FEATURE_ID_qwid; break;
|
|
case KBTS_FEATURE_TAG_rand: Result = KBTS__FEATURE_ID_rand; break;
|
|
case KBTS_FEATURE_TAG_rclt: Result = KBTS__FEATURE_ID_rclt; break;
|
|
case KBTS_FEATURE_TAG_rkrf: Result = KBTS__FEATURE_ID_rkrf; break;
|
|
case KBTS_FEATURE_TAG_rlig: Result = KBTS__FEATURE_ID_rlig; break;
|
|
case KBTS_FEATURE_TAG_rtbd: Result = KBTS__FEATURE_ID_rtbd; break;
|
|
case KBTS_FEATURE_TAG_rtla: Result = KBTS__FEATURE_ID_rtla; break;
|
|
case KBTS_FEATURE_TAG_rtlm: Result = KBTS__FEATURE_ID_rtlm; break;
|
|
case KBTS_FEATURE_TAG_ruby: Result = KBTS__FEATURE_ID_ruby; break;
|
|
case KBTS_FEATURE_TAG_rvrn: Result = KBTS__FEATURE_ID_rvrn; break;
|
|
case KBTS_FEATURE_TAG_salt: Result = KBTS__FEATURE_ID_salt; break;
|
|
case KBTS_FEATURE_TAG_sinf: Result = KBTS__FEATURE_ID_sinf; break;
|
|
case KBTS_FEATURE_TAG_size: Result = KBTS__FEATURE_ID_size; break;
|
|
case KBTS_FEATURE_TAG_smcp: Result = KBTS__FEATURE_ID_smcp; break;
|
|
case KBTS_FEATURE_TAG_smpl: Result = KBTS__FEATURE_ID_smpl; break;
|
|
case KBTS_FEATURE_TAG_ss01: Result = KBTS__FEATURE_ID_ss01; break;
|
|
case KBTS_FEATURE_TAG_ss02: Result = KBTS__FEATURE_ID_ss02; break;
|
|
case KBTS_FEATURE_TAG_ss03: Result = KBTS__FEATURE_ID_ss03; break;
|
|
case KBTS_FEATURE_TAG_ss04: Result = KBTS__FEATURE_ID_ss04; break;
|
|
case KBTS_FEATURE_TAG_ss05: Result = KBTS__FEATURE_ID_ss05; break;
|
|
case KBTS_FEATURE_TAG_ss06: Result = KBTS__FEATURE_ID_ss06; break;
|
|
case KBTS_FEATURE_TAG_ss07: Result = KBTS__FEATURE_ID_ss07; break;
|
|
case KBTS_FEATURE_TAG_ss08: Result = KBTS__FEATURE_ID_ss08; break;
|
|
case KBTS_FEATURE_TAG_ss09: Result = KBTS__FEATURE_ID_ss09; break;
|
|
case KBTS_FEATURE_TAG_ss10: Result = KBTS__FEATURE_ID_ss10; break;
|
|
case KBTS_FEATURE_TAG_ss11: Result = KBTS__FEATURE_ID_ss11; break;
|
|
case KBTS_FEATURE_TAG_ss12: Result = KBTS__FEATURE_ID_ss12; break;
|
|
case KBTS_FEATURE_TAG_ss13: Result = KBTS__FEATURE_ID_ss13; break;
|
|
case KBTS_FEATURE_TAG_ss14: Result = KBTS__FEATURE_ID_ss14; break;
|
|
case KBTS_FEATURE_TAG_ss15: Result = KBTS__FEATURE_ID_ss15; break;
|
|
case KBTS_FEATURE_TAG_ss16: Result = KBTS__FEATURE_ID_ss16; break;
|
|
case KBTS_FEATURE_TAG_ss17: Result = KBTS__FEATURE_ID_ss17; break;
|
|
case KBTS_FEATURE_TAG_ss18: Result = KBTS__FEATURE_ID_ss18; break;
|
|
case KBTS_FEATURE_TAG_ss19: Result = KBTS__FEATURE_ID_ss19; break;
|
|
case KBTS_FEATURE_TAG_ss20: Result = KBTS__FEATURE_ID_ss20; break;
|
|
case KBTS_FEATURE_TAG_ssty: Result = KBTS__FEATURE_ID_ssty; break;
|
|
case KBTS_FEATURE_TAG_stch: Result = KBTS__FEATURE_ID_stch; break;
|
|
case KBTS_FEATURE_TAG_subs: Result = KBTS__FEATURE_ID_subs; break;
|
|
case KBTS_FEATURE_TAG_sups: Result = KBTS__FEATURE_ID_sups; break;
|
|
case KBTS_FEATURE_TAG_swsh: Result = KBTS__FEATURE_ID_swsh; break;
|
|
case KBTS_FEATURE_TAG_test: Result = KBTS__FEATURE_ID_test; break;
|
|
case KBTS_FEATURE_TAG_titl: Result = KBTS__FEATURE_ID_titl; break;
|
|
case KBTS_FEATURE_TAG_tnam: Result = KBTS__FEATURE_ID_tnam; break;
|
|
case KBTS_FEATURE_TAG_tnum: Result = KBTS__FEATURE_ID_tnum; break;
|
|
case KBTS_FEATURE_TAG_trad: Result = KBTS__FEATURE_ID_trad; break;
|
|
case KBTS_FEATURE_TAG_twid: Result = KBTS__FEATURE_ID_twid; break;
|
|
case KBTS_FEATURE_TAG_unic: Result = KBTS__FEATURE_ID_unic; break;
|
|
case KBTS_FEATURE_TAG_valt: Result = KBTS__FEATURE_ID_valt; break;
|
|
case KBTS_FEATURE_TAG_vapk: Result = KBTS__FEATURE_ID_vapk; break;
|
|
case KBTS_FEATURE_TAG_vatu: Result = KBTS__FEATURE_ID_vatu; break;
|
|
case KBTS_FEATURE_TAG_vchw: Result = KBTS__FEATURE_ID_vchw; break;
|
|
case KBTS_FEATURE_TAG_vert: Result = KBTS__FEATURE_ID_vert; break;
|
|
case KBTS_FEATURE_TAG_vhal: Result = KBTS__FEATURE_ID_vhal; break;
|
|
case KBTS_FEATURE_TAG_vkna: Result = KBTS__FEATURE_ID_vkna; break;
|
|
case KBTS_FEATURE_TAG_vkrn: Result = KBTS__FEATURE_ID_vkrn; break;
|
|
case KBTS_FEATURE_TAG_vpal: Result = KBTS__FEATURE_ID_vpal; break;
|
|
case KBTS_FEATURE_TAG_vrt2: Result = KBTS__FEATURE_ID_vrt2; break;
|
|
case KBTS_FEATURE_TAG_vrtr: Result = KBTS__FEATURE_ID_vrtr; break;
|
|
case KBTS_FEATURE_TAG_zero: Result = KBTS__FEATURE_ID_zero; break;
|
|
default: break;
|
|
}
|
|
return Result;
|
|
}
|
|
|
|
static kbts_s32 kbts__UnicodeParentDeltas[671] = {
|
|
132,133,134,135,244,246,248,250,252,254,315,351,416,418,7678,7680,7682,7792,7794,132,133,134,135,275,277,279,281,283,285,346,382,447,
|
|
449,7709,7711,7713,7823,7825,131,132,133,134,174,176,178,180,182,416,418,452,7604,7606,7764,7766,7768,131,132,133,134,205,207,209,211,213,
|
|
447,449,483,7635,7637,7795,7797,7799,131,132,133,134,135,222,224,226,306,355,380,414,416,448,7774,7776,127,128,129,130,131,132,160,162,
|
|
164,365,416,418,454,7584,7744,7746,127,128,129,130,131,132,191,193,195,396,447,449,485,7615,7775,7777,131,132,133,134,135,253,255,257,
|
|
337,386,411,445,447,479,7805,7807,131,132,133,134,223,225,227,229,231,390,447,449,7651,7807,7809,131,132,133,134,192,194,196,198,359,
|
|
416,418,7620,7776,7778,132,134,254,442,7702,7712,7802,7804,7806,7808,131,214,216,218,395,7639,7641,7643,7645,131,245,247,249,426,7670,7672,7674,
|
|
7676,132,285,287,473,7733,7833,7835,7837,7839,-5,6991,6992,7103,7167,7168,7170,7173,-10,17,7031,7032,7101,7191,7192,7197,227,229,231,415,417,7655,
|
|
7657,7661,6,8,7051,7052,7093,7195,7196,7201,239,241,423,7671,7673,7675,7677,7715,189,439,7611,7613,7615,7617,7619,7726,258,260,262,446,448,7686,
|
|
7688,7692,182,184,186,188,384,398,7610,-11,7031,7032,7207,7208,7209,7211,213,215,217,219,415,429,7641,232,234,236,238,422,7662,7664,-15,17,
|
|
7071,7072,7231,7232,7233,220,470,7642,7644,7646,7648,7650,254,7690,7692,7694,7696,7698,7713,263,265,267,269,453,7693,7695,270,272,454,7702,7704,7706,
|
|
7708,-9,7017,7018,7101,7180,7183,-23,6,7092,7235,7236,7237,5,7063,7064,7091,7210,7213,206,208,210,7627,7631,7633,237,239,241,7658,7662,7664,171,
|
|
7591,7593,7595,7597,7599,202,7622,7624,7626,7628,7630,256,258,260,7703,7705,7707,285,7721,7723,7725,7727,7729,287,289,291,7734,7736,7738,-3,-2,-1,
|
|
3,4,1,2,3,4,5,132,164,166,168,170,132,195,197,199,201,204,382,7622,7624,7626,-14,7057,7058,7219,7221,-26,7103,7104,7249,7251,
|
|
7481,7483,7485,7487,7489,235,413,7653,7655,7657,7482,7484,7486,7488,7490,2,4,6,64,1,37,171,173,-21,203,205,207,3,4,5,7,2,
|
|
4,6,112,2,4,6,128,-19,7081,7082,7257,-13,7043,7044,7219,-11,1,202,204,-8,7003,7004,7101,27,172,174,176,218,220,222,224,249,
|
|
251,253,255,13,7041,7042,7097,7596,7598,7600,7602,7619,7621,7623,7625,7637,7639,7641,7643,7645,7647,7649,7651,7650,7652,7654,7656,7668,7670,7672,7674,7676,
|
|
7678,7680,7682,-33,-32,-31,-5,-4,-2,1,2,4,1,3,5,1,4,5,2,3,5,-58,7176,7181,-27,7191,7196,3,5,6,2,4,
|
|
16,14,15,16,-21,-20,193,27,28,162,312,7512,7514,343,7543,7545,7585,7587,7589,7616,7618,7620,7634,7636,7638,7665,7667,7669,733,7961,8005,62785,
|
|
62786,62816,62814,62815,62816,-29,-28,12,22,140,167,161,163,171,198,203,390,253,279,284,310,7203,7204,7426,7428,7428,7430,7684,7686,7687,7689,7699,
|
|
7701,7718,7720,7730,7732,62788,62816,62816,62826,62816,62834,62816,62838,62816,62843,-163,-70,-60,-59,-36,-16,-6,9,10,26,32,34,41,48,51,55,56,
|
|
59,60,63,66,67,78,81,100,118,169,200,278,282,294,309,340,7156,7190,7206,7243,7434,7440,7452,7458,7519,7609,7640,8739,8753,8754,62765,
|
|
};
|
|
|
|
static kbts_u8 kbts__ScriptExtensions[447] = {
|
|
6,18,24,25,35,37,41,42,43,45,47,72,79,80,112,132,11,28,32,72,77,155,160,13,72,72,155,22,25,28,45,72,
|
|
112,141,146,22,28,45,72,119,141,146,159,22,28,72,157,42,72,141,143,155,19,22,25,28,43,45,72,119,143,157,159,25,
|
|
37,42,43,62,72,25,35,54,72,112,143,146,157,159,5,28,35,43,45,54,72,112,143,146,35,72,143,22,28,72,119,22,
|
|
72,146,39,72,28,72,159,45,72,112,159,22,35,62,72,143,22,35,72,143,22,72,143,19,22,43,72,141,155,19,72,159,
|
|
25,45,28,112,28,42,5,41,42,4,40,51,103,143,154,167,4,143,154,1,4,40,51,103,143,154,167,1,4,51,83,84,
|
|
117,126,135,143,4,154,167,11,32,44,46,48,61,72,82,118,131,150,153,158,11,32,44,46,48,61,72,82,118,150,153,158,
|
|
11,32,34,44,46,47,48,61,69,80,82,86,100,108,118,136,142,149,150,153,158,11,32,34,44,46,47,48,49,61,69,74,
|
|
80,82,86,100,108,118,136,142,149,150,153,158,32,34,60,80,11,20,142,48,96,46,68,44,150,61,100,161,20,97,146,41,
|
|
42,72,16,52,144,145,94,124,11,32,44,61,32,131,32,61,82,118,150,153,32,100,11,32,44,61,82,100,118,136,153,158,
|
|
161,32,44,61,161,28,72,143,72,94,124,18,41,42,78,110,116,18,45,91,110,32,44,72,25,72,6,116,6,18,41,60,
|
|
79,110,129,1,4,110,24,152,13,24,50,55,62,94,168,13,24,50,55,62,94,124,168,13,24,50,55,62,94,156,168,13,
|
|
24,50,55,62,77,94,156,168,13,24,50,55,62,168,24,55,62,24,72,32,34,46,48,60,61,68,69,80,82,93,100,131,
|
|
149,158,161,32,34,46,48,60,61,68,69,80,93,100,131,149,158,161,32,34,46,48,60,68,69,80,93,149,158,32,34,46,
|
|
48,60,68,69,80,93,131,149,158,11,32,161,32,150,64,72,97,15,59,4,103,26,27,76,26,76,26,75,76,4,25,
|
|
};
|
|
|
|
static kbts_u8 kbts__UnicodeDecomposition_PageIndices[12194] = {
|
|
0,1,1,1,1,1,1,1,1,1,1,1,2,3,4,5,6,7,8,9,10,11,12,13,1,1,14,15,16,17,18,19,
|
|
20,21,22,23,1,1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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,
|
|
215,216,
|
|
};
|
|
|
|
static kbts_u64 kbts__UnicodeDecomposition_Data[3472] = {
|
|
52776558133248ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
6442451206ull,6450839814ull,6459228422ull,6467617030ull,6509560070ull,6526337286ull,0ull,6769606926ull,6442451222ull,6450839830ull,6459228438ull,6509560086ull,6442451238ull,6450839846ull,6459228454ull,6509560102ull,0ull,6467617082ull,6442451262ull,6450839870ull,6459228478ull,6467617086ull,6509560126ull,0ull,0ull,6442451286ull,6450839894ull,6459228502ull,6509560150ull,6450839910ull,0ull,0ull,
|
|
6442451334ull,6450839942ull,6459228550ull,6467617158ull,6509560198ull,6526337414ull,0ull,6769607054ull,6442451350ull,6450839958ull,6459228566ull,6509560214ull,6442451366ull,6450839974ull,6459228582ull,6509560230ull,0ull,6467617210ull,6442451390ull,6450839998ull,6459228606ull,6467617214ull,6509560254ull,0ull,0ull,6442451414ull,6450840022ull,6459228630ull,6509560278ull,6450840038ull,0ull,6509560294ull,
|
|
6476005638ull,6476005766ull,6492782854ull,6492782982ull,6777995526ull,6777995654ull,6450839822ull,6450839950ull,6459228430ull,6459228558ull,6501171470ull,6501171598ull,6543114510ull,6543114638ull,6543114514ull,6543114642ull,0ull,0ull,6476005654ull,6476005782ull,6492782870ull,6492782998ull,6501171478ull,6501171606ull,6777995542ull,6777995670ull,6543114518ull,6543114646ull,6459228446ull,6459228574ull,6492782878ull,6492783006ull,
|
|
6501171486ull,6501171614ull,6769606942ull,6769607070ull,6459228450ull,6459228578ull,0ull,0ull,6467617062ull,6467617190ull,6476005670ull,6476005798ull,6492782886ull,6492783014ull,6777995558ull,6777995686ull,6501171494ull,0ull,0ull,0ull,6459228458ull,6459228586ull,6769606958ull,6769607086ull,0ull,6450839858ull,6450839986ull,6769606962ull,6769607090ull,6543114546ull,6543114674ull,0ull,
|
|
0ull,0ull,0ull,6450839866ull,6450839994ull,6769606970ull,6769607098ull,6543114554ull,6543114682ull,0ull,0ull,0ull,6476005694ull,6476005822ull,6492782910ull,6492783038ull,6534725950ull,6534726078ull,0ull,0ull,6450839882ull,6450840010ull,6769606986ull,6769607114ull,6543114570ull,6543114698ull,6450839886ull,6450840014ull,6459228494ull,6459228622ull,6769606990ull,6769607118ull,
|
|
6543114574ull,6543114702ull,6769606994ull,6769607122ull,6543114578ull,6543114706ull,0ull,0ull,6467617110ull,6467617238ull,6476005718ull,6476005846ull,6492782934ull,6492783062ull,6526337366ull,6526337494ull,6534725974ull,6534726102ull,6777995606ull,6777995734ull,6459228510ull,6459228638ull,6459228518ull,6459228646ull,6509560166ull,6450839914ull,6450840042ull,6501171562ull,6501171690ull,6543114602ull,6543114730ull,0ull,
|
|
6668943678ull,6668943806ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6668943702ull,6668943830ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6543114502ull,6543114630ull,6543114534ull,6543114662ull,6543114558ull,6543114686ull,6543114582ull,6543114710ull,6476006258ull,6476006386ull,6450840434ull,6450840562ull,6543115122ull,6543115250ull,6442451826ull,6442451954ull,0ull,6476006162ull,6476006290ull,
|
|
6476007578ull,6476007582ull,6476006170ull,6476006298ull,0ull,0ull,6543114526ull,6543114654ull,6543114542ull,6543114670ull,6777995582ull,6777995710ull,6476007338ull,6476007342ull,6543115998ull,6543116874ull,6543114666ull,0ull,0ull,0ull,6450839838ull,6450839966ull,0ull,0ull,6442451258ull,6442451386ull,6450840342ull,6450840470ull,6450840346ull,6450840474ull,6450840418ull,6450840546ull,
|
|
6568280326ull,6568280454ull,6585057542ull,6585057670ull,6568280342ull,6568280470ull,6585057558ull,6585057686ull,6568280358ull,6568280486ull,6585057574ull,6585057702ull,6568280382ull,6568280510ull,6585057598ull,6585057726ull,6568280394ull,6568280522ull,6585057610ull,6585057738ull,6568280406ull,6568280534ull,6585057622ull,6585057750ull,6761218382ull,6761218510ull,6761218386ull,6761218514ull,0ull,0ull,6543114530ull,6543114658ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,6501171462ull,6501171590ull,6769606934ull,6769607062ull,6476006234ull,6476006362ull,6476006230ull,6476006358ull,6501171518ull,6501171646ull,6476007610ull,6476007614ull,6476005734ull,6476005862ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
3073ull,3077ull,0ull,3149ull,6450842658ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,2789ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,237ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,6450840226ull,6450843206ull,733ull,6450843222ull,6450843230ull,6450843238ull,0ull,6450843262ull,0ull,6450843286ull,6450843302ull,6450843434ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6509563494ull,6509563542ull,6450843334ull,6450843350ull,6450843358ull,6450843366ull,6450843438ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6509563622ull,6509563670ull,6450843390ull,6450843414ull,6450843430ull,0ull,0ull,0ull,0ull,6450843466ull,6509563722ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
6442455126ull,6509563990ull,0ull,6450843726ull,0ull,0ull,0ull,6509563930ull,0ull,0ull,0ull,0ull,6450843754ull,6442455138ull,6492786830ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6492786786ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6492786914ull,0ull,0ull,0ull,0ull,0ull,0ull,6442455254ull,6509564118ull,0ull,6450843854ull,0ull,0ull,0ull,6509564250ull,0ull,0ull,0ull,0ull,6450843882ull,6442455266ull,6492786958ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,6568284626ull,6568284630ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6492786778ull,6492786906ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
6492786754ull,6492786882ull,6509563970ull,6509564098ull,0ull,0ull,6492786774ull,6492786902ull,0ull,0ull,6509564770ull,6509564774ull,6509563994ull,6509564122ull,6509563998ull,6509564126ull,0ull,0ull,6476009570ull,6476009698ull,6509564002ull,6509564130ull,6509564026ull,6509564154ull,0ull,0ull,6509564834ull,6509564838ull,6509564086ull,6509564214ull,6476009614ull,6476009742ull,
|
|
6509564046ull,6509564174ull,6534729870ull,6534729998ull,6509564062ull,6509564190ull,0ull,0ull,6509564078ull,6509564206ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,13581162654ull,13589551262ull,13589551394ull,13597939870ull,13589551402ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
13589551958ull,0ull,13589551878ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,13589551946ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,19830678690ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,19830678734ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,19830678614ull,19830678618ull,19830678622ull,19830678642ull,19830678662ull,19830678666ull,19830678702ull,19830678718ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,20921198366ull,21130913566ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,20904421054ull,0ull,0ull,0ull,21978163402ull,0ull,0ull,21978163426ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,21978163290ull,21978163294ull,21978163314ull,0ull,0ull,21978163374ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,24343751966ull,0ull,0ull,24142425374ull,24352140574ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,24125648006ull,24125648010ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,25216167706ull,25216167710ull,25425882906ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,26491236634ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,27556590334ull,0ull,0ull,0ull,0ull,0ull,0ull,27556590362ull,27564978970ull,0ull,27397206810ull,27556590378ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,28437394714ull,28437394718ull,28647109914ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,29611800422ull,0ull,29653743462ull,29611800434ull,29787961190ull,0ull,
|
|
0ull,0ull,0ull,33747385610ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,33747385650ull,0ull,0ull,0ull,0ull,33747385670ull,0ull,0ull,0ull,0ull,33747385690ull,0ull,0ull,0ull,0ull,33747385710ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,33730608386ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,33168571846ull,0ull,33185349062ull,33286012618ull,0ull,33286012622ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,33286012358ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,33747385930ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,33747385970ull,0ull,0ull,
|
|
0ull,0ull,33747385990ull,0ull,0ull,0ull,0ull,33747386010ull,0ull,0ull,0ull,0ull,33747386030ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,33730608706ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,34745630870ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,35235358072582ull,35235366461190ull,
|
|
35235374849798ull,0ull,0ull,0ull,35235408404230ull,35235416792838ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,58426682390ull,0ull,58426682398ull,0ull,58426682406ull,0ull,58426682414ull,0ull,58426682422ull,0ull,
|
|
0ull,0ull,58426682438ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,58426682602ull,0ull,58426682610ull,0ull,0ull,
|
|
58426682618ull,58426682622ull,0ull,58426682634ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6752829702ull,6752829830ull,6501171466ull,6501171594ull,6736052490ull,6736052618ull,6853493002ull,6853493130ull,6450840350ull,6450840478ull,6501171474ull,6501171602ull,6736052498ull,6736052626ull,6853493010ull,6853493138ull,
|
|
6769606930ull,6769607058ull,6819938578ull,6819938706ull,6442452042ull,6442452046ull,6450840650ull,6450840654ull,6819938582ull,6819938710ull,6845104406ull,6845104534ull,6492784802ull,6492784806ull,6501171482ull,6501171610ull,6476005662ull,6476005790ull,6501171490ull,6501171618ull,6736052514ull,6736052642ull,6509560098ull,6509560226ull,6769606946ull,6769607074ull,6828327202ull,6828327330ull,6845104422ull,6845104550ull,6450840382ull,6450840510ull,
|
|
6450839854ull,6450839982ull,6736052526ull,6736052654ull,6853493038ull,6853493166ull,6736052530ull,6736052658ull,6476036314ull,6476036318ull,6853493042ull,6853493170ull,6819938610ull,6819938738ull,6450839862ull,6450839990ull,6501171510ull,6501171638ull,6736052534ull,6736052662ull,6501171514ull,6501171642ull,6736052538ull,6736052666ull,6853493050ull,6853493178ull,6819938618ull,6819938746ull,6450840406ull,6450840534ull,6509560662ull,6509560790ull,
|
|
6442452274ull,6442452278ull,6450840882ull,6450840886ull,6450839874ull,6450840002ull,6501171522ull,6501171650ull,6501171530ull,6501171658ull,6736052554ull,6736052682ull,6476036458ull,6476036462ull,6853493066ull,6853493194ull,6501171534ull,6501171662ull,6736052558ull,6736052686ull,6501172586ull,6501172590ull,6501172610ull,6501172614ull,6501202314ull,6501202318ull,6501171538ull,6501171666ull,6736052562ull,6736052690ull,6853493074ull,6853493202ull,
|
|
6819938642ull,6819938770ull,6744441174ull,6744441302ull,6845104470ull,6845104598ull,6819938646ull,6819938774ull,6450840994ull,6450840998ull,6509561258ull,6509561262ull,6467617114ull,6467617242ull,6736052570ull,6736052698ull,6442451294ull,6442451422ull,6450839902ull,6450840030ull,6509560158ull,6509560286ull,6501171550ull,6501171678ull,6736052574ull,6736052702ull,6501171554ull,6501171682ull,6509560162ull,6509560290ull,6501171558ull,6501171686ull,
|
|
6459228522ull,6459228650ull,6736052586ull,6736052714ull,6853493098ull,6853493226ull,6853493154ull,6509560274ull,6526337502ull,6526337510ull,0ull,6501172734ull,0ull,0ull,0ull,0ull,6736052486ull,6736052614ull,6517948678ull,6517948806ull,6450840330ull,6450840458ull,6442451722ull,6442451850ull,6517949194ull,6517949322ull,6467617546ull,6467617674ull,6459259522ull,6459259526ull,6450840586ull,6450840590ull,
|
|
6442451978ull,6442451982ull,6517949450ull,6517949454ull,6467617802ull,6467617806ull,6492813954ull,6492813958ull,6736052502ull,6736052630ull,6517948694ull,6517948822ull,6467617046ull,6467617174ull,6450840362ull,6450840490ull,6442451754ull,6442451882ull,6517949226ull,6517949354ull,6467617578ull,6467617706ull,6459259618ull,6459259622ull,6517948710ull,6517948838ull,6736052518ull,6736052646ull,6736052542ull,6736052670ull,6517948734ull,6517948862ull,
|
|
6450840402ull,6450840530ull,6442451794ull,6442451922ull,6517949266ull,6517949394ull,6467617618ull,6467617746ull,6459259698ull,6459259702ull,6450841218ull,6450841222ull,6442452610ull,6442452614ull,6517950082ull,6517950086ull,6467618434ull,6467618438ull,6736053890ull,6736053894ull,6736052566ull,6736052694ull,6517948758ull,6517948886ull,6450841278ull,6450841282ull,6442452670ull,6442452674ull,6517950142ull,6517950146ull,6467618494ull,6467618498ull,
|
|
6736053950ull,6736053954ull,6442451302ull,6442451430ull,6736052582ull,6736052710ull,6517948774ull,6517948902ull,6467617126ull,6467617254ull,0ull,0ull,0ull,0ull,0ull,0ull,6601838278ull,6610226886ull,6442482690ull,6442482694ull,6450871298ull,6450871302ull,6996130818ull,6996130822ull,6601838150ull,6610226758ull,6442482722ull,6442482726ull,6450871330ull,6450871334ull,6996130850ull,6996130854ull,
|
|
6601838294ull,6610226902ull,6442482754ull,6442482758ull,6450871362ull,6450871366ull,0ull,0ull,6601838166ull,6610226774ull,6442482786ull,6442482790ull,6450871394ull,6450871398ull,0ull,0ull,6601838302ull,6610226910ull,6442482818ull,6442482822ull,6450871426ull,6450871430ull,6996130946ull,6996130950ull,6601838174ull,6610226782ull,6442482850ull,6442482854ull,6450871458ull,6450871462ull,6996130978ull,6996130982ull,
|
|
6601838310ull,6610226918ull,6442482882ull,6442482886ull,6450871490ull,6450871494ull,6996131010ull,6996131014ull,6601838182ull,6610226790ull,6442482914ull,6442482918ull,6450871522ull,6450871526ull,6996131042ull,6996131046ull,6601838334ull,6610226942ull,6442482946ull,6442482950ull,6450871554ull,6450871558ull,0ull,0ull,6601838206ull,6610226814ull,6442482978ull,6442482982ull,6450871586ull,6450871590ull,0ull,0ull,
|
|
6601838358ull,6610226966ull,6442483010ull,6442483014ull,6450871618ull,6450871622ull,6996131138ull,6996131142ull,0ull,6610226838ull,0ull,6442483046ull,0ull,6450871654ull,0ull,6996131174ull,6601838374ull,6610226982ull,6442483074ull,6442483078ull,6450871682ull,6450871686ull,6996131202ull,6996131206ull,6601838246ull,6610226854ull,6442483106ull,6442483110ull,6450871714ull,6450871718ull,6996131234ull,6996131238ull,
|
|
6442454726ull,3761ull,6442454742ull,3765ull,6442454750ull,3769ull,6442454758ull,3773ull,6442454782ull,3889ull,6442454806ull,3893ull,6442454822ull,3897ull,0ull,0ull,7021296642ull,7021296646ull,7021296650ull,7021296654ull,7021296658ull,7021296662ull,7021296666ull,7021296670ull,7021296674ull,7021296678ull,7021296682ull,7021296686ull,7021296690ull,7021296694ull,7021296698ull,7021296702ull,
|
|
7021296770ull,7021296774ull,7021296778ull,7021296782ull,7021296786ull,7021296790ull,7021296794ull,7021296798ull,7021296802ull,7021296806ull,7021296810ull,7021296814ull,7021296818ull,7021296822ull,7021296826ull,7021296830ull,7021297026ull,7021297030ull,7021297034ull,7021297038ull,7021297042ull,7021297046ull,7021297050ull,7021297054ull,7021297058ull,7021297062ull,7021297066ull,7021297070ull,7021297074ull,7021297078ull,7021297082ull,7021297086ull,
|
|
6492786374ull,6476009158ull,7021297090ull,7021268678ull,7021268658ull,0ull,6996102854ull,7021297370ull,6492786246ull,6476009030ull,6442454598ull,3609ull,7021268550ull,0ull,3813ull,0ull,0ull,6996099746ull,7021297106ull,7021268702ull,7021268666ull,0ull,6996102878ull,7021297434ull,6442454614ull,3617ull,6442454622ull,3621ull,7021268574ull,6442483454ull,6450872062ull,6996131582ull,
|
|
6492786406ull,6476009190ull,6442454826ull,3649ull,0ull,0ull,6996102886ull,6996102954ull,6492786278ull,6476009062ull,6442454630ull,3625ull,0ull,6442483706ull,6450872314ull,6996131834ull,6492786454ull,6476009238ull,6442454830ull,3777ull,6601838342ull,6610226950ull,6996102934ull,6996102958ull,6492786326ull,6476009110ull,6442454678ull,3641ull,6610226822ull,6442451618ull,3605ull,385ull,
|
|
0ull,0ull,7021297138ull,7021268774ull,7021268794ull,0ull,6996102950ull,7021297626ull,6442454654ull,3633ull,6442454694ull,3645ull,7021268646ull,721ull,0ull,0ull,32777ull,32781ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,32833ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,3749ull,0ull,0ull,0ull,301ull,789ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6912247362ull,6912247370ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6912247378ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6912247618ull,6912247634ull,6912247626ull,0ull,0ull,0ull,0ull,6912247822ull,0ull,0ull,0ull,0ull,6912247842ull,0ull,0ull,6912247854ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,6912247950ull,0ull,6912247958ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6912248050ull,0ull,0ull,6912248078ull,0ull,0ull,6912248086ull,0ull,6912248098ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
6912213238ull,0ull,6912248198ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6912248118ull,6912213234ull,6912213242ull,6912248210ull,6912248214ull,0ull,0ull,6912248266ull,6912248270ull,0ull,0ull,6912248282ull,6912248286ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
6912248298ull,6912248302ull,0ull,0ull,6912248330ull,6912248334ull,0ull,0ull,6912248346ull,6912248350ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6912248458ull,6912248482ull,6912248486ull,6912248494ull,
|
|
6912248306ull,6912248310ull,6912248390ull,6912248394ull,0ull,0ull,0ull,0ull,0ull,0ull,6912248522ull,6912248526ull,6912248530ull,6912248534ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,49185ull,49189ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6912256886ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,104362721582ull,0ull,104362721590ull,0ull,
|
|
104362721598ull,0ull,104362721606ull,0ull,104362721614ull,0ull,104362721622ull,0ull,104362721630ull,0ull,104362721638ull,0ull,104362721646ull,0ull,104362721654ull,0ull,104362721662ull,0ull,104362721670ull,0ull,0ull,104362721682ull,0ull,104362721690ull,0ull,104362721698ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
104362721726ull,104371110334ull,0ull,104362721738ull,104371110346ull,0ull,104362721750ull,104371110358ull,0ull,104362721762ull,104371110370ull,0ull,104362721774ull,104371110382ull,0ull,0ull,0ull,0ull,0ull,0ull,104362721562ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,104362721910ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,104362721966ull,0ull,104362721974ull,0ull,104362721982ull,0ull,104362721990ull,0ull,104362721998ull,0ull,104362722006ull,0ull,104362722014ull,0ull,104362722022ull,0ull,104362722030ull,0ull,104362722038ull,0ull,
|
|
104362722046ull,0ull,104362722054ull,0ull,0ull,104362722066ull,0ull,104362722074ull,0ull,104362722082ull,0ull,0ull,0ull,0ull,0ull,0ull,104362722110ull,104371110718ull,0ull,104362722122ull,104371110730ull,0ull,104362722134ull,104371110742ull,0ull,104362722146ull,104371110754ull,0ull,104362722158ull,104371110766ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,104362721946ull,0ull,0ull,104362722238ull,104362722242ull,104362722246ull,104362722250ull,0ull,0ull,0ull,104362722294ull,0ull,143649ull,105425ull,146217ull,144161ull,113477ull,80073ull,85909ull,163441ull,163441ull,91461ull,149317ull,87581ull,91425ull,100313ull,121253ull,130581ull,
|
|
137469ull,138985ull,140257ull,148029ull,108553ull,111725ull,115557ull,118649ull,135413ull,148905ull,157637ull,80393ull,85461ull,109585ull,116845ull,137397ull,161913ull,95553ull,114605ull,137013ull,140689ull,101157ull,132961ull,139389ull,97065ull,105565ull,112041ull,117745ull,148281ull,81433ull,83677ull,84857ull,
|
|
103185ull,109389ull,116801ull,121757ull,131077ull,137241ull,137585ull,145341ull,154825ull,159165ull,161769ull,123441ull,124413ull,128641ull,134949ull,150545ull,162301ull,142169ull,91005ull,97297ull,127361ull,131577ull,117129ull,123689ull,144137ull,154589ull,90977ull,94601ull,108621ull,112489ull,113725ull,128189ull,
|
|
129245ull,153901ull,84809ull,131629ull,83825ull,83761ull,125041ull,128761ull,135109ull,154069ull,142849ull,101181ull,108553ull,142329ull,80101ull,94109ull,98377ull,118301ull,120257ull,85085ull,123885ull,81661ull,97957ull,79925ull,111409ull,103905ull,128137ull,85773ull,90489ull,121861ull,135461ull,141993ull,
|
|
110313ull,147137ull,111137ull,101369ull,134037ull,102017ull,120213ull,80569ull,83365ull,83749ull,107013ull,127901ull,133565ull,142153ull,149309ull,84949ull,86281ull,91597ull,97201ull,104213ull,114681ull,124073ull,153269ull,158121ull,162397ull,162617ull,84589ull,105241ull,110045ull,146825ull,96721ull,99905ull,
|
|
100353ull,103017ull,113805ull,116005ull,119333ull,124713ull,128977ull,131517ull,146585ull,136121ull,147597ull,150825ull,84061ull,84621ull,86773ull,115489ull,140041ull,141993ull,97061ull,98261ull,101869ull,110265ull,127225ull,118229ull,80785ull,89061ull,94109ull,95977ull,98417ull,118473ull,119205ull,130665ull,
|
|
131353ull,149713ull,154585ull,154913ull,155745ull,81453ull,124601ull,149201ull,154337ull,99205ull,80409ull,82793ull,94137ull,94461ull,104037ull,108553ull,116537ull,121097ull,136177ull,147953ull,163381ull,104993ull,153785ull,84517ull,105965ull,106445ull,111877ull,113265ull,118821ull,120165ull,123309ull,128065ull,
|
|
156025ull,83381ull,100537ull,154081ull,82093ull,95333ull,112553ull,146601ull,97837ull,99601ull,106589ull,118301ull,154137ull,84133ull,86077ull,94613ull,104525ull,105785ull,107169ull,111509ull,118809ull,120713ull,130533ull,140093ull,140165ull,149297ull,154505ull,85245ull,113385ull,86133ull,116545ull,119393ull,
|
|
137193ull,154253ull,160093ull,162429ull,106077ull,112429ull,133025ull,125741ull,126081ull,127561ull,117505ull,115301ull,142689ull,80641ull,134361ull,84201ull,83997ull,96921ull,101197ull,127833ull,93717ull,111737ull,105169ull,146669ull,139569ull,153909ull,140845ull,97101ull,83201ull,87809ull,0ull,0ull,
|
|
90473ull,0ull,104913ull,0ull,0ull,83833ull,117929ull,121641ull,124145ull,124281ull,124309ull,124477ull,154969ull,127737ull,130805ull,0ull,137289ull,0ull,142305ull,0ull,0ull,147681ull,148469ull,0ull,0ull,0ull,156605ull,156657ull,156833ull,161489ull,148345ull,154333ull,
|
|
81593ull,82845ull,83253ull,84773ull,84881ull,85317ull,87669ull,88089ull,88481ull,90369ull,90785ull,94609ull,94649ull,98897ull,99745ull,99897ull,100297ull,103741ull,104329ull,105029ull,107029ull,112093ull,112745ull,113801ull,116153ull,116909ull,118921ull,123461ull,124153ull,124197ull,124193ull,124225ull,
|
|
124249ull,124277ull,124469ull,124473ull,125185ull,125445ull,126721ull,128977ull,129061ull,129285ull,130505ull,131093ull,133045ull,133605ull,133605ull,135517ull,140353ull,140889ull,142341ull,142565ull,144205ull,144417ull,147161ull,147681ull,154509ull,155645ull,155885ull,98773ull,592825ull,133217ull,0ull,0ull,
|
|
80025ull,83669ull,83361ull,81409ull,83221ull,83457ull,84765ull,84969ull,87669ull,87381ull,87653ull,87945ull,90473ull,90829ull,91409ull,91473ull,92553ull,93345ull,97097ull,97125ull,97701ull,97973ull,99169ull,99641ull,99361ull,99897ull,99713ull,100297ull,100561ull,102161ull,102513ull,102729ull,
|
|
103769ull,104913ull,105565ull,105581ull,105817ull,110053ull,110313ull,111877ull,113517ull,113453ull,113801ull,114809ull,116153ull,122525ull,116949ull,117437ull,117929ull,119237ull,119833ull,120045ull,120949ull,120957ull,121641ull,121709ull,121809ull,122153ull,122113ull,123697ull,125637ull,126721ull,127469ull,128365ull,
|
|
128977ull,130297ull,131093ull,134473ull,135101ull,138725ull,140549ull,140825ull,140889ull,142077ull,142305ull,142125ull,142341ull,142329ull,142261ull,142565ull,142889ull,144417ull,146657ull,147913ull,149093ull,149977ull,154097ull,154509ull,154969ull,155501ull,155645ull,155693ull,155885ull,158793ull,163441ull,565545ull,
|
|
565521ull,577365ull,61045ull,65633ull,65765ull,608549ull,619329ull,654157ull,163085ull,163385ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,12247373670ull,0ull,12272539594ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,12356425638ull,12364814246ull,12356676902ull,12365065510ull,12272539458ull,12280928066ull,12314482498ull,12314482502ull,12314482506ull,12314482510ull,12314482514ull,12314482518ull,12314482522ull,0ull,12314482530ull,12314482534ull,12314482538ull,12314482542ull,12314482546ull,0ull,12314482554ull,0ull,
|
|
12314482562ull,12314482566ull,0ull,12314482574ull,12314482578ull,0ull,12314482586ull,12314482590ull,12314482594ull,12314482598ull,12314482602ull,12289316694ull,12339648326ull,12339648366ull,12339648402ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,6501439306ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,6501439338ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,585676112486ull,0ull,585676112494ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,585676112534ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,586590471366ull,586590471370ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,591078378782ull,591288093982ull,0ull,0ull,0ull,0ull,0ull,0ull,592244395530ull,0ull,592126955026ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,592185675310ull,0ull,
|
|
0ull,592244395586ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,592185675530ull,0ull,592101789450ull,592244395786ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,594266051302ull,594182165222ull,0ull,594291217126ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,596321261282ull,596321261286ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,603845846230ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,758313747578ull,758406022266ull,758322136186ull,758322136230ull,758330524794ull,758322136198ull,758322136202ull,758330524806ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,
|
|
0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,784695932318ull,784695932302ull,784695932326ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,999427622238ull,999427622242ull,
|
|
999503119742ull,999511508350ull,999519896958ull,999528285566ull,999536674174ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,999427622630ull,999427622634ull,999503120110ull,999503120114ull,999511508718ull,
|
|
999511508722ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,0ull,80117ull,80097ull,80133ull,525449ull,81281ull,81593ull,81645ull,81929ull,82409ull,82533ull,82845ull,82749ull,53881ull,530665ull,83253ull,83281ull,
|
|
83345ull,83421ull,529521ull,53989ull,83357ull,83509ull,529709ull,83549ull,83601ull,80689ull,83633ull,83669ull,673661ull,83925ull,83981ull,54141ull,84205ull,84249ull,84425ull,84445ull,54357ull,84765ull,84773ull,84881ull,84969ull,85013ull,85017ull,85085ull,85285ull,85317ull,85353ull,85453ull,
|
|
85493ull,85501ull,85501ull,85501ull,534705ull,115137ull,85801ull,85885ull,535949ull,85933ull,85957ull,86041ull,86649ull,86241ull,86305ull,86433ull,86665ull,87001ull,87105ull,87373ull,87437ull,87569ull,87569ull,87653ull,87725ull,87757ull,87817ull,89177ull,88089ull,89181ull,88389ull,88529ull,
|
|
83997ull,91065ull,89913ull,90065ull,90165ull,89645ull,90313ull,90309ull,90801ull,545681ull,91081ull,91101ull,91161ull,91241ull,91273ull,91529ull,547489ull,547753ull,92081ull,92269ull,92317ull,92001ull,92569ull,56249ull,56305ull,93217ull,93433ull,93433ull,550689ull,93965ull,94049ull,94109ull,
|
|
94157ull,552033ull,94205ull,94233ull,97613ull,94345ull,56837ull,94593ull,94649ull,94977ull,94773ull,554897ull,95501ull,554905ull,95673ull,95661ull,95729ull,96133ull,96137ull,57533ull,96245ull,96417ull,96501ull,96677ull,57737ull,558605ull,57841ull,96961ull,96973ull,96985ull,97065ull,691785ull,
|
|
97273ull,560325ull,560325ull,133125ull,97417ull,97417ull,58141ull,576225ull,624489ull,97673ull,97709ull,58253ull,97897ull,98101ull,98141ull,98277ull,98821ull,58601ull,58481ull,98897ull,564049ull,99101ull,99617ull,99633ull,99641ull,99633ull,99817ull,99897ull,100041ull,99985ull,100029ull,100217ull,
|
|
100297ull,100313ull,100417ull,100461ull,100725ull,101061ull,101201ull,101697ull,568369ull,101621ull,101361ull,101793ull,101901ull,102289ull,569285ull,102537ull,102165ull,102053ull,59577ull,102821ull,102905ull,103029ull,102877ull,59825ull,103741ull,103857ull,573481ull,104333ull,105441ull,104741ull,60517ull,105029ull,
|
|
60449ull,60305ull,83529ull,83541ull,105473ull,105073ull,131765ull,69477ull,105565ull,105581ull,105605ull,105849ull,105805ull,577293ull,60709ull,106473ull,106005ull,106825ull,107029ull,577973ull,107065ull,106621ull,107601ull,61045ull,107785ull,108173ull,108457ull,109217ull,580237ull,109421ull,61537ull,109701ull,
|
|
582301ull,109905ull,61753ull,110025ull,110205ull,110313ull,110317ull,584245ull,554029ull,584681ull,110905ull,586481ull,111357ull,111413ull,111005ull,111705ull,111865ull,112093ull,111877ull,112037ull,112097ull,112149ull,586873ull,111825ull,112829ull,113081ull,62669ull,113453ull,113437ull,588613ull,112613ull,114105ull,
|
|
589177ull,589369ull,114457ull,114917ull,114809ull,114797ull,63065ull,114985ull,115189ull,115165ull,115381ull,529557ull,115989ull,592269ull,116337ull,593581ull,116897ull,116949ull,117057ull,596001ull,117249ull,117333ull,597205ull,598097ull,118249ull,118317ull,64177ull,118421ull,64225ull,64225ull,119069ull,119153ull,
|
|
119237ull,119317ull,119593ull,64621ull,119953ull,602329ull,120057ull,602697ull,120257ull,558717ull,120897ull,605829ull,605921ull,606481ull,65521ull,65569ull,121809ull,607181ull,607177ull,607333ull,607437ull,121977ull,121981ull,121981ull,122153ull,65765ull,122413ull,65817ull,66137ull,610421ull,123193ull,123441ull,
|
|
123697ull,66445ull,612505ull,124249ull,612969ull,613141ull,124477ull,124845ull,66749ull,125185ull,125225ull,125245ull,615921ull,617117ull,617117ull,125881ull,67593ull,618157ull,126745ull,126757ull,67741ull,619009ull,127817ull,68225ull,127905ull,127885ull,128001ull,622105ull,128397ull,68613ull,128797ull,129033ull,
|
|
129301ull,68817ull,624801ull,624925ull,68965ull,625509ull,130537ull,625913ull,130645ull,131049ull,131093ull,627561ull,627853ull,131457ull,628385ull,131521ull,576893ull,69461ull,131785ull,132109ull,69677ull,132345ull,92885ull,630429ull,630485ull,577101ull,577137ull,133125ull,133137ull,147065ull,70061ull,133701ull,
|
|
133677ull,133749ull,84685ull,133829ull,133837ull,133877ull,134041ull,634097ull,134037ull,134261ull,134541ull,134837ull,134285ull,134901ull,135069ull,135517ull,134477ull,134953ull,134961ull,135025ull,635097ull,636333ull,635733ull,70829ull,136133ull,136141ull,136281ull,642857ull,136593ull,638129ull,71029ull,71045ull,
|
|
638661ull,639817ull,71085ull,137537ull,137585ull,137629ull,137637ull,137893ull,137761ull,138297ull,138121ull,138725ull,138401ull,138669ull,138777ull,71517ull,139141ull,139269ull,71653ull,139649ull,139661ull,645533ull,140125ull,140153ull,71893ull,140265ull,53997ull,647865ull,648601ull,72441ull,72477ull,141953ull,
|
|
142261ull,142889ull,143701ull,651937ull,144045ull,144133ull,144493ull,144861ull,654525ull,532497ull,145197ull,145137ull,145345ull,533369ull,146257ull,146657ull,661321ull,661429ull,148049ull,148421ull,148549ull,662713ull,148589ull,149729ull,150365ull,150369ull,150001ull,151525ull,151637ull,667625ull,153133ull,75349ull,
|
|
153309ull,669149ull,75673ull,154381ull,95945ull,154765ull,673045ull,673897ull,76217ull,76249ull,155521ull,675881ull,76489ull,676441ull,155693ull,155693ull,155813ull,677593ull,156553ull,77005ull,156837ull,157341ull,157449ull,157689ull,77625ull,683201ull,158793ull,160001ull,160757ull,78649ull,78773ull,161181ull,
|
|
688953ull,78817ull,689173ull,690233ull,690757ull,162541ull,79193ull,162789ull,162809ull,162837ull,162877ull,162905ull,163053ull,694273ull,0ull,0ull,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u64 kbts__GetUnicodeDecomposition(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeDecomposition_Data[((Codepoint < 195104) ? ((kbts_un)kbts__UnicodeDecomposition_PageIndices[Codepoint / 16] * 16) : 16) | (Codepoint & 15)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeWordBreakClass_PageIndices[7172] = {
|
|
0,1,2,2,2,3,4,5,2,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,
|
|
29,30,2,2,31,32,33,34,35,2,2,2,36,37,38,39,40,41,42,43,44,45,46,47,48,49,2,50,2,2,51,52,
|
|
53,54,55,56,57,57,58,59,57,60,57,61,62,63,64,65,57,57,66,57,57,57,67,57,2,68,69,70,71,57,57,57,
|
|
72,73,74,75,57,76,77,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
2,2,2,2,2,2,2,2,2,78,2,2,79,80,81,82,83,84,85,86,87,88,89,90,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,91,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,92,93,2,2,94,95,96,97,98,99,
|
|
100,101,102,103,57,104,105,106,2,107,108,109,2,2,110,111,112,113,114,115,116,117,118,119,120,121,122,123,57,124,125,126,
|
|
127,128,129,130,131,132,133,134,135,136,57,137,138,139,140,57,141,142,143,144,145,146,57,147,148,149,150,151,57,152,153,154,
|
|
2,2,2,2,2,2,2,155,156,2,157,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,158,
|
|
2,2,2,2,2,2,2,2,159,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,101,2,2,2,2,160,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,161,57,57,57,57,57,57,57,57,57,57,57,57,57,2,2,2,2,162,163,164,165,57,57,166,57,167,57,168,169,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,170,
|
|
171,57,172,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,173,174,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,175,57,57,57,57,176,57,
|
|
57,57,177,178,179,57,57,57,180,181,182,2,2,183,184,185,57,57,57,57,186,187,57,57,57,57,57,57,57,57,188,57,
|
|
189,190,191,57,57,192,57,57,57,193,57,194,57,57,57,195,2,196,197,57,57,57,57,57,57,57,57,57,198,199,57,57,
|
|
200,200,201,202,203,200,200,204,200,200,205,200,206,200,207,208,209,210,211,200,200,200,57,175,200,200,200,200,200,200,200,212,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
213,57,214,215,
|
|
};
|
|
|
|
static kbts_u8 kbts__UnicodeWordBreakClass_Data[27648] = {
|
|
0,0,0,0,0,0,0,0,0,0,3,4,4,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,14,0,0,0,0,13,0,0,0,0,17,0,15,0,18,18,18,18,18,18,18,18,18,18,16,17,0,0,0,0,
|
|
0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,19,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,
|
|
0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,11,0,0,8,1,0,0,0,0,0,0,11,0,16,0,0,11,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,11,11,11,11,0,11,11,0,0,11,11,11,11,17,11,
|
|
0,0,0,0,0,0,11,16,11,11,11,0,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,
|
|
11,11,0,5,5,5,5,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,0,11,16,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,17,11,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,
|
|
0,5,5,0,5,5,0,5,0,0,0,0,0,0,0,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,0,0,0,0,10,10,10,10,11,16,0,0,0,0,0,0,0,0,0,0,0,
|
|
18,18,18,18,18,18,0,0,0,0,0,0,17,17,0,0,5,5,5,5,5,5,5,5,5,5,5,0,8,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,18,18,18,18,18,18,18,18,18,18,0,18,17,0,11,11,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,5,5,5,5,5,5,5,18,0,5,5,5,5,5,5,11,11,5,5,0,5,5,5,5,11,11,18,18,18,18,18,18,18,18,18,18,11,11,11,0,0,11,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,5,5,5,5,5,5,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
18,18,18,18,18,18,18,18,18,18,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,11,11,0,0,17,0,11,0,0,5,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,11,5,5,5,5,5,5,5,5,5,11,5,5,5,11,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,0,18,18,0,0,0,0,0,5,5,5,5,5,5,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,18,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,11,5,5,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,5,5,5,5,5,5,5,11,11,11,11,11,11,11,11,11,11,5,5,0,0,18,18,18,18,18,18,18,18,18,18,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,5,5,5,0,11,11,11,11,11,11,11,11,0,0,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,0,0,0,11,11,11,11,0,0,5,11,5,5,
|
|
5,5,5,5,5,0,0,5,5,0,0,5,5,5,11,0,0,0,0,0,0,0,0,5,0,0,0,0,11,11,0,11,11,11,5,5,0,0,18,18,18,18,18,18,18,18,18,18,11,11,0,0,0,0,0,0,0,0,0,0,11,0,5,0,
|
|
0,5,5,5,0,11,11,11,11,11,11,0,0,0,0,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,0,11,11,0,11,11,0,0,5,0,5,5,
|
|
5,5,5,0,0,0,0,5,5,0,0,5,5,5,0,0,0,5,0,0,0,0,0,0,0,11,11,11,11,0,11,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,5,5,11,11,11,5,0,0,0,0,0,0,0,0,0,0,
|
|
0,5,5,5,0,11,11,11,11,11,11,11,11,11,0,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,0,11,11,11,11,11,0,0,5,11,5,5,
|
|
5,5,5,5,5,5,0,5,5,5,0,5,5,5,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,5,5,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,11,5,5,5,5,5,5,
|
|
0,5,5,5,0,11,11,11,11,11,11,11,11,0,0,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,0,11,11,11,11,11,0,0,5,11,5,5,
|
|
5,5,5,5,5,0,0,5,5,0,0,5,5,5,0,0,0,0,0,0,0,5,5,5,0,0,0,0,11,11,0,11,11,11,5,5,0,0,18,18,18,18,18,18,18,18,18,18,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,5,11,0,11,11,11,11,11,11,0,0,0,11,11,11,0,11,11,11,11,0,0,0,11,11,0,11,0,11,11,0,0,0,11,11,0,0,0,11,11,11,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,5,5,
|
|
5,5,5,0,0,0,5,5,5,0,5,5,5,5,0,0,11,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
5,5,5,5,5,11,11,11,11,11,11,11,11,0,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,5,11,5,5,
|
|
5,5,5,5,5,0,5,5,5,0,5,5,5,5,0,0,0,0,0,0,0,5,5,0,11,11,11,0,0,11,0,0,11,11,5,5,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,5,5,5,0,11,11,11,11,11,11,11,11,0,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,0,0,5,11,5,5,
|
|
5,5,5,5,5,0,5,5,5,0,5,5,5,5,0,0,0,0,0,0,0,5,5,0,0,0,0,0,0,11,11,0,11,11,5,5,0,0,18,18,18,18,18,18,18,18,18,18,0,11,11,5,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
5,5,5,5,11,11,11,11,11,11,11,11,11,0,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,11,5,5,
|
|
5,5,5,5,5,0,5,5,5,0,5,5,5,5,11,0,0,0,0,0,11,11,11,5,0,0,0,0,0,0,0,11,11,11,5,5,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,
|
|
0,5,5,5,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,0,11,0,0,
|
|
11,11,11,11,11,11,11,0,0,0,5,0,0,0,0,5,5,5,5,5,5,0,5,0,5,5,5,5,5,5,5,5,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,5,5,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,5,5,5,5,5,5,5,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,5,5,5,5,5,5,5,5,5,5,5,5,0,5,18,18,18,18,18,18,18,18,18,18,5,5,5,5,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,0,11,0,0,0,0,0,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,0,11,11,11,11,0,0,11,11,11,11,11,11,11,0,11,0,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,0,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,0,0,11,11,11,11,11,11,11,0,
|
|
11,0,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,0,0,
|
|
0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
20,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,0,5,5,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,5,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,5,5,5,8,5,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,11,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,
|
|
0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,
|
|
18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
5,5,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,11,11,11,11,11,11,11,11,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,11,11,18,18,18,18,18,18,18,18,18,18,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,
|
|
18,18,18,18,18,18,18,18,18,18,0,0,0,11,11,11,18,18,18,18,18,18,18,18,18,18,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,11,11,11,5,11,11,11,11,11,11,5,11,11,5,5,5,11,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,0,0,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,0,11,0,11,0,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,0,
|
|
0,0,11,11,11,0,11,11,11,11,11,11,11,0,0,0,11,11,11,11,0,0,11,11,11,11,11,11,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,11,11,11,0,11,11,11,11,11,11,11,0,0,0,
|
|
20,20,20,20,20,20,20,0,20,20,20,0,5,6,8,8,0,0,0,0,0,0,0,0,15,15,0,0,0,0,0,0,0,0,0,0,15,0,0,16,4,4,8,8,8,8,8,19,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,19,
|
|
19,0,0,0,17,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,20,8,8,8,8,8,0,8,8,8,8,8,8,8,8,8,8,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,11,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,11,0,0,0,0,11,0,0,11,11,11,11,11,11,11,11,11,11,0,11,0,0,0,11,11,11,11,11,0,0,0,0,1,0,11,0,11,0,11,0,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,12,0,0,11,11,11,11,
|
|
0,0,0,0,0,11,11,11,11,11,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,11,11,11,11,5,5,5,11,11,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,0,0,0,0,0,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,
|
|
11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
20,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,1,9,9,9,9,9,0,0,0,0,0,11,11,1,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,9,9,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
|
|
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,9,9,9,9,
|
|
0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,
|
|
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
|
|
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,18,18,18,18,18,18,18,18,18,18,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,0,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,0,11,0,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,5,11,11,11,5,11,11,11,11,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,11,11,11,11,11,0,0,0,11,0,11,11,5,
|
|
18,18,18,18,18,18,18,18,18,18,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,
|
|
5,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,5,11,11,11,11,11,11,11,11,5,5,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,5,5,5,0,0,5,5,0,0,0,0,0,5,5,
|
|
0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,0,0,11,11,11,5,5,0,0,0,0,0,0,0,0,0,
|
|
0,11,11,11,11,11,11,0,0,11,11,11,11,11,11,0,0,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,0,5,5,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,
|
|
11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,0,0,0,0,0,10,5,10,10,10,10,10,10,10,10,10,10,0,10,10,10,10,10,10,10,10,10,10,10,10,10,0,10,10,10,10,10,0,10,0,
|
|
10,10,0,10,10,0,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,19,19,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,17,0,15,0,17,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,8,
|
|
0,0,0,0,0,0,0,15,0,0,0,0,17,0,15,0,18,18,18,18,18,18,18,18,18,18,16,17,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,19,
|
|
0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
|
|
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,
|
|
0,0,11,11,11,11,11,11,0,0,11,11,11,11,11,11,0,0,11,11,11,11,11,11,0,0,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,0,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,0,0,0,0,11,11,11,11,11,11,11,11,0,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,0,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,0,0,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,0,0,0,11,0,0,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,11,11,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,5,5,5,0,5,5,0,0,0,0,0,5,5,5,5,11,11,11,11,0,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,5,5,5,0,0,0,0,5,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
18,18,18,18,18,18,18,18,18,18,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,5,5,5,5,5,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,5,5,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,
|
|
5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,5,11,11,5,5,11,0,0,0,0,0,0,0,0,0,5,
|
|
5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,0,0,18,0,0,
|
|
0,0,5,0,0,0,0,0,0,0,0,0,0,18,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,18,18,18,18,18,18,18,18,18,18,
|
|
0,0,0,0,11,5,5,11,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,0,0,11,0,0,0,0,0,0,0,0,0,
|
|
5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,11,11,11,11,0,0,0,0,5,5,5,5,0,5,5,18,18,18,18,18,18,18,18,18,18,11,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,5,11,
|
|
11,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,0,11,0,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
5,5,5,5,0,11,11,11,11,11,11,11,11,0,0,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,0,11,11,11,11,11,0,5,5,11,5,5,
|
|
5,5,5,5,5,0,0,5,5,0,0,5,5,5,0,0,11,0,0,0,0,0,0,5,0,0,0,0,0,11,11,11,11,11,5,5,0,0,5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,0,11,0,0,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,5,5,5,5,5,5,5,5,
|
|
5,0,5,0,0,5,0,5,5,5,5,0,5,5,5,5,5,11,5,11,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,5,5,11,11,11,11,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,5,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,11,11,0,11,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,0,0,5,5,5,5,5,5,5,5,
|
|
5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,11,0,0,0,0,0,0,0,
|
|
18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,
|
|
11,11,11,11,11,11,11,0,0,11,0,0,11,11,11,11,11,11,11,11,0,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,0,5,5,0,0,5,5,5,5,11,
|
|
5,11,5,5,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,0,0,5,5,5,5,5,5,5,11,0,11,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,5,5,5,5,5,5,5,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,11,5,5,5,5,0,
|
|
0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,11,5,5,5,5,5,5,5,5,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,
|
|
11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,0,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,0,0,0,5,0,5,5,0,5,
|
|
5,5,5,5,5,5,11,5,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,11,11,11,11,11,11,0,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,0,5,5,0,5,5,5,5,5,11,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,0,0,0,0,0,0,0,0,0,
|
|
5,5,11,5,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,0,0,0,5,5,
|
|
5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
|
|
5,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,
|
|
18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,0,0,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,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,0,0,0,5,5,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5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,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,0,0,11,0,0,11,11,0,0,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,0,11,0,11,11,11,
|
|
11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,0,11,11,11,11,0,0,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,0,
|
|
11,11,11,11,11,0,11,0,0,0,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,0,11,11,11,11,11,11,11,11,0,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,5,5,5,5,5,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,5,5,5,0,5,5,0,5,5,5,5,5,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,5,5,5,5,5,5,5,11,11,11,11,11,11,11,0,0,
|
|
18,18,18,18,18,18,18,18,18,18,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,5,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,5,11,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,0,11,11,11,11,0,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,5,5,5,5,5,5,5,11,0,0,0,0,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,0,11,0,0,11,0,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,0,11,0,11,0,0,0,0,
|
|
0,0,11,0,0,0,0,11,0,11,0,11,0,11,11,11,0,11,11,0,11,0,0,11,0,11,0,11,0,11,0,11,0,11,11,0,11,0,0,11,11,11,11,0,11,11,11,11,11,11,11,0,11,11,11,11,0,11,11,11,11,0,11,0,
|
|
11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,11,11,11,0,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11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5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetUnicodeWordBreakClass(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeWordBreakClass_Data[((Codepoint < 918016) ? ((kbts_un)kbts__UnicodeWordBreakClass_PageIndices[Codepoint / 128] * 128) : 7296) | (Codepoint & 127)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeLineBreakClass_PageIndices[7172] = {
|
|
0,1,2,2,2,3,4,2,2,5,2,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,
|
|
27,28,29,30,2,2,31,2,32,2,2,2,2,33,34,35,36,37,38,39,40,41,42,43,44,45,2,46,2,2,2,47,
|
|
48,49,50,2,51,52,53,54,2,2,2,55,56,57,58,59,2,2,2,60,2,2,61,2,2,62,63,64,65,66,67,68,
|
|
69,70,71,72,73,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,74,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
75,67,67,67,67,67,67,67,67,76,2,2,77,78,2,2,79,80,81,82,83,84,2,85,86,87,88,89,90,91,92,86,
|
|
87,88,89,90,91,92,86,87,88,89,90,91,92,86,87,88,89,90,91,92,86,87,88,89,90,91,92,86,87,88,89,90,
|
|
91,92,86,87,88,89,90,91,92,86,87,88,89,90,91,92,86,87,88,89,90,91,92,86,87,88,89,90,91,92,86,87,
|
|
88,89,90,91,92,86,87,88,89,90,91,92,86,87,88,93,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,67,67,67,67,95,2,2,2,96,97,98,99,100,101,
|
|
2,2,102,103,2,104,105,106,2,107,2,2,2,2,2,2,108,2,109,2,110,111,112,2,2,2,113,2,2,114,115,116,
|
|
117,118,119,120,121,122,123,124,125,126,2,127,128,129,130,2,131,132,133,134,135,136,137,138,139,140,141,142,2,143,144,145,
|
|
2,2,2,2,2,2,2,2,146,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,147,148,149,2,150,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,151,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,152,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,153,154,155,2,2,2,156,2,2,157,158,159,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,160,67,67,67,67,67,67,161,161,161,162,163,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,164,
|
|
67,67,165,67,67,166,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,167,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,138,2,2,2,2,168,2,
|
|
2,2,169,170,171,2,172,2,2,2,2,2,2,2,2,173,2,2,2,2,174,175,2,2,2,2,2,2,2,2,2,2,
|
|
176,177,178,2,2,179,2,2,2,180,2,181,2,2,2,2,2,182,183,2,2,2,2,2,2,184,2,2,2,2,2,2,
|
|
185,186,2,187,188,189,190,191,192,193,194,195,196,197,198,199,2,2,200,201,202,203,2,138,189,189,189,189,189,189,189,204,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,205,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,
|
|
67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,205,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2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,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
206,2,207,208,
|
|
};
|
|
|
|
static kbts_u8 kbts__UnicodeLineBreakClass_Data[26752] = {
|
|
63,63,63,63,63,63,63,63,63,19,5,3,3,4,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,7,16,23,37,40,48,37,23,21,14,37,40,26,31,26,18,39,39,39,39,39,39,39,39,39,39,26,26,37,37,37,16,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,40,14,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,19,12,37,63,
|
|
63,63,63,63,63,6,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,10,21,48,40,40,40,37,37,37,37,37,24,37,19,37,37,48,40,37,37,35,37,37,37,37,37,37,25,37,37,37,21,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,35,37,37,37,35,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,35,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,10,63,63,63,63,63,63,63,63,63,63,63,63,10,10,10,10,10,10,10,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,26,37,
|
|
37,37,37,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,26,19,37,37,37,37,40,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,19,63,
|
|
37,63,63,37,63,63,16,63,37,37,37,37,37,37,37,37,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,37,37,37,37,36,36,36,36,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
39,39,39,39,39,39,37,37,37,48,48,48,26,26,37,37,63,63,63,63,63,63,63,63,63,63,63,16,63,16,16,16,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,39,39,39,39,39,39,39,39,39,39,48,39,39,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,16,37,63,63,63,63,63,63,63,39,37,63,63,63,63,63,63,37,37,63,63,37,63,63,63,63,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,37,37,37,37,26,16,37,37,37,63,40,40,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,37,63,63,63,63,63,63,63,63,63,37,63,63,63,37,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,37,37,37,37,37,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,39,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,37,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,63,63,19,19,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,63,63,
|
|
63,63,63,63,63,37,37,63,63,37,37,63,63,63,37,37,37,37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,63,63,37,37,39,39,39,39,39,39,39,39,39,39,37,37,48,48,37,37,37,37,37,48,37,40,37,37,63,37,
|
|
37,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,63,63,
|
|
63,63,63,37,37,37,37,63,63,37,37,63,63,63,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,63,63,37,37,37,63,37,37,37,37,37,37,37,37,37,37,
|
|
37,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,63,63,
|
|
63,63,63,63,63,63,37,63,63,63,37,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,37,37,39,39,39,39,39,39,39,39,39,39,37,40,37,37,37,37,37,37,37,37,63,63,63,63,63,63,
|
|
37,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,63,63,
|
|
63,63,63,63,63,37,37,63,63,37,37,63,63,63,37,37,37,37,37,37,37,63,63,63,37,37,37,37,37,37,37,37,37,37,63,63,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,
|
|
63,63,63,37,37,37,63,63,63,37,63,63,63,63,37,37,37,37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,40,37,37,37,37,37,37,
|
|
63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,63,63,
|
|
63,63,63,63,63,37,63,63,63,37,63,63,63,63,37,37,37,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,63,63,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,35,37,37,37,37,37,37,37,37,
|
|
37,63,63,63,35,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,63,63,
|
|
63,63,63,63,63,37,63,63,63,37,63,63,63,63,37,37,37,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,63,63,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,37,63,63,
|
|
63,63,63,63,63,37,63,63,63,37,63,63,63,63,37,37,37,37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,63,63,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,48,37,37,37,37,37,37,
|
|
37,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,63,37,37,37,37,63,63,63,63,63,63,37,63,37,63,63,63,63,63,63,63,63,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,40,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,35,35,35,35,37,35,35,10,35,35,19,10,16,16,16,16,16,10,37,16,37,37,37,63,63,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,19,63,37,63,37,63,21,12,21,12,63,63,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,19,
|
|
63,63,63,63,63,19,63,63,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,19,19,
|
|
37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,35,35,19,35,37,37,37,37,37,10,10,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
39,39,39,39,39,39,39,39,39,39,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,
|
|
50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,
|
|
51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,
|
|
52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,37,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,19,19,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,19,27,37,19,37,19,40,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,16,16,19,19,35,37,16,16,37,63,63,63,10,63,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,
|
|
37,37,37,37,16,16,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,
|
|
39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
63,63,63,63,63,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,60,56,56,56,56,56,56,56,56,37,19,19,58,58,58,58,58,58,58,58,58,58,19,19,42,19,19,19,19,42,42,42,42,42,42,42,42,42,42,63,63,63,63,63,63,63,63,63,42,42,42,42,42,42,42,42,42,19,19,19,
|
|
63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,63,63,63,63,63,63,63,63,63,63,63,63,59,59,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,19,19,19,19,19,
|
|
39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,19,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,63,37,37,37,37,37,37,63,37,37,63,63,63,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,10,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,10,63,63,63,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,35,37,37,
|
|
19,19,19,19,19,19,19,10,19,19,19,8,63,64,63,63,32,10,19,19,29,37,37,37,24,25,21,24,24,25,21,24,37,37,37,37,33,33,33,19,3,3,63,63,63,63,63,10,48,48,48,48,48,48,48,48,37,24,25,37,27,27,37,37,
|
|
37,37,37,37,26,21,12,27,27,27,37,37,37,37,37,37,37,37,37,37,37,37,19,48,19,19,19,19,37,19,19,19,9,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,21,12,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,21,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,40,40,40,40,40,40,40,48,40,41,40,40,40,40,40,40,40,40,40,40,40,40,48,40,40,40,40,48,40,40,48,40,
|
|
48,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,48,37,37,37,37,37,48,37,37,37,37,37,37,37,37,37,37,37,37,40,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,40,40,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,33,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,21,12,21,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,43,43,37,37,37,37,37,37,37,37,37,37,37,37,37,22,13,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,38,38,38,37,37,37,43,42,42,43,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,57,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,38,37,
|
|
42,42,42,42,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,43,43,37,37,42,37,42,42,42,45,42,42,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,38,38,38,38,38,38,38,37,42,42,42,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,38,38,38,38,38,38,38,38,38,38,38,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,42,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,43,
|
|
37,37,37,37,37,37,37,37,37,37,38,38,38,38,38,38,37,37,37,38,37,37,37,37,37,37,37,37,37,37,37,37,37,38,37,37,37,37,37,37,37,37,38,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,43,43,42,
|
|
42,42,42,42,43,43,42,42,42,37,37,37,37,42,38,42,42,42,37,42,43,37,37,37,42,42,37,37,42,37,37,42,42,42,37,37,37,37,37,37,37,37,43,37,37,37,37,37,37,42,43,43,42,43,37,42,42,45,43,37,37,43,42,42,
|
|
42,42,42,42,42,38,37,37,42,42,46,46,45,45,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,38,37,38,37,37,37,37,38,38,38,37,38,37,37,37,23,23,23,23,23,23,37,16,16,42,37,37,37,21,12,21,12,21,12,21,12,21,12,21,12,21,12,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,38,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,
|
|
37,37,37,37,37,21,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,12,21,12,21,12,21,12,21,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,21,12,21,12,21,12,21,12,21,12,21,12,21,12,21,12,21,12,21,12,21,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,12,21,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,12,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,37,37,37,37,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,37,37,37,37,37,37,37,16,19,19,19,37,16,19,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
23,23,24,25,24,25,23,23,23,24,25,23,24,25,19,19,19,19,19,19,19,19,37,19,21,19,37,37,24,25,37,37,24,25,21,12,21,12,21,12,21,12,19,19,19,19,16,37,19,19,37,19,19,37,37,37,37,37,29,29,19,19,19,37,
|
|
19,19,21,19,19,19,19,19,19,19,19,37,19,37,19,19,37,37,37,16,16,21,14,21,14,21,14,21,14,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
20,13,13,43,43,28,43,43,22,13,22,13,22,13,22,13,22,13,43,43,22,13,22,13,22,13,22,13,28,22,13,13,43,43,43,43,43,43,43,43,43,43,63,63,63,63,63,63,43,43,43,43,43,63,43,43,43,43,43,28,28,43,43,42,
|
|
37,65,43,65,43,65,43,65,43,65,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,65,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,65,43,65,43,65,43,43,43,43,43,43,65,43,43,43,43,43,43,65,65,37,37,63,63,28,28,28,28,43,28,65,43,65,43,65,43,65,43,65,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,65,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,65,43,65,43,65,43,43,43,43,43,43,65,43,43,43,43,43,43,65,65,43,43,43,43,28,65,28,28,43,
|
|
37,37,37,37,37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,37,37,37,37,37,37,37,37,43,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,37,37,37,37,37,37,37,37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,28,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,37,37,37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,19,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,19,16,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,37,63,63,63,63,63,63,63,63,63,63,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,37,19,19,19,19,19,37,37,37,37,37,37,37,37,
|
|
37,37,63,37,37,37,63,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,48,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,35,35,16,16,37,37,37,37,37,37,37,37,
|
|
63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,37,37,37,37,37,37,37,37,19,19,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,35,37,37,63,
|
|
39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,37,37,37,
|
|
63,63,63,63,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
60,42,42,42,42,42,42,19,19,19,42,42,42,42,37,19,58,58,58,58,58,58,58,58,58,58,37,37,37,37,42,42,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,
|
|
19,19,19,63,19,19,19,19,19,19,19,19,63,63,37,37,58,58,58,58,58,58,58,58,58,58,37,37,42,19,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,19,19,37,37,37,63,63,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,19,63,63,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,
|
|
54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
|
|
54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
|
|
54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,
|
|
54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,
|
|
54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
|
|
54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
|
|
53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,
|
|
54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
|
|
54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
|
|
54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,
|
|
54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,
|
|
54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
|
|
54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
|
|
54,54,54,54,54,54,54,54,53,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,37,37,37,37,37,37,37,37,37,37,37,37,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,
|
|
51,51,51,51,51,51,51,37,37,37,37,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,37,37,37,37,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,36,63,36,36,36,36,36,36,36,36,36,36,37,36,36,36,36,36,36,36,36,36,36,36,36,36,37,36,36,36,36,36,37,36,37,
|
|
36,36,37,36,36,37,36,36,36,36,36,36,36,36,36,36,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,12,21,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,48,37,37,37,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,13,13,13,28,28,17,17,22,13,34,37,37,37,37,37,37,10,63,10,63,10,63,10,10,63,10,63,10,63,10,10,63,43,43,43,43,43,22,13,22,13,22,13,22,13,22,13,22,
|
|
13,22,13,22,13,43,43,22,13,43,43,43,43,43,43,43,13,43,13,37,28,28,17,17,43,22,13,22,13,22,13,43,43,43,43,43,43,43,43,37,43,41,49,43,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,9,
|
|
37,17,43,43,41,49,43,43,22,13,43,43,13,43,13,43,43,43,43,43,43,43,43,43,43,43,28,28,43,43,43,17,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,22,43,13,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,22,43,13,43,22,13,13,22,13,13,28,43,65,65,65,65,65,65,65,65,65,65,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,28,28,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,
|
|
37,37,43,43,43,43,43,43,37,37,43,43,43,43,43,43,37,37,43,43,43,43,43,43,37,37,43,43,43,37,37,37,49,41,43,43,43,41,41,37,38,38,38,38,38,38,38,37,37,37,37,37,37,37,37,37,37,63,63,63,30,37,37,37,
|
|
19,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,63,63,63,37,63,63,37,37,37,37,37,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,37,37,37,37,63,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,19,19,19,19,19,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,19,19,19,19,19,19,33,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,19,19,19,19,19,19,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
63,63,63,55,55,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,60,19,19,42,42,42,42,42,37,37,37,37,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,58,58,58,58,58,58,58,58,58,58,63,56,56,63,63,56,37,37,37,37,37,37,37,37,37,10,
|
|
63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,37,37,39,19,19,
|
|
19,19,63,37,37,37,37,37,37,37,37,37,37,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,39,39,39,39,39,39,39,39,39,39,
|
|
19,19,19,19,37,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,35,37,37,37,37,37,37,37,37,37,37,
|
|
63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,37,37,37,37,19,19,37,19,63,63,63,63,37,63,63,39,39,39,39,39,39,39,39,39,39,37,35,37,19,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,19,19,37,19,19,37,63,37,
|
|
37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
63,63,63,63,37,56,56,56,56,56,56,56,56,37,37,56,56,37,37,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,37,56,56,56,56,56,56,56,37,56,56,37,56,56,56,56,56,37,63,63,19,63,63,
|
|
63,63,63,63,63,37,37,63,63,37,37,63,63,60,37,37,58,37,37,37,37,37,37,63,37,37,37,37,37,19,58,58,56,56,63,63,37,37,63,63,63,63,63,63,63,37,37,37,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,
|
|
58,58,58,58,58,58,58,58,58,58,37,58,37,37,58,37,58,58,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,37,42,63,63,63,63,63,63,63,63,
|
|
63,37,63,37,37,63,37,63,63,63,63,37,63,63,63,63,60,55,63,42,42,42,37,42,42,37,37,37,37,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,37,37,37,37,19,19,19,19,37,39,39,39,39,39,39,39,39,39,39,19,19,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,37,37,63,63,63,63,63,63,63,63,
|
|
63,35,19,19,16,16,37,37,37,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,35,35,35,35,35,35,35,35,35,35,35,35,35,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,
|
|
39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,19,19,19,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
56,56,56,56,56,56,56,37,37,56,37,37,56,56,56,56,56,56,56,56,37,56,56,37,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,63,63,63,63,63,63,37,63,63,37,37,63,63,63,60,55,
|
|
63,55,63,63,19,19,19,37,37,37,37,37,37,37,37,37,58,58,58,58,58,58,58,58,58,58,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,37,37,63,63,63,63,63,63,63,37,35,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,37,63,63,63,63,35,
|
|
37,19,19,19,19,35,37,63,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,19,19,19,37,35,35,35,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
35,35,35,35,35,35,35,35,35,35,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,37,63,63,63,63,63,63,63,63,
|
|
37,19,19,19,19,19,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,35,16,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,37,37,37,63,37,63,63,37,63,
|
|
63,63,63,63,63,63,37,63,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,37,63,63,37,63,63,63,63,63,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,19,63,63,63,63,19,19,37,37,37,37,37,37,37,
|
|
63,63,55,63,56,56,56,56,56,56,56,56,56,56,56,56,56,37,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,63,63,63,63,63,63,63,37,37,37,63,63,
|
|
63,63,60,19,19,42,42,42,42,42,42,42,42,42,42,42,58,58,58,58,58,58,58,58,58,58,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,48,48,48,48,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,19,19,19,19,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,21,21,12,12,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,12,37,37,37,21,12,21,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,12,12,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,10,10,10,10,10,10,10,21,12,10,10,10,21,12,21,12,
|
|
63,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,21,12,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,58,58,58,58,58,58,58,58,58,58,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,19,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,19,19,19,37,37,37,37,37,37,
|
|
37,37,37,37,19,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,19,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,28,28,28,28,11,37,37,37,37,37,37,37,37,37,37,37,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,37,37,37,37,37,37,37,
|
|
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
|
|
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
|
|
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
|
|
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,
|
|
43,43,43,43,43,43,43,43,43,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,38,38,38,37,38,38,38,38,38,38,38,37,38,38,37,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,65,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,65,65,65,37,37,65,37,37,37,37,37,37,37,37,37,37,37,37,37,37,65,65,65,65,37,37,37,37,37,37,37,37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,19,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,37,37,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
|
|
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,37,37,37,37,37,37,37,37,37,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,63,37,37,19,19,19,19,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
63,63,63,63,63,63,63,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,63,63,63,63,63,63,63,37,63,63,37,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,
|
|
39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,40,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,63,63,63,63,63,63,63,37,37,37,37,37,39,39,39,39,39,39,39,39,39,39,37,37,37,37,21,21,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,48,37,37,37,48,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
42,42,42,42,43,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,44,44,44,44,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,
|
|
42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,
|
|
42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,44,44,44,44,44,44,44,44,44,44,44,44,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,44,44,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,
|
|
44,42,42,42,42,42,42,42,42,42,42,42,42,42,42,43,44,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,44,44,44,44,44,44,44,44,44,44,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,38,37,37,38,38,38,38,38,38,38,38,38,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,
|
|
44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
43,43,43,44,44,44,44,44,44,44,44,44,44,44,44,44,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,44,44,44,44,
|
|
43,43,43,43,43,43,43,43,43,44,44,44,44,44,44,44,43,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,43,43,43,43,43,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,
|
|
44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,
|
|
44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,42,42,42,42,42,42,42,42,42,42,42,43,43,43,43,43,43,43,43,43,42,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,43,43,
|
|
43,43,43,43,43,46,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,42,42,42,42,42,42,42,37,37,42,42,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,38,38,43,43,43,43,43,38,43,43,43,
|
|
43,43,46,46,46,43,43,46,43,43,46,45,45,42,42,43,43,43,43,43,42,42,42,42,42,42,42,42,42,42,42,42,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,42,42,43,42,42,42,43,43,43,47,47,47,47,47,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,
|
|
43,42,46,46,43,43,46,46,46,46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,43,43,43,46,43,43,43,
|
|
43,46,46,46,43,46,46,46,43,43,43,43,43,43,43,46,43,46,43,43,43,43,43,43,43,43,43,43,43,43,43,43,38,43,38,43,38,43,43,43,43,43,46,43,43,43,43,38,43,38,38,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,42,43,
|
|
38,38,38,38,38,38,38,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,38,38,38,38,38,38,38,38,38,38,38,38,38,38,43,43,43,43,43,43,43,43,43,43,43,43,43,38,38,38,38,38,38,38,38,38,38,38,38,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,42,43,43,43,43,42,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,42,42,42,42,42,42,42,42,42,42,42,45,45,42,42,42,42,46,42,42,42,42,42,
|
|
42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,45,42,42,42,42,46,46,42,42,42,42,42,42,42,42,42,42,42,42,42,43,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,
|
|
42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,37,37,37,37,37,37,37,37,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,37,37,37,37,37,37,42,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,46,46,46,43,43,43,46,46,46,46,46,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,23,23,23,27,27,27,37,37,37,37,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,46,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,46,46,46,43,43,43,43,43,43,43,43,43,
|
|
46,43,43,43,43,43,42,42,42,42,42,42,46,42,42,42,43,43,43,42,42,43,43,43,44,44,44,44,43,43,43,43,42,42,42,42,42,42,42,42,42,42,42,43,43,44,44,44,42,42,42,42,43,43,43,43,43,43,43,43,43,44,44,44,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,42,42,42,44,44,44,44,42,42,42,42,42,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,42,42,42,42,42,44,44,44,44,44,44,43,43,43,43,43,43,43,43,43,43,43,43,44,44,44,44,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,46,43,43,46,43,43,43,43,43,43,43,43,46,46,46,46,46,46,46,46,43,43,43,43,43,43,46,43,43,43,43,43,43,43,43,43,46,46,46,46,46,46,46,46,46,46,43,42,46,46,46,43,
|
|
43,43,43,43,43,43,42,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,46,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,46,46,43,46,46,43,46,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,46,46,46,43,46,46,46,46,46,46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,44,44,44,44,44,44,44,44,44,44,44,44,42,42,42,42,42,42,42,42,42,42,42,42,42,42,44,44,43,43,43,43,43,43,43,43,43,43,43,43,43,44,44,44,
|
|
43,43,43,43,43,43,43,43,43,43,44,44,44,44,44,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,46,46,46,43,44,44,44,44,44,44,44,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,44,44,43,43,43,43,43,43,43,43,43,43,43,44,44,44,44,44,44,46,46,46,46,46,46,46,46,46,44,44,44,44,44,44,44,
|
|
44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,
|
|
44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,37,37,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,37,37,
|
|
37,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
|
|
63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetUnicodeLineBreakClass(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeLineBreakClass_Data[((Codepoint < 918016) ? ((kbts_un)kbts__UnicodeLineBreakClass_PageIndices[Codepoint / 128] * 128) : 256) | (Codepoint & 127)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeGraphemeBreakClass_PageIndices[7200] = {
|
|
0,1,2,2,2,2,3,2,2,4,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,
|
|
26,27,28,29,2,2,30,2,2,2,2,2,2,2,31,32,33,34,35,2,36,37,38,39,40,41,2,42,2,2,2,2,
|
|
43,44,45,46,2,2,47,48,2,49,2,50,51,52,53,54,2,2,55,2,2,2,56,2,2,57,58,59,2,2,2,2,
|
|
60,61,2,2,2,62,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,63,64,2,2,65,66,67,68,69,70,2,71,72,73,74,75,76,77,78,79,
|
|
73,74,75,76,77,78,79,73,74,75,76,77,78,79,73,74,75,76,77,78,79,73,74,75,76,77,78,79,73,74,75,76,
|
|
77,78,79,73,74,75,76,77,78,79,73,74,75,76,77,78,79,73,74,75,76,77,78,79,73,74,75,76,77,78,79,73,
|
|
74,75,76,77,78,79,73,74,75,76,77,78,79,73,74,80,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,81,2,2,2,2,2,82,83,2,84,
|
|
2,2,2,85,2,86,87,2,2,2,2,2,2,2,2,2,2,2,2,2,88,89,2,2,2,2,90,2,2,91,92,93,
|
|
94,95,96,97,98,99,100,101,102,103,2,104,105,106,107,2,108,2,109,110,111,112,2,2,113,114,115,116,2,117,118,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,119,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,120,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,121,122,2,2,2,123,2,2,2,124,125,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,14,
|
|
0,14,14,0,14,14,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
12,12,12,12,12,12,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,14,14,14,14,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,12,0,14,14,14,14,14,14,0,0,14,14,0,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
|
|
14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,14,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,0,14,14,14,14,14,14,14,14,14,0,14,14,14,0,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,0,0,0,0,0,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,12,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
|
|
14,14,14,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,6,14,0,6,6,
|
|
6,14,14,14,14,14,14,14,14,6,6,6,6,15,6,6,0,14,14,14,14,14,14,14,13,13,13,13,13,13,13,13,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,13,13,13,
|
|
0,14,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,0,13,13,13,13,13,13,13,0,13,0,0,0,13,13,13,13,0,0,14,0,14,6,
|
|
6,14,14,14,14,0,0,6,6,0,0,6,6,15,0,0,0,0,0,0,0,0,0,14,0,0,0,0,13,13,0,13,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,13,13,0,0,0,0,0,0,0,0,0,0,0,0,14,0,
|
|
0,14,14,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,6,6,
|
|
6,14,14,0,0,0,0,14,14,0,0,14,14,14,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,14,0,0,0,0,0,0,0,0,0,0,
|
|
0,14,14,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,0,13,13,13,13,13,13,13,0,13,13,0,13,13,13,13,13,0,0,14,0,6,6,
|
|
6,14,14,14,14,14,0,14,14,6,0,6,6,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,14,14,14,14,14,14,
|
|
0,14,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,0,13,13,13,13,13,13,13,0,13,13,0,13,13,13,13,13,0,0,14,0,14,14,
|
|
6,14,14,14,14,0,0,6,6,0,0,6,6,15,0,0,0,0,0,0,0,14,14,14,0,0,0,0,13,13,0,13,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,6,
|
|
14,6,6,0,0,0,6,6,6,0,6,6,6,14,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
14,6,6,6,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,0,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,0,0,14,0,14,14,
|
|
14,6,6,6,6,0,14,14,14,0,14,14,14,15,0,0,0,0,0,0,0,14,14,0,13,13,13,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,14,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,6,14,
|
|
14,6,14,6,6,0,14,14,14,0,14,14,14,14,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
14,14,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,0,14,6,
|
|
6,14,14,14,14,0,6,6,6,0,6,6,6,15,12,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,14,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,6,14,14,14,14,14,14,14,6,6,
|
|
6,6,6,6,6,6,14,6,6,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,16,16,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,
|
|
16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,0,
|
|
16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,0,16,0,16,0,0,0,0,0,0,16,0,0,0,16,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,16,0,0,16,0,0,0,0,16,0,16,0,0,0,0,16,16,16,0,16,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,16,16,16,0,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0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,14,6,6,14,6,6,0,6,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
|
10,10,10,10,10,10,10,10,9,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
|
|
8,8,8,8,8,8,8,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,14,14,14,14,14,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
14,14,14,14,14,14,14,0,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,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,16,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
|
|
0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,16,16,16,16,16,16,16,16,16,0,16,16,16,16,
|
|
0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,14,14,14,14,14,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,
|
|
0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,
|
|
16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,
|
|
3,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
|
|
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
|
|
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
|
|
14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetUnicodeGraphemeBreakClass(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeGraphemeBreakClass_Data[((Codepoint < 921600) ? ((kbts_un)kbts__UnicodeGraphemeBreakClass_PageIndices[Codepoint / 128] * 128) : 256) | (Codepoint & 127)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeSyllabicInfo_PageIndices[3915] = {
|
|
0,1,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
|
5,0,6,0,0,0,0,0,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,
|
|
31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,0,50,51,52,0,53,54,55,56,57,58,59,0,
|
|
60,61,62,63,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,66,67,68,69,70,71,72,
|
|
73,74,74,75,76,77,0,0,78,79,80,81,74,82,83,0,84,74,85,86,87,0,0,0,88,89,90,0,91,92,74,93,
|
|
74,94,95,0,0,0,96,97,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
99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0,0,0,0,0,0,0,74,144,0,0,0,106,145,106,146,0,0,0,
|
|
147,148,149,150,151,152,153,0,154,155,156,157,158,159,160,161,162,163,164,0,165,166,167,168,169,170,171,172,173,174,175,176,
|
|
177,178,179,180,181,182,183,0,0,0,0,0,177,184,185,0,177,186,187,0,188,189,190,191,192,193,194,0,0,0,0,0,
|
|
188,195,0,0,0,0,0,0,196,197,198,0,0,199,200,201,202,203,204,74,205,0,0,0,0,0,0,0,0,0,0,0,
|
|
206,207,208,209,210,211,0,0,212,213,214,215,216,72,0,0,0,0,0,0,0,0,0,217,218,219,220,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,1034,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,3,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3,3,3,0,0,0,0,
|
|
3592,3592,3592,3592,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1039,1025,1025,1025,1025,1025,1025,1025,1025,1025,2311,2311,2307,3601,2311,519,
|
|
2311,2311,2311,2311,2311,2311,2311,2311,2311,2311,2311,2311,2311,2308,519,2311,0,3593,3593,3592,3592,2311,2311,2311,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1026,1026,2311,2311,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1034,3592,3592,3592,0,1026,1026,1026,1026,1026,1026,1026,1026,0,0,1026,1026,0,0,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1039,0,1025,0,0,0,1025,1025,1025,1025,0,0,2307,3601,3079,519,
|
|
3079,2311,2311,2311,2311,0,0,519,519,0,0,3079,3079,2308,1025,0,0,0,0,0,0,0,0,3079,0,0,0,0,1025,1025,0,1025,
|
|
1026,1026,2311,2311,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1025,1025,0,0,0,0,0,0,0,0,0,0,1034,0,3592,0,
|
|
0,3592,3592,3592,0,1026,1026,1026,1026,1026,1026,0,0,0,0,1026,1026,0,0,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1039,0,1025,1025,0,1025,1025,0,1025,1025,0,0,3075,0,3079,519,
|
|
3085,3079,3079,0,0,0,0,3079,3079,0,0,3079,3079,3076,0,0,0,2055,0,0,0,0,0,0,0,1025,1025,1025,1025,0,1025,0,
|
|
0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,3592,3592,1025,1025,0,1040,0,0,0,0,0,0,0,0,0,0,
|
|
0,3592,3592,3592,0,1026,1026,1026,1026,1026,1026,1026,1026,1026,0,1026,1026,1026,0,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1039,0,1025,1025,0,1025,1025,1025,1025,1025,0,0,3075,3601,3079,519,
|
|
3079,3079,3079,3079,3079,2311,0,2311,2311,3079,0,3079,3079,3076,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1026,1026,3079,3079,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,1025,3593,2307,3593,2307,2307,2307,
|
|
0,1800,3592,3592,0,1026,1026,1026,1026,1026,1026,1026,1026,0,0,1026,1026,0,0,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1039,0,1025,1025,0,1025,1025,1025,1025,1025,0,0,2307,3601,3079,1287,
|
|
3079,2311,2311,2311,2311,0,0,519,1287,0,0,3079,3079,2308,0,0,0,0,0,0,0,1283,1287,3079,0,0,0,0,1025,1025,0,1025,
|
|
1026,1026,2311,2311,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,3592,0,0,1026,1026,1026,1026,1026,1026,0,0,0,1026,1026,1026,0,1026,1026,1026,1025,0,0,0,1025,1025,0,1025,0,1025,1025,
|
|
0,0,0,1025,1025,0,0,0,1025,1025,1025,0,0,0,1025,1025,1039,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,3079,3079,
|
|
2311,3079,3079,0,0,0,519,519,519,0,3079,3079,3079,2308,0,0,0,0,0,0,0,0,0,3079,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
3592,3592,3592,3592,3592,1026,1026,1026,1026,1026,1026,1026,1026,0,1026,1026,1026,0,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1039,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,1795,3601,1799,1799,
|
|
1799,1799,1799,2311,2311,0,1799,1799,1799,0,1799,1799,1799,1796,0,0,0,0,0,0,0,1799,1799,0,1025,1025,1025,0,0,1025,0,0,
|
|
1026,1026,1799,1799,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1034,3592,3592,3592,0,1026,1026,1026,1026,1026,1026,1026,1026,0,1026,1026,1026,0,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1039,1025,1025,1025,0,1025,1025,1025,1025,1025,0,0,1795,3601,1799,1799,
|
|
1799,1799,1799,2311,2311,0,1799,2311,2311,0,2311,2311,1799,1796,0,0,0,0,0,0,0,2311,2311,0,0,0,0,0,0,1025,1025,0,
|
|
1026,1026,1799,1799,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,1042,1042,3592,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
3592,3592,3592,3592,1034,1026,1026,1026,1026,1026,1026,1026,1026,0,1026,1026,1026,0,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1039,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,3601,3079,3079,
|
|
3079,3079,3079,3079,3079,0,519,519,519,0,3079,3079,3079,4,14,0,0,0,0,0,1025,1025,1025,3079,0,0,0,0,0,0,0,1026,
|
|
1026,1026,3079,3079,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,0,1025,1025,1025,1025,1025,1025,
|
|
0,3592,3592,3592,0,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,0,0,0,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,0,0,0,2308,0,0,0,0,2311,2311,2311,2311,2311,2311,0,2311,0,2311,519,2311,519,2311,2311,2311,2311,
|
|
0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,2311,2311,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,
|
|
519,519,519,519,519,7,0,7,3,3,3,3,7,3592,7,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
0,1025,1025,0,1025,0,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,0,1025,0,1025,1025,1025,1025,1025,1025,1025,1025,0,7,7,7,7,7,7,7,7,7,7,7,7,1040,1040,0,0,
|
|
519,519,519,519,519,0,0,0,3,3,3,3,0,3592,3592,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,1025,1025,1025,1025,
|
|
1025,1025,0,0,1025,1025,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,3592,0,3592,0,3,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,3,7,7,7,7,7,7,7,7,7,7,7,7,3592,1025,
|
|
7,7,3592,3592,7,3601,3,3,1025,1025,1025,1025,1025,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,0,1040,1040,1040,1040,1040,1040,1040,
|
|
1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,0,0,0,
|
|
0,0,0,0,0,0,3592,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1039,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1039,1025,1025,1025,1025,
|
|
1025,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,23,23,20,20,21,21,22,3593,20,20,20,3593,3,1034,4,27,33,31,32,30,1025,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,1025,0,1025,1025,1026,1026,1026,1026,23,23,21,21,1039,1025,1025,1025,33,33,
|
|
36,1025,23,34,34,1025,1025,23,23,34,34,34,34,34,1025,1025,1025,20,20,20,20,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,32,23,22,20,20,1034,1034,1034,1034,1034,1034,1034,1025,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,20,0,0,
|
|
1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,0,0,0,0,0,0,0,0,0,1025,
|
|
1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,0,0,0,0,0,0,0,0,0,0,0,
|
|
1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,0,7,7,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1039,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,0,0,23,20,20,20,20,21,21,21,20,23,
|
|
23,22,22,22,23,23,25,25,25,24,24,25,24,25,25,25,25,25,4,25,0,0,0,0,0,1034,0,0,3601,25,0,0,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,0,0,0,0,0,0,1025,0,0,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,0,0,0,
|
|
1034,1034,1034,1034,1034,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1034,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,
|
|
7,7,7,7,7,7,7,7,7,1040,1040,1040,0,0,0,0,1040,1040,3592,1040,1040,1040,1040,1040,1040,1040,3592,3592,0,0,0,0,
|
|
0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,7,7,7,7,7,519,519,519,7,7,519,7,7,7,7,7,
|
|
7,1025,1025,1025,1025,1025,1025,1025,3,3,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1026,1026,1026,1026,1026,1026,1025,1025,1040,1040,1040,1040,1040,1025,1040,1040,1040,1040,0,
|
|
4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,3592,3,3,3,3,3,7,3,3,0,0,3,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
3592,3592,3592,1040,3592,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3,7,7,7,7,7,7,7,7,7,7,7,
|
|
7,7,7,7,4,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
3592,1040,3592,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1040,1040,1040,7,7,7,7,7,7,7,4,1040,1040,1025,1025,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,3601,1025,1025,1025,1040,1040,
|
|
1025,1025,1025,1025,1026,1026,3,7,7,7,7,7,7,7,7,7,1040,1040,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1040,1040,7,7,7,7,7,7,7,1040,1040,1040,1040,1040,1040,1040,3592,3592,0,3,0,0,0,0,0,0,0,0,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,1025,1025,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3593,3593,3593,0,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,
|
|
3593,3593,3593,3593,3593,3593,3593,3593,3593,3601,3601,3601,3601,3593,3601,3601,3601,3601,1025,1025,3593,1025,1025,3593,3593,3593,1034,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3592,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,5,6,0,0,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,1034,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3592,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,3592,3592,3592,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3593,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,1035,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1034,1034,1034,1034,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,0,0,0,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
|
1026,1026,7,1026,1026,1026,4,1025,1025,1025,1025,3592,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,7,7,7,7,7,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1026,1026,
|
|
1026,1026,1025,1025,1025,1025,1026,1040,1040,1025,1025,1025,1025,1025,1025,1025,1025,1040,1025,3592,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
3592,3592,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1040,7,7,7,7,7,7,7,7,7,7,7,
|
|
7,7,7,7,4,3592,0,0,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3593,3601,3601,3601,3601,3601,3601,0,0,0,0,0,0,1026,2311,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1026,1026,1026,1026,1026,1026,1026,1026,1026,3,3,3,0,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,1040,1040,1040,1040,7,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
3592,3592,1040,3592,1026,1026,1026,1026,1026,1025,1025,1025,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3,7,7,7,7,7,7,7,7,7,1040,1040,1040,
|
|
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,20,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1025,1025,1025,1025,1025,0,
|
|
1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,3592,7,7,7,7,7,7,7,7,7,1040,1040,1040,1040,0,0,0,0,0,0,0,0,0,
|
|
1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1034,1034,1034,0,0,0,1025,34,3,3,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,1026,7,7,7,519,519,7,7,519,1026,519,519,1026,7,3,
|
|
0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,0,0,0,0,0,3592,4,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1026,1026,1025,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1040,1040,1040,1040,1040,
|
|
1040,1040,1040,7,7,7,7,7,7,7,7,0,3,7,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,0,0,0,
|
|
1025,1287,7,7,0,7,1287,0,0,0,0,0,7,3592,3592,3592,1025,1025,1025,1025,0,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,3,3,3,0,0,0,0,4,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,3,3,3,3592,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,0,0,0,7,7,7,7,7,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,7,7,0,0,0,1025,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,3,3,3,3,3,3,3,3,3,3,3,1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
3592,3592,3592,1042,1042,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,
|
|
7,7,7,7,7,7,4,0,0,0,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,7,1026,1026,7,7,1025,0,0,0,0,0,0,0,0,0,1034,
|
|
3592,3592,3592,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,7,4,3,0,0,0,0,0,
|
|
0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
3592,3592,3592,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,7,7,7,7,4,3592,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,
|
|
0,0,0,0,1025,7,7,1025,0,0,0,0,0,0,0,0,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
3592,3592,3592,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,7,7,7,7,7,
|
|
4,3601,0,0,0,0,0,0,0,3592,3,7,7,0,7,3592,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1025,0,0,0,0,0,
|
|
0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,0,0,
|
|
1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,3592,4,3,3592,0,0,0,0,0,0,3593,1025,
|
|
1026,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1026,1026,1026,1026,1025,1025,1025,0,1025,0,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,0,0,0,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3592,
|
|
7,7,7,7,7,7,7,7,7,3,7,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
3592,3592,3592,3592,0,1026,1026,1026,1026,1026,1026,1026,1026,0,0,1026,1026,0,0,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,0,1025,1025,1025,1025,1025,0,3,3,3601,7,7,
|
|
7,7,7,7,7,0,0,7,7,0,0,7,7,4,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,3592,3592,
|
|
1026,1026,7,7,0,0,3593,3593,3593,3593,3593,3593,3593,0,0,0,3593,3593,3593,3593,3593,0,0,0,0,0,0,0,0,0,0,0,
|
|
1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,0,1026,0,0,1026,0,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,3601,7,7,7,7,7,7,7,7,
|
|
7,0,7,0,0,7,0,7,7,7,3592,0,3592,3592,3592,3,4,14,3592,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,3593,3593,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,7,7,7,
|
|
7,7,4,3592,3592,3592,3,3601,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,3592,3592,
|
|
1042,1042,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,3592,
|
|
3592,3592,4,3,3601,0,0,0,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,0,0,7,7,7,7,3592,3592,3592,4,
|
|
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1026,1026,1026,1026,7,7,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,7,7,7,7,7,3592,3592,4,
|
|
7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3592,3592,7,7,7,7,7,7,7,7,7,4,3,1025,0,0,0,0,0,0,0,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,
|
|
1034,1034,1034,1034,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,1040,1040,1040,
|
|
7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,7,7,7,3592,3592,4,3,0,0,0,0,0,
|
|
1026,1026,1026,1026,1026,1026,1026,0,0,1026,0,0,1025,1025,1025,1025,1025,1025,1025,1025,0,1025,1025,0,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,0,7,7,0,0,3592,3592,7,4,0,
|
|
1040,14,1040,3,0,0,0,0,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1026,1026,1026,1026,1026,1026,1026,1026,0,0,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,0,0,7,7,7,7,3592,3592,
|
|
4,3601,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1026,7,7,7,7,7,7,7,7,7,7,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3592,7,3592,3592,3592,3592,3592,1042,1040,1040,1040,1040,1034,
|
|
0,0,0,0,0,1034,0,4,0,0,0,0,0,0,0,0,1026,7,7,7,7,7,7,7,7,7,7,7,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,0,0,0,0,0,0,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,3592,3592,3592,4,0,0,0,3601,0,0,
|
|
1026,1026,1026,1026,1026,1026,1026,1026,1026,0,1026,1026,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,7,0,7,7,7,7,3592,3592,3592,4,
|
|
3601,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,
|
|
1040,1040,1040,1040,1040,1040,1040,1040,0,1040,1040,1040,1040,1040,1040,1040,7,7,7,7,7,3592,3592,0,0,0,0,0,0,0,0,0,
|
|
1026,1026,1026,1026,1026,1026,1026,0,1026,1026,0,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,0,0,0,7,0,7,7,0,7,
|
|
3592,3592,3,7,7,4,14,1040,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1026,1026,1026,1026,1026,1026,0,1026,1026,0,1026,1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,0,7,7,0,7,7,3592,3592,4,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1034,7,7,7,7,0,0,0,0,0,0,0,0,0,
|
|
3592,3592,14,3592,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,7,7,7,0,0,0,7,7,
|
|
7,7,4,0,0,0,0,0,0,0,0,0,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,3,0,0,0,0,0,
|
|
1026,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,
|
|
7,7,7,7,7,7,7,7,7,7,1040,1040,1040,3592,1040,7,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,
|
|
3592,3592,3592,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,7,7,7,7,7,7,7,7,7,7,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,3,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
|
|
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
|
|
7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,0,0,0,0,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,1283,1283,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,0,0,0,3,3,3,3,3,3,3,1025,1025,1025,1025,1025,1025,1025,0,0,
|
|
1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,1025,1025,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,3,3,3,3,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,7,7,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,7,7,1025,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,
|
|
1025,1025,1025,1025,3,3,3,3,3,3,3,1025,0,0,0,0,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,0,0,0,0,0,0,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u16 kbts__GetUnicodeSyllabicInfo(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeSyllabicInfo_Data[((Codepoint < 125280) ? ((kbts_un)kbts__UnicodeSyllabicInfo_PageIndices[Codepoint / 32] * 32) : 0) | (Codepoint & 31)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeFlags_PageIndices[8193] = {
|
|
0,1,2,3,2,4,5,6,2,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,
|
|
30,31,32,33,34,35,36,37,38,33,33,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,2,2,2,55,
|
|
56,57,58,59,60,61,62,33,63,33,33,33,33,33,64,65,33,33,33,66,67,68,69,70,71,72,73,74,75,76,33,77,
|
|
78,79,80,81,82,33,33,33,83,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,84,83,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,85,
|
|
33,33,33,33,33,33,33,33,33,86,33,33,87,88,89,90,91,92,93,94,95,96,97,98,83,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,99,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
83,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,85,33,33,100,101,102,103,33,33,104,105,106,107,108,109,
|
|
110,111,112,113,2,114,115,116,117,118,119,120,33,33,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,
|
|
139,140,141,142,143,144,145,146,147,148,2,149,150,151,152,2,153,154,155,156,157,158,2,159,160,161,162,163,2,164,165,166,
|
|
33,33,33,33,33,33,33,37,167,33,168,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,169,
|
|
33,33,33,33,33,33,33,33,170,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
|
|
33,33,33,33,33,33,33,111,33,33,33,33,171,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,172,2,2,2,2,2,2,2,2,2,2,2,2,2,33,33,33,33,173,174,175,176,2,2,177,2,2,178,179,180,
|
|
83,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,181,33,33,33,33,33,33,33,33,33,182,183,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,184,
|
|
33,33,185,33,33,186,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,187,188,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,33,189,33,33,33,190,191,168,
|
|
33,192,193,194,195,196,197,2,2,2,2,2,2,198,199,200,33,33,33,33,201,202,2,2,2,2,2,2,2,2,203,2,
|
|
204,205,206,2,2,207,2,2,2,208,2,209,2,2,2,210,33,211,212,2,2,2,2,2,213,214,215,2,216,217,2,2,
|
|
218,219,33,220,221,2,33,33,33,33,33,33,33,222,223,224,225,226,33,33,227,228,33,229,2,2,2,2,2,2,2,2,
|
|
83,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,0,16,16,16,12,16,2,16,16,16,16,16,16,16,0,0,0,16,16,16,12,16,16,16,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,
|
|
16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
208,208,208,208,208,80,208,208,208,208,208,208,208,80,80,208,80,208,80,208,208,80,80,80,80,80,80,208,80,80,80,80,80,80,80,208,208,208,208,208,208,80,80,80,80,208,208,80,208,208,80,80,80,80,80,80,208,80,80,80,80,80,80,80,
|
|
80,80,208,80,80,208,80,80,80,80,80,80,80,80,80,82,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,0,0,0,0,16,16,0,0,0,0,16,0,0,0,0,0,
|
|
0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,
|
|
0,0,16,80,80,80,80,80,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,208,80,80,208,208,208,80,80,208,80,0,208,
|
|
0,208,208,0,80,80,0,80,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,16,16,16,0,0,16,0,0,16,16,80,80,80,80,80,80,80,80,80,80,80,0,2,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,208,209,209,80,80,81,80,80,80,80,80,80,80,48,48,48,48,48,48,48,48,48,48,0,0,0,0,16,16,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,80,80,80,80,80,80,81,0,16,80,80,80,80,81,80,16,16,81,81,16,80,80,80,80,16,16,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,
|
|
80,80,80,80,80,80,80,80,80,80,80,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,80,80,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,16,16,16,0,0,0,16,0,0,80,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,16,80,80,80,80,80,80,80,80,80,16,80,80,80,16,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,80,80,80,80,80,80,80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,81,81,80,81,81,81,80,80,80,81,80,80,80,80,80,80,80,80,80,80,80,80,80,80,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,81,80,80,80,80,80,80,80,80,80,80,80,80,
|
|
80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,208,16,16,16,
|
|
16,80,80,80,80,80,80,80,80,16,16,16,16,80,16,16,16,80,80,80,80,80,80,80,16,16,16,16,16,16,16,16,16,16,80,80,0,0,48,48,48,48,48,48,48,48,48,48,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,80,16,16,0,16,16,16,16,16,16,16,16,0,0,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,16,0,0,0,16,16,16,16,0,0,208,16,144,16,
|
|
16,80,80,80,80,0,0,16,16,0,0,16,16,80,16,0,0,0,0,0,0,0,0,144,0,0,0,0,16,16,0,16,16,16,80,80,0,0,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,16,16,16,16,0,80,0,
|
|
0,80,80,16,0,16,16,16,16,16,16,0,0,0,0,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,0,16,16,0,16,16,0,0,208,0,16,16,
|
|
16,80,80,0,0,0,0,80,80,0,0,80,80,80,0,0,0,80,0,0,0,0,0,0,0,16,16,16,16,0,16,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,80,80,16,16,16,80,0,0,0,0,0,0,0,0,0,0,
|
|
0,80,80,16,0,16,16,16,16,16,16,16,16,16,0,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,0,16,16,16,16,16,0,0,80,16,16,16,
|
|
16,80,80,80,80,80,0,80,80,16,0,16,16,80,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,80,80,0,0,48,48,48,48,48,48,48,48,48,48,0,16,0,0,0,0,0,0,0,16,80,80,80,80,80,80,
|
|
0,80,16,16,0,16,16,16,16,16,16,16,16,0,0,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,0,16,16,16,16,16,0,0,208,16,144,80,
|
|
16,80,80,80,80,0,0,16,16,0,0,16,16,80,0,0,0,0,0,0,0,80,208,144,0,0,0,0,16,16,0,16,16,16,80,80,0,0,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,
|
|
0,0,80,16,0,16,16,16,16,16,16,0,0,0,16,16,16,0,16,16,16,16,0,0,0,16,16,0,16,0,16,16,0,0,0,16,16,0,0,0,16,16,16,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,144,16,
|
|
80,16,16,0,0,0,16,16,16,0,16,16,16,80,0,0,16,0,0,0,0,0,0,144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,
|
|
80,16,16,16,80,16,16,16,16,16,16,16,16,0,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,80,16,80,80,
|
|
80,16,16,16,16,0,80,80,80,0,80,80,80,80,0,0,0,0,0,0,0,80,208,0,16,16,16,0,0,16,0,0,16,16,80,80,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,
|
|
16,80,16,16,0,16,16,16,16,16,16,16,16,0,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,0,0,80,16,16,80,
|
|
16,16,144,16,16,0,80,16,16,0,16,16,80,80,0,0,0,0,0,0,0,144,144,0,0,0,0,0,0,16,16,0,16,16,80,80,0,0,48,48,48,48,48,48,48,48,48,48,0,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
80,80,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,16,144,16,
|
|
16,80,80,80,80,0,16,16,16,0,16,16,16,80,16,16,0,0,0,0,16,16,16,144,16,16,16,16,16,16,16,16,16,16,80,80,0,0,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
0,80,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,0,16,0,0,
|
|
16,16,16,16,16,16,16,0,0,0,208,0,0,0,0,144,16,16,80,80,80,0,80,0,16,16,16,16,16,16,16,144,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,16,80,80,80,80,80,80,80,0,0,0,0,16,
|
|
16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,16,16,0,16,0,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,0,16,16,16,16,16,16,16,16,16,16,80,16,16,80,80,80,80,80,80,80,80,80,16,0,0,
|
|
16,16,16,16,16,0,16,0,80,80,80,80,80,80,80,0,48,48,48,48,48,48,48,48,48,48,0,0,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,16,16,16,80,80,16,16,16,16,16,16,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,16,16,80,16,80,16,80,4,8,4,8,16,16,
|
|
16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,80,208,80,208,80,80,80,80,80,80,80,80,80,80,16,
|
|
208,80,80,80,80,0,80,80,16,16,16,16,16,80,80,80,80,80,80,80,80,80,80,80,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,208,80,208,80,80,80,80,80,0,16,16,
|
|
16,16,16,16,16,16,80,16,16,16,16,16,16,0,16,16,0,0,0,0,0,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,208,80,80,16,80,80,80,80,80,80,16,80,80,16,16,80,80,16,
|
|
48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,16,16,16,16,16,16,16,16,80,80,16,16,16,16,80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,80,16,16,80,80,16,16,16,16,16,16,80,16,16,48,48,48,48,48,48,48,48,48,48,16,16,16,80,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,18,18,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,0,16,16,16,16,0,0,16,16,16,16,16,16,16,0,16,0,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,0,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,0,0,16,16,16,16,16,16,16,0,
|
|
16,0,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,80,80,80,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,4,8,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,16,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,16,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,0,80,80,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,82,82,16,80,80,80,80,80,80,80,144,144,
|
|
144,16,16,16,144,144,80,16,16,80,80,80,80,80,80,80,80,80,80,80,0,0,0,16,0,0,0,16,16,80,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,82,82,82,2,82,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,80,80,80,16,16,16,16,80,80,16,16,16,0,0,0,0,16,16,80,16,16,16,16,16,16,80,80,80,0,0,0,0,
|
|
16,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,16,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,16,16,80,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,80,80,80,80,80,80,80,0,80,16,80,16,16,80,80,80,80,80,80,80,80,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,80,0,0,80,
|
|
48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,16,80,
|
|
80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
80,80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,144,80,80,80,80,80,16,80,16,16,16,
|
|
16,16,80,16,16,16,16,16,16,16,16,16,16,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,16,16,16,16,16,16,16,16,16,0,0,0,
|
|
80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,16,16,80,80,16,80,80,80,16,16,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,80,80,16,16,16,80,16,80,80,80,16,16,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,16,16,80,80,0,0,0,0,0,0,0,0,
|
|
48,48,48,48,48,48,48,48,48,48,0,0,0,16,16,16,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,80,80,0,80,80,80,80,80,80,80,80,80,80,80,80,80,16,80,80,80,80,80,80,80,16,16,16,16,80,16,16,16,16,16,16,80,16,16,16,80,80,16,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,16,
|
|
16,16,0,0,0,0,0,0,0,0,0,0,0,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,12,12,0,0,0,0,0,
|
|
0,0,0,0,16,4,8,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,16,16,0,0,16,16,16,16,16,16,16,16,16,4,8,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,4,8,0,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,80,80,80,80,80,80,80,80,80,80,80,80,16,16,16,16,80,16,16,16,80,80,80,80,80,80,80,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,0,16,16,16,16,0,16,16,0,0,0,0,0,0,0,0,0,0,16,0,16,16,16,0,0,0,0,0,16,16,16,16,16,16,0,16,0,16,0,16,0,0,0,0,16,0,0,0,0,0,0,16,16,16,16,0,16,16,0,0,0,0,
|
|
16,16,16,16,16,0,0,0,0,0,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,0,0,16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,28,28,28,28,28,28,16,16,16,16,16,16,16,28,16,16,16,16,16,16,16,16,16,28,28,28,28,16,28,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,28,28,16,16,
|
|
16,16,16,28,16,28,16,16,16,16,16,16,28,16,16,16,16,16,28,28,28,28,16,16,16,16,16,16,16,16,16,16,16,16,16,16,28,28,28,28,28,28,28,28,16,16,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
|
|
28,28,28,28,28,28,28,28,28,28,28,28,16,16,16,28,28,28,28,16,16,16,16,16,28,16,16,16,16,16,16,16,16,16,28,28,16,16,28,16,28,28,16,28,16,16,16,16,28,28,28,28,28,28,28,28,28,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,28,28,28,28,28,16,16,28,28,16,16,16,16,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,16,16,28,28,28,28,28,16,28,28,16,16,28,28,28,28,28,16,
|
|
16,16,16,16,16,16,16,16,4,8,4,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,4,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,4,8,4,8,4,8,4,8,4,8,4,8,4,8,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,28,28,4,8,16,28,28,16,28,16,28,16,16,16,16,16,16,16,28,28,16,16,16,16,16,28,28,28,16,16,16,28,28,28,28,4,8,4,8,4,8,4,8,4,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,16,16,28,16,16,16,16,28,16,16,28,28,28,16,16,28,28,28,28,28,28,28,28,16,16,16,16,16,16,16,16,28,16,16,16,16,16,16,16,
|
|
28,28,16,16,28,28,16,16,16,16,16,16,16,16,16,28,28,28,28,16,28,28,16,16,4,8,4,8,16,16,16,16,16,16,16,16,16,16,16,16,28,28,16,16,16,16,16,16,16,16,16,16,16,28,16,16,28,28,16,16,4,8,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,28,28,28,28,16,16,16,16,16,28,28,16,16,16,16,16,16,28,28,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,28,28,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,28,28,28,28,28,28,28,
|
|
28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,16,16,16,28,28,28,28,28,28,28,28,16,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
|
|
28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,16,16,16,16,16,16,16,28,16,16,16,16,28,28,28,16,16,16,16,16,16,28,28,28,16,16,16,16,16,16,16,16,28,28,28,28,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,28,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,0,0,0,0,80,80,80,0,0,0,0,0,0,0,0,0,0,0,16,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,
|
|
16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,
|
|
0,0,12,12,12,12,0,0,0,12,12,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,0,0,12,12,4,8,4,8,4,8,4,8,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,4,8,4,8,4,8,4,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
0,0,0,0,16,16,16,16,4,8,4,8,4,8,4,8,4,8,16,16,4,8,4,8,4,8,4,8,0,0,0,0,16,16,16,16,16,16,16,16,16,16,80,80,80,80,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,
|
|
0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,208,208,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,
|
|
0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,18,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,48,48,48,48,48,48,48,48,48,48,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,80,16,16,16,0,80,80,80,80,80,80,80,80,80,80,0,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,16,16,16,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,0,0,16,16,16,0,16,16,16,16,16,
|
|
16,16,80,16,16,16,80,16,16,16,16,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,16,16,16,16,16,80,0,0,0,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,80,80,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,16,16,16,16,16,16,0,0,0,16,0,16,16,80,
|
|
48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,80,80,16,16,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,
|
|
80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,16,80,80,80,80,16,16,80,80,16,16,
|
|
16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,16,16,16,16,16,80,16,16,16,16,16,16,16,16,16,16,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,16,16,80,80,16,16,80,80,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,80,16,16,16,16,16,16,16,16,80,16,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,80,80,80,16,16,80,80,16,16,16,16,16,80,80,
|
|
16,80,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,80,80,16,16,0,0,16,16,16,16,80,0,0,0,0,0,0,0,0,0,
|
|
0,16,16,16,16,16,16,0,0,16,16,16,16,16,16,0,0,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,0,0,0,0,0,0,0,0,0,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,16,80,16,16,0,16,80,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,0,16,0,
|
|
16,16,0,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,8,4,8,4,8,0,0,0,16,0,28,28,16,0,0,16,0,0,0,0,0,0,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,2,
|
|
0,0,0,0,16,0,0,0,4,8,0,16,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,28,16,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,8,16,0,
|
|
16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,16,8,16,4,8,0,4,8,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,18,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,
|
|
0,0,16,16,16,16,16,16,0,0,16,16,16,16,16,16,0,0,16,16,16,16,16,16,0,0,16,16,16,0,0,0,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,2,2,2,2,2,2,2,2,2,0,0,0,16,16,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,0,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,0,0,0,0,16,16,16,16,16,16,16,16,0,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,0,0,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,0,0,0,16,0,0,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,0,0,0,0,0,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,80,80,80,0,80,80,0,0,0,0,0,80,80,80,80,16,16,16,16,0,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,80,80,80,0,0,0,0,80,
|
|
16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,0,0,0,0,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,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,16,16,16,16,16,16,16,16,16,16,16,16,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,80,80,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,80,80,80,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,80,80,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,
|
|
16,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,
|
|
80,80,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,48,48,48,48,48,48,48,48,48,48,80,16,16,80,80,16,0,0,0,0,0,0,0,0,0,80,
|
|
80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,16,16,80,208,0,0,0,0,0,
|
|
0,0,80,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,
|
|
80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,208,80,80,80,80,16,80,80,80,80,80,80,80,80,0,48,48,48,48,48,48,48,48,48,48,
|
|
0,0,0,0,16,16,16,16,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,0,0,16,0,0,0,0,0,0,0,0,0,
|
|
80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,16,
|
|
16,16,16,16,16,0,0,0,0,80,80,80,80,0,16,80,48,48,48,48,48,48,48,48,48,48,16,0,16,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,16,16,80,16,80,80,0,0,0,0,0,0,80,16,
|
|
16,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,0,16,0,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,16,16,80,80,80,80,80,80,80,80,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,
|
|
80,80,16,16,0,16,16,16,16,16,16,16,16,0,0,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,0,16,16,16,16,16,0,80,80,16,144,16,
|
|
80,16,16,16,16,0,0,16,16,0,0,16,16,16,0,0,16,0,0,0,0,0,0,144,0,0,0,0,0,16,16,16,16,16,16,16,0,0,80,80,80,80,80,80,80,0,0,0,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,0,16,0,0,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,144,16,16,208,80,80,80,80,
|
|
80,0,144,0,0,16,0,16,16,144,16,0,16,16,80,16,80,16,80,16,0,0,0,0,0,0,0,0,0,0,0,0,0,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,
|
|
16,16,80,80,80,16,80,16,16,16,16,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,80,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,144,16,16,80,80,80,80,80,80,16,208,16,16,144,16,80,
|
|
80,16,80,80,16,16,0,16,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,144,16,16,80,80,80,80,0,0,16,16,16,16,80,80,16,80,
|
|
80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,16,16,80,16,80,
|
|
80,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,16,80,16,16,80,80,80,80,80,80,16,80,16,0,0,0,0,0,0,0,
|
|
48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,80,16,80,16,16,80,80,80,80,16,80,80,80,80,80,0,0,0,0,48,48,48,48,48,48,48,48,48,48,16,16,0,0,0,16,
|
|
16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,16,80,80,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
|
16,16,16,16,16,16,16,0,0,16,0,0,16,16,16,16,16,16,16,16,0,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,144,16,16,16,16,16,0,16,16,0,0,80,80,16,80,16,
|
|
16,16,16,80,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,0,0,80,80,16,16,16,16,80,16,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,80,80,80,80,80,80,80,80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,16,16,80,80,80,80,0,
|
|
0,0,0,0,0,0,0,80,0,0,0,0,0,0,0,0,16,80,80,80,80,80,80,16,16,80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,80,80,80,80,16,80,80,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,0,80,80,80,80,80,80,16,80,
|
|
16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,0,16,80,80,80,80,80,80,80,16,80,80,16,80,80,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,0,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,0,0,0,80,0,80,80,0,80,
|
|
80,80,80,80,80,80,16,80,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,16,16,16,16,16,16,0,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,80,80,0,16,16,80,16,80,16,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,16,16,0,0,0,0,0,0,0,0,0,
|
|
80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,0,0,0,16,16,
|
|
80,16,80,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
80,16,16,16,16,16,16,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,208,208,208,80,80,80,80,80,80,80,80,208,16,16,16,80,80,80,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,
|
|
48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,0,0,0,0,0,16,16,16,16,
|
|
16,16,16,16,0,16,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,144,16,16,16,16,16,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,80,80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,0,16,80,0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
|
16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,0,0,16,80,80,0,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,0,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,
|
|
80,80,80,80,80,80,80,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,144,16,80,80,80,16,16,16,16,144,144,144,144,144,2,2,2,2,2,2,2,2,80,80,80,80,80,
|
|
80,80,80,16,16,80,80,80,80,80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,80,80,80,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,16,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,
|
|
80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,16,16,16,16,80,80,80,80,80,
|
|
80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,16,16,16,16,16,16,16,16,80,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,80,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,80,80,80,80,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
80,80,80,80,80,80,80,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,0,0,80,80,80,80,80,80,80,0,80,80,0,80,80,80,80,80,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,80,80,80,80,80,80,80,16,16,16,16,16,16,16,0,0,
|
|
48,48,48,48,48,48,48,48,48,48,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,16,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,80,80,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,80,80,16,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,0,16,16,16,16,0,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,80,80,80,80,80,80,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,80,80,80,80,80,80,80,16,0,0,0,0,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,0,16,0,0,16,0,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,0,16,0,16,0,0,0,0,
|
|
0,0,16,0,0,0,0,16,0,16,0,16,0,16,16,16,0,16,16,0,16,0,0,16,0,16,0,16,0,16,0,16,0,16,16,0,16,0,0,16,16,16,16,0,16,16,16,16,16,16,16,0,16,16,16,16,0,16,16,16,16,0,16,0,
|
|
16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,16,16,16,0,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,
|
|
16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
|
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,
|
|
16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,
|
|
82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,
|
|
82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,
|
|
82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetUnicodeFlags(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeFlags_Data[((Codepoint < 1048704) ? ((kbts_un)kbts__UnicodeFlags_PageIndices[Codepoint / 128] * 128) : 256) | (Codepoint & 127)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeBidirectionalClass_PageIndices[8193] = {
|
|
0,1,2,2,2,3,4,5,2,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,
|
|
29,30,2,2,31,32,33,34,35,2,2,2,2,36,37,38,39,40,41,42,43,44,45,46,47,48,2,49,2,2,50,51,
|
|
52,53,54,55,56,57,58,59,57,60,57,57,57,61,57,57,2,2,57,57,57,57,57,57,2,62,63,64,57,57,57,57,
|
|
65,66,67,68,69,70,71,72,73,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,74,73,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,75,
|
|
2,2,2,2,2,2,2,2,2,76,2,2,77,78,79,80,81,82,83,84,85,86,87,88,73,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,89,73,57,57,57,57,57,75,90,73,57,57,57,57,57,57,75,
|
|
73,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,75,2,2,91,92,93,94,95,95,96,97,98,99,100,101,
|
|
102,103,104,105,57,106,107,108,2,109,110,111,2,2,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,
|
|
130,131,132,133,134,135,136,137,138,139,57,140,141,142,143,57,144,145,146,147,148,149,150,151,152,153,154,155,57,156,157,158,
|
|
2,2,2,2,2,2,2,159,160,2,161,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,162,
|
|
2,2,2,2,2,2,2,2,163,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,103,2,2,2,2,164,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,165,57,57,57,57,57,57,57,57,57,57,57,57,57,2,2,2,2,166,167,168,169,57,57,170,57,171,172,173,174,
|
|
73,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,175,2,2,2,2,2,2,2,2,2,176,177,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,178,
|
|
2,2,179,2,2,180,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,181,182,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,183,57,57,57,57,184,161,
|
|
2,185,186,187,188,189,190,57,191,192,193,2,2,194,195,196,2,2,2,2,197,198,57,57,57,57,57,57,57,57,199,57,
|
|
200,201,202,57,57,203,57,57,57,204,57,205,57,57,57,206,207,208,209,57,57,57,57,57,210,211,212,57,213,214,57,57,
|
|
57,57,215,216,217,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,218,57,57,57,57,57,57,57,57,
|
|
73,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,219,73,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,220,57,221,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,222,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,223,57,57,57,57,224,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,2,2,2,2,225,57,57,57,57,57,57,57,57,57,57,57,
|
|
73,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,226,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,227,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
228,57,229,230,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
73,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,231,
|
|
73,
|
|
};
|
|
|
|
static kbts_u8 kbts__UnicodeBidirectionalClass_Data[29696] = {
|
|
1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,9,9,9,0,0,0,0,0,8,10,8,10,10,7,7,7,7,7,7,7,7,7,7,10,0,0,0,0,0,
|
|
0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,1,
|
|
1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,0,9,9,9,9,0,0,0,0,2,0,0,1,0,0,9,9,7,7,0,2,0,0,0,7,2,0,0,0,0,0,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,
|
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
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4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
|
|
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
|
|
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetUnicodeBidirectionalClass(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeBidirectionalClass_Data[((Codepoint < 1048704) ? ((kbts_un)kbts__UnicodeBidirectionalClass_PageIndices[Codepoint / 128] * 128) : 7296) | (Codepoint & 127)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeJoiningType_PageIndices[7172] = {
|
|
0,1,0,0,0,0,2,0,0,3,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
|
|
25,26,0,0,0,0,27,0,0,0,0,0,0,0,28,29,30,31,32,0,33,34,35,36,37,38,0,39,0,0,0,0,
|
|
40,41,0,0,0,0,0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5,
|
|
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetUnicodeJoiningType(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeJoiningType_Data[((Codepoint < 918016) ? ((kbts_un)kbts__UnicodeJoiningType_PageIndices[Codepoint / 128] * 128) : 0) | (Codepoint & 127)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeCombiningClass_PageIndices[3915] = {
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,0,0,0,0,
|
|
0,0,0,0,5,0,0,0,0,0,0,0,6,7,8,0,9,0,10,11,0,0,12,13,14,15,16,0,0,0,0,17,
|
|
18,19,20,0,21,0,22,23,0,24,25,0,0,24,26,27,0,24,26,0,0,24,26,0,0,24,26,0,0,0,26,0,
|
|
0,24,28,0,0,24,26,0,0,29,26,0,0,0,30,0,0,31,32,0,0,33,34,0,35,36,0,37,38,0,39,0,
|
|
0,40,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,0,0,0,0,45,0,
|
|
0,0,0,0,0,46,0,0,0,47,0,0,0,0,0,0,48,0,0,49,0,50,51,0,0,52,53,54,0,55,0,56,
|
|
0,57,0,0,0,0,58,59,0,0,0,0,0,0,60,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,62,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,123,124,125,0,0,0,0,126,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
127,128,0,0,129,0,0,0,0,120,0,0,0,0,0,0,0,0,0,0,0,130,0,131,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,132,0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,134,0,0,0,135,
|
|
};
|
|
|
|
static kbts_u8 kbts__UnicodeCombiningClass_Data[4352] = {
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,232,220,220,220,220,232,216,220,220,220,220,
|
|
220,202,202,220,220,220,220,202,202,220,220,220,220,220,220,220,220,220,220,220,1,1,1,1,1,220,220,220,220,230,230,230,230,230,230,230,230,240,230,220,220,220,230,230,230,220,220,0,230,230,230,220,220,220,220,230,232,220,220,230,233,234,234,233,
|
|
234,234,233,230,230,230,230,230,230,230,230,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,230,230,230,230,220,230,230,230,222,220,230,230,230,230,230,230,220,220,220,220,220,220,230,230,220,230,230,222,228,230,22,15,16,17,23,18,19,20,21,14,14,24,12,25,0,13,
|
|
0,10,11,0,230,220,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,230,230,230,31,32,33,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,28,29,30,31,32,33,27,34,230,230,220,220,230,230,230,230,230,220,230,230,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,230,230,0,0,230,230,230,230,220,230,0,0,230,230,0,220,230,230,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,220,230,230,220,230,230,220,220,220,230,220,220,230,220,230,
|
|
230,230,220,230,220,230,220,230,220,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,230,230,220,230,0,0,0,0,0,0,0,0,0,220,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,0,230,230,230,230,230,230,230,230,230,0,230,230,230,0,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,220,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,220,220,220,230,230,230,230,
|
|
0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,220,220,220,220,220,230,230,230,230,230,230,230,230,230,230,230,230,230,230,0,220,230,230,220,230,230,220,230,230,230,220,220,220,28,29,30,230,230,230,220,230,230,220,220,230,230,230,230,230,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,230,220,230,230,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,4,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,9,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,107,107,107,107,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,118,118,9,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,122,122,122,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,220,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,0,220,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,129,132,0,131,0,0,0,0,0,132,132,132,132,0,0,
|
|
132,0,230,230,9,0,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,230,0,0,
|
|
0,0,0,0,0,0,0,0,0,228,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,222,230,220,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,220,0,0,0,0,0,0,0,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,230,230,230,0,0,220,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,220,220,220,220,220,220,230,230,220,0,220,220,230,230,220,220,230,230,230,230,230,220,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,230,220,230,230,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,0,1,220,220,220,220,220,230,230,220,220,220,220,230,0,1,1,1,1,1,1,1,0,0,0,0,220,0,0,0,0,0,0,230,0,0,0,230,230,0,0,0,0,0,0,
|
|
230,230,220,230,230,230,230,230,230,230,220,230,230,234,214,220,202,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,232,228,228,220,218,230,233,220,230,220,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,1,1,230,230,230,230,1,1,1,230,230,0,0,0,0,230,0,0,0,1,1,230,220,230,1,1,220,220,220,220,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,
|
|
230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,218,228,232,222,224,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,0,0,0,0,230,230,230,230,230,230,230,230,230,230,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,220,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,0,230,230,220,0,0,230,230,0,0,0,0,0,230,230,
|
|
0,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,230,230,230,230,230,230,230,220,220,220,220,220,220,220,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,0,0,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,0,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,1,220,0,0,0,0,9,0,0,0,0,0,230,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,220,220,
|
|
0,0,0,0,0,0,220,220,230,230,230,220,230,220,220,220,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,220,230,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,7,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,216,216,1,1,1,0,0,0,226,216,216,216,216,216,0,0,0,0,0,0,0,0,220,220,220,220,220,
|
|
220,220,220,0,0,230,230,230,230,230,220,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,230,230,0,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,0,0,230,230,230,230,230,
|
|
230,230,0,230,230,0,230,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,232,232,220,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,220,220,220,220,220,220,220,0,0,0,0,0,0,0,0,0,0,0,0,0,230,230,230,230,230,230,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetUnicodeCombiningClass(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeCombiningClass_Data[((Codepoint < 125280) ? ((kbts_un)kbts__UnicodeCombiningClass_PageIndices[Codepoint / 32] * 32) : 0) | (Codepoint & 31)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeParentInfo_PageIndices[7452] = {
|
|
0,0,0,1,2,3,4,5,0,0,6,0,7,8,9,10,11,12,0,0,13,14,15,16,0,0,17,18,0,0,19,0,
|
|
0,0,20,0,0,0,0,0,0,21,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,23,24,25,26,27,0,0,
|
|
28,29,30,31,32,28,0,33,0,0,0,0,0,34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,36,37,
|
|
0,0,38,0,39,0,0,0,0,0,0,0,40,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,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0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,113,0,0,0,0,0,114,
|
|
};
|
|
|
|
static kbts_u32 kbts__UnicodeParentInfo_Data[1840] = {
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66205,66203,66204,0,
|
|
0,1048680,197171,328076,393573,1114167,66202,459024,459045,983176,65816,328101,393561,197177,590008,1048696,131675,0,524538,459059,459066,1245203,131681,393585,131683,590017,393591,0,0,0,0,0,
|
|
0,1048664,197168,328071,393567,1114150,66201,459010,524530,917655,131663,328081,393555,197174,589999,1048648,131495,0,524506,459031,524522,1245184,131677,459052,131679,655525,393579,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,197180,0,0,0,0,0,0,0,0,0,262647,0,66188,66190,131667,65956,0,0,262651,0,0,0,0,66200,
|
|
0,0,0,0,262655,197165,66191,0,66189,0,0,0,262623,0,0,0,0,0,262635,0,66016,66187,131665,66199,0,0,262639,0,0,0,0,65965,
|
|
0,0,0,0,262643,197162,66190,0,65843,0,0,0,262619,0,0,0,0,0,262631,262631,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,131671,131671,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,131673,131673,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,66196,66196,0,0,0,0,66138,66138,0,0,0,0,0,0,66197,66197,66197,66197,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66198,328106,328106,0,0,0,0,0,0,0,0,0,0,0,0,0,328096,
|
|
328096,0,0,0,0,0,0,66174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65923,65923,0,0,0,0,
|
|
0,0,0,0,0,0,66160,66160,66192,66192,0,0,0,0,65923,65923,0,0,66159,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,66177,0,0,0,0,0,0,0,0,459017,0,0,0,262603,0,328086,0,459038,0,0,0,0,0,262599,
|
|
0,66195,0,0,0,393543,0,0,0,328091,0,0,66070,0,66193,0,0,524490,0,0,0,262611,0,393537,0,524498,0,0,0,0,0,262627,
|
|
0,131669,0,0,0,524514,0,0,0,393549,197141,197144,0,0,66194,0,0,0,131458,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,65922,0,0,0,0,0,0,0,0,0,131227,0,0,66164,0,197156,131661,65935,262607,0,65942,0,0,0,66186,0,
|
|
0,0,0,262583,0,0,0,65595,0,0,0,65595,0,65646,0,0,131659,0,0,66169,0,197159,131657,65930,262579,0,66170,0,0,0,66185,0,
|
|
0,0,0,262615,0,0,0,65578,0,0,0,65578,0,65630,0,0,0,0,0,0,65923,65923,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,65923,65923,0,0,0,0,0,0,197186,131693,66113,66113,66113,131691,66113,0,66113,131685,66113,131689,66113,0,66113,0,
|
|
66113,66113,0,66113,131687,0,66113,66113,66113,197183,66113,0,0,0,0,0,0,0,66206,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,197126,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66163,0,66163,0,0,0,0,0,
|
|
0,65922,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65922,0,0,65975,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,66180,66180,66180,0,0,0,0,66178,0,0,0,0,66176,66176,0,0,0,0,0,65922,0,0,66173,0,0,0,66172,
|
|
0,0,0,65922,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66172,
|
|
0,0,0,0,0,0,0,131461,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66180,66180,0,0,0,0,66178,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,66173,0,0,0,0,0,0,65922,0,0,0,0,0,65918,0,0,0,0,0,0,0,
|
|
0,66176,66176,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,197135,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,131504,65921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65923,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65922,0,0,0,0,0,0,197129,0,0,0,65922,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,197132,0,0,65922,0,0,0,66171,0,65922,0,0,0,0,0,0,0,0,0,65922,0,0,0,
|
|
0,65922,0,0,0,0,65922,0,0,0,0,65922,0,0,0,0,0,197150,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,66161,66162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65922,0,0,0,0,0,0,0,0,0,0,
|
|
0,328061,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65922,0,65922,0,65922,0,65922,0,65922,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,65922,0,65922,0,65923,65923,0,0,65922,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,65923,65923,0,0,0,0,0,0,0,0,0,0,65762,65762,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
131655,131655,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66081,66081,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,66119,66119,0,0,262595,262595,65625,65625,65625,65625,65625,65625,262595,262595,65625,65625,65625,65625,65625,65625,
|
|
131503,131503,0,0,0,0,0,0,131503,131503,0,0,0,0,0,0,262591,262591,65986,65986,65986,65986,65986,65986,262591,262591,65986,65986,65986,65986,65986,65986,
|
|
197039,197039,0,0,0,0,0,0,197039,197039,0,0,0,0,0,0,197039,197039,0,0,0,0,0,0,0,197039,0,0,0,0,0,0,
|
|
262575,262575,65970,65970,65970,65970,65970,65970,262575,262575,65970,65970,65970,65970,65970,65970,66179,0,0,0,66181,0,0,0,0,0,0,0,66184,0,0,0,
|
|
0,0,0,0,0,0,65922,0,0,0,0,0,0,0,0,197153,0,0,0,0,0,0,65922,0,0,0,0,0,0,0,197123,0,
|
|
66167,0,66166,0,66168,0,0,0,0,0,0,0,0,0,0,0,65917,0,65917,0,66165,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,65922,0,0,0,0,65922,0,0,65922,0,0,0,0,0,0,0,65922,0,65922,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,65869,0,0,0,0,0,0,65922,0,65923,0,0,65922,0,0,0,0,66169,0,0,
|
|
0,65922,0,0,66119,66119,0,0,0,0,0,0,0,0,0,0,0,0,65923,65923,0,0,65923,65923,0,0,65762,65762,66183,66183,0,0,
|
|
0,0,65923,65923,0,0,65923,65923,0,0,0,0,0,0,0,0,0,66182,66182,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,66167,0,0,0,0,0,65869,65869,0,65921,0,0,0,0,0,0,66175,66175,66175,66175,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,65919,0,0,0,0,0,0,0,0,66181,0,0,0,0,65922,0,65922,0,65922,
|
|
0,65922,0,65922,0,65922,0,65922,0,65922,0,65922,0,65922,0,65922,0,65922,0,0,65922,0,65922,0,65922,0,0,0,0,0,0,131458,
|
|
0,0,131458,0,0,131458,0,0,131458,0,0,131458,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65922,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65763,65763,65763,65763,0,0,0,0,0,0,0,0,0,0,65922,0,0,
|
|
0,0,0,0,0,0,0,0,0,131653,0,0,0,0,0,0,0,0,65857,0,0,0,0,0,0,0,66167,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,65922,0,65922,0,0,0,0,0,0,0,0,0,65762,0,0,0,0,0,0,0,0,0,0,
|
|
0,65917,65917,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65922,0,65922,0,0,0,0,0,0,65920,0,0,0,0,
|
|
65922,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,197147,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,197138,0,0,0,0,0,0,0,0,0,0,0,65920,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,262587,0,0,131517,65869,0,0,0,0,0,0,65738,0,0,0,0,0,0,
|
|
0,0,0,65762,0,0,0,65922,0,65922,0,0,0,0,0,0,0,0,0,0,0,0,0,65982,65982,0,0,0,0,0,0,328066,
|
|
0,0,0,0,0,0,0,0,0,65923,65923,131503,131503,0,0,0,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u32 kbts__GetUnicodeParentInfo(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeParentInfo_Data[((Codepoint < 119232) ? ((kbts_un)kbts__UnicodeParentInfo_PageIndices[Codepoint / 16] * 16) : 0) | (Codepoint & 15)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeUseClass_PageIndices[3915] = {
|
|
0,1,2,2,0,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,7,8,8,9,10,11,12,13,8,0,0,14,15,
|
|
16,0,17,18,19,20,21,0,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,
|
|
46,47,48,49,50,51,52,53,54,55,56,49,57,58,59,60,61,62,63,0,64,65,66,0,67,68,69,70,71,72,73,0,
|
|
8,74,75,76,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,79,80,81,8,82,83,84,
|
|
85,8,8,86,87,88,0,0,89,90,91,92,8,93,94,0,95,8,96,97,98,0,0,0,99,100,101,0,102,103,8,104,
|
|
8,105,106,0,0,0,107,108,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
110,111,0,112,113,0,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,115,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,118,8,119,0,0,0,0,0,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,141,142,143,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,145,21,0,0,0,69,146,0,0,0,0,147,148,0,0,
|
|
0,0,0,0,0,0,0,0,8,149,14,150,151,0,0,0,0,0,0,0,8,152,153,0,0,118,154,118,155,156,157,0,
|
|
158,159,160,161,162,163,164,0,165,166,167,168,162,169,170,171,172,173,174,0,175,176,177,178,179,180,181,182,183,184,185,186,
|
|
8,187,188,189,61,190,191,0,0,0,0,0,8,192,193,0,8,194,195,0,8,196,197,198,199,200,201,0,0,0,0,0,
|
|
8,202,0,0,0,0,0,0,203,204,205,0,0,206,207,208,209,210,211,8,212,0,0,0,0,0,0,0,0,0,0,0,
|
|
213,214,215,216,217,218,0,0,219,220,221,222,223,84,0,0,0,0,0,0,0,0,0,224,225,226,227,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,
|
|
228,229,230,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,
|
|
228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,
|
|
228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,
|
|
228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,231,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,232,233,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,36,34,36,36,36,36,0,0,33,33,0,0,33,33,3,0,0,0,0,0,0,0,0,0,36,0,0,0,0,0,0,1,1,
|
|
1,1,36,36,0,0,29,29,29,29,29,29,29,0,0,0,29,29,29,29,29,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,36,34,34,35,35,35,35,35,35,0,33,0,0,33,0,33,33,36,31,0,31,31,29,9,6,38,9,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,29,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,36,33,36,35,35,35,35,35,35,34,34,
|
|
36,36,3,29,29,31,9,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,6,1,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,36,33,36,35,35,35,35,35,35,33,34,33,33,36,33,29,29,31,3,9,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,36,33,36,35,35,35,35,0,0,33,33,33,33,29,29,31,3,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,35,35,0,0,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,36,36,36,35,35,35,35,35,35,34,34,36,36,29,31,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
|
|
1,1,1,1,1,1,1,1,1,1,1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0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,8,0,0,0,0,0,
|
|
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,22,22,22,22,22,22,22,19,21,22,22,22,18,18,18,18,
|
|
23,18,18,18,18,18,18,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,34,34,34,34,34,34,34,34,34,34,34,34,10,10,13,29,12,35,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,29,29,29,29,29,29,29,0,0,0,0,0,0,0,0,0,31,31,31,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,36,36,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,9,0,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
|
|
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,0,0,0,0,0,0,0,30,30,30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,4,4,0,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,29,29,29,29,29,29,29,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,29,29,29,29,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,34,34,34,34,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,35,35,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,
|
|
1,1,1,1,8,8,8,8,8,8,8,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetUnicodeUseClass(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeUseClass_Data[((Codepoint < 125280) ? ((kbts_un)kbts__UnicodeUseClass_PageIndices[Codepoint / 32] * 32) : 0) | (Codepoint & 31)] : 0;
|
|
}
|
|
|
|
static kbts_u16 kbts__UnicodeScriptExtension_PageIndices[7172] = {
|
|
0,1,2,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,
|
|
30,31,32,32,33,34,35,36,37,37,37,37,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,2,2,53,54,
|
|
55,56,57,58,59,59,59,59,60,59,59,59,59,59,59,59,61,61,59,59,59,59,62,63,64,65,66,67,68,69,70,71,
|
|
72,73,74,75,76,77,78,79,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,80,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
81,81,81,81,81,81,81,81,81,82,83,83,84,85,86,87,88,89,90,91,92,93,94,95,32,32,32,32,32,32,32,32,
|
|
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
|
|
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
|
|
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,96,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,70,70,97,98,99,100,101,101,102,103,104,105,106,107,
|
|
108,109,110,111,61,112,113,114,115,116,117,118,119,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,
|
|
138,139,140,141,142,143,144,145,146,147,61,148,149,150,151,61,152,153,154,155,156,157,158,159,160,161,162,163,61,164,165,166,
|
|
167,167,167,167,167,167,167,168,169,167,170,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,171,
|
|
172,172,172,172,172,172,172,172,173,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
|
|
172,172,172,172,172,172,172,174,175,175,175,175,176,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,177,61,61,61,61,61,61,61,61,61,61,61,61,61,178,178,178,178,179,180,181,182,61,61,183,61,184,185,186,187,
|
|
188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
|
|
188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,189,188,188,188,188,188,188,190,190,190,191,192,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,193,
|
|
194,195,196,197,197,198,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,199,200,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,59,201,59,59,59,202,203,204,
|
|
59,205,206,207,208,209,210,61,211,212,213,59,59,214,59,215,216,216,216,216,216,217,61,61,61,61,61,61,61,61,218,61,
|
|
219,220,221,61,61,222,61,61,61,223,61,224,61,61,61,225,226,227,228,61,61,61,61,61,229,230,231,61,232,233,61,61,
|
|
234,235,59,236,237,61,59,59,59,59,59,59,59,238,239,240,241,242,59,59,243,244,59,245,61,61,61,61,61,61,61,61,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,246,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,247,70,248,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,249,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,250,70,70,70,70,251,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,70,70,70,70,252,61,61,61,61,61,61,61,61,61,61,61,
|
|
70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,253,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
|
|
70,70,70,70,70,70,70,254,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,
|
|
255,61,256,257,
|
|
};
|
|
|
|
static kbts_u16 kbts__UnicodeScriptExtension_Data[33024] = {
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,929,929,929,929,929,
|
|
929,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,2305,929,929,929,929,929,929,929,929,929,929,929,929,16,929,929,2305,929,929,929,929,929,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,929,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,929,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,929,929,929,519,929,929,929,
|
|
929,929,929,929,929,929,929,738,929,738,738,738,929,610,929,929,929,929,929,929,929,929,929,802,929,738,929,929,929,929,929,929,
|
|
2305,2305,2305,2305,2305,929,929,929,929,929,417,417,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
872,1128,1380,1509,1675,2022,932,2217,2506,1442,2819,2916,3043,1538,3138,961,1538,3203,961,3300,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
2850,961,961,3429,3588,2850,961,961,961,961,961,961,961,1539,2850,961,3715,3814,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,1441,961,961,1441,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,1218,961,961,961,961,961,4003,961,
|
|
961,961,961,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,1441,1441,1441,1441,4098,4098,1441,1441,1,1,1441,1441,1441,1441,929,1441,
|
|
1,1,1,1,1441,929,1441,929,1441,1441,1441,1,1441,1,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,1,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,801,801,801,801,801,801,801,801,801,801,801,801,801,801,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,4162,4226,1410,1410,4226,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,1,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
|
|
161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,1,1,161,161,161,161,161,161,161,
|
|
161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
|
|
161,161,161,161,161,161,161,161,161,4291,161,1,1,161,161,161,1,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,
|
|
1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,
|
|
1729,1729,1729,1729,1729,1729,1729,1729,1,1,1,1,1,1,1,1,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,
|
|
1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1,1,1,1,1729,1729,1729,1729,1729,1729,1,1,1,1,1,1,1,1,1,1,1,
|
|
129,129,129,129,129,929,129,129,129,129,129,129,4391,129,129,129,129,129,129,129,129,129,129,129,129,129,129,4391,4611,129,129,4712,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
4969,129,129,129,129,129,129,129,129,129,129,4610,4610,4610,4610,4610,4610,4610,4610,4610,4610,4610,129,129,129,129,129,129,129,129,129,129,
|
|
5251,5251,5251,5251,5251,5251,5251,5251,5251,5251,129,129,129,129,129,129,4610,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,4994,129,129,129,129,129,129,129,129,929,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,1,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,
|
|
4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,
|
|
4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,1,1,4577,4577,4577,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,
|
|
4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,4929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,
|
|
3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,3297,1,1,3297,3297,3297,
|
|
4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,
|
|
4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,1,1,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,1,
|
|
2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,2657,1,1,2657,1,
|
|
4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,4577,1,1,1,1,1,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,1,129,129,1,1,1,1,1,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,929,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,5357,5772,961,961,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
1025,1025,1025,1025,6165,6839,7556,7556,7556,7556,7556,7556,7556,7556,7556,7556,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
353,353,353,353,1,353,353,353,353,353,353,353,353,1,1,353,353,1,1,353,353,353,353,353,353,353,353,353,353,353,353,353,
|
|
353,353,353,353,353,353,353,353,353,1,353,353,353,353,353,353,353,1,353,1,1,1,353,353,353,353,1,1,353,353,353,353,
|
|
353,353,353,353,353,1,1,353,353,1,1,353,353,353,353,1,1,1,1,1,1,1,1,353,1,1,1,1,353,353,1,353,
|
|
353,353,353,353,1,1,7683,7683,7683,7683,7683,7683,7683,7683,7683,7683,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,1,
|
|
1,1537,1537,1537,1,1537,1537,1537,1537,1537,1537,1,1,1,1,1537,1537,1,1,1537,1537,1537,1537,1537,1537,1537,1537,1537,1537,1537,1537,1537,
|
|
1537,1537,1537,1537,1537,1537,1537,1537,1537,1,1537,1537,1537,1537,1537,1537,1537,1,1537,1537,1,1537,1537,1,1537,1537,1,1,1537,1,1537,1537,
|
|
1537,1537,1537,1,1,1,1,1537,1537,1,1,1537,1537,1537,1,1,1,1537,1,1,1,1,1,1,1,1537,1537,1537,1537,1,1537,1,
|
|
1,1,1,1,1,1,7778,7778,7778,7778,7778,7778,7778,7778,7778,7778,1537,1537,1537,1537,1537,1537,1537,1,1,1,1,1,1,1,1,1,
|
|
1,1473,1473,1473,1,1473,1473,1473,1473,1473,1473,1473,1473,1473,1,1473,1473,1473,1,1473,1473,1473,1473,1473,1473,1473,1473,1473,1473,1473,1473,1473,
|
|
1473,1473,1473,1473,1473,1473,1473,1473,1473,1,1473,1473,1473,1473,1473,1473,1473,1,1473,1473,1,1473,1473,1473,1473,1473,1,1,1473,1473,1473,1473,
|
|
1473,1473,1473,1473,1473,1473,1,1473,1473,1473,1,1473,1473,1473,1,1,1473,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1473,1473,1473,1473,1,1,7842,7842,7842,7842,7842,7842,7842,7842,7842,7842,1473,1473,1,1,1,1,1,1,1,1473,1473,1473,1473,1473,1473,1473,
|
|
1,3777,3777,3777,1,3777,3777,3777,3777,3777,3777,3777,3777,1,1,3777,3777,1,1,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,
|
|
3777,3777,3777,3777,3777,3777,3777,3777,3777,1,3777,3777,3777,3777,3777,3777,3777,1,3777,3777,1,3777,3777,3777,3777,3777,1,1,3777,3777,3777,3777,
|
|
3777,3777,3777,3777,3777,1,1,3777,3777,1,1,3777,3777,3777,1,1,1,1,1,1,1,3777,3777,3777,1,1,1,1,3777,3777,1,3777,
|
|
3777,3777,3777,3777,1,1,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,3777,1,1,1,1,1,1,1,1,
|
|
1,1,4801,4801,1,4801,4801,4801,4801,4801,4801,1,1,1,4801,4801,4801,1,4801,4801,4801,4801,1,1,1,4801,4801,1,4801,1,4801,4801,
|
|
1,1,1,4801,4801,1,1,1,4801,4801,4801,1,1,1,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,1,1,1,1,4801,4801,
|
|
4801,4801,4801,1,1,1,4801,4801,4801,1,4801,4801,4801,4801,1,1,4801,1,1,1,1,1,1,4801,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,7906,7906,7906,7906,7906,7906,7906,7906,7906,7906,7906,7906,7906,7906,4801,4801,4801,4801,4801,4801,4801,1,1,1,1,1,
|
|
4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,1,4897,4897,4897,1,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,
|
|
4897,4897,4897,4897,4897,4897,4897,4897,4897,1,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,1,1,4897,4897,4897,4897,
|
|
4897,4897,4897,4897,4897,1,4897,4897,4897,1,4897,4897,4897,4897,1,1,1,1,1,1,1,4897,4897,1,4897,4897,4897,1,1,4897,1,1,
|
|
4897,4897,4897,4897,1,1,4897,4897,4897,4897,4897,4897,4897,4897,4897,4897,1,1,1,1,1,1,1,4897,4897,4897,4897,4897,4897,4897,4897,4897,
|
|
1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,1,1953,1953,1953,1,1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,
|
|
1953,1953,1953,1953,1953,1953,1953,1953,1953,1,1953,1953,1953,1953,1953,1953,1953,1953,1953,1953,1,1953,1953,1953,1953,1953,1,1,1953,1953,1953,1953,
|
|
1953,1953,1953,1953,1953,1,1953,1953,1953,1,1953,1953,1953,1953,1,1,1,1,1,1,1,1953,1953,1,1,1,1,1,1,1953,1953,1,
|
|
1953,1953,1953,1953,1,1,7971,7971,7971,7971,7971,7971,7971,7971,7971,7971,1,1953,1953,1953,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,1,2625,2625,2625,1,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,
|
|
2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,
|
|
2625,2625,2625,2625,2625,1,2625,2625,2625,1,2625,2625,2625,2625,2625,2625,1,1,1,1,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,
|
|
2625,2625,2625,2625,1,1,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,2625,
|
|
1,4353,4353,4353,1,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,1,1,1,4353,4353,4353,4353,4353,4353,
|
|
4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,1,4353,4353,4353,4353,4353,4353,4353,4353,4353,1,4353,1,1,
|
|
4353,4353,4353,4353,4353,4353,4353,1,1,1,4353,1,1,1,1,4353,4353,4353,4353,4353,4353,1,4353,1,4353,4353,4353,4353,4353,4353,4353,4353,
|
|
1,1,1,1,1,1,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,1,1,4353,4353,4353,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,
|
|
4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,1,1,1,1,929,
|
|
4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,4961,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,2273,2273,1,2273,1,2273,2273,2273,2273,2273,1,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,
|
|
2273,2273,2273,2273,1,2273,1,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,1,1,
|
|
2273,2273,2273,2273,2273,1,2273,1,2273,2273,2273,2273,2273,2273,2273,1,2273,2273,2273,2273,2273,2273,2273,2273,2273,2273,1,1,2273,2273,2273,2273,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,
|
|
4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,
|
|
4993,4993,4993,4993,4993,4993,4993,4993,1,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,
|
|
4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,1,1,1,1,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,
|
|
4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,1,4993,4993,4993,4993,4993,4993,4993,
|
|
4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,1,4993,4993,
|
|
4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,4993,1,4993,4993,4993,4993,4993,4993,4993,929,929,929,929,4993,4993,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,
|
|
3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,
|
|
8067,8067,8067,8067,8067,8067,8067,8067,8067,8067,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,
|
|
3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,
|
|
3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,
|
|
1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,
|
|
1313,1313,1313,1313,1313,1313,1,1313,1,1,1,1,1,1313,1,1,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,
|
|
1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,8163,1313,1313,1313,1313,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1,1,1249,1249,1249,1249,1249,1249,1249,1,1249,1,1249,1249,1249,1249,1,1,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1,1,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1,1,1249,1249,1249,1249,1249,1249,1249,1,
|
|
1249,1,1249,1249,1249,1249,1,1,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1249,1249,1249,1249,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1,1,1249,1249,1249,1249,1249,1249,1249,1249,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1,1,1249,1249,1249,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1,1,1,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1,1,1,1,1,1,
|
|
705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
|
|
705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
|
|
705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,1,1,705,705,705,705,705,705,1,1,
|
|
545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
|
|
545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
|
|
545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
|
|
545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
|
|
3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,3393,1,1,1,
|
|
4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,
|
|
4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,
|
|
4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,4097,1,1,1,1,1,1,1,
|
|
4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,4609,1,1,1,1,1,1,1,1,1,4609,
|
|
1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,1665,8260,8260,1,1,1,1,1,1,1,1,1,
|
|
513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
4641,4641,4641,4641,4641,4641,4641,4641,4641,4641,4641,4641,4641,1,4641,4641,4641,1,4641,4641,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,
|
|
2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,
|
|
2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,1,1,
|
|
2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,1,1,1,1,1,1,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,1,1,1,1,1,1,
|
|
3009,3009,8386,8386,3009,8386,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,1,1,1,1,1,1,
|
|
3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,
|
|
3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,
|
|
3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,1,1,1,1,1,1,1,
|
|
3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,
|
|
3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,1,1,1,1,1,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
|
|
545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
|
|
545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,1,1,1,1,1,1,1,1,1,1,
|
|
2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,1,
|
|
2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,1,1,1,1,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,1,1,1,1,
|
|
2369,1,1,1,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,2369,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,
|
|
4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,4673,1,1,4673,4673,4673,4673,4673,1,1,1,1,1,1,1,1,1,1,1,
|
|
3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,
|
|
3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,1,1,1,1,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,
|
|
3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,1,1,1,1,1,1,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,3265,1,1,1,3265,3265,
|
|
2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,2145,
|
|
481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,1,1,481,481,
|
|
4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,
|
|
4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,1,
|
|
4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,1,1,4705,
|
|
4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,1,1,1,1,1,1,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,1,1,1,1,1,1,
|
|
4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,4705,1,1,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,
|
|
225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,
|
|
225,225,225,225,225,225,225,225,225,225,225,225,225,1,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,
|
|
225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,
|
|
4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,
|
|
4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,4481,
|
|
321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
|
|
321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,1,1,1,1,1,1,1,1,321,321,321,321,
|
|
2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,
|
|
2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,1,1,1,2337,2337,2337,2337,2337,
|
|
2337,2337,2337,2337,2337,2337,2337,2337,2337,2337,1,1,1,2337,2337,2337,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,
|
|
3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,3425,
|
|
897,897,897,897,897,897,897,897,897,897,897,1,1,1,1,1,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,
|
|
1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1,1,1313,1313,1313,
|
|
4481,4481,4481,4481,4481,4481,4481,4481,1,1,1,1,1,1,1,1,8452,1025,8452,8483,1025,5346,5346,8578,5346,8578,8646,1025,8578,8578,1025,1025,
|
|
8578,5346,1025,1025,1025,1025,1025,1025,1025,8834,5346,1025,1025,5346,1025,1025,1025,1025,8907,5378,9252,5346,5346,353,5378,5378,3201,1,1,1,1,1,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,1441,1441,1441,1441,1441,897,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,1441,1441,1441,
|
|
1441,1441,2305,2305,2305,2305,1441,1441,1441,1441,1441,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,897,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,1441,
|
|
1441,1441,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,9379,961,4577,961,961,961,961,961,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1,1,1441,1441,1441,1441,1441,1441,1,1,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,1441,1441,1441,1441,1,1,1441,1441,1441,1441,1441,1441,1,1,1441,1441,1441,1441,1441,1441,1441,1441,1,1441,1,1441,1,1441,1,1441,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1,1,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,1441,1441,1441,1,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1,1,1441,1441,1441,1441,1441,1441,1,1441,1441,1441,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1,1,1441,1441,1441,1,1441,1441,1441,1441,1441,1441,1441,1441,1441,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,961,961,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,9475,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,4706,929,929,929,929,929,929,929,929,929,929,9574,929,929,9764,929,929,
|
|
929,929,929,929,929,1,929,929,929,929,929,929,929,929,929,929,929,2305,1,1,929,929,929,929,929,929,929,929,929,929,929,2305,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,9891,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,1441,929,929,929,2305,2305,929,929,929,929,929,929,2305,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,2305,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,929,929,929,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,
|
|
1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,
|
|
1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
|
|
801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
|
|
801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
|
|
801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,1,1,1,1,1,801,801,801,801,801,801,801,
|
|
1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,
|
|
1313,1313,1313,1313,1313,1313,1,1313,1,1,1,1,1,1313,1,1,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,
|
|
5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,5025,
|
|
5025,5025,5025,5025,5025,5025,5025,5025,1,1,1,1,1,1,1,5025,5025,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5025,
|
|
1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1,1,1,1,1,1,1,1,1,
|
|
1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1249,1249,1249,1,
|
|
1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1249,1249,1249,1,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,9986,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,10050,10119,929,929,929,929,929,929,929,929,929,929,1121,929,929,929,
|
|
929,10339,929,4226,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10434,10434,10434,10434,10434,10434,10434,10434,10434,10434,10434,10434,10434,10434,10434,10434,
|
|
929,10503,10728,10501,929,769,769,769,10984,10984,11241,11241,11526,11526,11526,11526,11526,11526,929,10501,11526,11526,11526,11526,11526,11526,11526,11526,10501,10501,10501,10501,
|
|
929,769,769,769,769,769,769,769,769,769,10498,10498,10498,10498,1601,1601,10501,10594,10594,10594,10594,10594,929,10501,769,769,769,769,11715,11715,769,769,
|
|
1,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1,1,10594,10594,10594,10594,1761,1761,1761,
|
|
10594,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,
|
|
1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,
|
|
1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,11526,10594,1985,1985,1985,
|
|
1,1,1,1,1,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,
|
|
417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,1,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,1,1,1,1,1,1,1,1,1,10434,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,929,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,929,929,929,929,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,
|
|
1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,769,
|
|
1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,
|
|
1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,
|
|
1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,929,929,929,929,929,929,929,929,929,929,769,769,769,769,769,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,929,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,
|
|
5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,
|
|
5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,
|
|
5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,
|
|
5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,1,1,1,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,
|
|
5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,5377,
|
|
5377,5377,5377,5377,5377,5377,5377,1,1,1,1,1,1,1,1,1,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,
|
|
2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,2465,
|
|
5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,
|
|
5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,
|
|
5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,
|
|
5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,
|
|
5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,
|
|
5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,5217,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,4226,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
|
|
257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
|
|
257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,1,1,1,1,1,1,1,1,
|
|
11810,11810,11810,11810,11810,11810,11810,11810,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,929,929,929,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,1,1,2305,2305,1,2305,1,2305,2305,2305,2305,2305,2305,2305,2305,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,
|
|
4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,4545,1,1,1,11888,11888,11888,12399,12399,12399,12875,12875,13228,12875,1,1,1,1,1,1,
|
|
3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,
|
|
3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,3969,1,1,1,1,1,1,1,1,
|
|
4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,
|
|
4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,
|
|
4161,4161,4161,4161,4161,4161,1,1,1,1,1,1,1,1,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,4161,1,1,1,1,1,1,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,13603,1025,13698,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,
|
|
2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,
|
|
2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,2049,13763,2049,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,
|
|
4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,4065,1,1,1,1,1,1,1,1,1,1,1,4065,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1,1,1,
|
|
1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,
|
|
1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,
|
|
1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1,13858,1889,1889,1889,1889,1889,1889,1889,1889,1889,1889,1,1,1,1,1889,1889,
|
|
3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,1,
|
|
673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,
|
|
673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,1,1,1,1,1,1,1,1,1,
|
|
673,673,673,673,673,673,673,673,673,673,673,673,673,673,1,1,673,673,673,673,673,673,673,673,673,673,1,1,673,673,673,673,
|
|
3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,
|
|
4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,
|
|
4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,4737,
|
|
4737,4737,4737,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4737,4737,4737,4737,4737,
|
|
2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,1,1,1,1,1,1,1,1,1,
|
|
1,1249,1249,1249,1249,1249,1249,1,1,1249,1249,1249,1249,1249,1249,1,1,1249,1249,1249,1249,1249,1249,1,1,1,1,1,1,1,1,1,
|
|
1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1249,1249,1249,1,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,929,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,1441,2305,2305,2305,2305,929,929,1,1,1,1,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
|
|
705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
|
|
705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
|
|
2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,
|
|
2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,1,1,2817,2817,2817,2817,2817,2817,2817,2817,2817,2817,1,1,1,1,1,1,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1601,1601,1601,1601,1,1,1,1,1,1,1,1,1,1,1,1,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1601,1601,1601,1601,1601,1601,1601,1,1,1,1,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1,1,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,1,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2305,2305,2305,2305,2305,2305,2305,1,1,1,1,1,1,1,1,1,1,1,1,161,161,161,161,161,1,1,1,1,1,1729,1729,1729,
|
|
1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,1,1729,1729,1729,1729,1729,1,1729,1,
|
|
1729,1729,1,1729,1729,1,1729,1729,1729,1729,1729,1729,1729,1729,1729,1729,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,13922,13922,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,1,1,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,1,1,1,1,1,1,1,129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,129,129,5250,129,129,129,129,129,129,129,129,129,129,5250,129,129,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,897,897,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,10501,10501,929,929,929,929,929,929,929,929,929,929,929,929,1,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,1,929,929,929,929,1,1,1,1,129,129,129,129,129,1,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,1,1,929,
|
|
1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,929,929,929,929,929,
|
|
929,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,929,929,929,929,929,
|
|
929,11526,11526,11526,11526,11526,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,10594,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,
|
|
1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,1985,10594,10594,
|
|
1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1601,1,
|
|
1,1,1601,1601,1601,1601,1601,1601,1,1,1601,1601,1601,1601,1601,1601,1,1,1601,1601,1601,1601,1601,1601,1,1,1601,1601,1601,1,1,1,
|
|
929,929,929,929,929,929,929,1,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,929,929,929,929,929,1,1,
|
|
2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,1,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,
|
|
2433,2433,2433,2433,2433,2433,2433,1,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,1,2433,2433,1,2433,
|
|
2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,1,1,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,
|
|
2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,
|
|
2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,
|
|
2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,2433,1,1,1,1,1,
|
|
13987,13987,14082,1,1,1,1,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,
|
|
14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,14147,1,1,1,14082,14082,14082,14082,14082,14082,14082,14082,14082,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,
|
|
1441,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,961,1,1,
|
|
2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,2497,1,1,1,
|
|
577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,
|
|
577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,14242,1,1,1,1,
|
|
3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,3489,
|
|
3489,3489,3489,3489,1,1,1,1,1,1,1,1,1,3489,3489,3489,1377,1377,1377,1377,1377,1377,1377,1377,1377,1377,1377,1377,1377,1377,1377,1377,
|
|
1377,1377,1377,1377,1377,1377,1377,1377,1377,1377,1377,1,1,1,1,1,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,
|
|
3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,3585,1,1,1,1,1,
|
|
5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,5185,1,5185,
|
|
3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,
|
|
3617,3617,3617,3617,1,1,1,1,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,3617,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,
|
|
993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,
|
|
993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,
|
|
4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,4225,
|
|
3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,1,1,
|
|
3841,3841,3841,3841,3841,3841,3841,3841,3841,3841,1,1,1,1,1,1,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,
|
|
3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,1,1,1,1,3809,3809,3809,3809,3809,3809,3809,3809,
|
|
3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,3809,1,1,1,1,
|
|
1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,1185,
|
|
1185,1185,1185,1185,1185,1185,1185,1185,1,1,1,1,1,1,1,1,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,
|
|
609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,
|
|
609,609,609,609,1,1,1,1,1,1,1,1,1,1,1,609,5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,1,5249,5249,5249,5249,
|
|
5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,1,5249,5249,5249,5249,5249,5249,5249,1,5249,5249,1,5249,5249,5249,5249,5249,5249,5249,5249,5249,
|
|
5249,5249,1,5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,5249,1,5249,5249,5249,5249,5249,5249,5249,1,5249,5249,1,1,1,
|
|
5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,
|
|
5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,5089,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,
|
|
2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,
|
|
2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,
|
|
2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,
|
|
2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,
|
|
2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,1,1,1,1,1,1,1,1,1,
|
|
2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,2401,1,1,1,1,1,1,1,1,1,1,
|
|
2401,2401,2401,2401,2401,2401,2401,2401,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2305,2305,2305,2305,2305,2305,1,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,1,2305,2305,2305,2305,2305,2305,2305,2305,2305,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
833,833,833,833,833,833,1,1,833,1,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,
|
|
833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,1,833,833,1,1,1,833,1,1,833,
|
|
1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1793,1,1793,1793,1793,1793,1793,1793,1793,1793,1793,
|
|
3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,3905,
|
|
3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,3137,1,
|
|
1,1,1,1,1,1,1,3137,3137,3137,3137,3137,3137,3137,3137,3137,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1697,1,1697,1697,1,1,1,1,1,1697,1697,1697,1697,1697,
|
|
4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,4001,1,1,1,4001,
|
|
2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,1,1,1,1,1,2529,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,2913,
|
|
2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,1,1,1,1,2881,2881,2881,2881,
|
|
2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,1,1,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,
|
|
2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,2881,
|
|
2081,2081,2081,2081,1,2081,2081,1,1,1,1,1,2081,2081,2081,2081,2081,2081,2081,2081,1,2081,2081,2081,1,2081,2081,2081,2081,2081,2081,2081,
|
|
2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,2081,1,1,2081,2081,2081,1,1,1,1,2081,
|
|
2081,2081,2081,2081,2081,2081,2081,2081,2081,1,1,1,1,1,1,1,2081,2081,2081,2081,2081,2081,2081,2081,2081,1,1,1,1,1,1,1,
|
|
3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,3681,
|
|
3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,2689,
|
|
2689,2689,2689,2689,2689,2689,2689,1,1,1,1,2689,2689,2689,2689,2689,2689,2689,5090,2689,2689,2689,2689,1,1,1,1,1,1,1,1,1,
|
|
193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,
|
|
193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,1,1,1,193,193,193,193,193,193,193,
|
|
1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1857,1,1,1857,1857,1857,1857,1857,1857,1857,1857,
|
|
1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1,1,1,1,1,1825,1825,1825,1825,1825,1825,1825,1825,
|
|
4033,4033,4033,4033,4033,4033,4033,4033,4033,4033,4033,4033,4033,4033,4033,4033,4033,4033,1,1,1,1,1,1,1,4033,4033,4033,4033,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,4033,4033,4033,4033,4033,4033,4033,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,
|
|
3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,3713,
|
|
3713,3713,3713,3713,3713,3713,3713,3713,3713,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,
|
|
3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,
|
|
3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,3521,1,1,1,1,1,1,1,3521,3521,3521,3521,3521,3521,
|
|
1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,
|
|
1633,1633,1633,1633,1633,1633,1633,1633,1,1,1,1,1,1,1,1,1633,1633,1633,1633,1633,1633,1633,1633,1633,1633,1,1,1,1,1,1,
|
|
1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,
|
|
1281,1281,1281,1281,1281,1281,1,1,1,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,
|
|
1281,1281,1281,1281,1281,1281,1,1,1,1,1,1,1,1,1281,1281,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,1,
|
|
5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,
|
|
5345,5345,5345,5345,5345,5345,5345,5345,5345,5345,1,5345,5345,5345,1,1,5345,5345,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,129,129,129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,129,129,129,129,
|
|
3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,3649,
|
|
3649,3649,3649,3649,3649,3649,3649,3649,1,1,1,1,1,1,1,1,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,
|
|
4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,4321,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3745,3745,3745,3745,3745,3745,3745,3745,3745,3745,3745,3745,3745,3745,3745,3745,
|
|
3745,3745,3745,3745,3745,3745,3745,3745,3745,3745,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
|
|
737,737,737,737,737,737,737,737,737,737,737,737,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1217,1,1,1,1,1,1,1,1,1,
|
|
449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
|
|
449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
|
|
449,449,449,449,449,449,449,449,449,449,449,449,449,449,1,1,1,1,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
|
|
449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,1,1,1,1,1,1,1,1,1,449,
|
|
1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,
|
|
1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,1921,
|
|
1921,1921,1921,1,1,1,1,1,1,1,1,1,1,1921,1,1,4385,4385,4385,4385,4385,4385,4385,4385,4385,4385,4385,4385,4385,4385,4385,4385,
|
|
4385,4385,4385,4385,4385,4385,4385,4385,4385,1,1,1,1,1,1,1,4385,4385,4385,4385,4385,4385,4385,4385,4385,4385,1,1,1,1,1,1,
|
|
641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,
|
|
641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,1,641,641,641,641,641,641,641,641,641,641,
|
|
641,641,641,641,641,641,641,641,1,1,1,1,1,1,1,1,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,
|
|
2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,2561,1,1,1,1,1,1,1,1,1,
|
|
4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,
|
|
4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,
|
|
4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,4193,
|
|
1,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,4353,1,1,1,1,1,1,1,1,1,1,1,
|
|
2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,1,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,
|
|
2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,2177,
|
|
2177,2177,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
3073,3073,3073,3073,3073,3073,3073,1,3073,1,3073,3073,3073,3073,1,3073,3073,3073,3073,3073,3073,3073,3073,3073,3073,3073,3073,3073,3073,3073,1,3073,
|
|
3073,3073,3073,3073,3073,3073,3073,3073,3073,3073,1,1,1,1,1,1,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,
|
|
2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,
|
|
2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,1,1,1,1,1,2209,2209,2209,2209,2209,2209,2209,2209,2209,2209,1,1,1,1,1,1,
|
|
1409,7906,1409,7906,1,1409,1409,1409,1409,1409,1409,1409,1409,1,1,1409,1409,1,1,1409,1409,1409,1409,1409,1409,1409,1409,1409,1409,1409,1409,1409,
|
|
1409,1409,1409,1409,1409,1409,1409,1409,1409,1,1409,1409,1409,1409,1409,1409,1409,1,1409,1409,1,1409,1409,1409,1409,1409,1,7906,7906,1409,1409,1409,
|
|
1409,1409,1409,1409,1409,1,1,1409,1409,1,1,1409,1409,1409,1,1,1409,1,1,1,1,1,1,1409,1,1,1,1,1,1409,1409,1409,
|
|
1409,1409,1409,1409,1,1,1409,1409,1409,1409,1409,1409,1409,1,1,1,1409,1409,1409,1409,1409,1,1,1,1,1,1,1,1,1,1,1,
|
|
5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,1,5153,1,1,5153,1,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,
|
|
5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,1,5153,5153,5153,5153,5153,5153,5153,5153,5153,
|
|
5153,1,5153,1,1,5153,1,5153,5153,5153,5153,1,5153,5153,5153,5153,5153,5153,5153,5153,5153,5153,1,5153,5153,1,1,1,1,1,1,1,
|
|
1,5153,5153,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,
|
|
3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,
|
|
3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,1,3233,3233,3233,
|
|
3233,3233,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,
|
|
5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,
|
|
5057,5057,5057,5057,5057,5057,5057,5057,1,1,1,1,1,1,1,1,5057,5057,5057,5057,5057,5057,5057,5057,5057,5057,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,
|
|
4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,1,1,4257,4257,4257,4257,4257,4257,4257,4257,
|
|
4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,4257,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,
|
|
2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,
|
|
2977,2977,2977,2977,2977,1,1,1,1,1,1,1,1,1,1,1,2977,2977,2977,2977,2977,2977,2977,2977,2977,2977,1,1,1,1,1,1,
|
|
3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,3009,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,
|
|
4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,1,1,1,1,1,1,
|
|
4769,4769,4769,4769,4769,4769,4769,4769,4769,4769,1,1,1,1,1,1,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,3105,
|
|
3105,3105,3105,3105,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,1,1,65,65,65,
|
|
65,65,65,65,65,65,65,65,65,65,65,65,1,1,1,1,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,
|
|
65,65,65,65,65,65,65,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,
|
|
1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,
|
|
5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,
|
|
5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,5313,1,1,1,1,1,1,1,1,1,1,1,1,5313,
|
|
1057,1057,1057,1057,1057,1057,1057,1,1,1057,1,1,1057,1057,1057,1057,1057,1057,1057,1057,1,1057,1057,1,1057,1057,1057,1057,1057,1057,1057,1057,
|
|
1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1,1057,1057,1,1,1057,1057,1057,1057,1057,
|
|
1057,1057,1057,1057,1057,1057,1057,1,1,1,1,1,1,1,1,1,1057,1057,1057,1057,1057,1057,1057,1057,1057,1057,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
3201,3201,3201,3201,3201,3201,3201,3201,1,1,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,
|
|
3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,3201,1,1,3201,3201,3201,3201,3201,3201,
|
|
3201,3201,3201,3201,3201,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,
|
|
5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,5409,
|
|
5409,5409,5409,5409,5409,5409,5409,5409,1,1,1,1,1,1,1,1,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,
|
|
4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,
|
|
4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,4417,
|
|
4417,4417,4417,1,1,1,1,1,1,1,1,1,1,1,1,1,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
|
|
3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,
|
|
3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,3937,1,1,1,1,1,1,1,
|
|
1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,
|
|
4513,4513,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4513,4513,4513,4513,4513,4513,4513,4513,4513,4513,1,1,1,1,1,1,
|
|
385,385,385,385,385,385,385,385,385,1,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
|
|
385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,1,385,385,385,385,385,385,385,385,
|
|
385,385,385,385,385,385,1,1,1,1,1,1,1,1,1,1,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
|
|
385,385,385,385,385,385,385,385,385,385,385,385,385,1,1,1,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,
|
|
2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,1,1,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,
|
|
2721,2721,2721,2721,2721,2721,2721,2721,1,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,2721,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2753,2753,2753,2753,2753,2753,2753,1,2753,2753,1,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,
|
|
2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,1,1,1,2753,1,2753,2753,1,2753,
|
|
2753,2753,2753,2753,2753,2753,2753,2753,1,1,1,1,1,1,1,1,2753,2753,2753,2753,2753,2753,2753,2753,2753,2753,1,1,1,1,1,1,
|
|
1505,1505,1505,1505,1505,1505,1,1505,1505,1,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,
|
|
1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1,1505,1505,1,1505,1505,1505,1505,1505,1505,1,1,1,1,1,1,1,
|
|
1505,1505,1505,1505,1505,1505,1505,1505,1505,1505,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,2593,1,1,1,1,1,1,1,
|
|
2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,1,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,
|
|
2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,1,1,1,2017,2017,
|
|
2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,2017,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2465,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,7906,7906,4801,7906,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,
|
|
4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,4801,1,1,1,1,1,1,1,1,1,1,1,1,1,4801,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,1,4449,4449,4449,4449,4449,1,1,1,1,1,1,1,1,1,1,1,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,
|
|
4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,4449,
|
|
4449,4449,4449,4449,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,
|
|
865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,
|
|
865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,
|
|
865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,865,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1,1,1,1,1,1,1,1,1,1,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,
|
|
1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1153,1,1,1,1,1,
|
|
97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
|
|
97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
|
|
97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
|
|
97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
|
|
97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
|
|
97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
|
|
97,97,97,97,97,97,97,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,
|
|
1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1569,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
|
|
257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
|
|
257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
|
|
257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
|
|
257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
|
|
257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,1,1,1,1,1,1,1,
|
|
3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,1,
|
|
3041,3041,3041,3041,3041,3041,3041,3041,3041,3041,1,1,1,1,3041,3041,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,
|
|
4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,
|
|
4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,1,
|
|
4833,4833,4833,4833,4833,4833,4833,4833,4833,4833,1,1,1,1,1,1,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
|
|
289,289,289,289,289,289,289,289,289,289,289,289,289,289,1,1,289,289,289,289,289,289,1,1,1,1,1,1,1,1,1,1,
|
|
3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,
|
|
3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,
|
|
3873,3873,3873,3873,3873,3873,1,1,1,1,1,1,1,1,1,1,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,1,3873,3873,3873,3873,3873,
|
|
3873,3873,1,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,1,1,1,1,1,3873,3873,3873,
|
|
3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,3873,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,
|
|
2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,2241,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,
|
|
2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,
|
|
2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,2785,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,
|
|
2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,
|
|
2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,1,1,1,1,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,
|
|
2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,
|
|
2945,2945,2945,2945,2945,2945,2945,2945,1,1,1,1,1,1,1,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
4865,3329,769,769,2113,1,1,1,1,1,1,1,1,1,1,1,769,769,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,
|
|
4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,
|
|
4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,
|
|
4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,
|
|
4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,
|
|
4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,
|
|
4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,
|
|
4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,4865,1,1,1,1,1,1,1,1,
|
|
2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,
|
|
2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,
|
|
2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,
|
|
2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,
|
|
2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,
|
|
2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,
|
|
2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,2113,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2113,
|
|
4865,4865,4865,4865,4865,4865,4865,4865,4865,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1985,1985,1985,1985,1,1985,1985,1985,1985,1985,1985,1985,1,1985,1985,1,
|
|
1985,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,1761,
|
|
1985,1985,1985,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1761,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1761,1761,1761,1,1,1985,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1985,1985,1985,1985,1,1,1,1,1,1,1,1,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,
|
|
3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,
|
|
3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,
|
|
3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,
|
|
3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,
|
|
3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,
|
|
3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,
|
|
3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,
|
|
3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,3329,1,1,1,1,
|
|
1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,
|
|
1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,
|
|
1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,
|
|
1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1,1,1,1,1,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1,1,1,
|
|
1121,1121,1121,1121,1121,1121,1121,1121,1121,1,1,1,1,1,1,1,1121,1121,1121,1121,1121,1121,1121,1121,1121,1121,1,1,1121,1121,1121,1121,
|
|
1121,1121,1121,1121,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,1,1,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,1,1,1,1,1,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,961,961,961,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,961,961,961,961,961,
|
|
961,961,961,929,929,961,961,961,961,961,961,961,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,961,961,961,961,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,1441,
|
|
1441,1441,1441,1441,1441,1441,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,929,929,929,929,929,929,929,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,929,929,
|
|
1,1,929,1,1,929,929,1,1,929,929,929,929,1,929,929,929,929,929,929,929,929,929,929,929,929,1,929,1,929,929,929,
|
|
929,929,929,929,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,1,929,929,929,929,1,1,929,929,929,929,929,929,929,929,1,929,929,929,929,929,929,929,1,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,929,929,929,929,1,
|
|
929,929,929,929,929,1,929,1,1,1,929,929,929,929,929,929,929,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,
|
|
4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,
|
|
4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,
|
|
4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,
|
|
4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4289,4289,4289,4289,4289,
|
|
1,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,4289,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,2305,1,
|
|
1,1,1,1,1,2305,2305,2305,2305,2305,2305,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1345,1345,1345,1345,1345,1345,1345,1,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1345,1,1,1345,1345,1345,1345,1345,
|
|
1345,1345,1,1345,1345,1,1345,1345,1345,1345,1345,1,1,1,1,1,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,
|
|
897,897,897,897,897,897,897,897,897,897,897,897,897,897,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,897,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,
|
|
3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,1,1,1,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,1,1,
|
|
3361,3361,3361,3361,3361,3361,3361,3361,3361,3361,1,1,1,1,3361,3361,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,
|
|
5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,5121,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,
|
|
5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,5281,1,1,1,1,1,5281,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,
|
|
3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,3169,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,
|
|
3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,3457,1,1,1,1,3457,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1249,1249,1249,1249,1249,1249,1249,1,1249,1249,1249,1249,1,1249,1249,1,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1249,1,
|
|
2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,
|
|
2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,
|
|
2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,
|
|
2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,
|
|
2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,
|
|
2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,
|
|
2849,2849,2849,2849,2849,1,1,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,2849,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
|
|
33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
|
|
33,33,33,33,33,33,33,33,33,33,33,33,1,1,1,1,33,33,33,33,33,33,33,33,33,33,1,1,1,1,33,33,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
129,129,129,129,1,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
|
|
1,129,129,1,129,1,1,129,1,129,129,129,129,129,129,129,129,129,129,1,129,129,129,129,1,129,1,129,1,1,1,1,
|
|
1,1,129,1,1,1,1,129,1,129,1,129,1,129,129,129,1,129,129,1,129,1,1,129,1,129,1,129,1,129,1,129,
|
|
1,129,129,1,129,1,1,129,129,129,129,1,129,129,129,129,129,129,129,1,129,129,129,129,1,129,129,129,129,1,129,1,
|
|
129,129,129,129,129,129,129,129,129,129,1,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,1,1,1,1,
|
|
1,129,129,129,1,129,129,129,129,129,1,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,129,129,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
1761,929,929,1,1,1,1,1,1,1,1,1,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,769,769,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,
|
|
929,929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,1,1,1,1,1,1,1,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,929,
|
|
929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,1,1,1,1,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,1,1,1,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,1,1,1,1,1,1,1,1,1,1,1,1,1,1,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,1,1,1,1,1,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
|
|
769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,929,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,
|
|
961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u16 kbts__GetUnicodeScriptExtension(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeScriptExtension_Data[((Codepoint < 918016) ? ((kbts_un)kbts__UnicodeScriptExtension_PageIndices[Codepoint / 128] * 128) : 7808) | (Codepoint & 127)] : 0;
|
|
}
|
|
|
|
static kbts_u8 kbts__UnicodeMirrorCodepoint_PageIndices[2044] = {
|
|
0,1,2,3,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,8715,8716,8717,8712,8713,8714,0,0,0,0,0,0,0,10741,0,0,0,0,0,0,0,0,0,11262,
|
|
10659,10651,10656,0,10990,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8765,8764,0,0,
|
|
0,0,0,8909,0,8780,0,0,0,0,0,0,8773,0,0,0,0,0,8787,8786,8789,8788,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,8805,8804,8807,8806,8809,8808,8811,8810,0,0,8815,8814,8817,8816,8819,8818,8821,8820,8823,8822,8825,8824,8827,8826,8829,8828,8831,8830,
|
|
8833,8832,8835,8834,8837,8836,8839,8838,8841,8840,8843,8842,0,0,0,8848,8847,8850,8849,0,0,0,0,0,10680,0,0,0,0,0,0,0,
|
|
0,0,8867,8866,0,0,10974,0,10980,10979,0,10981,0,0,0,0,8881,8880,8883,8882,8885,8884,8887,8886,10204,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,8906,8905,8908,8907,8771,0,0,8913,8912,0,0,0,0,8919,8918,8921,8920,8923,8922,8925,8924,8927,8926,
|
|
8929,8928,8931,8930,8933,8932,8935,8934,8937,8936,8939,8938,8941,8940,0,0,8945,8944,8954,8955,8956,0,8957,8958,0,0,8946,8947,8948,8950,8951,0,
|
|
0,0,0,0,0,0,0,0,8969,8968,8971,8970,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,9002,9001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,10089,10088,10091,10090,10093,10092,10095,10094,10097,10096,10099,10098,10101,10100,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,10180,10179,10182,10181,0,10185,10184,0,10189,0,10187,0,0,0,0,0,0,0,10198,10197,0,0,0,0,0,8888,10206,10205,0,
|
|
0,0,10211,10210,10213,10212,10215,10214,10217,10216,10219,10218,10221,10220,10223,10222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,10628,10627,10630,10629,10632,10631,10634,10633,10636,10635,10640,10639,10638,10637,10642,10641,10644,10643,10646,10645,10648,10647,0,0,8737,0,0,0,0,
|
|
8738,0,0,8736,10661,10660,0,0,10665,10664,10667,10666,10669,10668,10671,10670,0,0,0,0,0,0,0,0,8856,0,0,0,0,0,0,0,
|
|
10689,10688,0,0,10693,10692,0,0,0,0,0,0,0,0,0,10704,10703,10706,10705,0,10709,10708,0,0,10713,10712,10715,10714,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,10729,10728,0,0,0,0,0,0,0,0,0,0,0,8725,0,0,10745,10744,0,0,10749,10748,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,10796,10795,10798,10797,0,0,0,0,0,10805,10804,0,0,0,0,0,0,10813,10812,0,0,
|
|
0,0,0,0,10853,10852,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10874,10873,10876,10875,10878,10877,10880,
|
|
10879,10882,10881,10884,10883,10886,10885,10888,10887,10890,10889,10892,10891,10894,10893,10896,10895,10898,10897,10900,10899,10902,10901,10904,10903,10906,10905,10908,10907,10910,10909,10912,
|
|
10911,10914,10913,0,0,0,10919,10918,10921,10920,10923,10922,10925,10924,0,10928,10927,10930,10929,10932,10931,10934,10933,10936,10935,10938,10937,10940,10939,10942,10941,10944,
|
|
10943,10946,10945,10948,10947,10950,10949,10952,10951,10954,10953,10956,10955,10958,10957,10960,10959,10962,10961,10964,10963,10966,10965,0,0,0,0,0,0,0,8870,0,
|
|
0,0,0,8873,8872,8875,0,0,0,0,0,0,10989,10988,8740,0,0,0,0,0,0,0,0,11000,10999,11002,11001,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8735,0,
|
|
0,0,11779,11778,11781,11780,0,0,0,11786,11785,0,11789,11788,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11805,11804,0,0,
|
|
11809,11808,11811,11810,11813,11812,11815,11814,11817,11816,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11862,11861,11864,11863,11866,11865,11868,11867,0,0,0,
|
|
0,0,0,0,0,0,0,0,12297,12296,12299,12298,12301,12300,12303,12302,12305,12304,0,0,12309,12308,12311,12310,12313,12312,12315,12314,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65114,65113,65116,65115,65118,65117,0,
|
|
0,0,0,0,65125,65124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,65289,65288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65310,0,65308,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65341,0,65339,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65373,0,65371,0,65376,
|
|
65375,0,65379,65378,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
};
|
|
|
|
KBTS_INLINE kbts_u32 kbts__GetUnicodeMirrorCodepoint(kbts_u32 Codepoint)
|
|
{
|
|
return (Codepoint < 1114110) ? kbts__UnicodeMirrorCodepoint_Data[((Codepoint < 65408) ? ((kbts_un)kbts__UnicodeMirrorCodepoint_PageIndices[Codepoint / 32] * 32) : 0) | (Codepoint & 31)] : 0;
|
|
}
|
|
|
|
KBTS_INLINE kbts_u32 kbts__GetDecompositionSize(kbts_u64 Decomposition)
|
|
{
|
|
return Decomposition & 3;
|
|
}
|
|
|
|
KBTS_INLINE kbts_u32 kbts__GetDecompositionCodepoint(kbts_u64 Decomposition, kbts_un Index){
|
|
return (Decomposition >> (Index ? 23 : 2)) & 0x1FFFFF;
|
|
}
|
|
|
|
#define KBTS_UNICODE_DECOMPOSITION_DO_NOT_RECURSE0 (1ull << 44)
|
|
#define KBTS_UNICODE_DECOMPOSITION_DO_NOT_RECURSE1 (1ull << 45)
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetSyllabicClass(kbts_u16 SyllabicInfo)
|
|
{
|
|
return (kbts_u8)(SyllabicInfo & 0xFF);
|
|
}
|
|
|
|
KBTS_INLINE kbts_u8 kbts__GetSyllabicPosition(kbts_u16 SyllabicInfo)
|
|
{
|
|
return (kbts_u8)(SyllabicInfo >> 8);
|
|
}
|
|
|
|
KBTS_INLINE kbts_s32 *kbts__GetParentInfoDeltas(kbts_u32 ParentInfo)
|
|
{
|
|
return kbts__UnicodeParentDeltas + (ParentInfo & 0xFFFF);
|
|
}
|
|
|
|
KBTS_INLINE kbts_un kbts__GetParentInfoCount(kbts_u32 ParentInfo)
|
|
{
|
|
return ParentInfo >> 16;
|
|
}
|
|
|
|
KBTS_INLINE kbts_un kbts__ScriptExtensionCount(kbts_u16 ScriptExtension)
|
|
{
|
|
return (ScriptExtension & 0x1f);
|
|
}
|
|
|
|
KBTS_INLINE kbts_un kbts__ScriptExtensionOffset(kbts_u16 ScriptExtension)
|
|
{
|
|
return (ScriptExtension >> 5);
|
|
}
|
|
|
|
typedef kbts_u8 kbts_grapheme_break_class;
|
|
enum kbts_grapheme_break_class_enum {
|
|
/* 0 */ KBTS_GRAPHEME_BREAK_CLASS_DEFAULT,
|
|
/* 1 */ KBTS_GRAPHEME_BREAK_CLASS_CR,
|
|
/* 2 */ KBTS_GRAPHEME_BREAK_CLASS_LF,
|
|
/* 3 */ KBTS_GRAPHEME_BREAK_CLASS_Control,
|
|
/* 4 */ KBTS_GRAPHEME_BREAK_CLASS_Extend,
|
|
/* 5 */ KBTS_GRAPHEME_BREAK_CLASS_ZWJ,
|
|
/* 6 */ KBTS_GRAPHEME_BREAK_CLASS_SpacingMark,
|
|
/* 7 */ KBTS_GRAPHEME_BREAK_CLASS_L,
|
|
/* 8 */ KBTS_GRAPHEME_BREAK_CLASS_V,
|
|
/* 9 */ KBTS_GRAPHEME_BREAK_CLASS_LV,
|
|
/* 10 */ KBTS_GRAPHEME_BREAK_CLASS_LVT,
|
|
/* 11 */ KBTS_GRAPHEME_BREAK_CLASS_T,
|
|
/* 12 */ KBTS_GRAPHEME_BREAK_CLASS_Prepend,
|
|
/* 13 */ KBTS_GRAPHEME_BREAK_CLASS_IndicConsonant,
|
|
/* 14 */ KBTS_GRAPHEME_BREAK_CLASS_IndicExtend,
|
|
/* 15 */ KBTS_GRAPHEME_BREAK_CLASS_IndicLinker,
|
|
/* 16 */ KBTS_GRAPHEME_BREAK_CLASS_ExtendedPictographic,
|
|
/* 17 */ KBTS_GRAPHEME_BREAK_CLASS_RI,
|
|
|
|
KBTS_GRAPHEME_BREAK_CLASS_COUNT,
|
|
};
|
|
|
|
typedef kbts_u8 kbts_grapheme_break_state;
|
|
enum kbts_grapheme_break_state_enum {
|
|
/* 0 */ KBTS_GRAPHEME_BREAK_STATE_START,
|
|
/* 1 */ KBTS_GRAPHEME_BREAK_STATE_CR,
|
|
/* 2 */ KBTS_GRAPHEME_BREAK_STATE_L,
|
|
/* 3 */ KBTS_GRAPHEME_BREAK_STATE_LVxV,
|
|
/* 4 */ KBTS_GRAPHEME_BREAK_STATE_LVTxT,
|
|
/* 5 */ KBTS_GRAPHEME_BREAK_STATE_IndicConsonantxIndicLinker,
|
|
/* 6 */ KBTS_GRAPHEME_BREAK_STATE_IndicExtendr,
|
|
/* 7 */ KBTS_GRAPHEME_BREAK_STATE_IndicExtendLinkerr,
|
|
/* 8 */ KBTS_GRAPHEME_BREAK_STATE_ExtendedPictographic,
|
|
/* 9 */ KBTS_GRAPHEME_BREAK_STATE_ExtendR,
|
|
/* 10 */ KBTS_GRAPHEME_BREAK_STATE_ExtendR_ZWJ,
|
|
/* 11 */ KBTS_GRAPHEME_BREAK_STATE_RI,
|
|
/* 12 */ KBTS_GRAPHEME_BREAK_STATE_SKIP,
|
|
|
|
/* 13 */ KBTS_GRAPHEME_BREAK_STATE_COUNT,
|
|
|
|
/* 14 */ KBTS_GRAPHEME_BREAK_STATE_b0,
|
|
/* 15 */ KBTS_GRAPHEME_BREAK_STATE_b01,
|
|
// The values below have to be in the same order as their corresponding states.
|
|
/* 16 */ KBTS_GRAPHEME_BREAK_STATE_b1,
|
|
/* 17 */ KBTS_GRAPHEME_BREAK_STATE_b1toCR,
|
|
/* 18 */ KBTS_GRAPHEME_BREAK_STATE_b1toL,
|
|
/* 19 */ KBTS_GRAPHEME_BREAK_STATE_b1toLVxV,
|
|
/* 20 */ KBTS_GRAPHEME_BREAK_STATE_b1toLVTxT,
|
|
/* 21 */ KBTS_GRAPHEME_BREAK_STATE_b1toIndicConsonantxIndicLinker,
|
|
/* 22 */ KBTS_GRAPHEME_BREAK_STATE_PADDING0,
|
|
/* 23 */ KBTS_GRAPHEME_BREAK_STATE_PADDING1,
|
|
/* 24 */ KBTS_GRAPHEME_BREAK_STATE_b1toExtendedPictographic,
|
|
/* 25 */ KBTS_GRAPHEME_BREAK_STATE_PADDING2,
|
|
/* 26 */ KBTS_GRAPHEME_BREAK_STATE_PADDING3,
|
|
/* 27 */ KBTS_GRAPHEME_BREAK_STATE_b1toRI,
|
|
/* 28 */ KBTS_GRAPHEME_BREAK_STATE_b1toSKIP,
|
|
};
|
|
|
|
// In the SKIP column, CR, LF and Control all still break before the cursor
|
|
// because their rules have a higher priority.
|
|
// In Indic-related states, ZWJ should behave like an Indic Extend.
|
|
static kbts_grapheme_break_state kbts_GraphemeBreakTransition[KBTS_GRAPHEME_BREAK_CLASS_COUNT][KBTS_GRAPHEME_BREAK_STATE_COUNT] = {
|
|
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 */
|
|
/* 0 */ {16,16,16,16,16,16,16,16,16,16,16,16, 0},
|
|
/* 1 */ {17,17,17,17,17,17,17,17,17,17,17,17,17},
|
|
/* 2 */ {15,14,15,15,15,15,15,15,15,15,15,15,15},
|
|
/* 3 */ {15,15,15,15,15,15,15,15,15,15,15,15,15},
|
|
/* 4 */ { 0,16, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0},
|
|
/* 5 */ { 0,16, 0, 0, 0, 6, 6, 7,10,10, 0, 0, 0},
|
|
/* 6 */ { 0,16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
/* 7 */ {18,18, 2,18,18,18,18,16,18,18,18,18, 2},
|
|
/* 8 */ {19,19, 3, 3,19,19,19,16,19,19,19,19, 3},
|
|
/* 9 */ {19,19, 3,19,19,19,19,16,19,19,19,19, 3},
|
|
/* 10 */ {20,20, 4,20,20,20,20,16,20,20,20,20, 4},
|
|
/* 11 */ {20,20,20, 4, 4,20,20,16,20,20,20,20, 4},
|
|
/* 12 */ {28,28,28,28,28,28,28,28,28,28,28,28,12},
|
|
/* 13 */ {21,21,21,21,21,21,21, 5,21,21,21,21, 5},
|
|
/* 14 */ { 0,16, 0, 0, 0, 6, 6, 7, 9, 9, 0, 0, 0},
|
|
/* 15 */ { 5,21, 5, 5, 5, 7, 7, 7, 5, 5, 5, 5, 5},
|
|
/* 16 */ {24,24,24,24,24,24,24,16,24,24, 0,24, 8},
|
|
/* 17 */ {27,27,27,27,27,27,27,27,27,27,27, 0,11},
|
|
};
|
|
|
|
// These classes are for Indic, Myanmar and Khmer.
|
|
typedef kbts_u8 kbts_indic_syllabic_class;
|
|
enum kbts_indic_syllabic_class_enum {
|
|
/* 0 A */ KBTS_INDIC_SYLLABIC_CLASS_OTHER,
|
|
/* 1 B */ KBTS_INDIC_SYLLABIC_CLASS_CONSONANT,
|
|
/* 2 C */ KBTS_INDIC_SYLLABIC_CLASS_VOWEL,
|
|
/* 3 D */ KBTS_INDIC_SYLLABIC_CLASS_NUKTA,
|
|
/* 4 E */ KBTS_INDIC_SYLLABIC_CLASS_HALANT,
|
|
/* 5 F */ KBTS_INDIC_SYLLABIC_CLASS_ZWNJ,
|
|
/* 6 G */ KBTS_INDIC_SYLLABIC_CLASS_ZWJ,
|
|
/* 7 H */ KBTS_INDIC_SYLLABIC_CLASS_MATRA,
|
|
/* 8 I */ KBTS_INDIC_SYLLABIC_CLASS_SYLLABLE_MODIFIER,
|
|
/* 9 J */ KBTS_INDIC_SYLLABIC_CLASS_VEDIC_SIGN,
|
|
/* 10 K */ KBTS_INDIC_SYLLABIC_CLASS_PLACEHOLDER,
|
|
/* 11 L */ KBTS_INDIC_SYLLABIC_CLASS_DOTTED_CIRCLE,
|
|
/* 12 M */ KBTS_INDIC_SYLLABIC_CLASS_REGISTER_SHIFTER,
|
|
/* 13 N */ KBTS_INDIC_SYLLABIC_CLASS_MATRA_POST,
|
|
/* 14 O */ KBTS_INDIC_SYLLABIC_CLASS_REPHA,
|
|
/* 15 P */ KBTS_INDIC_SYLLABIC_CLASS_RA,
|
|
/* 16 Q */ KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_MEDIAL,
|
|
/* 17 R */ KBTS_INDIC_SYLLABIC_CLASS_SYMBOL,
|
|
/* 18 S */ KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_WITH_STACKER,
|
|
/* 19 T */ KBTS_INDIC_SYLLABIC_CLASS_SYLLABLE_MODIFIER_POST,
|
|
/* 20 U */ KBTS_INDIC_SYLLABIC_CLASS_VOWEL_ABOVE,
|
|
/* 21 V */ KBTS_INDIC_SYLLABIC_CLASS_VOWEL_BELOW,
|
|
/* 22 W */ KBTS_INDIC_SYLLABIC_CLASS_VOWEL_PRE,
|
|
/* 23 X */ KBTS_INDIC_SYLLABIC_CLASS_VOWEL_POST,
|
|
/* 24 Y */ KBTS_INDIC_SYLLABIC_CLASS_ROBATIC,
|
|
/* 25 Z */ KBTS_INDIC_SYLLABIC_CLASS_X_GROUP,
|
|
/* 26 a */ KBTS_INDIC_SYLLABIC_CLASS_Y_GROUP,
|
|
/* 27 b */ KBTS_INDIC_SYLLABIC_CLASS_ASAT,
|
|
/* 28 c */ KBTS_INDIC_SYLLABIC_CLASS_DOT_BELOW,
|
|
/* 29 d */ KBTS_INDIC_SYLLABIC_CLASS_SYLLABLE_MOD,
|
|
/* 30 e */ KBTS_INDIC_SYLLABIC_CLASS_MEDIAL_HA,
|
|
/* 31 f */ KBTS_INDIC_SYLLABIC_CLASS_MEDIAL_RA,
|
|
/* 32 g */ KBTS_INDIC_SYLLABIC_CLASS_MEDIAL_WA,
|
|
/* 33 h */ KBTS_INDIC_SYLLABIC_CLASS_MEDIAL_YA,
|
|
/* 34 i */ KBTS_INDIC_SYLLABIC_CLASS_PWO,
|
|
/* 35 j */ KBTS_INDIC_SYLLABIC_CLASS_VARIATION_SELECTOR,
|
|
/* 36 k */ KBTS_INDIC_SYLLABIC_CLASS_MEDIAL_MON_LA,
|
|
|
|
KBTS_MYANMAR_SYLLABIC_CLASS_COUNT,
|
|
KBTS_INDIC_SYLLABIC_CLASS_COUNT = KBTS_INDIC_SYLLABIC_CLASS_SYLLABLE_MODIFIER_POST + 1,
|
|
KBTS_KHMER_SYLLABIC_CLASS_COUNT = KBTS_INDIC_SYLLABIC_CLASS_Y_GROUP + 1,
|
|
};
|
|
|
|
#define KBTS_INDIC_SYLLABIC_STATE_COUNT 41
|
|
#define KBTS_MYANMAR_SYLLABIC_STATE_COUNT 31
|
|
#define KBTS_KHMER_SYLLABIC_STATE_COUNT 23
|
|
|
|
// @Incomplete: Decrement every state by 1.
|
|
static kbts_u8 kbts_IndicSyllabicTransition[KBTS_INDIC_SYLLABIC_CLASS_COUNT][KBTS_INDIC_SYLLABIC_STATE_COUNT] = {
|
|
/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 */
|
|
/* A */ {43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,},
|
|
/* B */ {14,43,43,43,43,43,43,14,43,43,43,43,43,43,43,14,43,14,43,43,43,43,43,43,43,14,43,43,43,43,43,43,14,43,43,14,43,43,14,43,14,},
|
|
/* C */ {30,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,30,43,43,43,43,43,43,43,43,43,43,43,43,30,43,43,},
|
|
/* D */ {24,43,24,20,43,43,31,43,43,43, 7,43,43,24,43,33,43,43,43,43,43,43,43,12,43,24,43,43,43, 7,43,24,43,43,43,33,15,43,24,24,43,},
|
|
/* E */ { 8,43, 8,21,27,43, 8,43,18,18, 8, 8,18, 8,43,43,43,43,43,21,43,43,43, 8,18, 8,43,38,43, 8, 8, 8,43,43,18,18,43,43, 8,26,43,},
|
|
/* F */ {25,43,13,22,28, 2,13,15,19,19,13,13,19,25,29,29, 2,29,19,22,22,19, 2,13,19,35,15,19,43, 9,13,25,29,43,22,22,29,29,25,25,43,},
|
|
/* G */ {13,43,13,22,28,43,10,16,19,19,10,13,19,32,29,29,43,16,19,22,22,19,43,13,19,36,37,19,43,10,10,13,29,43,22,22,29,37,13,32,43,},
|
|
/* H */ { 4,43, 4, 4, 4,43, 4,43, 4, 4, 4, 4, 4, 4,43,43,43,43, 4, 4, 4, 4,43, 4, 4, 4,43, 4,43, 4, 4, 4,43,43, 4, 4,43,43, 4, 4,43,},
|
|
/* I */ { 6,43, 6, 6, 6,23, 6,17, 6, 6, 6, 6, 6, 6,17,17,23,17,34, 6, 6, 6,43, 6, 6, 6,17, 6,17, 6, 6, 6,17,43, 6, 6,17,17, 6, 6,43,},
|
|
/* J */ { 2, 2, 2, 2, 2, 2, 2, 2,43,43, 2, 2,43, 2, 2, 2, 2, 2,43, 2, 2,43, 2, 2,43, 2, 2,43,43, 2, 2, 2, 2,43, 2, 2, 2, 2, 2, 2,43,},
|
|
/* K */ {32,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,32,43,32,},
|
|
/* L */ {32,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,32,43,43,43,43,43,43,43,43,43,43,43,43,32,43,43,},
|
|
/* M */ { 3,43,43,43,43,43,43,43,11,43,43,43,43, 3,43,43,43,43,43,43,43,43,43,43, 3, 3,43,43,43,11,43, 3,43,43, 3,43,43,43, 3, 3,43,},
|
|
/* N */ { 4,43, 4, 4, 4, 4, 4,43, 4, 4, 4, 4, 4, 4,43,43,43,43, 4, 4, 4, 4,43, 4, 4, 4,43, 4,43, 4, 4, 4,43, 4, 4, 4,43,43, 4, 4,43,},
|
|
/* O */ {39,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,},
|
|
/* P */ {40,43,43,43,43,43,43,14,43,43,43,43,43,43,43,14,43,14,43,43,43,43,43,43,43,14,43,43,43,43,43,43,14,43,43,14,43,43,14,43,14,},
|
|
/* Q */ { 5,43, 5,43,43,43, 5,43,43,43, 5, 5,43, 5,43,43,43,43,43,43,43,43,43, 5,43, 5,43,43,43, 5, 5, 5,43,43,43,43,43,43, 5, 5,43,},
|
|
/* R */ {37,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,},
|
|
/* S */ {41,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,},
|
|
/* T */ { 6,43, 6, 6, 6,23, 6,17, 6, 6, 6, 6, 6, 6,17,17,23,17,34, 6, 6, 6,43, 6, 6, 6,17, 6,17, 6, 6, 6,17,43, 6, 6,17,17, 6, 6,43,},
|
|
};
|
|
|
|
// @Incomplete: Decrement every state by 1.
|
|
static kbts_u8 kbts_MyanmarSyllabicTransition[KBTS_MYANMAR_SYLLABIC_CLASS_COUNT][KBTS_MYANMAR_SYLLABIC_STATE_COUNT] = {
|
|
/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 */
|
|
/* A */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* B */ {18,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,18,33,33,33,33,33,33,33,33,18,18,33,18,},
|
|
/* C */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* D */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* E */ {19,33,33,33,33,33,33,33,33,33,33,33,33,33,33,28,33,28,19,29,33,33,33,33,33,33,33,18,19,28,18,},
|
|
/* F */ { 2,33, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,33, 2, 2,33,},
|
|
/* G */ { 2,33, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,33, 2, 2,33,},
|
|
/* H */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* I */ { 3,33, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,33, 3, 3,33,},
|
|
/* J */ { 4,33,33, 4, 4, 4, 4, 4, 4,33, 4, 4, 4, 4,15, 4, 4, 4, 4, 4, 4, 4, 4, 4,33, 4,33,33, 4, 4, 4,},
|
|
/* K */ {18,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,18,33,18,},
|
|
/* L */ {18,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,18,33,18,},
|
|
/* M */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* N */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* O */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* P */ {30,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,18,33,33,33,33,33,33,33,33,18,18,33,18,},
|
|
/* Q */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* R */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* S */ {31,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* T */ { 3,33, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,33, 3, 3,33,},
|
|
/* U */ { 5,33,33,33, 5,33, 5,22, 5,33, 5, 5, 5, 5,33, 5, 5, 5, 5, 5, 5,22,22,22,33, 5,33,33, 5, 5,33,},
|
|
/* V */ { 6,33,33,33, 6, 6, 6,33, 6,33, 6, 6, 6, 6,33, 6, 6, 6, 6, 6, 6,33,33,33,33, 6,33,33, 6, 6,33,},
|
|
/* W */ { 7,33,33,33,33,33, 7,33, 7,33, 7, 7, 7, 7,33, 7, 7, 7, 7, 7, 7,33,33,33,33, 7,33,33, 7, 7,33,},
|
|
/* X */ { 8,33,33, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,33, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,33,33, 8, 8,33,},
|
|
/* Y */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* Z */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* a */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* b */ { 9,33,33,33,33,33,33,23, 9,25,21,33,21,26, 3, 9,21, 9, 9, 9,33,33,23,23,33,33, 3,33, 9,20,33,},
|
|
/* c */ {10,33,33,10,10,10,10,10,10,33,10,10,10,10,27,10,10,10,10,10,10,10,10,10,33,10,33,33,10,10,33,},
|
|
/* d */ {33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,},
|
|
/* e */ {11,33,33,33,33,33,33,24,11,33,33,11,11,11,33,11,33,11,11,11,33,33,33,33,33,11,33,33,11,11,33,},
|
|
/* f */ {12,33,33,33,33,33,33,33,12,33,33,33,33,12,33,12,33,12,12,12,33,33,33,33,33,12,33,33,12,12,33,},
|
|
/* g */ {13,33,33,33,33,33,33,33,13,33,33,13,33,13,33,13,33,13,13,13,33,33,33,33,33,13,33,33,13,13,33,},
|
|
/* h */ {14,33,33,33,33,33,33,33,14,33,33,33,33,33,33,14,33,14,14,14,33,33,33,33,33,33,33,33,14,14,33,},
|
|
/* i */ {15,33,15,15,15,15,15,15,15,15,15,15,15,15,33,15,15,15,15,15,15,15,15,15,15,15,15,33,15,15,33,},
|
|
/* j */ {16,33,33,33,33,33,21,33,33,33,33,33,33,33,33,33,33,16,16,33,33,33,33,33,33,33,33,33,16,16,33,},
|
|
/* k */ {17,33,33,33,33,33,33,23,17,33,17,17,17,17,33,17,33,17,17,17,33,33,33,23,33,17,33,33,17,17,33,},
|
|
};
|
|
|
|
// @Incomplete: Decrement every state by 1.
|
|
static kbts_u8 kbts_KhmerSyllabicTransition[KBTS_KHMER_SYLLABIC_CLASS_COUNT][KBTS_KHMER_SYLLABIC_STATE_COUNT] = {
|
|
/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
|
|
/* A */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* B */ {15,25,25,25,25,18,25,25,25,25,25,25,25,25,25,25,25,25,25,25, 2,25,25,},
|
|
/* C */ {15,25,25,25,25,18,25,25,25,25,25,25,25,25,25,25,25,25,25,25, 2,25,25,},
|
|
/* D */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* E */ {21,21,25,25,21,25,25, 6,25, 6,25, 6,25, 6,21,21,25,25,25,25,25, 6,25,},
|
|
/* F */ { 4,17, 3, 3, 4,25, 7, 7,19, 9,20,11,13,13,23, 4, 3,25,19,20,25, 4, 3,},
|
|
/* G */ { 4,17, 3, 3, 4,25, 7, 7,19, 9,20,11,13,13,23, 4, 3,25,19,20,25, 4, 3,},
|
|
/* H */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* I */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* J */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* K */ {16,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* L */ {16,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* M */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* N */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* O */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* P */ {15,25,25,25,25,18,25,25,25,25,25,25,25,25,25,25,25,25,25,25, 2,25,25,},
|
|
/* Q */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* R */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* S */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* T */ {25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,},
|
|
/* U */ { 8, 8,25, 8, 8,25,25,25, 8, 8, 8, 8,25,25, 8, 8, 8,25,25,25,25, 8, 8,},
|
|
/* V */ {10,10,25,25,10,25,25,25,25,25,25,10,25,25,10,10,25,25,25,25,25,10,25,},
|
|
/* W */ {12,12,25,25,12,25,25,25,25,25,25,25,25,25,12,12,25,25,25,25,25,12,25,},
|
|
/* X */ {14,14,25,25,14,25,25,14,25,14,25,14,25,25,14,14,25,25,25,25,25,14,25,},
|
|
/* Y */ { 5, 5,25,25,25,25,25,25,25,25,25,25,25,25,16, 5, 5,25,25,25,25,25,16,},
|
|
/* Z */ {22,22,22,22,22,25, 8, 8,10,10,12,12,14,14,22,22,22,25,10,12,25,22,22,},
|
|
/* a */ {18,18,25,25,18,25,25,18,25,18,25,18,25,18,18,18,25,18,25,25,25,18,25,},
|
|
};
|
|
|
|
typedef kbts_u8 kbts_use_syllabic_class;
|
|
enum kbts_use_syllabic_class_enum {
|
|
/* 0 */ KBTS_USE_SYLLABIC_CLASS_OTHER,
|
|
/* 1 */ KBTS_USE_SYLLABIC_CLASS_BASE,
|
|
/* 2 */ KBTS_USE_SYLLABIC_CLASS_BASE_OTHER,
|
|
/* 3 */ KBTS_USE_SYLLABIC_CLASS_HALANT,
|
|
/* 4 */ KBTS_USE_SYLLABIC_CLASS_HALANT_OR_VOWEL_MODIFIER,
|
|
/* 5 */ KBTS_USE_SYLLABIC_CLASS_SAKOT,
|
|
/* 6 */ KBTS_USE_SYLLABIC_CLASS_INVISIBLE_STACKER,
|
|
/* 7 */ KBTS_USE_SYLLABIC_CLASS_CONS_SUB,
|
|
/* 8 */ KBTS_USE_SYLLABIC_CLASS_CONS_MOD_ABOVE,
|
|
/* 9 */ KBTS_USE_SYLLABIC_CLASS_CONS_MOD_BELOW,
|
|
/* 10 */ KBTS_USE_SYLLABIC_CLASS_CONS_MED_PRE,
|
|
/* 11 */ KBTS_USE_SYLLABIC_CLASS_CONS_MED_ABOVE,
|
|
/* 12 */ KBTS_USE_SYLLABIC_CLASS_CONS_MED_BELOW,
|
|
/* 13 */ KBTS_USE_SYLLABIC_CLASS_CONS_MED_POST,
|
|
/* 14 */ KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_ABOVE,
|
|
/* 15 */ KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_BELOW,
|
|
/* 16 */ KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_POST,
|
|
/* 17 */ KBTS_USE_SYLLABIC_CLASS_REORDERING_KILLER,
|
|
/* 18 */ KBTS_USE_SYLLABIC_CLASS_HIEROGLYPH,
|
|
/* 19 */ KBTS_USE_SYLLABIC_CLASS_HIEROGLYPH_SEGMENT_BEGIN,
|
|
/* 20 */ KBTS_USE_SYLLABIC_CLASS_HIEROGLYPH_MOD,
|
|
/* 21 */ KBTS_USE_SYLLABIC_CLASS_HIEROGLYPH_SEGMENT_END,
|
|
/* 22 */ KBTS_USE_SYLLABIC_CLASS_HIEROGLYPH_JOINER,
|
|
/* 23 */ KBTS_USE_SYLLABIC_CLASS_HIEROGLYPH_MIRROR,
|
|
/* 24 */ KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_MOD_ABOVE,
|
|
/* 25 */ KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_MOD_BELOW,
|
|
/* 26 */ KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_MOD_POST,
|
|
/* 27 */ KBTS_USE_SYLLABIC_CLASS_SYMBOL_MOD_ABOVE,
|
|
/* 28 */ KBTS_USE_SYLLABIC_CLASS_SYMBOL_MOD_BELOW,
|
|
/* 29 */ KBTS_USE_SYLLABIC_CLASS_VOWEL_MOD_ABOVE,
|
|
/* 30 */ KBTS_USE_SYLLABIC_CLASS_VOWEL_MOD_BELOW,
|
|
/* 31 */ KBTS_USE_SYLLABIC_CLASS_VOWEL_MOD_POST,
|
|
/* 32 */ KBTS_USE_SYLLABIC_CLASS_VOWEL_MOD_PRE,
|
|
/* 33 */ KBTS_USE_SYLLABIC_CLASS_VOWEL_PRE,
|
|
/* 34 */ KBTS_USE_SYLLABIC_CLASS_VOWEL_ABOVE,
|
|
/* 35 */ KBTS_USE_SYLLABIC_CLASS_VOWEL_BELOW,
|
|
/* 36 */ KBTS_USE_SYLLABIC_CLASS_VOWEL_POST,
|
|
/* 37 */ KBTS_USE_SYLLABIC_CLASS_CONSONANT_WITH_STACKER,
|
|
/* 38 */ KBTS_USE_SYLLABIC_CLASS_REPHA,
|
|
/* 39 */ KBTS_USE_SYLLABIC_CLASS_ZWNJ,
|
|
/* 40 */ KBTS_USE_SYLLABIC_CLASS_HALANT_NUM,
|
|
/* 41 */ KBTS_USE_SYLLABIC_CLASS_BASE_NUM,
|
|
|
|
KBTS_USE_SYLLABIC_CLASS_COUNT,
|
|
};
|
|
|
|
enum
|
|
{
|
|
KBTS_USE_STATE_s0 = 42,
|
|
};
|
|
|
|
// @Incomplete: Decrement every state by 1.
|
|
static kbts_u8 kbts_UseTransition[KBTS_USE_SYLLABIC_CLASS_COUNT][KBTS_USE_STATE_s0] = {
|
|
/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 */
|
|
/* A */ {24,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,},
|
|
/* B */ {15,44,44,44,44,44,44,44,44,15,15,44,44,15,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,37,44,37,44,44,44,44,44,44,44,44,44,44,},
|
|
/* C */ {24,44,44,44,44,44,44,44,44,15,15,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,},
|
|
/* D */ {14,44,44,44,44,44,44,44,44,44,14,44,44,44,14,14,31,31,31,31,44,44,44,14,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,14,},
|
|
/* E */ {14,44,44,44,44, 5, 5, 5, 5,44,14,44,44, 5,14,14,31,31,31,31,44,44,44,14,44,44,44,44,44,44, 5, 5,44,44,44,44,44,44,44,44,44,14,},
|
|
/* F */ {14,30,30,30,30,30,30,30,30,44,14,44,44,30,14,14,32,32,32,32,44,44,44,14,44,44,44,44,44,44,30,30,44,44,44,44,30,44,44,44,44,14,},
|
|
/* G */ {14,44,44,44,44,44,44,44,44,44,14,44,44,44,14,14,31,31,31,31,44,44,44,14,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,14,},
|
|
/* H */ {15,44,44,44,44,44,44,44,44,44,15,44,44,44,15,15,44,44,44,44,44,44,44,15,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,15,},
|
|
/* I */ {15,44,44,44,44,44,44,44,44,44,15,44,44,44,15,44,44,44,44,44,44,44,44,15,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,15,},
|
|
/* J */ {16,44,44,44,44,44,44,44,44,44,16,44,44,44,16,16,44,44,44,44,44,44,44,16,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,16,},
|
|
/* K */ {17,44,44,44,44,44,44,44,44,44,17,44,44,44,17,17,44,44,44,44,44,44,44,17,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,17,},
|
|
/* L */ {18,44,44,44,44,44,44,44,44,44,18,44,44,44,18,18,18,44,44,44,44,44,44,18,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,18,},
|
|
/* M */ {19,44,44,44,44,44,44,44,44,44,19,44,44,44,19,19,19,19,44,44,44,44,44,19,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,19,},
|
|
/* N */ {20,44,44,44,44,44,44,44,44,44,20,44,44,44,20,20,20,20,20,44,44,44,44,20,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,20,},
|
|
/* O */ {21,21,21,21,21,21,21,21,21,44,21,44,44,21,21,21,21,21,21,21,21,44,44,21,44,44,44,44,44,44,21,21,44,44,44,44,21,44,44,44,44,21,},
|
|
/* P */ {22,22,22,22,22,22,22,22,22,44,22,44,44,22,22,22,22,22,22,22,22,22,44,22,44,44,44,44,44,44,22,22,44,44,44,44,22,44,44,44,44,22,},
|
|
/* Q */ {23,23,23,23,23,23,23,23,23,44,23,44,44,23,23,23,23,23,23,23,23,23,23,23,44,44,44,44,44,44,23,23,44,44,44,44,23,44,44,44,44,23,},
|
|
/* R */ {25,44,44,44,44,44,44,44,44,44,25,44,44,44,25,25,44,44,44,44,44,44,44,25,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,25,},
|
|
/* S */ {41,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,38,44,41,44,44,44,44,44,41,},
|
|
/* T */ {42,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,34,44,36,44,39,39,39,44,36,},
|
|
/* U */ {44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,33,44,44,39,44,39,33,44,},
|
|
/* V */ {44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,33,44,33,44,44,44,44,44,33,44,},
|
|
/* W */ {44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,34,34,34,44,44,34,34,34,34,44,},
|
|
/* X */ {44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,40,44,44,35,44,},
|
|
/* Y */ {26,26,26,26,26,26,26,26,26,44,26,44,44,26,26,26,26,26,26,26,26,26,26,26,44,26,44,44,44,44,26,26,44,44,44,44,26,44,44,44,44,26,},
|
|
/* Z */ {27,27,27,27,27,27,27,27,27,44,27,44,44,27,27,27,27,27,27,27,27,27,27,27,44,27,27,44,44,44,27,27,44,44,44,44,27,44,44,44,44,27,},
|
|
/* a */ {25,25,25,25,25,25,25,25,25,44,25,44,44,25,25,25,25,25,25,25,25,25,25,25,44,44,44,44,44,44,25,25,44,44,44,44,25,44,44,44,44,25,},
|
|
/* b */ {28,44,44,44,44,44,44,44,44,44,11,44,44,44,44,44,44,44,44,44,44,44,44,28,44,44,44,28,44,44,44,44,44,44,44,44,44,44,44,44,44,28,},
|
|
/* c */ {29,44,44,44,44,44,44,44,44,44,29,44,44,44,44,44,44,44,44,44,44,44,44,29,44,44,44,29,29,44,44,44,44,44,44,44,44,44,44,44,44,29,},
|
|
/* d */ { 2, 2,44,44, 2, 2, 2, 2, 2,44, 2,44,44, 2, 2, 2, 2, 2, 2, 2,44,44,44, 2,44,44,44,44,44,44, 2, 2,44,44,44,44,44,44,44,44,44, 2,},
|
|
/* e */ { 3, 3, 3,44, 3, 3, 3, 3, 3,44, 3,44,44, 3, 3, 3, 3, 3, 3, 3,44,44,44, 3,44,44,44,44,44,44, 3, 3,44,44,44,44,44,44,44,44,44, 3,},
|
|
/* f */ { 4, 4, 4,44, 4, 4, 4, 4, 4,44, 4,44,44, 4, 4, 4, 4, 4, 4, 4,44,44,44, 4,44,44,44,44,44,44, 4, 4,44,44,44,44,44,44,44,44,44, 4,},
|
|
/* g */ { 5,44,44,44, 5, 5, 5, 5, 5,44, 5,44,44, 5, 5, 5, 5, 5, 5, 5,44,44,44, 5,44,44,44,44,44,44, 5, 5,44,44,44,44,44,44,44,44,44, 5,},
|
|
/* h */ { 6,44,44,44,44, 6,44,44,44,44, 6,44,44,44, 6, 6, 6, 6, 6, 6,44,44,44, 6,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44, 6,},
|
|
/* i */ { 7,44,44,44,44, 7, 7,44,44,44, 7,44,44,44, 7, 7, 7, 7, 7, 7,44,44,44, 7,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44, 7,},
|
|
/* j */ { 8,44,44,44,44, 8, 8, 8,44,44, 8,44,44,44, 8, 8, 8, 8, 8, 8,44,44,44, 8,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44, 8,},
|
|
/* k */ { 9,44,44,44,44, 9, 9, 9, 9,44, 9,44,44,44, 9, 9, 9, 9, 9, 9,44,44,44, 9,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44, 9,},
|
|
/* l */ {10,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,},
|
|
/* m */ {11,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,},
|
|
/* n */ {44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,},
|
|
/* o */ {12,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,},
|
|
/* p */ {13,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,},
|
|
};
|
|
|
|
KBTS_EXPORT void kbts_FontCoverageTestBegin(kbts_font_coverage_test *Test, kbts_font *Font)
|
|
{
|
|
Test->Font = Font;
|
|
Test->BaseParentCount = 0;
|
|
Test->BaseCodepoint = 0;
|
|
Test->CurrentBaseError = 0;
|
|
Test->Error = 0;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_FontCoverageTestCodepoint(kbts_font_coverage_test *Test, int Codepoint)
|
|
{
|
|
if(!Test->Error)
|
|
{
|
|
kbts_u32 UCodepoint = (kbts_u32)Codepoint;
|
|
int RecomposeBase = 0;
|
|
|
|
if(!kbts__GetUnicodeCombiningClass(UCodepoint))
|
|
{
|
|
Test->Error |= Test->CurrentBaseError;
|
|
Test->CurrentBaseError = 0;
|
|
Test->BaseCodepoint = UCodepoint;
|
|
|
|
RecomposeBase = 1;
|
|
}
|
|
else
|
|
{
|
|
kbts_u16 Id = (kbts_u16)kbts_CodepointToGlyphId(Test->Font, Codepoint);
|
|
|
|
if(!Id)
|
|
{
|
|
KBTS__FOR(ParentIndex, 0, Test->BaseParentCount)
|
|
{
|
|
kbts_glyph_parent *Parent = &Test->BaseParents[ParentIndex];
|
|
|
|
if(Parent->Codepoint1 == UCodepoint)
|
|
{
|
|
Test->BaseCodepoint = Parent->Codepoint;
|
|
RecomposeBase = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(!RecomposeBase)
|
|
{
|
|
Test->Error = 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
if(RecomposeBase)
|
|
{
|
|
kbts_u32 BaseCodepoint = Test->BaseCodepoint;
|
|
kbts_u16 BaseId = (kbts_u16)kbts_CodepointToGlyphId(Test->Font, (int)Test->BaseCodepoint);
|
|
kbts_un BaseParentCount = 0;
|
|
|
|
kbts_b32 Done = 0;
|
|
while(!Done)
|
|
{
|
|
kbts_u32 ParentInfo = kbts__GetUnicodeParentInfo(BaseCodepoint);
|
|
kbts_s32 *ParentDeltas = kbts__GetParentInfoDeltas(ParentInfo);
|
|
|
|
BaseParentCount = 0;
|
|
|
|
Done = 1;
|
|
|
|
KBTS__FOR(ParentIndex, 0, BaseParentCount)
|
|
{
|
|
kbts_glyph_parent Parent = KBTS__ZERO;
|
|
Parent.Codepoint = BaseCodepoint + (kbts_u32)ParentDeltas[ParentIndex];
|
|
|
|
kbts_u64 Decomposition = kbts__GetUnicodeDecomposition(Parent.Codepoint);
|
|
Parent.Codepoint1 = kbts__GetDecompositionCodepoint(Decomposition, 1);
|
|
|
|
kbts_u16 RecompositionId = (kbts_u16)kbts_CodepointToGlyphId(Test->Font, (int)Parent.Codepoint);
|
|
|
|
if(RecompositionId)
|
|
{
|
|
if(kbts__GetDecompositionSize(Decomposition) == 1)
|
|
{
|
|
BaseCodepoint = Parent.Codepoint;
|
|
BaseId = RecompositionId;
|
|
|
|
Done = 0;
|
|
|
|
break;
|
|
}
|
|
else
|
|
{
|
|
Test->BaseParents[BaseParentCount++] = Parent;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Test->BaseCodepoint = BaseCodepoint;
|
|
Test->BaseParentCount = (kbts_u32)BaseParentCount;
|
|
|
|
if(!BaseId)
|
|
{
|
|
Test->CurrentBaseError = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_FontCoverageTestEnd(kbts_font_coverage_test *Test)
|
|
{
|
|
int Result = Test->CurrentBaseError | Test->Error;
|
|
Test->Error = Result;
|
|
return !Result;
|
|
}
|
|
|
|
typedef struct kbts__enabled_lookup
|
|
{
|
|
kbts_u16 SequentialLookupIndex;
|
|
kbts_u16 Value;
|
|
} kbts__enabled_lookup;
|
|
|
|
struct kbts_glyph_config
|
|
{
|
|
kbts_allocator_function *Allocator;
|
|
void *AllocatorData;
|
|
|
|
kbts_u32 *EnabledLookupBits;
|
|
kbts_u32 *DisabledLookupBits;
|
|
|
|
kbts_glyph_flags EnabledFilterFlags;
|
|
kbts_glyph_flags DisabledFilterFlags;
|
|
|
|
kbts__enabled_lookup *NonBinaryEnabledLookups;
|
|
kbts_u32 NonBinaryEnabledLookupCount;
|
|
};
|
|
|
|
typedef struct kbts__arena_block
|
|
{
|
|
kbts_arena_block_header Header;
|
|
void *BaseAllocation; // For freeing
|
|
|
|
kbts_un Size;
|
|
kbts_un Used;
|
|
|
|
// char Memory[Size]; // if Memory is NULL
|
|
} kbts__arena_block;
|
|
|
|
typedef struct kbts__arena_lifetime
|
|
{
|
|
kbts_arena *Arena;
|
|
kbts_arena_block_header *BlockHeader;
|
|
kbts_un Used;
|
|
} kbts__arena_lifetime;
|
|
|
|
typedef struct kbts__glyph_list
|
|
{
|
|
kbts_glyph *SentinelPrev;
|
|
kbts_glyph *SentinelNext;
|
|
kbts_glyph *OneBeforeFirst;
|
|
kbts_glyph *OnePastLast;
|
|
} kbts__glyph_list;
|
|
|
|
typedef struct kbts__baked_feature
|
|
{
|
|
kbts_u16 *Indices;
|
|
kbts_u32 Count;
|
|
kbts_u32 FeatureTag;
|
|
kbts_u32 FeatureId;
|
|
kbts_u32 SkipFlags;
|
|
kbts_u32 GlyphFilter;
|
|
} kbts__baked_feature;
|
|
|
|
struct kbts__bucketed_glyph
|
|
{
|
|
kbts_glyph *Glyph;
|
|
kbts_u32 SortKey;
|
|
kbts_u16 FeatureValue;
|
|
};
|
|
|
|
typedef struct kbts__bucketed_glyph_block_header
|
|
{
|
|
struct kbts__bucketed_glyph_block_header *Prev;
|
|
struct kbts__bucketed_glyph_block_header *Next;
|
|
} kbts__bucketed_glyph_block_header;
|
|
|
|
typedef struct kbts__bucketed_glyph_block
|
|
{
|
|
kbts__bucketed_glyph_block_header Header;
|
|
kbts_b32 StartOfAllocation;
|
|
kbts_u32 Count;
|
|
kbts__bucketed_glyph Glyphs[KBTS__BUCKETED_GLYPHS_PER_BLOCK];
|
|
} kbts__bucketed_glyph_block;
|
|
|
|
#define KBTS__MAX_VARIATION_AXIS_COUNT 32
|
|
#define KBTS_MAX_SIMULTANEOUS_FEATURES 256
|
|
#define KBTS_MAX_OUTPUT_GLYPHS_PER_INPUT_GLYPH 256
|
|
typedef struct kbts__item_variation_store kbts__item_variation_store;
|
|
struct kbts_shape_scratchpad
|
|
{
|
|
kbts_allocator_function *Allocator;
|
|
void *AllocatorData;
|
|
kbts_b32 SelfAllocated;
|
|
|
|
void *ScratchMemory;
|
|
|
|
kbts_shape_config *Config;
|
|
|
|
kbts_u32 ApproximateInputGlyphCount;
|
|
kbts_u32 ApproximateOutputGlyphCount;
|
|
|
|
kbts_u32 *GlyphLookupSubtableMatrix;
|
|
kbts_u32 *LookupSubtableIndexOffsets;
|
|
kbts_u32 GlyphIdCount;
|
|
kbts_u32 LookupSubtableCount;
|
|
kbts_u32 GposLookupIndexOffset;
|
|
kbts_u32 SequentialLookupCount;
|
|
|
|
kbts_s16 *VariationVectorNormalized;
|
|
|
|
kbts__item_variation_store *GdefItemVariationStore;
|
|
|
|
kbts__bucketed_glyph_block_header *LookupGlyphBuckets;
|
|
kbts__bucketed_glyph_block_header FreeBucketedBlockSentinel;
|
|
|
|
kbts__feature_set LookupFeatures;
|
|
|
|
kbts__glyph_list Cluster;
|
|
kbts_b32 RealCluster;
|
|
kbts_b32 ClusterAtStartOfWord;
|
|
|
|
kbts_glyph *LookupOnePastLastGlyph;
|
|
kbts_u32 LookupOnePastLastGlyphIndex;
|
|
|
|
kbts_u32 NextGlyphUid;
|
|
|
|
kbts_u32 Ip;
|
|
kbts__op_kind OpKind;
|
|
|
|
kbts_direction RunDirection;
|
|
|
|
kbts_u32 SequentialLookupIndexIndex;
|
|
kbts_u32 FeatureStagesRead;
|
|
|
|
kbts_shape_error Error;
|
|
};
|
|
|
|
#define KBTS__INPUT_CODEPOINT_FIRST_BLOCK_MSB 6
|
|
#define KBTS__INPUT_CODEPOINT_ONE_PAST_LAST_BLOCK_MSB 27
|
|
|
|
typedef kbts_u32 kbts__context_font_flags;
|
|
enum kbts__context_font_flags_enum
|
|
{
|
|
KBTS__CONTEXT_FONT_FLAG_NONE = 0,
|
|
KBTS__CONTEXT_FONT_FLAG_VARIATIONS_DIRTY = 1,
|
|
};
|
|
|
|
typedef struct kbts__interned_context_font_info
|
|
{
|
|
kbts_font *Font;
|
|
float *VariationVector;
|
|
kbts_s16 *VariationVectorNormalized;
|
|
kbts_u32 Hash;
|
|
} kbts__interned_context_font_info;
|
|
|
|
typedef struct kbts__context_font_info
|
|
{
|
|
kbts_font *Font;
|
|
float *VariationVector;
|
|
|
|
kbts__interned_context_font_info *Interned;
|
|
kbts__context_font_flags Flags;
|
|
} kbts__context_font_info;
|
|
|
|
typedef struct kbts__existing_shape_config
|
|
{
|
|
kbts_shape_config *Config;
|
|
kbts_u32 ConfigWriteCursor;
|
|
kbts_u32 CacheBinIndex;
|
|
|
|
kbts_u32 FontHash;
|
|
kbts_u32 LastUsedTimestamp;
|
|
} kbts__existing_shape_config;
|
|
|
|
typedef kbts_u32 kbts__context_flags;
|
|
enum kbts__context_flags_enum
|
|
{
|
|
KBTS__CONTEXT_FLAG_NONE,
|
|
|
|
KBTS__CONTEXT_FLAG_MANUAL_SEGMENTATION = 1,
|
|
KBTS__CONTEXT_FLAG_START_OF_MANUAL_RUN = 2,
|
|
KBTS__CONTEXT_FLAG_USE_MANUAL_BREAK_INFO = 4,
|
|
KBTS__CONTEXT_FLAG_FEATURE_OVERRIDES_DIRTY = 8,
|
|
KBTS__CONTEXT_FLAG_GLOBAL_VARIATIONS_DIRTY = 0x10,
|
|
};
|
|
|
|
typedef struct kbts__context_font
|
|
{
|
|
kbts__arena_lifetime Lifetime;
|
|
kbts__context_font_info Info;
|
|
kbts_u16 Generation;
|
|
} kbts__context_font;
|
|
|
|
typedef struct kbts__existing_glyph_config
|
|
{
|
|
kbts_glyph_config *GlyphConfig;
|
|
|
|
kbts_feature_override *FeatureOverrides;
|
|
int FeatureOverrideCount;
|
|
|
|
kbts_u32 ConfigSize;
|
|
kbts_u32 ConfigWriteCursor;
|
|
kbts_u32 Hash;
|
|
} kbts__existing_glyph_config;
|
|
|
|
typedef struct kbts__existing_shape_config_block_header
|
|
{
|
|
struct kbts__existing_shape_config_block_header *Prev;
|
|
struct kbts__existing_shape_config_block_header *Next;
|
|
} kbts__existing_shape_config_block_header;
|
|
|
|
#define KBTS__EXISTING_SHAPE_CONFIGS_PER_BLOCK 32
|
|
typedef struct kbts__existing_shape_config_block
|
|
{
|
|
kbts__existing_shape_config_block_header Header;
|
|
|
|
kbts_u32 OccupiedBits;
|
|
kbts__existing_shape_config Items[KBTS__EXISTING_SHAPE_CONFIGS_PER_BLOCK];
|
|
} kbts__existing_shape_config_block;
|
|
|
|
typedef struct kbts__huge_shape_config
|
|
{
|
|
kbts__existing_shape_config_block *Block;
|
|
kbts_u32 IndexWithinBlock;
|
|
} kbts__huge_shape_config;
|
|
|
|
typedef struct kbts__existing_glyph_config_block_header
|
|
{
|
|
struct kbts__existing_glyph_config_block_header *Prev;
|
|
struct kbts__existing_glyph_config_block_header *Next;
|
|
} kbts__existing_glyph_config_block_header;
|
|
|
|
#define KBTS__EXISTING_GLYPH_CONFIGS_PER_BLOCK 32
|
|
typedef struct kbts__existing_glyph_config_block
|
|
{
|
|
kbts__existing_glyph_config_block_header Header;
|
|
|
|
kbts_u32 OccupiedBits;
|
|
kbts__existing_glyph_config Items[KBTS__EXISTING_GLYPH_CONFIGS_PER_BLOCK];
|
|
} kbts__existing_glyph_config_block;
|
|
|
|
struct kbts__shape_codepoint
|
|
{
|
|
kbts__interned_context_font_info *FontInfo; // Only set when (BreakFlags & KBTS_BREAK_FLAG_GRAPHEME) != 0.
|
|
|
|
kbts_feature_override *FeatureOverrides;
|
|
int FeatureOverrideCount;
|
|
|
|
int Codepoint;
|
|
int UserId;
|
|
|
|
// @Memory: Pack these into u8s.
|
|
kbts_break_flags BreakFlags;
|
|
kbts_script Script; // Only set when (BreakFlags & KBTS_BREAK_FLAG_SCRIPT) != 0.
|
|
kbts_direction Direction; // Only set when (BreakFlags & KBTS_BREAK_FLAG_DIRECTION) != 0.
|
|
kbts_direction ParagraphDirection; // Only set when (BreakFlags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION) != 0.
|
|
};
|
|
|
|
typedef struct kbts__context_font_block_header
|
|
{
|
|
struct kbts__context_font_block_header *Prev;
|
|
struct kbts__context_font_block_header *Next;
|
|
|
|
kbts_b32 Visited;
|
|
} kbts__context_font_block_header;
|
|
|
|
#ifndef KBTS_CONTEXT_FONTS_PER_BLOCK
|
|
#define KBTS_CONTEXT_FONTS_PER_BLOCK 32
|
|
#endif
|
|
|
|
// Hopefully, this is enough of a safeguard against weird user #defines..?
|
|
#define KBTS__CONTEXT_FONTS_PER_BLOCK (KBTS_CONTEXT_FONTS_PER_BLOCK)
|
|
|
|
typedef struct kbts__context_font_block
|
|
{
|
|
kbts__context_font_block_header Header;
|
|
|
|
kbts__context_font Fonts[KBTS__CONTEXT_FONTS_PER_BLOCK];
|
|
} kbts__context_font_block;
|
|
|
|
enum {KBTS__SHAPE_CONFIG_CACHE_BIN_COUNT = 3};
|
|
|
|
static const kbts_u32 kbts__ShapeConfigCacheBinSizes[KBTS__SHAPE_CONFIG_CACHE_BIN_COUNT + 1] = {
|
|
8 * 1024,
|
|
32 * 1024,
|
|
128 * 1024,
|
|
512 * 1024,
|
|
};
|
|
|
|
typedef struct kbts__fifo_bin
|
|
{
|
|
char *Base;
|
|
kbts_u32 WriteCursor;
|
|
} kbts__fifo_bin;
|
|
|
|
enum {
|
|
KBTS__GLYPH_CONFIG_CACHE_BIN_SIZE = 4096,
|
|
KBTS__HUGE_SHAPE_CONFIG_CAPACITY = 6,
|
|
};
|
|
|
|
struct kbts_shape_context
|
|
{
|
|
kbts_arena PermanentArena;
|
|
kbts_arena FontArena;
|
|
kbts_arena ConfigArena;
|
|
kbts_arena ScratchArena;
|
|
|
|
kbts_allocator_function *SelfAllocator;
|
|
void *SelfAllocatorData;
|
|
|
|
kbts__interned_context_font_info DummyFontInfo;
|
|
|
|
kbts__shape_codepoint *LastGraphemeBreak;
|
|
kbts_u32 LastGraphemeBreakIndex;
|
|
kbts_u32 LastLineBreakIndex;
|
|
kbts_u32 BreakStartIndex;
|
|
|
|
kbts_u32 FontCount;
|
|
kbts__context_font_block_header FontBlockSentinel;
|
|
|
|
kbts_un InputCodepointCount;
|
|
int NextUserId;
|
|
kbts__shape_codepoint *InputBlocks[KBTS__INPUT_CODEPOINT_ONE_PAST_LAST_BLOCK_MSB - KBTS__INPUT_CODEPOINT_FIRST_BLOCK_MSB];
|
|
|
|
kbts_glyph_storage GlyphStorage;
|
|
|
|
kbts_shape_context_flags PublicFlags; // Flags that can be set by the user at creation time.
|
|
kbts__context_flags Flags;
|
|
kbts_direction ManualRunDirection;
|
|
kbts_script ManualRunScript;
|
|
|
|
kbts_feature_override *CurrentFeatureOverrides;
|
|
kbts_variation *CurrentGlobalVariations;
|
|
kbts_u32 CurrentFeatureOverrideCount;
|
|
kbts_u32 CurrentGlobalVariationCount;
|
|
|
|
kbts_direction ParagraphDirection;
|
|
kbts_language Language;
|
|
|
|
kbts__interned_context_font_info *RunFontInfo;
|
|
kbts_script RunScript;
|
|
// This may be different from ParagraphDirection if ParagraphDirection == KBTS_DIRECTION_DONT_KNOW.
|
|
kbts_direction RunParagraphDirection;
|
|
kbts_direction RunDirection;
|
|
kbts_shape_codepoint_iterator RunCodepointIterator;
|
|
kbts_b32 DoneShapingRuns;
|
|
|
|
kbts_u32 FindOrCreateShapeConfigTimestamp;
|
|
kbts_u32 FindOrCreateGlyphConfigTimestamp;
|
|
kbts__existing_shape_config_block_header ExistingShapeConfigBlockSentinel;
|
|
kbts__existing_glyph_config_block_header ExistingGlyphConfigBlockSentinel;
|
|
|
|
kbts_u32 HugeShapeConfigCount;
|
|
kbts__huge_shape_config HugeShapeConfigs[KBTS__HUGE_SHAPE_CONFIG_CAPACITY];
|
|
|
|
kbts__fifo_bin ShapeConfigCacheBins[KBTS__SHAPE_CONFIG_CACHE_BIN_COUNT];
|
|
kbts__fifo_bin GlyphConfigCacheBin;
|
|
|
|
kbts_u32 ScratchFeatureOverrideCount;
|
|
kbts_feature_override ScratchFeatureOverrides[KBTS_MAX_SIMULTANEOUS_FEATURES];
|
|
|
|
kbts_u32 ScratchGlobalVariationCount;
|
|
kbts_variation ScratchGlobalVariations[KBTS__MAX_VARIATION_AXIS_COUNT];
|
|
|
|
kbts_break_state BreakState;
|
|
|
|
kbts_shape_error Error;
|
|
};
|
|
|
|
KBTS_INLINE kbts_b32 kbts__ExistingShapeConfigBlockIsValid(kbts_shape_context *Context, kbts__existing_shape_config_block *Block)
|
|
{
|
|
kbts_b32 Result = &Block->Header != &Context->ExistingShapeConfigBlockSentinel;
|
|
return Result;
|
|
}
|
|
KBTS_INLINE kbts_b32 kbts__ExistingGlyphConfigBlockIsValid(kbts_shape_context *Context, kbts__existing_glyph_config_block *Block)
|
|
{
|
|
kbts_b32 Result = &Block->Header != &Context->ExistingGlyphConfigBlockSentinel;
|
|
return Result;
|
|
}
|
|
|
|
typedef struct kbts__indic_script_properties
|
|
{
|
|
kbts_u32 ViramaCodepoint;
|
|
kbts_u8 BlwfPostOnly;
|
|
kbts__reph_position RephPosition;
|
|
kbts__reph_encoding RephEncoding;
|
|
kbts__syllabic_position RightSideMatraPosition;
|
|
kbts__syllabic_position AboveBaseMatraPosition;
|
|
kbts__syllabic_position BelowBaseMatraPosition;
|
|
} kbts__indic_script_properties;
|
|
|
|
typedef struct kbts__sequential_lookup
|
|
{
|
|
kbts_u32 GlyphFilter;
|
|
kbts_u32 SkipFlags;
|
|
kbts_u16 LookupIndex;
|
|
} kbts__sequential_lookup;
|
|
|
|
struct kbts_shape_config
|
|
{
|
|
kbts_allocator_function *Allocator;
|
|
void *AllocatorData;
|
|
|
|
kbts_font *Font;
|
|
kbts_script Script;
|
|
kbts_language Language;
|
|
kbts__langsys *Langsys[KBTS_SHAPING_TABLE_COUNT];
|
|
kbts__op_list OpList;
|
|
|
|
kbts__feature_set Features;
|
|
|
|
kbts_shaper Shaper;
|
|
kbts_shaper_properties *ShaperProperties;
|
|
|
|
kbts_uid Uid;
|
|
kbts_u32 SizeNotCountingAlignment;
|
|
|
|
kbts__indic_script_properties IndicScriptProperties;
|
|
kbts__feature *Blwf;
|
|
kbts__feature *Pref;
|
|
kbts__feature *Pstf;
|
|
kbts__feature *Locl;
|
|
kbts__feature *Rphf;
|
|
kbts__feature *Half;
|
|
kbts__feature *Vatu;
|
|
|
|
kbts_u32 GlyphCount;
|
|
kbts_u32 LookupCount;
|
|
kbts_u32 OffsetToFeatureStageFirstLookupIndices; // u16 [OpList.FeatureStageCount + 1]
|
|
kbts_u32 OffsetToSequentialLookups; // sequential_lookups[LookupCount]
|
|
kbts_u32 OffsetToIdSequentialLookupMatrix; // u32[]
|
|
|
|
// Indic
|
|
kbts_glyph Virama;
|
|
|
|
kbts_glyph DottedCircle;
|
|
kbts_glyph Whitespace;
|
|
|
|
// Thai
|
|
kbts_glyph Nikhahit;
|
|
kbts_glyph SaraAa;
|
|
};
|
|
KBTS_INLINE kbts_u16 *kbts__shape_config_FeatureStageFirstLookupIndices(kbts_shape_config *Config)
|
|
{
|
|
kbts_u16 *Result = KBTS__POINTER_OFFSET(kbts_u16, Config, Config->OffsetToFeatureStageFirstLookupIndices);
|
|
return Result;
|
|
}
|
|
KBTS_INLINE kbts__sequential_lookup *kbts__shape_config_SequentialLookups(kbts_shape_config *Config)
|
|
{
|
|
kbts__sequential_lookup *Result = KBTS__POINTER_OFFSET(kbts__sequential_lookup, Config, Config->OffsetToSequentialLookups);
|
|
return Result;
|
|
}
|
|
KBTS_INLINE kbts_u32 *kbts__shape_config_IdSequentialLookupMatrix(kbts_shape_config *Config)
|
|
{
|
|
kbts_u32 *Result = KBTS__POINTER_OFFSET(kbts_u32, Config, Config->OffsetToIdSequentialLookupMatrix);
|
|
return Result;
|
|
}
|
|
|
|
static const kbts_u8 kbts__CmapFormatPrecedence[14] = {1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 3, 0, 4, 5};
|
|
|
|
static int kbts__ShaperClearsMarkAdvancesInPostGposFixup(kbts_u32 Shaper)
|
|
{
|
|
int Result = (1 << Shaper) & ((1 << KBTS_SHAPER_ARABIC) | (1 << KBTS_SHAPER_DEFAULT) | (1 << KBTS_SHAPER_HEBREW));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__indic_script_properties kbts__IndicScriptProperties(kbts_u32 Script)
|
|
{
|
|
kbts__indic_script_properties Result = KBTS__ZERO;
|
|
|
|
switch(Script)
|
|
{
|
|
case KBTS_SCRIPT_DEVANAGARI:
|
|
{
|
|
Result.ViramaCodepoint = 0x94D;
|
|
Result.RephPosition = KBTS__REPH_POSITION_BEFORE_POST;
|
|
Result.RightSideMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_SUBJOINED;
|
|
Result.AboveBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_SUBJOINED;
|
|
Result.BelowBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_SUBJOINED;
|
|
}
|
|
break;
|
|
|
|
case KBTS_SCRIPT_BENGALI:
|
|
{
|
|
Result.ViramaCodepoint = 0x9CD;
|
|
Result.RephPosition = KBTS__REPH_POSITION_AFTER_SUBJOINED;
|
|
Result.RightSideMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
Result.BelowBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_SUBJOINED;
|
|
}
|
|
break;
|
|
|
|
case KBTS_SCRIPT_GUJARATI:
|
|
{
|
|
Result.ViramaCodepoint = 0xACD;
|
|
Result.RephPosition = KBTS__REPH_POSITION_BEFORE_POST;
|
|
Result.RightSideMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
Result.AboveBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_SUBJOINED;
|
|
Result.BelowBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
}
|
|
break;
|
|
|
|
case KBTS_SCRIPT_GURMUKHI:
|
|
{
|
|
Result.ViramaCodepoint = 0xA4D;
|
|
Result.RephPosition = KBTS__REPH_POSITION_BEFORE_SUBJOINED;
|
|
Result.RightSideMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
Result.AboveBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
Result.BelowBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
}
|
|
break;
|
|
|
|
case KBTS_SCRIPT_KANNADA:
|
|
{
|
|
Result.ViramaCodepoint = 0xCCD;
|
|
Result.BlwfPostOnly = 1;
|
|
Result.AboveBaseMatraPosition = KBTS__SYLLABIC_POSITION_BEFORE_SUBJOINED;
|
|
Result.BelowBaseMatraPosition = KBTS__SYLLABIC_POSITION_BEFORE_SUBJOINED;
|
|
}
|
|
break;
|
|
|
|
case KBTS_SCRIPT_MALAYALAM:
|
|
{
|
|
Result.ViramaCodepoint = 0xD4D;
|
|
Result.RephPosition = KBTS__REPH_POSITION_AFTER_MAIN;
|
|
Result.RephEncoding = KBTS__REPH_ENCODING_LOGICAL_REPHA;
|
|
Result.RightSideMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
Result.BelowBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
}
|
|
break;
|
|
|
|
case KBTS_SCRIPT_ODIA:
|
|
{
|
|
Result.ViramaCodepoint = 0xB4D;
|
|
Result.RephPosition = KBTS__REPH_POSITION_AFTER_MAIN;
|
|
Result.RightSideMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
Result.AboveBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_MAIN;
|
|
Result.BelowBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_SUBJOINED;
|
|
}
|
|
break;
|
|
|
|
case KBTS_SCRIPT_TAMIL:
|
|
{
|
|
Result.ViramaCodepoint = 0xBCD;
|
|
Result.RightSideMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
Result.AboveBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_SUBJOINED;
|
|
Result.BelowBaseMatraPosition = KBTS__SYLLABIC_POSITION_AFTER_POST;
|
|
}
|
|
break;
|
|
|
|
case KBTS_SCRIPT_TELUGU:
|
|
{
|
|
Result.ViramaCodepoint = 0xC4D;
|
|
Result.RephEncoding = KBTS__REPH_ENCODING_EXPLICIT;
|
|
Result.BlwfPostOnly = 1;
|
|
Result.AboveBaseMatraPosition = KBTS__SYLLABIC_POSITION_BEFORE_SUBJOINED;
|
|
Result.BelowBaseMatraPosition = KBTS__SYLLABIC_POSITION_BEFORE_SUBJOINED;
|
|
}
|
|
break;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE kbts_u32 kbts__ReadU32Unaligned_(kbts_u32 *Data)
|
|
{
|
|
kbts_u32 Result;
|
|
KBTS_MEMCPY(&Result, (void *)Data, sizeof(kbts_u32));
|
|
return Result;
|
|
}
|
|
KBTS_INLINE kbts_u16 kbts__ReadU16Unaligned_(const kbts_u16 *Data)
|
|
{
|
|
kbts_u16 Result;
|
|
KBTS_MEMCPY(&Result, (void *)Data, sizeof(kbts_u16));
|
|
return Result;
|
|
}
|
|
KBTS_INLINE kbts_s16 kbts__ReadS16Unaligned_(kbts_s16 *Data)
|
|
{
|
|
kbts_s16 Result;
|
|
KBTS_MEMCPY(&Result, (void *)Data, sizeof(kbts_s16));
|
|
return Result;
|
|
}
|
|
KBTS_INLINE void kbts__WriteU32Unaligned_(kbts_u32 *Dest, kbts_u32 Value)
|
|
{
|
|
KBTS_MEMCPY((void *)Dest, &Value, sizeof(kbts_u32));
|
|
}
|
|
KBTS_INLINE void kbts__WriteU16Unaligned_(kbts_u16 *Dest, kbts_u16 Value)
|
|
{
|
|
KBTS_MEMCPY((void *)Dest, &Value, sizeof(kbts_u16));
|
|
}
|
|
|
|
#ifndef kbts__ReadU16Unaligned
|
|
#define kbts__ReadU16Unaligned(Pointer) kbts__ReadU16Unaligned_(Pointer)
|
|
#endif
|
|
#ifndef kbts__ReadU32Unaligned
|
|
#define kbts__ReadU32Unaligned(Pointer) kbts__ReadU32Unaligned_(Pointer)
|
|
#endif
|
|
#ifndef kbts__ReadS16Unaligned
|
|
#define kbts__ReadS16Unaligned(Pointer) kbts__ReadS16Unaligned_(Pointer)
|
|
#endif
|
|
#ifndef kbts__WriteU16Unaligned
|
|
#define kbts__WriteU16Unaligned(Pointer, Value) kbts__WriteU16Unaligned_(Pointer, Value)
|
|
#endif
|
|
#ifndef kbts__OverwriteU16Unaligned
|
|
#define kbts__OverwriteU16Unaligned(Pointer, Value) kbts__WriteU16Unaligned_(Pointer, Value)
|
|
#endif
|
|
#ifndef kbts__WriteU32Unaligned
|
|
#define kbts__WriteU32Unaligned(Pointer, Value) kbts__WriteU32Unaligned_(Pointer, Value)
|
|
#endif
|
|
#ifndef kbts__MarkOkToRead
|
|
#define kbts__MarkOkToRead(Pointer, Size)
|
|
#endif
|
|
|
|
KBTS_INLINE kbts_u32 kbts__ReadU32UnalignedEndOfBuffer(void *Data, kbts_un Left)
|
|
{
|
|
kbts_un Overhang = 4 - Left;
|
|
kbts_u32 Result = kbts__ReadU32Unaligned((kbts_u32 *)((char *)Data - Overhang));
|
|
// @Endianness
|
|
Result >>= Overhang * 8;
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__ByteSwapArray16Unchecked(kbts_u16 *Array, kbts_un Count)
|
|
{
|
|
KBTS__FOR(It, 0, Count)
|
|
{
|
|
kbts_u16 X = kbts__ReadU16Unaligned(&Array[It]);
|
|
kbts__WriteU16Unaligned(&Array[It], kbts__ByteSwap16(X));
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapArray32Unchecked(kbts_u32 *Array, kbts_un Count)
|
|
{
|
|
KBTS__FOR(WordIndex, 0, Count)
|
|
{
|
|
kbts_u32 Word = kbts__ReadU32Unaligned(&Array[WordIndex]);
|
|
Word = kbts__ByteSwap32(Word);
|
|
kbts__WriteU32Unaligned(&Array[WordIndex], Word);
|
|
}
|
|
}
|
|
|
|
KBTS_INLINE kbts_u16 kbts__ReadU16Be(kbts_u16 *Pointer)
|
|
{
|
|
// We use ReadU16Unaligned_ instead of the wrapper macro because validation only happens once we
|
|
// start byteswapping.
|
|
kbts_u16 Result = kbts__ByteSwap16(kbts__ReadU16Unaligned_(Pointer));
|
|
return Result;
|
|
}
|
|
|
|
static kbts_u16 kbts__ByteSwap16InPlaceUnchecked(kbts_u16 *X)
|
|
{
|
|
kbts_u16 Result = kbts__ReadU16Unaligned(X);
|
|
Result = kbts__ByteSwap16(Result);
|
|
kbts__WriteU16Unaligned(X, Result);
|
|
return Result;
|
|
}
|
|
|
|
static kbts_u32 kbts__ByteSwap32InPlaceUnchecked(kbts_u32 *X)
|
|
{
|
|
kbts_u32 Result = kbts__ReadU32Unaligned(X);
|
|
Result = kbts__ByteSwap32(Result);
|
|
kbts__WriteU32Unaligned(X, Result);
|
|
return Result;
|
|
}
|
|
|
|
static kbts_u64 kbts__ContainsFeature(kbts__feature_set *Set, kbts__feature_id Id)
|
|
{
|
|
kbts_un WordIndex = Id / 64;
|
|
kbts_un BitIndex = Id % 64;
|
|
|
|
kbts_u64 Result = Set->Flags[WordIndex] & (1ull << BitIndex);
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__AddFeature(kbts__feature_set *Set, kbts__feature_id Id)
|
|
{
|
|
kbts_un WordIndex = Id / 64;
|
|
kbts_un BitIndex = Id % 64;
|
|
|
|
Set->Flags[WordIndex] |= 1ull << BitIndex;
|
|
}
|
|
|
|
//
|
|
// TTF struct definitions.
|
|
//
|
|
|
|
enum
|
|
{
|
|
KBTS__GLYPH_CLASS_BASE = 1,
|
|
KBTS__GLYPH_CLASS_LIGATURE = 2,
|
|
KBTS__GLYPH_CLASS_MARK = 3,
|
|
KBTS__GLYPH_CLASS_COMPONENT = 4,
|
|
};
|
|
|
|
enum
|
|
{
|
|
KBTS__LOOKUP_FLAG_RIGHT_TO_LEFT = 1 << 0,
|
|
KBTS__LOOKUP_FLAG_IGNORE_BASE_GLYPHS = 1 << 1,
|
|
KBTS__LOOKUP_FLAG_IGNORE_LIGATURES = 1 << 2,
|
|
KBTS__LOOKUP_FLAG_IGNORE_MARKS = 1 << 3,
|
|
KBTS__LOOKUP_FLAG_USE_MARK_FILTERING_SET = 1 << 4,
|
|
|
|
KBTS__LOOKUP_FLAG_MARK_ATTACHMENT_CLASS_FILTER = 0xFF00,
|
|
};
|
|
|
|
enum
|
|
{
|
|
KBTS__OS2_WIDTH_ULTRA_CONDENSED = 1,
|
|
KBTS__OS2_WIDTH_EXTRA_CONDENSED = 2,
|
|
KBTS__OS2_WIDTH_CONDENSED = 3,
|
|
KBTS__OS2_WIDTH_SEMI_CONDENSED = 4,
|
|
KBTS__OS2_WIDTH_MEDIUM = 5,
|
|
KBTS__OS2_WIDTH_SEMI_EXPANDED = 6,
|
|
KBTS__OS2_WIDTH_EXPANDED = 7,
|
|
KBTS__OS2_WIDTH_EXTRA_EXPANDED = 8,
|
|
KBTS__OS2_WIDTH_ULTRA_EXPANDED = 9,
|
|
};
|
|
|
|
enum
|
|
{
|
|
KBTS__VALUE_FORMAT_X_PLACEMENT = 1 << 0,
|
|
KBTS__VALUE_FORMAT_Y_PLACEMENT = 1 << 1,
|
|
KBTS__VALUE_FORMAT_X_ADVANCE = 1 << 2,
|
|
KBTS__VALUE_FORMAT_Y_ADVANCE = 1 << 3,
|
|
KBTS__VALUE_FORMAT_X_PLACEMENT_DEVICE = 1 << 4,
|
|
KBTS__VALUE_FORMAT_Y_PLACEMENT_DEVICE = 1 << 5,
|
|
KBTS__VALUE_FORMAT_X_ADVANCE_DEVICE = 1 << 6,
|
|
KBTS__VALUE_FORMAT_Y_ADVANCE_DEVICE = 1 << 7,
|
|
};
|
|
|
|
enum
|
|
{
|
|
KBTS__OS2_SELECTION_FLAG_NONE,
|
|
|
|
KBTS__OS2_SELECTION_FLAG_ITALIC = (1 << 0),
|
|
KBTS__OS2_SELECTION_FLAG_UNDERSCORE = (1 << 1),
|
|
KBTS__OS2_SELECTION_FLAG_NEGATIVE = (1 << 2),
|
|
KBTS__OS2_SELECTION_FLAG_OUTLINED = (1 << 3),
|
|
KBTS__OS2_SELECTION_FLAG_STRIKEOUT = (1 << 4),
|
|
KBTS__OS2_SELECTION_FLAG_BOLD = (1 << 5),
|
|
KBTS__OS2_SELECTION_FLAG_REGULAR = (1 << 6),
|
|
KBTS__OS2_SELECTION_FLAG_USE_TYPO_METRICS = (1 << 7),
|
|
KBTS__OS2_SELECTION_FLAG_WWS = (1 << 8),
|
|
KBTS__OS2_SELECTION_FLAG_OBLIQUE = (1 << 9),
|
|
};
|
|
|
|
#pragma pack(push, 1)
|
|
|
|
typedef struct kbts__script_record
|
|
{
|
|
kbts_u32 Tag;
|
|
kbts_u16 Offset;
|
|
} kbts__script_record;
|
|
|
|
typedef struct kbts__script_list
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts__script_record Records[Count];
|
|
} kbts__script_list;
|
|
|
|
typedef struct kbts__ot_script
|
|
{
|
|
kbts_u16 DefaultLangsysOffset;
|
|
kbts_u16 Count;
|
|
// kbts__langsys_record Records[Count];
|
|
} kbts__ot_script;
|
|
|
|
typedef struct kbts__langsys_record
|
|
{
|
|
kbts_u32 Tag;
|
|
kbts_u16 Offset;
|
|
} kbts__langsys_record;
|
|
|
|
struct kbts__langsys
|
|
{
|
|
kbts_u16 LookupOrderOffset; // reserved
|
|
kbts_u16 RequiredFeatureIndex;
|
|
kbts_u16 FeatureIndexCount;
|
|
// kbts_u16 FeatureIndices[FeatureIndexCount];
|
|
};
|
|
|
|
typedef struct kbts__feature_list
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts__feature_record Records[Count];
|
|
} kbts__feature_list;
|
|
|
|
typedef struct kbts__feature_record
|
|
{
|
|
kbts_u32 Tag;
|
|
kbts_u16 Offset;
|
|
} kbts__feature_record;
|
|
|
|
struct kbts__feature
|
|
{
|
|
kbts_u16 FeatureParamsOffset;
|
|
kbts_u16 LookupIndexCount;
|
|
// kbts_u16 LookupIndices[LookupIndexCount];
|
|
};
|
|
|
|
typedef struct kbts__lookup_list
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts_u16 Offsets[Count];
|
|
} kbts__lookup_list;
|
|
|
|
// Lookups are used both in GSUB and GPOS.
|
|
// Type means either GSUB Lookup Type, or GPOS Lookup Type, depending on the table we are parsing.
|
|
typedef struct kbts__lookup
|
|
{
|
|
kbts_u16 Type;
|
|
kbts_u16 Flag;
|
|
kbts_u16 SubtableCount;
|
|
// kbts_u16 SubtableOffsets[SubtableCount];
|
|
// If USE_MARK_FILTERING_SET:
|
|
// kbts_u16 MarkFilteringSet;
|
|
} kbts__lookup;
|
|
|
|
typedef struct kbts__coverage
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 Count;
|
|
// If Format == 1:
|
|
// kbts_u16 GlyphArray[Count];
|
|
// If Format == 2:
|
|
// kbts__range_record Ranges[Count];
|
|
} kbts__coverage;
|
|
|
|
typedef struct kbts__range_record
|
|
{
|
|
kbts_u16 StartGlyphId;
|
|
kbts_u16 EndGlyphId;
|
|
kbts_u16 StartCoverageIndex;
|
|
} kbts__range_record;
|
|
|
|
typedef struct kbts__class_definition_1
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 StartGlyphId;
|
|
kbts_u16 GlyphCount;
|
|
// kbts_u16 ClassValues[GlyphCount];
|
|
} kbts__class_definition_1;
|
|
|
|
typedef struct kbts__class_definition_2
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 Count;
|
|
// kbts__class_range_record Ranges[Count];
|
|
} kbts__class_definition_2;
|
|
|
|
typedef struct kbts__class_range_record
|
|
{
|
|
kbts_u16 StartGlyphId;
|
|
kbts_u16 EndGlyphId;
|
|
kbts_u16 Class;
|
|
} kbts__class_range_record;
|
|
|
|
typedef struct kbts__sequence_lookup_record
|
|
{
|
|
kbts_u16 SequenceIndex;
|
|
kbts_u16 LookupListIndex;
|
|
} kbts__sequence_lookup_record;
|
|
|
|
typedef struct kbts__sequence_rule
|
|
{
|
|
kbts_u16 GlyphCount;
|
|
kbts_u16 SequenceLookupCount;
|
|
// kbts_u16 InputSequence[GlyphCount - 1];
|
|
// kbts__sequence_lookup_record SequenceLookupRecords[SequenceLookupCount];
|
|
} kbts__sequence_rule;
|
|
|
|
typedef struct kbts__sequence_rule_set
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts_u16 Offsets[Count];
|
|
} kbts__sequence_rule_set;
|
|
|
|
typedef struct kbts__sequence_context_1
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 SeqRuleSetCount;
|
|
// kbts_u16 SeqRuleSetOffsets[];
|
|
} kbts__sequence_context_1;
|
|
|
|
typedef struct kbts__sequence_context_2
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 ClassDefOffset;
|
|
kbts_u16 ClassSequenceRuleSetCount;
|
|
// kbts_u16 ClassSequenceRuleSetOffsets[ClassSequenceRuleSetCount]; May be NULL!
|
|
} kbts__sequence_context_2;
|
|
|
|
typedef struct kbts__class_sequence_rule_set
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts_u16 ClassSequenceRuleOffsets[Count];
|
|
} kbts__class_sequence_rule_set;
|
|
|
|
typedef struct kbts__class_sequence_rule
|
|
{
|
|
kbts_u16 GlyphCount;
|
|
kbts_u16 SequenceLookupCount;
|
|
// kbts_u16 InputSequence[GlyphCount-1];
|
|
// kbts__sequence_lookup_record SequenceLookupRecords[SequenceLookupCount];
|
|
} kbts__class_sequence_rule;
|
|
|
|
typedef struct kbts__sequence_context_3
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 GlyphCount;
|
|
kbts_u16 SequenceLookupCount;
|
|
// kbts_u16 CoverageOffsets[GlyphCount];
|
|
// kbts__sequence_lookup_record SequenceLookupRecords[SequenceLookupCount];
|
|
} kbts__sequence_context_3;
|
|
|
|
typedef struct kbts__chained_sequence_context_1
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 ChainedSequenceRuleSetCount;
|
|
// kbts_u16 ChainedSequenceRuleSetOffsets[ChainedSequenceRuleSetCount];
|
|
} kbts__chained_sequence_context_1;
|
|
|
|
typedef struct kbts__chained_sequence_rule_set
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts_u16 Offsets[Count];
|
|
} kbts__chained_sequence_rule_set;
|
|
|
|
typedef struct kbts__chained_sequence_rule
|
|
{
|
|
kbts_u16 BacktrackGlyphCount;
|
|
// kbts_u16 BacktrackSequence[BacktrackCount];
|
|
// kbts_u16 InputGlyphCount;
|
|
// kbts_u16 InputSequence[InputGlyphCount - 1];
|
|
// kbts_u16 LookaheadGlyphCount;
|
|
// kbts_u16 LookaheadSequence[LookaheadGlyphCount];
|
|
// kbts_u16 SequenceLookupCount;
|
|
// kbts__sequence_lookup_record SequenceLookupRecords[SequenceLookupCount];
|
|
} kbts__chained_sequence_rule;
|
|
|
|
typedef struct kbts__chained_sequence_context_2
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 BacktrackClassDefOffset;
|
|
kbts_u16 InputClassDefOffset;
|
|
kbts_u16 LookaheadClassDefOffset;
|
|
kbts_u16 ChainedClassSequenceRuleSetCount;
|
|
// kbts_u16 ChainedClassSequenceRuleSetOffsets[ChainedClassSequenceRuleSetCount];
|
|
} kbts__chained_sequence_context_2;
|
|
|
|
typedef struct kbts__chained_sequence_context_3
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 BacktrackGlyphCount;
|
|
// kbts_u16 BacktrackCoverageOffsets[BacktrackGlyphCount];
|
|
// kbts_u16 InputGlyphCount;
|
|
// kbts_u16 InputCoverageOffsets[InputGlyphCount];
|
|
// kbts_u16 LookaheadGlyphCount;
|
|
// kbts_u16 LookaheadCoverageOffsets[LookaheadGlyphCount];
|
|
// kbts_u16 SequenceLookupCount;
|
|
// kbts__sequence_lookup_record SequenceLookupRecords[SequenceLookupCount];
|
|
} kbts__chained_sequence_context_3;
|
|
|
|
typedef struct kbts__device
|
|
{
|
|
union
|
|
{
|
|
struct
|
|
{
|
|
kbts_u16 StartSize;
|
|
kbts_u16 EndSize;
|
|
} Device; // If DeltaFormat <= 3
|
|
|
|
struct
|
|
{
|
|
kbts_u16 DeltaSetOuterIndex;
|
|
kbts_u16 DeltaSetInnerIndex;
|
|
} VariationIndex; // If DeltaFormat == 0x8000
|
|
} U;
|
|
|
|
kbts_u16 DeltaFormat;
|
|
// kbts_u16 DeltaValue[];
|
|
} kbts__device;
|
|
|
|
typedef struct kbts__feature_variations
|
|
{
|
|
kbts_u16 Major;
|
|
kbts_u16 Minor;
|
|
kbts_u32 RecordCount;
|
|
// kbts__feature_variation_record Records[RecordCount];
|
|
} kbts__feature_variations;
|
|
|
|
typedef struct kbts__feature_variation_record
|
|
{
|
|
kbts_u32 ConditionSetOffset;
|
|
kbts_u32 FeatureTableSubstitutionOffset;
|
|
} kbts__feature_variation_record;
|
|
|
|
typedef struct kbts__condition_set
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts_u32 Offsets[Count];
|
|
} kbts__condition_set;
|
|
|
|
typedef struct kbts__fixed16_16
|
|
{
|
|
kbts_s32 Value;
|
|
} kbts__fixed16_16;
|
|
|
|
typedef struct kbts__condition_1
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 AxisIndex;
|
|
kbts_s16 FilterRangeMinValue;
|
|
kbts_s16 FilterRangeMaxValue;
|
|
} kbts__condition_1;
|
|
|
|
typedef struct kbts__feature_table_substitution
|
|
{
|
|
kbts_u16 Major;
|
|
kbts_u16 Minor;
|
|
kbts_u16 Count;
|
|
// kbts__feature_table_substitution_record Records[Count];
|
|
} kbts__feature_table_substitution;
|
|
|
|
typedef struct kbts__feature_table_substitution_record
|
|
{
|
|
kbts_u16 FeatureIndex;
|
|
kbts_u32 AlternateFeatureOffset;
|
|
} kbts__feature_table_substitution_record;
|
|
|
|
typedef struct kbts__ttc_header
|
|
{
|
|
kbts_u32 Magic; // ttcf
|
|
kbts_u16 Major;
|
|
kbts_u16 Minor;
|
|
kbts_u32 FontCount;
|
|
// kbts_u32 TableDirectoryOffsets[FontCount];
|
|
|
|
// If Major == 2:
|
|
// kbts_u32 DsigTag;
|
|
// kbts_u32 DsigLength;
|
|
// kbts_u32 DsigOffset;
|
|
} kbts__ttc_header;
|
|
|
|
typedef struct kbts__table_directory
|
|
{
|
|
kbts_u32 Version;
|
|
kbts_u16 TableCount;
|
|
kbts_u16 SearchRange;
|
|
kbts_u16 EntrySelector;
|
|
kbts_u16 RangeShift;
|
|
// kbts__table_record Records[TableCount];
|
|
} kbts__table_directory;
|
|
|
|
typedef struct kbts__table_record
|
|
{
|
|
kbts_u32 Tag;
|
|
kbts_u32 Checksum;
|
|
kbts_u32 Offset;
|
|
kbts_u32 Length;
|
|
} kbts__table_record;
|
|
|
|
typedef struct kbts__cmap
|
|
{
|
|
kbts_u16 Version;
|
|
kbts_u16 TableCount;
|
|
// kbts__encoding_record Records[TableCount];
|
|
} kbts__cmap;
|
|
|
|
typedef struct kbts__encoding_record
|
|
{
|
|
kbts_u16 PlatformId;
|
|
kbts_u16 EncodingId;
|
|
kbts_u32 SubtableOffset;
|
|
} kbts__encoding_record;
|
|
|
|
/* Precedence rules for cmap tables:
|
|
- Tables are mutually exclusive, except for format 14 which completes the others.
|
|
- 8, 10, 12 > 0, 2, 4, 6
|
|
- Formats 4, 12, 13, 14 are used today.
|
|
- Formats 4 and 12 are basic cmap tables.
|
|
- Format 13 is for fallback fonts that want to map lots of codepoints to a few fallback glyphs.
|
|
- Format 14 is for Unicode Variation Sequences.
|
|
- There can be Unicode and Windows tables with the same formats. In that case, we prefer the Windows tables.
|
|
*/
|
|
|
|
typedef struct kbts__cmap_0
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 Length;
|
|
kbts_u16 Language;
|
|
kbts_u8 GlyphIdArray[256];
|
|
} kbts__cmap_0;
|
|
|
|
typedef struct kbts__cmap_2
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 Length;
|
|
kbts_u16 Language;
|
|
kbts_u16 SubHeaderKeys[256];
|
|
// kbts__sub_header SubHeaders[];
|
|
// kbts_u16 GlyphIdArray[];
|
|
} kbts__cmap_2;
|
|
|
|
typedef struct kbts__sub_header
|
|
{
|
|
kbts_u16 FirstCode;
|
|
kbts_u16 EntryCount;
|
|
kbts_s16 IdDelta;
|
|
kbts_u16 IdRangeOffset;
|
|
} kbts__sub_header;
|
|
|
|
typedef struct kbts__cmap_4
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 Length;
|
|
kbts_u16 Language;
|
|
kbts_u16 SegmentCountTimesTwo;
|
|
kbts_u16 SearchRange;
|
|
kbts_u16 EntrySelector;
|
|
kbts_u16 RangeShift;
|
|
// kbts_u16 EndCode[SegmentCount];
|
|
// kbts_u16 Reserved;
|
|
// kbts_u16 StartCode[SegmentCount];
|
|
// kbts_s16 IdDelta[SegmentCount];
|
|
// kbts_u16 IdRangeOffsets[SegmentCount];
|
|
// kbts_u16 GlyphIdArray[];
|
|
} kbts__cmap_4;
|
|
|
|
typedef struct kbts__cmap_6
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 Length;
|
|
kbts_u16 Language;
|
|
kbts_u16 FirstCode;
|
|
kbts_u16 EntryCount;
|
|
// kbts_u16 GlyphIdArray[EntryCount];
|
|
} kbts__cmap_6;
|
|
|
|
typedef struct kbts__cmap_12_13
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 Reserved;
|
|
kbts_u32 Length;
|
|
kbts_u32 Language;
|
|
kbts_u32 GroupCount;
|
|
// kbts__sequential_map_group Groups[GroupCount];
|
|
} kbts__cmap_12_13;
|
|
|
|
typedef struct kbts__sequential_map_group
|
|
{
|
|
kbts_u32 StartCharacterCode;
|
|
kbts_u32 EndCharacterCode;
|
|
kbts_u32 StartGlyphId;
|
|
} kbts__sequential_map_group;
|
|
|
|
struct kbts__cmap_14
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u32 Length;
|
|
kbts_u32 SelectorCount;
|
|
// kbts__variation_selector Selectors[SelectorCount];
|
|
};
|
|
|
|
typedef struct kbts__variation_selector
|
|
{
|
|
kbts_u8 Selector[3];
|
|
kbts_u32 DefaultUvsOffset;
|
|
kbts_u32 NonDefaultUvsOffset;
|
|
} kbts__variation_selector;
|
|
|
|
typedef struct kbts__default_uvs
|
|
{
|
|
kbts_u32 RangeCount;
|
|
// kbts__unicode_range Ranges[RangeCount];
|
|
} kbts__default_uvs;
|
|
|
|
typedef struct kbts__unicode_range
|
|
{
|
|
kbts_u8 Start[3];
|
|
kbts_u8 Count;
|
|
} kbts__unicode_range;
|
|
|
|
typedef struct kbts__non_default_uvs
|
|
{
|
|
kbts_u32 MappingCount;
|
|
// kbts__uvs_mapping Mappings[MappingCount];
|
|
} kbts__non_default_uvs;
|
|
|
|
typedef struct kbts__uvs_mapping
|
|
{
|
|
kbts_u8 UnicodeValue[3];
|
|
kbts_u16 GlyphId;
|
|
} kbts__uvs_mapping;
|
|
|
|
struct kbts__gsub_gpos
|
|
{
|
|
kbts_u16 Major;
|
|
kbts_u16 Minor;
|
|
kbts_u16 ScriptListOffset;
|
|
kbts_u16 FeatureListOffset;
|
|
kbts_u16 LookupListOffset;
|
|
kbts_u32 FeatureVariationsOffset; // Only present in v1.1. May be 0.
|
|
};
|
|
|
|
typedef struct kbts__single_substitution
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
union
|
|
{
|
|
kbts_s16 DeltaGlyphId; // Format == 1
|
|
kbts_u16 GlyphCount; // Format == 2
|
|
} DeltaOrCount;
|
|
// If Format == 2:
|
|
// kbts_u16 SubstituteGlyphIds[GlyphCount];
|
|
} kbts__single_substitution;
|
|
|
|
typedef struct kbts__multiple_substitution
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 SequenceCount;
|
|
// kbts_u16 SequenceOffsets[SequenceCount];
|
|
} kbts__multiple_substitution;
|
|
|
|
typedef struct kbts__sequence
|
|
{
|
|
kbts_u16 GlyphCount;
|
|
// kbts_u16 SubstituteGlyphIds[GlyphCount];
|
|
} kbts__sequence;
|
|
|
|
typedef struct kbts__alternate_substitution
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 AlternateSetCount;
|
|
// kbts_u16 AlternateSetOffsets[AlternateSetCount];
|
|
} kbts__alternate_substitution;
|
|
|
|
typedef struct kbts__alternate_set
|
|
{
|
|
kbts_u16 GlyphCount;
|
|
// kbts_u16 AlternateGlyphIds[GlyphCount];
|
|
} kbts__alternate_set;
|
|
|
|
typedef struct kbts__ligature_substitution
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 LigatureSetCount;
|
|
// kbts_u16 LigatureSetOffsets[LigatureSetCount];
|
|
} kbts__ligature_substitution;
|
|
|
|
typedef struct kbts__ligature_set
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts_u16 Offsets[Count];
|
|
} kbts__ligature_set;
|
|
|
|
typedef struct kbts__ligature
|
|
{
|
|
kbts_u16 Glyph;
|
|
kbts_u16 ComponentCount;
|
|
// kbts_u16 ComponentGlyphIds[ComponentCount - 1];
|
|
} kbts__ligature;
|
|
|
|
typedef struct kbts__extension
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 LookupType;
|
|
kbts_u32 Offset;
|
|
} kbts__extension;
|
|
|
|
typedef struct kbts__reverse_chain_substitution
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 BacktrackGlyphCount;
|
|
// kbts_u16 BacktrackCoverageOffsets[BacktrackGlyphCount];
|
|
// kbts_u16 LookaheadGlyphCount;
|
|
// kbts_u16 LookaheadCoverageOffsets[LookaheadGlyphCount];
|
|
// kbts_u16 GlyphCount;
|
|
// kbts_u16 SubstituteGlyphIds[GlyphCount];
|
|
} kbts__reverse_chain_substitution;
|
|
|
|
typedef struct kbts__mark_glyph_sets
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 MarkGlyphSetCount;
|
|
// kbts_u32 CoverageOffsets[MarkGlyphSetCount];
|
|
} kbts__mark_glyph_sets;
|
|
|
|
struct kbts__gdef
|
|
{
|
|
kbts_u16 Major;
|
|
kbts_u16 Minor;
|
|
kbts_u16 ClassDefinitionOffset; // May be 0
|
|
kbts_u16 AttachListOffset; // May be 0
|
|
kbts_u16 LigatureCaretListOffset; // May be 0
|
|
kbts_u16 MarkAttachmentClassDefinitionOffset; // May be 0
|
|
kbts_u16 MarkGlyphSetsDefinitionOffset; // v1.2 and up; may be 0
|
|
kbts_u32 ItemVariationStoreOffset; // v1.3 and up; may be 0
|
|
};
|
|
|
|
typedef struct kbts__anchor
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_s16 X;
|
|
kbts_s16 Y;
|
|
union
|
|
{
|
|
kbts_u16 AnchorPoint; // If Format == 2
|
|
kbts_u16 XDeviceOffset; // If Format == 3
|
|
} U;
|
|
kbts_u16 YDeviceOffset; // If Format == 3
|
|
} kbts__anchor;
|
|
|
|
typedef struct kbts__mark_record
|
|
{
|
|
kbts_u16 Class;
|
|
kbts_u16 AnchorOffset;
|
|
} kbts__mark_record;
|
|
|
|
typedef struct kbts__mark_array
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts__mark_record Records[Count];
|
|
} kbts__mark_array;
|
|
|
|
typedef struct kbts__single_adjustment_1
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 ValueFormat;
|
|
// ValueRecord;
|
|
} kbts__single_adjustment_1;
|
|
|
|
typedef struct kbts__single_adjustment_2
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 ValueFormat;
|
|
kbts_u16 RecordCount;
|
|
// ValueRecord Records[RecordCount];
|
|
} kbts__single_adjustment_2;
|
|
|
|
typedef struct kbts__pair_value_record
|
|
{
|
|
kbts_u16 SecondGlyph;
|
|
// ValueRecord Record1;
|
|
// ValueRecord Record2;
|
|
} kbts__pair_value_record;
|
|
|
|
typedef struct kbts__pair_set
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts__pair_value_record PairValueRecords[Count];
|
|
} kbts__pair_set;
|
|
|
|
typedef struct kbts__pair_adjustment_1
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 ValueFormat1; // May be 0
|
|
kbts_u16 ValueFormat2; // May be 0
|
|
kbts_u16 SetCount;
|
|
// kbts_u16 SetOffsets[PairSetCount];
|
|
} kbts__pair_adjustment_1;
|
|
|
|
typedef struct kbts__pair_adjustment_2
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 ValueFormat1; // May be 0
|
|
kbts_u16 ValueFormat2; // May be 0
|
|
kbts_u16 ClassDefinition1Offset;
|
|
kbts_u16 ClassDefinition2Offset;
|
|
kbts_u16 Class1Count;
|
|
kbts_u16 Class2Count;
|
|
// ValueRecord ValueRecords[Class1Count][Class2Count][2];
|
|
} kbts__pair_adjustment_2;
|
|
|
|
typedef struct kbts__entry_exit
|
|
{
|
|
kbts_u16 EntryAnchorOffset;
|
|
kbts_u16 ExitAnchorOffset;
|
|
} kbts__entry_exit;
|
|
|
|
typedef struct kbts__cursive_attachment
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 CoverageOffset;
|
|
kbts_u16 EntryExitCount;
|
|
// kbts__entry_exit Records[EntryExitCount];
|
|
} kbts__cursive_attachment;
|
|
|
|
typedef struct kbts__base_array
|
|
{
|
|
kbts_u16 BaseCount;
|
|
// kbts_u16 BaseAnchorOffsets[BaseCount][MarkClassCount]; // May be NULL
|
|
} kbts__base_array;
|
|
|
|
typedef struct kbts__mark_to_base_attachment
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 MarkCoverageOffset;
|
|
kbts_u16 BaseCoverageOffset;
|
|
kbts_u16 MarkClassCount;
|
|
kbts_u16 MarkArrayOffset;
|
|
kbts_u16 BaseArrayOffset;
|
|
} kbts__mark_to_base_attachment;
|
|
|
|
typedef struct kbts__ligature_attach
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts_u16 LigatureAnchorOffsets[Count][MarkClassCount]; // May be NULL
|
|
} kbts__ligature_attach;
|
|
|
|
typedef struct kbts__ligature_array
|
|
{
|
|
kbts_u16 Count;
|
|
// kbts_u16 LigatureAttachOffsets[Count];
|
|
} kbts__ligature_array;
|
|
|
|
typedef struct kbts__mark_to_ligature_attachment
|
|
{
|
|
kbts_u16 Format;
|
|
kbts_u16 MarkCoverageOffset;
|
|
kbts_u16 LigatureCoverageOffset;
|
|
kbts_u16 MarkClassCount;
|
|
kbts_u16 MarkArrayOffset;
|
|
kbts_u16 LigatureArrayOffset;
|
|
} kbts__mark_to_ligature_attachment;
|
|
|
|
typedef struct kbts__long_mtx
|
|
{
|
|
kbts_u16 Advance;
|
|
kbts_s16 PreviousSideBearing;
|
|
} kbts__long_mtx;
|
|
|
|
struct kbts__head
|
|
{
|
|
kbts_u16 Major;
|
|
kbts_u16 Minor;
|
|
kbts_u32 Revision;
|
|
kbts_u32 ChecksumAdjustment;
|
|
kbts_u32 MagicNumber;
|
|
kbts_u16 Flags;
|
|
kbts_u16 UnitsPerEm;
|
|
kbts_s64 CreatedTime;
|
|
kbts_s64 LastModifiedTime;
|
|
kbts_s16 XMin;
|
|
kbts_s16 YMin;
|
|
kbts_s16 XMax;
|
|
kbts_s16 YMax;
|
|
kbts_u16 MacStyle; // OS/2 style takes priority on Windows.
|
|
kbts_u16 LowestRecommendedPpem;
|
|
kbts_s16 DirectionHint; // Deprecated. Should ~always be 2.
|
|
kbts_s16 IndexToLocFormat;
|
|
kbts_s16 GlyphDataFormat; // Only 0 is defined.
|
|
};
|
|
|
|
struct kbts__hea
|
|
{
|
|
kbts_u16 Major;
|
|
kbts_u16 Minor;
|
|
|
|
// According to Microsoft, these metrics are deprecated.
|
|
// The OS/2 table is the preferred way to get these, now.
|
|
kbts_s16 Ascent;
|
|
kbts_s16 Descent;
|
|
kbts_s16 LineGap;
|
|
|
|
kbts_u16 MaxAdvance;
|
|
kbts_s16 MinPreviousSideBearing;
|
|
kbts_s16 MinNextSideBearing;
|
|
kbts_s16 MaxExtent;
|
|
|
|
kbts_s16 CaretSlopeRise;
|
|
kbts_s16 CaretSlopeRun;
|
|
kbts_s16 CaretOffset;
|
|
|
|
kbts_u16 Reserved[4];
|
|
|
|
kbts_s16 MetricDataFormat;
|
|
kbts_u16 MetricCount;
|
|
};
|
|
|
|
typedef struct kbts__os2
|
|
{
|
|
kbts_u16 Version;
|
|
kbts_s16 AverageCharacterWidth;
|
|
kbts_u16 WeightClass;
|
|
kbts_u16 WidthClass;
|
|
kbts_u16 Type;
|
|
kbts_s16 SubscriptXSize;
|
|
kbts_s16 SubscriptYSize;
|
|
kbts_s16 SubscriptXOffset;
|
|
kbts_s16 SubscriptYOffset;
|
|
kbts_s16 SuperscriptXSize;
|
|
kbts_s16 SuperscriptYSize;
|
|
kbts_s16 SuperscriptXOffset;
|
|
kbts_s16 SuperscriptYOffset;
|
|
kbts_s16 StrikeoutSize;
|
|
kbts_s16 StrikeoutPosition;
|
|
kbts_s16 FamilyClass;
|
|
kbts_u8 Panose[10]; // 32
|
|
kbts_u32 UnicodeRange[4]; // 42
|
|
kbts_u32 VendorId; // 58
|
|
kbts_u16 Selection; // 62
|
|
kbts_u16 FirstCharacterIndex; // 64
|
|
kbts_u16 LastCharacterIndex; // 66
|
|
|
|
// Some version 0 fonts support this, others do not.
|
|
kbts_s16 TypoAscender; // 68
|
|
kbts_s16 TypoDescender; // 70
|
|
kbts_s16 TypoLineGap; // 72
|
|
kbts_u16 WinAscent;
|
|
kbts_u16 WinDescent;
|
|
|
|
// If Version >= 1:
|
|
kbts_u32 CodePageRange[2];
|
|
|
|
// If Version >= 2:
|
|
kbts_s16 Height;
|
|
kbts_s16 CapHeight;
|
|
kbts_u16 DefaultChar;
|
|
kbts_u16 BreakChar;
|
|
kbts_u16 MaxContext;
|
|
|
|
// If Version >= 5:
|
|
kbts_u16 LowerOpticalPointSize;
|
|
kbts_u16 UpperOpticalPointSize;
|
|
} kbts__os2;
|
|
|
|
typedef struct kbts__lang_tag_record
|
|
{
|
|
kbts_u16 Length;
|
|
kbts_u16 LangTagOffset;
|
|
} kbts__lang_tag_record;
|
|
|
|
typedef struct kbts__name_record
|
|
{
|
|
kbts_u16 PlatformId;
|
|
kbts_u16 EncodingId;
|
|
kbts_u16 LanguageId;
|
|
kbts_u16 NameId;
|
|
kbts_u16 Length;
|
|
kbts_u16 StringOffset;
|
|
} kbts__name_record;
|
|
|
|
typedef struct kbts__name
|
|
{
|
|
kbts_u16 Version;
|
|
kbts_u16 Count;
|
|
kbts_u16 StringStorageOffset;
|
|
// kbts__name_record Records[Count];
|
|
|
|
// If Version == 1:
|
|
// kbts_u16 LangTagCount;
|
|
// kbts__lang_tag_record LangTags[LangTagCount];
|
|
} kbts__name;
|
|
|
|
enum kbts__variation_axis_flags_enum
|
|
{
|
|
KBTS__VARIATION_AXIS_FLAG_NONE = 0,
|
|
KBTS__VARIATION_AXIS_FLAG_HIDDEN = (1 << 0), // Hide from UI
|
|
};
|
|
|
|
typedef struct kbts__variation_axis_record
|
|
{
|
|
kbts_u32 Tag;
|
|
kbts__fixed16_16 MinValue;
|
|
kbts__fixed16_16 DefaultValue;
|
|
kbts__fixed16_16 MaxValue;
|
|
kbts_u16 Flags;
|
|
kbts_u16 AxisNameId; // See 'name' table for display names.
|
|
} kbts__variation_axis_record;
|
|
|
|
typedef struct kbts__instance_record
|
|
{
|
|
kbts_u16 SubfamilyNameId; // The full string can be looked up in the 'name' table.
|
|
kbts_u16 Flags; // Always 0.
|
|
// kbts__fixed16_16 Coordinates[AxisCount];
|
|
// kbts_u16 PostscriptNameId; // Optional (check InstanceSize). Full string is in 'name'.
|
|
} kbts__instance_record;
|
|
|
|
typedef struct kbts__avar
|
|
{
|
|
kbts_u16 Major; // 1
|
|
kbts_u16 Minor; // 0
|
|
kbts_u16 Reserved; // 0
|
|
kbts_u16 AxisCount; // Same as the one in fvar
|
|
// kbts__segment_maps AxisSegmentMaps[AxisCount];
|
|
} kbts__avar;
|
|
|
|
typedef struct kbts__segment_maps
|
|
{
|
|
kbts_u16 PositionMapCount;
|
|
// kbts__axis_value_map AxisValueMaps[PositionMapCount];
|
|
} kbts__segment_maps;
|
|
|
|
typedef struct kbts__axis_value_map
|
|
{
|
|
kbts_s16 FromCoordinate;
|
|
kbts_s16 ToCoordinate;
|
|
} kbts__axis_value_map;
|
|
|
|
typedef struct kbts__fvar
|
|
{
|
|
kbts_u16 Major;
|
|
kbts_u16 Minor;
|
|
kbts_u16 AxesArrayOffset;
|
|
kbts_u16 Reserved; // Always 2.
|
|
kbts_u16 AxisCount;
|
|
kbts_u16 AxisSize; // Must be 20 "for this version" of OpenType.
|
|
kbts_u16 InstanceCount;
|
|
kbts_u16 InstanceSize; // Must be (AxisCount * sizeof(fixed16_16) + 4) or (AxisCount * sizeof(fixed16_16) + 6).
|
|
} kbts__fvar;
|
|
|
|
typedef struct kbts__hvar_vvar_common
|
|
{
|
|
kbts_u16 Major; // 1
|
|
kbts_u16 Minor; // 0
|
|
kbts_u32 ItemVariationStoreOffset;
|
|
kbts_u32 AdvanceWidthMappingOffset; // May be 0.
|
|
kbts_u32 LsbMappingOffset; // May be 0.
|
|
kbts_u32 RsbMappingOffset; // May be 0.
|
|
} kbts__hvar_vvar_common;
|
|
|
|
typedef struct kbts__vvar
|
|
{
|
|
kbts__hvar_vvar_common Common;
|
|
kbts_u32 OriginMappingOffset; // May be 0.
|
|
} kbts__vvar;
|
|
|
|
typedef struct kbts__mvar
|
|
{
|
|
kbts_u16 Major; // 1
|
|
kbts_u16 Minor; // 0
|
|
kbts_u16 Reserved; // 0
|
|
kbts_u16 ValueRecordSize;
|
|
kbts_u16 ValueRecordCount;
|
|
kbts_u16 ItemVariationStoreOffset;
|
|
// kbts__mvar_value_record ValueRecords[ValueRecordCount]
|
|
} kbts__mvar;
|
|
|
|
typedef struct kbts__mvar_value_record
|
|
{
|
|
kbts_u32 Tag;
|
|
kbts_u16 DeltaSetOuterIndex;
|
|
kbts_u16 DeltaSetInnerIndex;
|
|
} kbts__mvar_value_record;
|
|
|
|
typedef struct kbts__delta_set_index_map
|
|
{
|
|
kbts_u8 Format;
|
|
kbts_u8 EntryFormat;
|
|
|
|
// If Format == 0:
|
|
// kbts_u16 MapCount;
|
|
// kbts_u8 MapData[];
|
|
|
|
// If Format == 1:
|
|
// kbts_u32 MapCount;
|
|
// kbts_u8 MapData[];
|
|
} kbts__delta_set_index_map;
|
|
|
|
typedef struct kbts__variation_region_list
|
|
{
|
|
kbts_u16 AxisCount;
|
|
kbts_u16 RegionCount;
|
|
|
|
// variation_region VariationRegions[RegionCount];
|
|
// aka. kbts__region_axis_coordinates RegionAxes[RegionCount][AxisCount];
|
|
} kbts__variation_region_list;
|
|
|
|
typedef struct kbts__region_axis_coordinates
|
|
{
|
|
kbts_s16 StartCoord;
|
|
kbts_s16 PeakCoord;
|
|
kbts_s16 EndCoord;
|
|
} kbts__region_axis_coordinates;
|
|
|
|
struct kbts__item_variation_store
|
|
{
|
|
kbts_u16 Format;
|
|
|
|
// !!! Compiler bug !!!
|
|
// For some reason, #pragma pack does not work on this struct.
|
|
// Use macros to access these members.
|
|
// kbts_u32 VariationRegionListOffset;
|
|
// kbts_u16 ItemVariationDataCount;
|
|
// kbts_u32 ItemVariationDataOffsets[ItemVariationDataCount]; // Each offset can be 0.
|
|
};
|
|
#define kbts__item_variation_store_VariationRegionListOffset(Store) KBTS__POINTER_OFFSET(kbts_u32, (Store), 2)
|
|
#define kbts__item_variation_store_ItemVariationDataCount(Store) KBTS__POINTER_OFFSET(kbts_u16, (Store), 6)
|
|
#define kbts__item_variation_store_ItemVariationDataOffsets(Store) KBTS__POINTER_OFFSET(kbts_u32, (Store), 8)
|
|
|
|
typedef struct kbts__item_variation_data
|
|
{
|
|
kbts_u16 ItemCount;
|
|
kbts_u16 WordDeltaCount;
|
|
kbts_u16 RegionIndexCount;
|
|
// kbts_u16 RegionIndexes[RegionIndexCount];
|
|
|
|
// If WordDeltaCount & 0x8000:
|
|
// struct
|
|
// {
|
|
// kbts_s32 Words[WordDeltaCount & 0x7FFF];
|
|
// kbts_s16 HalfWords[RegionIndexCount - (WordDeltaCount & 0x7FFF)];
|
|
// } DeltaSets[ItemCount];
|
|
//
|
|
// If !(WordDeltaCount & 0x8000):
|
|
// struct
|
|
// {
|
|
// kbts_s16 Words[WordDeltaCount & 0x7FFF];
|
|
// kbts_s8 HalfWords[RegionIndexCount - (WordDeltaCount & 0x7FFF)];
|
|
// } DeltaSets[ItemCount];
|
|
} kbts__item_variation_data;
|
|
|
|
struct kbts__maxp
|
|
{
|
|
kbts_u16 Major;
|
|
kbts_u16 Minor;
|
|
|
|
// If "version 0.5" (Major == 0, Minor == 0x5000):
|
|
kbts_u16 GlyphCount;
|
|
|
|
// If Major == 1:
|
|
kbts_u16 MaxPointCount;
|
|
kbts_u16 MaxContourCount;
|
|
kbts_u16 MaxCompositePointCount;
|
|
kbts_u16 MaxCompositeContourCount;
|
|
kbts_u16 MaxZoneCount;
|
|
kbts_u16 MaxTwilightPointCount;
|
|
kbts_u16 StorageAreaCount;
|
|
kbts_u16 FunctionDefinitionCount;
|
|
kbts_u16 InstructionDefinitionCount;
|
|
kbts_u16 MaximumStackDepth;
|
|
kbts_u16 MaximumInstructionSize;
|
|
kbts_u16 MaximumTopLevelComponentCount;
|
|
kbts_u16 MaximumComponentDepth;
|
|
};
|
|
|
|
#pragma pack(pop)
|
|
|
|
//
|
|
// Unpack functions for TTF structs.
|
|
//
|
|
|
|
typedef struct kbts__script_pointer
|
|
{
|
|
kbts_u32 Tag;
|
|
kbts__ot_script *Script;
|
|
} kbts__script_pointer;
|
|
|
|
typedef struct kbts__langsys_pointer
|
|
{
|
|
kbts_u32 Tag;
|
|
kbts__langsys *Langsys;
|
|
} kbts__langsys_pointer;
|
|
|
|
typedef struct kbts__feature_pointer
|
|
{
|
|
kbts_u32 Tag;
|
|
kbts__feature *Feature;
|
|
} kbts__feature_pointer;
|
|
|
|
typedef struct kbts__feature_variation_pointer
|
|
{
|
|
kbts__condition_set *ConditionSet;
|
|
kbts__feature_table_substitution *FeatureTableSubstitution;
|
|
} kbts__feature_variation_pointer;
|
|
|
|
typedef struct kbts__feature_substitution_pointer
|
|
{
|
|
kbts_u16 SubstitutedFeatureIndex;
|
|
kbts__feature *AlternateFeature;
|
|
} kbts__feature_substitution_pointer;
|
|
|
|
typedef struct kbts__cmap_subtable_pointer
|
|
{
|
|
kbts_u16 PlatformId;
|
|
kbts_u16 EncodingId;
|
|
kbts_u16 *Subtable;
|
|
} kbts__cmap_subtable_pointer;
|
|
|
|
typedef struct kbts__unpacked_chained_sequence_rule
|
|
{
|
|
kbts_u16 *Input;
|
|
kbts_u16 *Backtrack;
|
|
kbts_u16 *Lookahead;
|
|
kbts__sequence_lookup_record *Records;
|
|
|
|
kbts_u16 BacktrackCount;
|
|
kbts_u16 InputCount;
|
|
kbts_u16 LookaheadCount;
|
|
kbts_u16 RecordCount;
|
|
} kbts__unpacked_chained_sequence_rule;
|
|
|
|
typedef struct kbts__unpacked_chained_sequence_context_3
|
|
{
|
|
kbts_u16 *BacktrackCoverageOffsets;
|
|
kbts_u16 *InputCoverageOffsets;
|
|
kbts_u16 *LookaheadCoverageOffsets;
|
|
kbts__sequence_lookup_record *Records;
|
|
|
|
kbts_u16 BacktrackCount;
|
|
kbts_u16 InputCount;
|
|
kbts_u16 LookaheadCount;
|
|
kbts_u16 RecordCount;
|
|
} kbts__unpacked_chained_sequence_context_3;
|
|
|
|
typedef struct kbts__unpacked_reverse_chain_substitution
|
|
{
|
|
kbts_u16 *BacktrackCoverageOffsets;
|
|
kbts_u16 *LookaheadCoverageOffsets;
|
|
kbts_u16 *SubstituteGlyphIds;
|
|
|
|
kbts_u16 BacktrackCount;
|
|
kbts_u16 LookaheadCount;
|
|
kbts_u16 GlyphCount;
|
|
} kbts__unpacked_reverse_chain_substitution;
|
|
|
|
typedef struct kbts__unpacked_value_record
|
|
{
|
|
kbts_u16 Size;
|
|
|
|
kbts_s16 PlacementX;
|
|
kbts_s16 PlacementY;
|
|
kbts_s16 AdvanceX;
|
|
kbts_s16 AdvanceY;
|
|
kbts__device *PlacementXDevice;
|
|
kbts__device *PlacementYDevice;
|
|
kbts__device *AdvanceXDevice;
|
|
kbts__device *AdvanceYDevice;
|
|
} kbts__unpacked_value_record;
|
|
|
|
typedef struct kbts__resolved_value_record
|
|
{
|
|
kbts_s16 PlacementX;
|
|
kbts_s16 PlacementY;
|
|
kbts_s16 AdvanceX;
|
|
kbts_s16 AdvanceY;
|
|
} kbts__resolved_value_record;
|
|
|
|
static kbts__unpacked_value_record kbts__UnpackValueRecord(void *Parent, kbts_u16 Format, kbts_u16 *Record)
|
|
{
|
|
kbts__unpacked_value_record Result = KBTS__ZERO;
|
|
|
|
kbts_u16 *At = Record;
|
|
|
|
if(Format & KBTS__VALUE_FORMAT_X_PLACEMENT)
|
|
{
|
|
Result.PlacementX = kbts__ReadS16Unaligned((kbts_s16 *)At);
|
|
At += 1;
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_Y_PLACEMENT)
|
|
{
|
|
Result.PlacementY = kbts__ReadS16Unaligned((kbts_s16 *)At);
|
|
At += 1;
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_X_ADVANCE)
|
|
{
|
|
Result.AdvanceX = kbts__ReadS16Unaligned((kbts_s16 *)At);
|
|
At += 1;
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_Y_ADVANCE)
|
|
{
|
|
Result.AdvanceY = kbts__ReadS16Unaligned((kbts_s16 *)At);
|
|
At += 1;
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_X_PLACEMENT_DEVICE)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(At);
|
|
At += 1;
|
|
|
|
if(Offset)
|
|
{
|
|
Result.PlacementXDevice = KBTS__POINTER_OFFSET(kbts__device, Parent, Offset);
|
|
}
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_Y_PLACEMENT_DEVICE)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(At);
|
|
At += 1;
|
|
|
|
if(Offset)
|
|
{
|
|
Result.PlacementYDevice = KBTS__POINTER_OFFSET(kbts__device, Parent, Offset);
|
|
}
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_X_ADVANCE_DEVICE)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(At);
|
|
At += 1;
|
|
|
|
if(Offset)
|
|
{
|
|
Result.AdvanceXDevice = KBTS__POINTER_OFFSET(kbts__device, Parent, Offset);
|
|
}
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_Y_ADVANCE_DEVICE)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(At);
|
|
At += 1;
|
|
|
|
if(Offset)
|
|
{
|
|
Result.AdvanceYDevice = KBTS__POINTER_OFFSET(kbts__device, Parent, Offset);
|
|
}
|
|
}
|
|
|
|
Result.Size = (kbts_u16)(At - Record);
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_s16 kbts__FloatToFixed2_14(float X)
|
|
{
|
|
kbts_s32 Result;
|
|
|
|
if(X <= -1.0f)
|
|
{
|
|
Result = 0xC000;
|
|
}
|
|
else if(X >= 1.0f)
|
|
{
|
|
Result = 0x4000;
|
|
}
|
|
else
|
|
{
|
|
Result = kbts__Round32(X * (1 << 14));
|
|
}
|
|
|
|
return (kbts_s16)Result;
|
|
}
|
|
|
|
static float kbts__Fixed2_14ToFloat(kbts_s16 X)
|
|
{
|
|
float Result = (float)X * (1.0f / (float)(1 << 14));
|
|
return Result;
|
|
}
|
|
|
|
static float kbts__ItemVariationStoreDelta(kbts__item_variation_store *Store, kbts_un DeltaSetOuterIndex, kbts_un DeltaSetInnerIndex, kbts_s16 *VariationVectorNormalized)
|
|
{
|
|
float Result = 0;
|
|
|
|
if(VariationVectorNormalized &&
|
|
Store)
|
|
{
|
|
kbts_u32 *Store_VariationRegionListOffset = kbts__item_variation_store_VariationRegionListOffset(Store);
|
|
kbts_u16 *Store_ItemVariationDataCount = kbts__item_variation_store_ItemVariationDataCount(Store);
|
|
kbts_u32 *Store_ItemVariationDataOffsets = kbts__item_variation_store_ItemVariationDataOffsets(Store);
|
|
|
|
kbts_un VariationDataCount = kbts__ReadU16Unaligned(Store_ItemVariationDataCount);
|
|
|
|
if(DeltaSetOuterIndex < VariationDataCount)
|
|
{
|
|
kbts_un ItemVariationDataOffset = kbts__ReadU32Unaligned(&Store_ItemVariationDataOffsets[DeltaSetOuterIndex]);
|
|
|
|
if(ItemVariationDataOffset)
|
|
{
|
|
kbts_un VariationRegionListOffset = kbts__ReadU32Unaligned(Store_VariationRegionListOffset);
|
|
|
|
kbts__variation_region_list *VariationRegionList = KBTS__POINTER_OFFSET(kbts__variation_region_list, Store, VariationRegionListOffset);
|
|
kbts__region_axis_coordinates *RegionAxisCoordinates = KBTS__POINTER_AFTER(kbts__region_axis_coordinates, VariationRegionList);
|
|
kbts__item_variation_data *ItemVariationData = KBTS__POINTER_OFFSET(kbts__item_variation_data, Store, ItemVariationDataOffset);
|
|
kbts_u16 *RegionIndices = KBTS__POINTER_AFTER(kbts_u16, ItemVariationData);
|
|
|
|
kbts_un AxisCount = kbts__ReadU16Unaligned(&VariationRegionList->AxisCount);
|
|
kbts_un RegionIndexCount = kbts__ReadU16Unaligned(&ItemVariationData->RegionIndexCount);
|
|
kbts_un WordDeltaCount = kbts__ReadU16Unaligned(&ItemVariationData->WordDeltaCount);
|
|
|
|
char *Deltas = (char *)(RegionIndices + RegionIndexCount);
|
|
kbts_s16 *WordDeltas = (kbts_s16 *)(Deltas + DeltaSetInnerIndex * (WordDeltaCount + RegionIndexCount));
|
|
kbts_s8 *HalfWordDeltas = (kbts_s8 *)(WordDeltas + WordDeltaCount);
|
|
|
|
KBTS__FOR(RegionIndexIndex, 0, RegionIndexCount)
|
|
{
|
|
kbts_un RegionIndex = kbts__ReadU16Unaligned(&RegionIndices[RegionIndexIndex]);
|
|
kbts__region_axis_coordinates *RegionCoords = &RegionAxisCoordinates[RegionIndex * AxisCount];
|
|
|
|
float RegionDelta = 0;
|
|
if(RegionIndexIndex < WordDeltaCount)
|
|
{
|
|
RegionDelta = (float)kbts__ReadS16Unaligned(&WordDeltas[RegionIndexIndex]);
|
|
}
|
|
else
|
|
{
|
|
RegionDelta = (float)HalfWordDeltas[RegionIndexIndex - WordDeltaCount];
|
|
}
|
|
|
|
float RegionFactor = 1;
|
|
|
|
KBTS__FOR(AxisIndex, 0, AxisCount)
|
|
{
|
|
kbts_s16 InputFixed = VariationVectorNormalized[AxisIndex];
|
|
|
|
kbts__region_axis_coordinates *RegionAxis = &RegionCoords[AxisIndex];
|
|
kbts_s16 LowFixed = kbts__ReadS16Unaligned(&RegionAxis->StartCoord);
|
|
kbts_s16 PeakFixed = kbts__ReadS16Unaligned(&RegionAxis->PeakCoord);
|
|
kbts_s16 HighFixed = kbts__ReadS16Unaligned(&RegionAxis->EndCoord);
|
|
|
|
if(PeakFixed &&
|
|
(LowFixed <= PeakFixed) &&
|
|
(PeakFixed <= HighFixed) &&
|
|
!((LowFixed < 0) && (HighFixed > 0) && (PeakFixed != 0)) &&
|
|
(InputFixed != PeakFixed))
|
|
{
|
|
float AxisFactor = 0;
|
|
|
|
if((InputFixed >= LowFixed) &&
|
|
(InputFixed <= HighFixed))
|
|
{
|
|
// @Cleanup: Why don't we just compute the factor, and then check for bounds and NaN afterwards?
|
|
float InputFloat = kbts__Fixed2_14ToFloat(InputFixed);
|
|
float PeakFloat = kbts__Fixed2_14ToFloat(PeakFixed);
|
|
|
|
if(InputFixed < PeakFixed)
|
|
{
|
|
float LowFloat = kbts__Fixed2_14ToFloat(LowFixed);
|
|
|
|
AxisFactor = (InputFloat - LowFloat) / (PeakFloat - LowFloat);
|
|
}
|
|
else
|
|
{
|
|
float HighFloat = kbts__Fixed2_14ToFloat(HighFixed);
|
|
|
|
AxisFactor = (HighFloat - InputFloat) / (HighFloat - PeakFloat);
|
|
}
|
|
}
|
|
|
|
RegionFactor *= AxisFactor;
|
|
}
|
|
|
|
if(RegionFactor == 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
Result += RegionDelta * RegionFactor;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static float kbts__ResolveDevice(kbts__item_variation_store *Store, kbts_s16 *VariationVectorNormalized, kbts__device *Device)
|
|
{
|
|
float Result = 0;
|
|
|
|
if(VariationVectorNormalized &&
|
|
(kbts__ReadU16Unaligned(&Device->DeltaFormat) == 0x8000))
|
|
{
|
|
Result = kbts__ItemVariationStoreDelta(Store, kbts__ReadU16Unaligned(&Device->U.VariationIndex.DeltaSetOuterIndex), kbts__ReadU16Unaligned(&Device->U.VariationIndex.DeltaSetInnerIndex), VariationVectorNormalized);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__resolved_value_record kbts__ResolveValueRecord(kbts_shape_scratchpad *Scratchpad, void *Parent, kbts_u16 Format, kbts_u16 *Record)
|
|
{
|
|
kbts__resolved_value_record Result = KBTS__ZERO;
|
|
|
|
kbts_u16 *At = Record;
|
|
|
|
if(Format & KBTS__VALUE_FORMAT_X_PLACEMENT)
|
|
{
|
|
Result.PlacementX = kbts__ReadS16Unaligned((kbts_s16 *)At);
|
|
At += 1;
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_Y_PLACEMENT)
|
|
{
|
|
Result.PlacementY = kbts__ReadS16Unaligned((kbts_s16 *)At);
|
|
At += 1;
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_X_ADVANCE)
|
|
{
|
|
Result.AdvanceX = kbts__ReadS16Unaligned((kbts_s16 *)At);
|
|
At += 1;
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_Y_ADVANCE)
|
|
{
|
|
Result.AdvanceY = kbts__ReadS16Unaligned((kbts_s16 *)At);
|
|
At += 1;
|
|
}
|
|
if(Format & (KBTS__VALUE_FORMAT_X_PLACEMENT_DEVICE |
|
|
KBTS__VALUE_FORMAT_Y_PLACEMENT_DEVICE |
|
|
KBTS__VALUE_FORMAT_X_ADVANCE_DEVICE |
|
|
KBTS__VALUE_FORMAT_Y_ADVANCE_DEVICE))
|
|
{
|
|
kbts__item_variation_store *Store = Scratchpad->GdefItemVariationStore;
|
|
kbts_s16 *VariationVectorNormalized = Scratchpad->VariationVectorNormalized;
|
|
|
|
if(Format & KBTS__VALUE_FORMAT_X_PLACEMENT_DEVICE)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(At);
|
|
At += 1;
|
|
|
|
if(Offset)
|
|
{
|
|
kbts__device *PlacementXDevice = KBTS__POINTER_OFFSET(kbts__device, Parent, Offset);
|
|
float DeviceDelta = kbts__ResolveDevice(Store, VariationVectorNormalized, PlacementXDevice);
|
|
Result.PlacementX += (kbts_s16)kbts__Round32(DeviceDelta);
|
|
}
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_Y_PLACEMENT_DEVICE)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(At);
|
|
At += 1;
|
|
|
|
if(Offset)
|
|
{
|
|
kbts__device *PlacementYDevice = KBTS__POINTER_OFFSET(kbts__device, Parent, Offset);
|
|
float DeviceDelta = kbts__ResolveDevice(Store, VariationVectorNormalized, PlacementYDevice);
|
|
Result.PlacementY += (kbts_s16)kbts__Round32(DeviceDelta);
|
|
}
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_X_ADVANCE_DEVICE)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(At);
|
|
At += 1;
|
|
|
|
if(Offset)
|
|
{
|
|
kbts__device *AdvanceXDevice = KBTS__POINTER_OFFSET(kbts__device, Parent, Offset);
|
|
float DeviceDelta = kbts__ResolveDevice(Store, VariationVectorNormalized, AdvanceXDevice);
|
|
Result.AdvanceX += (kbts_s16)kbts__Round32(DeviceDelta);
|
|
}
|
|
}
|
|
if(Format & KBTS__VALUE_FORMAT_Y_ADVANCE_DEVICE)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(At);
|
|
At += 1;
|
|
|
|
if(Offset)
|
|
{
|
|
kbts__device *AdvanceYDevice = KBTS__POINTER_OFFSET(kbts__device, Parent, Offset);
|
|
float DeviceDelta = kbts__ResolveDevice(Store, VariationVectorNormalized, AdvanceYDevice);
|
|
Result.AdvanceY += (kbts_s16)kbts__Round32(DeviceDelta);
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__unpacked_reverse_chain_substitution kbts__UnpackReverseChainSubstitution(kbts__reverse_chain_substitution *Subst, int ByteSwap)
|
|
{
|
|
kbts__unpacked_reverse_chain_substitution Result;
|
|
|
|
Result.BacktrackCoverageOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
Result.BacktrackCount = kbts__ReadU16Unaligned(&Subst->BacktrackGlyphCount);
|
|
if(ByteSwap)
|
|
{
|
|
Result.BacktrackCount = kbts__ByteSwap16(Result.BacktrackCount);
|
|
}
|
|
|
|
Result.LookaheadCoverageOffsets = Result.BacktrackCoverageOffsets + Result.BacktrackCount + 1;
|
|
Result.LookaheadCount = kbts__ReadU16Unaligned(&Result.BacktrackCoverageOffsets[Result.BacktrackCount]);
|
|
if(ByteSwap)
|
|
{
|
|
Result.LookaheadCount = kbts__ByteSwap16(Result.LookaheadCount);
|
|
}
|
|
|
|
Result.SubstituteGlyphIds = Result.LookaheadCoverageOffsets + Result.LookaheadCount + 1;
|
|
Result.GlyphCount = kbts__ReadU16Unaligned(&Result.LookaheadCoverageOffsets[Result.LookaheadCount]);
|
|
if(ByteSwap)
|
|
{
|
|
Result.GlyphCount = kbts__ByteSwap16(Result.GlyphCount);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__unpacked_chained_sequence_rule kbts__UnpackChainedSequenceRule(kbts__chained_sequence_rule *Rule, int ByteSwap)
|
|
{
|
|
kbts__unpacked_chained_sequence_rule Result;
|
|
|
|
Result.Backtrack = KBTS__POINTER_AFTER(kbts_u16, Rule);
|
|
Result.BacktrackCount = kbts__ReadU16Unaligned(&Rule->BacktrackGlyphCount);
|
|
if(ByteSwap)
|
|
{
|
|
Result.BacktrackCount = kbts__ByteSwap16(Result.BacktrackCount);
|
|
}
|
|
|
|
Result.Input = Result.Backtrack + Result.BacktrackCount + 1;
|
|
Result.InputCount = kbts__ReadU16Unaligned(&Result.Backtrack[Result.BacktrackCount]);
|
|
if(ByteSwap)
|
|
{
|
|
Result.InputCount = kbts__ByteSwap16(Result.InputCount);
|
|
}
|
|
|
|
Result.Lookahead = Result.Input + Result.InputCount;
|
|
Result.LookaheadCount = kbts__ReadU16Unaligned(&Result.Input[Result.InputCount - 1]);
|
|
if(ByteSwap)
|
|
{
|
|
Result.LookaheadCount = kbts__ByteSwap16(Result.LookaheadCount);
|
|
}
|
|
|
|
Result.Records = (kbts__sequence_lookup_record *)(Result.Lookahead + Result.LookaheadCount + 1);
|
|
Result.RecordCount = kbts__ReadU16Unaligned(&Result.Lookahead[Result.LookaheadCount]);
|
|
if(ByteSwap)
|
|
{
|
|
Result.RecordCount = kbts__ByteSwap16(Result.RecordCount);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__unpacked_chained_sequence_context_3 kbts__UnpackChainedSequenceContext3(kbts__chained_sequence_context_3 *Subst, int ByteSwap)
|
|
{
|
|
kbts__unpacked_chained_sequence_context_3 Result;
|
|
|
|
Result.BacktrackCoverageOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
Result.BacktrackCount = kbts__ReadU16Unaligned(&Subst->BacktrackGlyphCount);
|
|
if(ByteSwap)
|
|
{
|
|
Result.BacktrackCount = kbts__ByteSwap16(Result.BacktrackCount);
|
|
}
|
|
|
|
Result.InputCoverageOffsets = Result.BacktrackCoverageOffsets + Result.BacktrackCount + 1;
|
|
Result.InputCount = kbts__ReadU16Unaligned(&Result.BacktrackCoverageOffsets[Result.BacktrackCount]);
|
|
if(ByteSwap)
|
|
{
|
|
Result.InputCount = kbts__ByteSwap16(Result.InputCount);
|
|
}
|
|
|
|
Result.LookaheadCoverageOffsets = Result.InputCoverageOffsets + Result.InputCount + 1;
|
|
Result.LookaheadCount = kbts__ReadU16Unaligned(&Result.InputCoverageOffsets[Result.InputCount]);
|
|
if(ByteSwap)
|
|
{
|
|
Result.LookaheadCount = kbts__ByteSwap16(Result.LookaheadCount);
|
|
}
|
|
|
|
Result.Records = (kbts__sequence_lookup_record *)(Result.LookaheadCoverageOffsets + Result.LookaheadCount + 1);
|
|
Result.RecordCount = kbts__ReadU16Unaligned(&Result.LookaheadCoverageOffsets[Result.LookaheadCount]);
|
|
if(ByteSwap)
|
|
{
|
|
Result.RecordCount = kbts__ByteSwap16(Result.RecordCount);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
typedef struct kbts__unpacked_lookup
|
|
{
|
|
kbts_u16 *SubtableOffsets;
|
|
kbts__coverage *MarkFilteringSet;
|
|
kbts_u16 Type;
|
|
kbts_u16 Flags;
|
|
kbts_u16 SubtableCount;
|
|
} kbts__unpacked_lookup;
|
|
|
|
static kbts__unpacked_lookup kbts__UnpackLookup(kbts__gdef *Gdef, kbts__lookup *Lookup)
|
|
{
|
|
kbts__unpacked_lookup Result = KBTS__ZERO;
|
|
|
|
Result.Type = kbts__ReadU16Unaligned(&Lookup->Type);
|
|
Result.Flags = kbts__ReadU16Unaligned(&Lookup->Flag);
|
|
Result.SubtableCount = kbts__ReadU16Unaligned(&Lookup->SubtableCount);
|
|
Result.SubtableOffsets = KBTS__POINTER_AFTER(kbts_u16, Lookup);
|
|
if(Result.Flags & KBTS__LOOKUP_FLAG_USE_MARK_FILTERING_SET)
|
|
{
|
|
kbts_u16 MarkFilteringSetIndex = kbts__ReadU16Unaligned(&Result.SubtableOffsets[Result.SubtableCount]);
|
|
|
|
if(Gdef && kbts__ReadU16Unaligned(&Gdef->MarkGlyphSetsDefinitionOffset))
|
|
{
|
|
kbts__mark_glyph_sets *MarkGlyphSets = KBTS__POINTER_OFFSET(kbts__mark_glyph_sets, Gdef, kbts__ReadU16Unaligned(&Gdef->MarkGlyphSetsDefinitionOffset));
|
|
|
|
if(kbts__ReadU16Unaligned(&MarkGlyphSets->MarkGlyphSetCount) > MarkFilteringSetIndex)
|
|
{
|
|
kbts_u32 *CoverageOffsets = KBTS__POINTER_AFTER(kbts_u32, MarkGlyphSets);
|
|
kbts_un CoverageOffset = kbts__ReadU32Unaligned(&CoverageOffsets[MarkFilteringSetIndex]);
|
|
Result.MarkFilteringSet = KBTS__POINTER_OFFSET(kbts__coverage, MarkGlyphSets, CoverageOffset);
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__script_pointer kbts__GetScript(kbts__script_list *List, kbts_un Index)
|
|
{
|
|
kbts__script_record *Records = (kbts__script_record *)(List + 1);
|
|
kbts__script_record *Record = &Records[Index];
|
|
|
|
kbts__script_pointer Result;
|
|
Result.Tag = kbts__ReadU32Unaligned(&Record->Tag);
|
|
Result.Script = (kbts__ot_script *)((char *)List + kbts__ReadU16Unaligned(&Record->Offset));
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__langsys *kbts__GetDefaultLangsys(kbts__ot_script *Script)
|
|
{
|
|
kbts__langsys *Result = kbts__ReadU16Unaligned(&Script->DefaultLangsysOffset) ? KBTS__POINTER_OFFSET(kbts__langsys, Script, kbts__ReadU16Unaligned(&Script->DefaultLangsysOffset)) : 0;
|
|
return Result;
|
|
}
|
|
|
|
static kbts__langsys_pointer kbts__GetLangsys(kbts__ot_script *Script, kbts_un Index)
|
|
{
|
|
kbts__langsys_record *Records = (kbts__langsys_record *)(Script + 1);
|
|
kbts__langsys_record *Record = &Records[Index];
|
|
|
|
kbts__langsys_pointer Result;
|
|
Result.Tag = kbts__ReadU32Unaligned(&Record->Tag);
|
|
Result.Langsys = KBTS__POINTER_OFFSET(kbts__langsys, Script, kbts__ReadU16Unaligned(&Record->Offset));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__feature_pointer kbts__GetFeature(kbts__feature_list *List, kbts_un Index)
|
|
{
|
|
kbts__feature_record *Records = (kbts__feature_record *)(List + 1);
|
|
kbts__feature_record *Record = &Records[Index];
|
|
|
|
kbts__feature_pointer Result;
|
|
Result.Tag = kbts__ReadU32Unaligned(&Record->Tag);
|
|
Result.Feature = KBTS__POINTER_OFFSET(kbts__feature, List, kbts__ReadU16Unaligned(&Record->Offset));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__lookup_list *kbts__GetLookupList(kbts__gsub_gpos *GsubGpos)
|
|
{
|
|
kbts__lookup_list *Result = 0;
|
|
|
|
if(GsubGpos)
|
|
{
|
|
Result = KBTS__POINTER_OFFSET(kbts__lookup_list, GsubGpos, kbts__ReadU16Unaligned(&GsubGpos->LookupListOffset));
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__lookup *kbts__GetLookup(kbts__lookup_list *List, kbts_un Index)
|
|
{
|
|
kbts__lookup *Result = 0;
|
|
|
|
if(Index < kbts__ReadU16Unaligned(&List->Count))
|
|
{
|
|
kbts_u16 *Offsets = KBTS__POINTER_AFTER(kbts_u16, List);
|
|
Result = KBTS__POINTER_OFFSET(kbts__lookup, List, kbts__ReadU16Unaligned(&Offsets[Index]));
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__sequence_rule_set *kbts__GetSequenceRuleSet(kbts__sequence_context_1 *Context, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Context + 1);
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(&Offsets[Index]);
|
|
|
|
kbts__sequence_rule_set *Result = Offset ? KBTS__POINTER_OFFSET(kbts__sequence_rule_set, Context, Offset) : 0;
|
|
return Result;
|
|
}
|
|
|
|
static kbts__sequence_rule *kbts__GetSequenceRule(kbts__sequence_rule_set *Set, kbts_un Index)
|
|
{
|
|
KBTS_ASSERT(Index < kbts__ReadU16Unaligned(&Set->Count));
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Set + 1);
|
|
kbts__sequence_rule *Result = KBTS__POINTER_OFFSET(kbts__sequence_rule, Set, kbts__ReadU16Unaligned(&Offsets[Index]));
|
|
return Result;
|
|
}
|
|
|
|
// A single class definition table can be used by multiple lookups, so it is possible
|
|
// (and valid) to get an out-of-bounds glyph class.
|
|
static kbts__class_sequence_rule_set *kbts__GetClassSequenceRuleSet(kbts__sequence_context_2 *Context, kbts_un Index)
|
|
{
|
|
kbts__class_sequence_rule_set *Result = 0;
|
|
if(Index < kbts__ReadU16Unaligned(&Context->ClassSequenceRuleSetCount))
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Context + 1);
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(&Offsets[Index]);
|
|
Result = Offset ? KBTS__POINTER_OFFSET(kbts__class_sequence_rule_set, Context, Offset) : 0;
|
|
}
|
|
return Result;
|
|
}
|
|
|
|
static kbts__class_sequence_rule *kbts__GetClassSequenceRule(kbts__class_sequence_rule_set *Set, kbts_un Index)
|
|
{
|
|
KBTS_ASSERT(Index < kbts__ReadU16Unaligned(&Set->Count));
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Set + 1);
|
|
kbts__class_sequence_rule *Result = KBTS__POINTER_OFFSET(kbts__class_sequence_rule, Set, kbts__ReadU16Unaligned(&Offsets[Index]));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__chained_sequence_rule_set *kbts__GetChainedSequenceRuleSet(kbts__chained_sequence_context_1 *Context, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Context + 1);
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(&Offsets[Index]);
|
|
kbts__chained_sequence_rule_set *Result = Offset ? KBTS__POINTER_OFFSET(kbts__chained_sequence_rule_set, Context, Offset) : 0;
|
|
return Result;
|
|
}
|
|
|
|
static kbts__chained_sequence_rule *kbts__GetChainedSequenceRule(kbts__chained_sequence_rule_set *Set, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Set + 1);
|
|
kbts__chained_sequence_rule *Result = KBTS__POINTER_OFFSET(kbts__chained_sequence_rule, Set, kbts__ReadU16Unaligned(&Offsets[Index]));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__chained_sequence_rule_set *kbts__GetChainedClassSequenceRuleSet(kbts__chained_sequence_context_2 *Context, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Context + 1);
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(&Offsets[Index]);
|
|
kbts__chained_sequence_rule_set *Result = Offset ? KBTS__POINTER_OFFSET(kbts__chained_sequence_rule_set, Context, Offset) : 0;
|
|
return Result;
|
|
}
|
|
|
|
static kbts__chained_sequence_rule *kbts__GetChainedClassSequenceRule(kbts__chained_sequence_rule_set *Set, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Set + 1);
|
|
kbts__chained_sequence_rule *Result = KBTS__POINTER_OFFSET(kbts__chained_sequence_rule, Set, kbts__ReadU16Unaligned(&Offsets[Index]));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__cmap_subtable_pointer kbts__GetCmapSubtable(kbts__cmap *Cmap, kbts_un Index)
|
|
{
|
|
kbts__encoding_record *Records = (kbts__encoding_record *)(Cmap + 1);
|
|
kbts__encoding_record *Record = &Records[Index];
|
|
|
|
kbts__cmap_subtable_pointer Result;
|
|
Result.PlatformId = kbts__ReadU16Unaligned(&Record->PlatformId);
|
|
Result.EncodingId = kbts__ReadU16Unaligned(&Record->EncodingId);
|
|
Result.Subtable = KBTS__POINTER_OFFSET(kbts_u16, Cmap, kbts__ReadU32Unaligned(&Record->SubtableOffset));
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__sequence *kbts__GetSequence(kbts__multiple_substitution *Subst, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Subst + 1);
|
|
kbts__sequence *Result = KBTS__POINTER_OFFSET(kbts__sequence, Subst, kbts__ReadU16Unaligned(&Offsets[Index]));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__alternate_set *kbts__GetAlternateSet(kbts__alternate_substitution *Subst, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Subst + 1);
|
|
kbts__alternate_set *Result = KBTS__POINTER_OFFSET(kbts__alternate_set, Subst, kbts__ReadU16Unaligned(&Offsets[Index]));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__ligature_set *kbts__GetLigatureSet(kbts__ligature_substitution *Subst, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Subst + 1);
|
|
kbts__ligature_set *Result = KBTS__POINTER_OFFSET(kbts__ligature_set, Subst, kbts__ReadU16Unaligned(&Offsets[Index]));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__ligature *kbts__GetLigature(kbts__ligature_set *Set, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = (kbts_u16 *)(Set + 1);
|
|
kbts_un Offset = kbts__ReadU16Unaligned(&Offsets[Index]);
|
|
kbts__ligature *Result = KBTS__POINTER_OFFSET(kbts__ligature, Set, Offset);
|
|
return Result;
|
|
}
|
|
|
|
static kbts__mark_record *kbts__GetMarkRecord(kbts__mark_array *Array, kbts_un Index)
|
|
{
|
|
kbts__mark_record *Records = KBTS__POINTER_AFTER(kbts__mark_record, Array);
|
|
kbts__mark_record *Result = &Records[Index];
|
|
return Result;
|
|
}
|
|
|
|
static kbts__ligature_attach *kbts__GetLigatureAttach(kbts__ligature_array *Array, kbts_un Index)
|
|
{
|
|
kbts_u16 *Offsets = KBTS__POINTER_AFTER(kbts_u16, Array);
|
|
kbts__ligature_attach *Result = KBTS__POINTER_OFFSET(kbts__ligature_attach, Array, kbts__ReadU16Unaligned(&Offsets[Index]));
|
|
return Result;
|
|
}
|
|
|
|
static kbts__anchor *kbts__GetLigatureAttachAnchor(kbts__mark_to_ligature_attachment *Adjust, kbts__ligature_attach *Attach, kbts_u16 MarkClass, kbts_un ComponentIndex)
|
|
{
|
|
kbts_u16 *Offsets = KBTS__POINTER_AFTER(kbts_u16, Attach);
|
|
kbts_un Adjust_MarkClassCount = kbts__ReadU16Unaligned(&Adjust->MarkClassCount);
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(&Offsets[ComponentIndex * Adjust_MarkClassCount + MarkClass]);
|
|
|
|
kbts__anchor *Result = 0;
|
|
if(Offset)
|
|
{
|
|
Result = KBTS__POINTER_OFFSET(kbts__anchor, Attach, Offset);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__ResolveAnchorXy(kbts_shape_scratchpad *Scratchpad, kbts__anchor *Anchor, kbts_s32 *X_, kbts_s32 *Y_)
|
|
{
|
|
kbts_s32 X = kbts__ReadS16Unaligned(&Anchor->X);
|
|
kbts_s32 Y = kbts__ReadS16Unaligned(&Anchor->Y);
|
|
|
|
if(kbts__ReadU16Unaligned(&Anchor->Format) == 3)
|
|
{
|
|
kbts__item_variation_store *GdefItemVariationStore = Scratchpad->GdefItemVariationStore;
|
|
kbts_s16 *VariationVectorNormalized = Scratchpad->VariationVectorNormalized;
|
|
|
|
if(kbts__ReadU16Unaligned(&Anchor->U.XDeviceOffset))
|
|
{
|
|
kbts__device *Device = KBTS__POINTER_OFFSET(kbts__device, Anchor, kbts__ReadU16Unaligned(&Anchor->U.XDeviceOffset));
|
|
float DeviceDelta = kbts__ResolveDevice(GdefItemVariationStore, VariationVectorNormalized, Device);
|
|
X += kbts__Round32(DeviceDelta);
|
|
}
|
|
|
|
if(kbts__ReadU16Unaligned(&Anchor->YDeviceOffset))
|
|
{
|
|
kbts__device *Device = KBTS__POINTER_OFFSET(kbts__device, Anchor, kbts__ReadU16Unaligned(&Anchor->YDeviceOffset));
|
|
float DeviceDelta = kbts__ResolveDevice(GdefItemVariationStore, VariationVectorNormalized, Device);
|
|
Y += kbts__Round32(DeviceDelta);
|
|
}
|
|
}
|
|
|
|
*X_ = X;
|
|
*Y_ = Y;
|
|
}
|
|
|
|
typedef struct kbts__mark_info
|
|
{
|
|
kbts__mark_array *Array;
|
|
kbts__mark_record *Record;
|
|
kbts__anchor *Anchor;
|
|
} kbts__mark_info;
|
|
|
|
static kbts__mark_info kbts__GetMarkInfo(void *Subtable, kbts_un SubtableOffsetToMarkArray, kbts_un CoverageIndex)
|
|
{
|
|
kbts__mark_info Result = KBTS__ZERO;
|
|
|
|
Result.Array = KBTS__POINTER_OFFSET(kbts__mark_array, Subtable, SubtableOffsetToMarkArray);
|
|
Result.Record = kbts__GetMarkRecord(Result.Array, CoverageIndex);
|
|
Result.Anchor = KBTS__POINTER_OFFSET(kbts__anchor, Result.Array, kbts__ReadU16Unaligned(&Result.Record->AnchorOffset));
|
|
|
|
return Result;
|
|
}
|
|
|
|
//
|
|
//
|
|
//
|
|
|
|
typedef struct kbts__byteswap_context
|
|
{
|
|
char *FileBase;
|
|
char *FileEnd;
|
|
|
|
kbts_u32 *MarkedBytesBitfield; // [IDIV_ROUND_UP(FileEnd - FileBase, 32) * sizeof(kbts_u32)]
|
|
|
|
char *BoundsStart;
|
|
char *BoundsEnd;
|
|
|
|
kbts_b32 ErrorInCurrentBounds;
|
|
kbts_b32 ErrorInAnyBounds;
|
|
} kbts__byteswap_context;
|
|
|
|
typedef struct kbts__bounds
|
|
{
|
|
char *Start;
|
|
char *End;
|
|
} kbts__bounds;
|
|
|
|
static kbts__bounds kbts__BeginBounds(kbts__byteswap_context *Context, void *Start, void *End)
|
|
{
|
|
kbts__bounds Result;
|
|
Result.Start = Context->BoundsStart;
|
|
Result.End = Context->BoundsEnd;
|
|
|
|
Context->BoundsStart = (char *)Start;
|
|
Context->BoundsEnd = (char *)End;
|
|
|
|
Context->ErrorInAnyBounds |= Context->ErrorInCurrentBounds;
|
|
Context->ErrorInCurrentBounds = 0;
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__EndBounds(kbts__byteswap_context *Context, kbts__bounds *Bounds)
|
|
{
|
|
Context->BoundsStart = Bounds->Start;
|
|
Context->BoundsEnd = Bounds->End;
|
|
|
|
return Context->ErrorInCurrentBounds;
|
|
}
|
|
|
|
typedef kbts_u32 kbts__check_and_mark_region_result_flags;
|
|
enum kbts__check_and_mark_region_result_flags_enum
|
|
{
|
|
KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_NONE = 0,
|
|
KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_IN_BOUNDS = 1,
|
|
KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_NEEDS_BYTESWAP = 2,
|
|
};
|
|
|
|
static kbts_b32 kbts__AddressIsMarked(kbts__byteswap_context *Context, void *Pointer)
|
|
{
|
|
kbts_b32 Result = 1;
|
|
|
|
if(!Context->ErrorInCurrentBounds && Pointer)
|
|
{
|
|
if(((char *)Pointer >= Context->BoundsStart) && ((char *)Pointer < Context->BoundsEnd))
|
|
{
|
|
// @Incomplete: Make this table-local.
|
|
char *OnePastHeader = Context->FileBase + sizeof(kbts_blob_header);
|
|
kbts_un Offset = (char *)Pointer - OnePastHeader;
|
|
|
|
kbts_un WordOffset = Offset / 32;
|
|
kbts_un BitOffset = Offset % 32;
|
|
|
|
Result = Context->MarkedBytesBitfield[WordOffset] & (1u << BitOffset);
|
|
}
|
|
else
|
|
{
|
|
Context->ErrorInCurrentBounds = 1;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__SpanIsInBounds(kbts__byteswap_context *Context, void *Start, void *End)
|
|
{
|
|
kbts_b32 Result = (Start <= End) &&
|
|
((char *)Start >= Context->BoundsStart) && ((char *)End <= (char *)Context->BoundsEnd);
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__UnpackChainedSequenceRuleChecked(kbts__byteswap_context *Context, kbts__chained_sequence_rule *Rule, kbts__unpacked_chained_sequence_rule *Unpacked)
|
|
{
|
|
kbts_b32 Result = 0;
|
|
|
|
if(kbts__SpanIsInBounds(Context, Rule, Rule + 1))
|
|
{
|
|
kbts_un BacktrackCount = kbts__ReadU16Unaligned(&Rule->BacktrackGlyphCount);
|
|
kbts_u16 *Backtrack = KBTS__POINTER_AFTER(kbts_u16, Rule);
|
|
if(kbts__SpanIsInBounds(Context, Backtrack, Backtrack + BacktrackCount + 1))
|
|
{
|
|
kbts_un InputCount = kbts__ReadU16Unaligned(&Backtrack[BacktrackCount]);
|
|
kbts_u16 *Input = Backtrack + BacktrackCount + 1;
|
|
if(InputCount &&
|
|
kbts__SpanIsInBounds(Context, Input, Input + InputCount))
|
|
{
|
|
kbts_un LookaheadCount = kbts__ReadU16Unaligned(&Input[InputCount - 1]);
|
|
kbts_u16 *Lookahead = Input + InputCount;
|
|
if(kbts__SpanIsInBounds(Context, Lookahead, Lookahead + LookaheadCount + 1))
|
|
{
|
|
kbts_un RecordCount = kbts__ReadU16Unaligned(&Lookahead[LookaheadCount]);
|
|
kbts__sequence_lookup_record *Records = (kbts__sequence_lookup_record *)(Lookahead + LookaheadCount + 1);
|
|
if(kbts__SpanIsInBounds(Context, Records, Records + RecordCount))
|
|
{
|
|
Unpacked->BacktrackCount = (kbts_u16)BacktrackCount;
|
|
Unpacked->Backtrack = Backtrack;
|
|
Unpacked->InputCount = (kbts_u16)InputCount;
|
|
Unpacked->Input = Input;
|
|
Unpacked->LookaheadCount = (kbts_u16)LookaheadCount;
|
|
Unpacked->Lookahead = Lookahead;
|
|
Unpacked->RecordCount = (kbts_u16)RecordCount;
|
|
Unpacked->Records = Records;
|
|
|
|
Result = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__check_and_mark_region_result_flags kbts__CheckAndMarkRegion(kbts__byteswap_context *Context, void *Start, void *End)
|
|
{
|
|
kbts__check_and_mark_region_result_flags Result = 0;
|
|
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
if(((char *)Start <= (char *)End) &&
|
|
((char *)Start >= Context->BoundsStart) && ((char *)End <= (char *)Context->BoundsEnd))
|
|
{
|
|
Result |= KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_IN_BOUNDS;
|
|
|
|
// @Incomplete: Make this table-local.
|
|
char *OnePastHeader = Context->FileBase + sizeof(kbts_blob_header);
|
|
kbts_un StartOffset = (char *)Start - OnePastHeader;
|
|
kbts_un EndOffset = (char *)End - OnePastHeader;
|
|
|
|
kbts_un StartWordOffset = StartOffset / 32;
|
|
kbts_un StartWordBitOffset = StartOffset % 32;
|
|
kbts_un OnePastLastWordOffset = ((EndOffset - 1) / 32) + 1;
|
|
kbts_un EndWordBitOffset = EndOffset % 32;
|
|
|
|
// We expect the whole range to be either fully marked or fully unmarked.
|
|
kbts_u32 ExpectedBitsMask = (Context->MarkedBytesBitfield[StartWordOffset] & (1u << StartWordBitOffset)) ? 0xFFFFFFFFu : 0;
|
|
|
|
kbts_u32 StartWordMask = 0xFFFFFFFFu << StartWordBitOffset;
|
|
kbts_u32 EndWordMask = 0xFFFFFFFFu;
|
|
if(EndWordBitOffset)
|
|
{
|
|
EndWordMask >>= 32 - EndWordBitOffset;
|
|
}
|
|
|
|
for(kbts_un WordOffset = StartWordOffset;
|
|
WordOffset < OnePastLastWordOffset;
|
|
++WordOffset)
|
|
{
|
|
kbts_u32 UnexpectedBits = Context->MarkedBytesBitfield[WordOffset] ^ ExpectedBitsMask;
|
|
if(WordOffset == StartWordOffset)
|
|
{
|
|
UnexpectedBits &= StartWordMask;
|
|
}
|
|
if((WordOffset + 1) == OnePastLastWordOffset)
|
|
{
|
|
UnexpectedBits &= EndWordMask;
|
|
}
|
|
|
|
if(UnexpectedBits)
|
|
{
|
|
Context->ErrorInCurrentBounds = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(!Context->ErrorInCurrentBounds & !ExpectedBitsMask)
|
|
{
|
|
// All good. We can mark.
|
|
Result |= KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_NEEDS_BYTESWAP;
|
|
|
|
for(kbts_un WordOffset = StartWordOffset;
|
|
WordOffset < OnePastLastWordOffset;
|
|
++WordOffset)
|
|
{
|
|
kbts_u32 Mask = 0xFFFFFFFFu;
|
|
if(WordOffset == StartWordOffset)
|
|
{
|
|
Mask &= StartWordMask;
|
|
}
|
|
if((WordOffset + 1) == OnePastLastWordOffset)
|
|
{
|
|
Mask &= EndWordMask;
|
|
}
|
|
|
|
Context->MarkedBytesBitfield[WordOffset] |= Mask;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Context->ErrorInCurrentBounds = 1;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__MarkOkToReadContext(kbts__byteswap_context *Context, void *Pointer, kbts_un Size)
|
|
{
|
|
kbts__check_and_mark_region_result_flags Flags = kbts__CheckAndMarkRegion(Context, Pointer, (char *)Pointer + Size);
|
|
if(Flags & KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_NEEDS_BYTESWAP)
|
|
{
|
|
kbts__MarkOkToRead(Pointer, Size);
|
|
}
|
|
|
|
return !Context->ErrorInCurrentBounds;
|
|
}
|
|
|
|
static kbts_b32 kbts__ByteSwapArray16Context(kbts__byteswap_context *Context, kbts_u16 *Array, kbts_un Count)
|
|
{
|
|
kbts__check_and_mark_region_result_flags Flags = kbts__CheckAndMarkRegion(Context, Array, Array + Count);
|
|
if(Flags & KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_NEEDS_BYTESWAP)
|
|
{
|
|
kbts__ByteSwapArray16Unchecked(Array, Count);
|
|
}
|
|
|
|
return !Context->ErrorInCurrentBounds;
|
|
}
|
|
|
|
static kbts_b32 kbts__ByteSwapArray32Context(kbts__byteswap_context *Context, kbts_u32 *Array, kbts_un Count)
|
|
{
|
|
kbts__check_and_mark_region_result_flags Flags = kbts__CheckAndMarkRegion(Context, Array, Array + Count);
|
|
if(Flags & KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_NEEDS_BYTESWAP)
|
|
{
|
|
kbts__ByteSwapArray32Unchecked(Array, Count);
|
|
}
|
|
|
|
return !Context->ErrorInCurrentBounds;
|
|
}
|
|
|
|
static kbts_b32 kbts__ByteSwap16InPlaceContext(kbts__byteswap_context *Context, kbts_u16 *Pointer, kbts_un *ByteSwappedValue)
|
|
{
|
|
kbts__check_and_mark_region_result_flags Flags = kbts__CheckAndMarkRegion(Context, Pointer, Pointer + 1);
|
|
kbts_u16 Value = 0;
|
|
|
|
if(Flags & KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_IN_BOUNDS)
|
|
{
|
|
Value = kbts__ReadU16Unaligned(Pointer);
|
|
|
|
if(Flags & KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_NEEDS_BYTESWAP)
|
|
{
|
|
Value = kbts__ByteSwap16(Value);
|
|
|
|
kbts__WriteU16Unaligned(Pointer, Value);
|
|
}
|
|
}
|
|
|
|
if(ByteSwappedValue)
|
|
{
|
|
*ByteSwappedValue = Value;
|
|
}
|
|
|
|
return !Context->ErrorInCurrentBounds;
|
|
}
|
|
|
|
static kbts_b32 kbts__ByteSwap32InPlaceContext(kbts__byteswap_context *Context, kbts_u32 *Pointer, kbts_un *ByteSwappedValue)
|
|
{
|
|
kbts__check_and_mark_region_result_flags Flags = kbts__CheckAndMarkRegion(Context, Pointer, Pointer + 1);
|
|
kbts_u32 Value = 0;
|
|
|
|
if(Flags & KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_IN_BOUNDS)
|
|
{
|
|
Value = kbts__ReadU32Unaligned(Pointer);
|
|
|
|
if(Flags & KBTS__CHECK_AND_MARK_REGION_RESULT_FLAG_NEEDS_BYTESWAP)
|
|
{
|
|
Value = kbts__ByteSwap32(Value);
|
|
|
|
kbts__WriteU32Unaligned(Pointer, Value);
|
|
}
|
|
}
|
|
|
|
if(ByteSwappedValue)
|
|
{
|
|
*ByteSwappedValue = Value;
|
|
}
|
|
|
|
return !Context->ErrorInCurrentBounds;
|
|
}
|
|
|
|
typedef struct kbts__cover_glyph_result
|
|
{
|
|
int Valid;
|
|
kbts_u32 Index;
|
|
} kbts__cover_glyph_result;
|
|
|
|
static int kbts__LookupBeginsWithCoverage(kbts_shaping_table ShapingTable, kbts_u16 LookupType, kbts_u16 Format)
|
|
{
|
|
int Result = 0;
|
|
if(ShapingTable == KBTS_SHAPING_TABLE_GSUB)
|
|
{
|
|
Result = (LookupType != 7) && (Format != 3);
|
|
}
|
|
else
|
|
{
|
|
Result = (LookupType != 9) && (Format != 3);
|
|
}
|
|
return Result;
|
|
}
|
|
|
|
// Except for lookup tables 5.3, 6.3 and 7, all tables begin with (kbts_u16 Format, kbts_u16 CoverageOffset).
|
|
KBTS_INLINE int kbts__GsubLookupBeginsWithCoverage(kbts_u16 LookupType, kbts_u16 Format)
|
|
{
|
|
int Result = kbts__LookupBeginsWithCoverage(KBTS_SHAPING_TABLE_GSUB, LookupType, Format);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE int kbts__GposLookupBeginsWithCoverage(kbts_u16 LookupType, kbts_u16 Format)
|
|
{
|
|
int Result = kbts__LookupBeginsWithCoverage(KBTS_SHAPING_TABLE_GPOS, LookupType, Format);
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__ByteSwapFeature(kbts__byteswap_context *Context, kbts_un OnePastLastLookupIndex, kbts__feature *Feature)
|
|
{
|
|
kbts_u16 *LookupIndices = KBTS__POINTER_AFTER(kbts_u16, Feature);
|
|
if(!kbts__AddressIsMarked(Context, Feature) &&
|
|
kbts__ByteSwapArray16Context(Context, &Feature->FeatureParamsOffset, 2))
|
|
{
|
|
kbts_un Feature_LookupIndexCount = kbts__ReadU16Unaligned(&Feature->LookupIndexCount);
|
|
if(kbts__ByteSwapArray16Context(Context, LookupIndices, Feature_LookupIndexCount))
|
|
{
|
|
// Clip out-of-bounds lookup indices.
|
|
kbts_un ValidLookupIndexCount = 0;
|
|
KBTS__FOR(LookupIndexIndex, 0, Feature_LookupIndexCount)
|
|
{
|
|
kbts_u16 LookupIndex = kbts__ReadU16Unaligned(&LookupIndices[LookupIndexIndex]);
|
|
|
|
if(LookupIndex < OnePastLastLookupIndex)
|
|
{
|
|
kbts__WriteU16Unaligned_(&LookupIndices[ValidLookupIndexCount++], LookupIndex);
|
|
}
|
|
}
|
|
|
|
// We require lookup indices to be sorted per feature for the lookup application order to match Harfbuzz.
|
|
// Lookup indices are _typically_ sorted per feature, but we can't assume it is always the case.
|
|
KBTS__FOR(Iter, 0, ValidLookupIndexCount)
|
|
{
|
|
KBTS__FOR(IndexIndex, 1, ValidLookupIndexCount)
|
|
{
|
|
kbts_u16 Left = kbts__ReadU16Unaligned(&LookupIndices[IndexIndex - 1]);
|
|
kbts_u16 Right = kbts__ReadU16Unaligned(&LookupIndices[IndexIndex]);
|
|
|
|
if(Left > Right)
|
|
{
|
|
kbts__WriteU16Unaligned_(&LookupIndices[IndexIndex - 1], Right);
|
|
kbts__WriteU16Unaligned_(&LookupIndices[IndexIndex], Left);
|
|
}
|
|
}
|
|
}
|
|
|
|
#ifdef KBTS_DUMP
|
|
KBTS__FOR(LookupIndexIndex, 0, ValidLookupIndexCount)
|
|
{
|
|
KBTS_DUMPF(" Lookup index %u\n", kbts__ReadU16Unaligned(&LookupIndices[LookupIndexIndex]));
|
|
}
|
|
#endif
|
|
|
|
kbts__WriteU16Unaligned_(&Feature->LookupIndexCount, (kbts_u16)ValidLookupIndexCount);
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapGsubGposCommon(kbts__byteswap_context *Context, kbts__gsub_gpos *Header)
|
|
{
|
|
kbts__ByteSwapArray16Context(Context, &Header->Major, 5);
|
|
kbts_u16 Header_Minor = kbts__ReadU16Unaligned(&Header->Minor);
|
|
|
|
if(Header_Minor == 1)
|
|
{
|
|
kbts__ByteSwap32InPlaceContext(Context, &Header->FeatureVariationsOffset, 0);
|
|
}
|
|
|
|
kbts_un OnePastLastLookupIndex;
|
|
{
|
|
kbts__lookup_list *LookupList = KBTS__POINTER_OFFSET(kbts__lookup_list, Header, kbts__ReadU16Unaligned(&Header->LookupListOffset));
|
|
|
|
if(!kbts__ByteSwap16InPlaceContext(Context, &LookupList->Count, &OnePastLastLookupIndex))
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
kbts__script_list *ScriptList = KBTS__POINTER_OFFSET(kbts__script_list, Header, kbts__ReadU16Unaligned(&Header->ScriptListOffset));
|
|
kbts_un ScriptListScriptCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &ScriptList->Count, &ScriptListScriptCount))
|
|
{
|
|
kbts__script_record *ScriptRecords = KBTS__POINTER_AFTER(kbts__script_record, ScriptList);
|
|
|
|
if((char *)(ScriptRecords + ScriptListScriptCount) > Context->BoundsEnd)
|
|
{
|
|
Context->ErrorInCurrentBounds = 1;
|
|
return;
|
|
}
|
|
|
|
KBTS__FOR(It, 0, ScriptListScriptCount)
|
|
{
|
|
kbts__script_record *Record = &ScriptRecords[It];
|
|
kbts__MarkOkToReadContext(Context, &Record->Tag, sizeof(Record->Tag));
|
|
|
|
kbts_un RecordScriptOffset;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Record->Offset, &RecordScriptOffset))
|
|
{
|
|
KBTS_DUMPF("Script %.4s\n", (char *)&Record->Tag);
|
|
|
|
kbts__ot_script *Script = KBTS__POINTER_OFFSET(kbts__ot_script, ScriptList, RecordScriptOffset);
|
|
|
|
kbts_un ScriptLangsysCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Script->DefaultLangsysOffset, 0) &&
|
|
kbts__ByteSwap16InPlaceContext(Context, &Script->Count, &ScriptLangsysCount))
|
|
{
|
|
kbts__langsys *DefaultLangsys = kbts__GetDefaultLangsys(Script);
|
|
|
|
if(DefaultLangsys &&
|
|
kbts__ByteSwapArray16Context(Context, &DefaultLangsys->LookupOrderOffset, 3))
|
|
{
|
|
kbts_un FeatureIndexCount = kbts__ReadU16Unaligned(&DefaultLangsys->FeatureIndexCount);
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, DefaultLangsys), FeatureIndexCount);
|
|
}
|
|
|
|
kbts__langsys_record *LangsysRecords = KBTS__POINTER_AFTER(kbts__langsys_record, Script);
|
|
KBTS__FOR(LangsysIndex, 0, ScriptLangsysCount)
|
|
{
|
|
kbts__langsys_record *LangsysRecord = &LangsysRecords[LangsysIndex];
|
|
kbts__MarkOkToReadContext(Context, &LangsysRecord->Tag, sizeof(LangsysRecord->Tag));
|
|
kbts_un LangsysRecord_Offset;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &LangsysRecord->Offset, &LangsysRecord_Offset))
|
|
{
|
|
kbts__langsys *Langsys = KBTS__POINTER_OFFSET(kbts__langsys, Script, LangsysRecord_Offset);
|
|
if(kbts__ByteSwapArray16Context(Context, &Langsys->LookupOrderOffset, 3))
|
|
{
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Langsys), kbts__ReadU16Unaligned(&Langsys->FeatureIndexCount));
|
|
}
|
|
}
|
|
}
|
|
|
|
# ifdef KBTS_DUMP
|
|
if(DefaultLangsys)
|
|
{
|
|
KBTS_DUMPF(" Default langsys @ %zu\n", (char *)DefaultLangsys - Context->FileBase);
|
|
KBTS_DUMPF(" Lookup order offset %u\n", kbts__ReadU16Unaligned(&DefaultLangsys->LookupOrderOffset));
|
|
KBTS_DUMPF(" Required feature %u\n", kbts__ReadU16Unaligned(&DefaultLangsys->RequiredFeatureIndex));
|
|
kbts_u16 *FeatureIndices = KBTS__POINTER_AFTER(kbts_u16, DefaultLangsys);
|
|
KBTS__FOR(FeatureIndexIndex, 0, kbts__ReadU16Unaligned(&DefaultLangsys->FeatureIndexCount))
|
|
{
|
|
KBTS_DUMPF(" Feature %u\n", kbts__ReadU16Unaligned(&FeatureIndices[FeatureIndexIndex]));
|
|
}
|
|
}
|
|
|
|
KBTS__FOR(LangsysIndex, 0, ScriptLangsysCount)
|
|
{
|
|
kbts__langsys_record *LangsysRecord = &LangsysRecords[LangsysIndex];
|
|
kbts_un LangsysRecord_Offset = kbts__ReadU16Unaligned(&LangsysRecord->Offset);
|
|
|
|
kbts__langsys *Langsys = KBTS__POINTER_OFFSET(kbts__langsys, Script, LangsysRecord_Offset);
|
|
KBTS_DUMPF(" Langsys %.4s @ %zu\n", (char *)&LangsysRecord->Tag, (char *)Script + LangsysRecord_Offset - Context->FileBase);
|
|
KBTS_DUMPF(" Lookup order offset %u\n"
|
|
" Required feature %u\n",
|
|
kbts__ReadU16Unaligned(&Langsys->LookupOrderOffset), kbts__ReadU16Unaligned(&Langsys->RequiredFeatureIndex));
|
|
kbts_u16 *FeatureIndices = KBTS__POINTER_AFTER(kbts_u16, Langsys);
|
|
kbts_un Langsys_FeatureIndexCount = kbts__ReadU16Unaligned(&Langsys->FeatureIndexCount);
|
|
KBTS__FOR(FeatureIndexIndex, 0, Langsys_FeatureIndexCount)
|
|
{
|
|
KBTS_DUMPF(" Feature %u\n", kbts__ReadU16Unaligned(&FeatureIndices[FeatureIndexIndex]));
|
|
}
|
|
}
|
|
# endif
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts_un Header_FeatureVariationsOffset = kbts__ReadU32Unaligned(&Header->FeatureVariationsOffset);
|
|
if((Header_Minor == 1) && Header_FeatureVariationsOffset)
|
|
{
|
|
kbts__feature_variations *FeatureVariations = KBTS__POINTER_OFFSET(kbts__feature_variations, Header, Header_FeatureVariationsOffset);
|
|
|
|
kbts_un FeatureVariations_RecordCount;
|
|
if(kbts__ByteSwapArray16Context(Context, &FeatureVariations->Major, 2) &&
|
|
kbts__ByteSwap32InPlaceContext(Context, &FeatureVariations->RecordCount, &FeatureVariations_RecordCount))
|
|
{
|
|
kbts__feature_variation_record *Records = KBTS__POINTER_AFTER(kbts__feature_variation_record, FeatureVariations);
|
|
|
|
KBTS__FOR(VariationIndex, 0, FeatureVariations_RecordCount)
|
|
{
|
|
kbts__feature_variation_record *Record = &Records[VariationIndex];
|
|
|
|
if(kbts__ByteSwapArray32Context(Context, &Record->ConditionSetOffset, 2))
|
|
{
|
|
kbts_un ConditionSetOffset = kbts__ReadU32Unaligned(&Record->ConditionSetOffset);
|
|
if(ConditionSetOffset)
|
|
{
|
|
kbts__condition_set *Set = KBTS__POINTER_OFFSET(kbts__condition_set, FeatureVariations, ConditionSetOffset);
|
|
kbts_un Set_Count;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Set->Count, &Set_Count))
|
|
{
|
|
kbts_u32 *ConditionOffsets = KBTS__POINTER_AFTER(kbts_u32, Set);
|
|
if(kbts__ByteSwapArray32Context(Context, ConditionOffsets, Set_Count))
|
|
{
|
|
KBTS__FOR(ConditionIndex, 0, Set_Count)
|
|
{
|
|
kbts_un ConditionOffset = kbts__ReadU32Unaligned(&ConditionOffsets[ConditionIndex]);
|
|
kbts__condition_1 *Condition = KBTS__POINTER_OFFSET(kbts__condition_1, Set, ConditionOffset);
|
|
|
|
kbts__ByteSwapArray16Context(Context, &Condition->Format, 4);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts_un FeatureTableSubstitutionOffset = kbts__ReadU32Unaligned(&Record->FeatureTableSubstitutionOffset);
|
|
if(FeatureTableSubstitutionOffset)
|
|
{
|
|
kbts__feature_table_substitution *FeatureSubst = KBTS__POINTER_OFFSET(kbts__feature_table_substitution, FeatureVariations, FeatureTableSubstitutionOffset);
|
|
if(kbts__ByteSwapArray16Context(Context, &FeatureSubst->Major, 3))
|
|
{
|
|
kbts__feature_table_substitution_record *SubstRecords = KBTS__POINTER_AFTER(kbts__feature_table_substitution_record, FeatureSubst);
|
|
kbts_un FeatureSubst_Count = kbts__ReadU16Unaligned(&FeatureSubst->Count);
|
|
KBTS__FOR(SubstRecordIndex, 0, FeatureSubst_Count)
|
|
{
|
|
kbts__feature_table_substitution_record *SubstRecord = &SubstRecords[SubstRecordIndex];
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &SubstRecord->FeatureIndex, 0))
|
|
{
|
|
kbts_un SubstRecord_AlternateFeatureOffset;
|
|
if(kbts__ByteSwap32InPlaceContext(Context, &SubstRecord->AlternateFeatureOffset, &SubstRecord_AlternateFeatureOffset))
|
|
{
|
|
kbts__feature *Feature = KBTS__POINTER_OFFSET(kbts__feature, FeatureSubst, SubstRecord_AlternateFeatureOffset);
|
|
kbts__ByteSwapFeature(Context, OnePastLastLookupIndex, Feature);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts__feature_list *FeatureList = KBTS__POINTER_OFFSET(kbts__feature_list, Header, kbts__ReadU16Unaligned(&Header->FeatureListOffset));
|
|
kbts_un FeatureList_Count;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &FeatureList->Count, &FeatureList_Count))
|
|
{
|
|
kbts__feature_record *FeatureRecords = KBTS__POINTER_AFTER(kbts__feature_record, FeatureList);
|
|
KBTS__FOR(FeatureRecordIndex, 0, FeatureList_Count)
|
|
{
|
|
kbts__feature_record *FeatureRecord = &FeatureRecords[FeatureRecordIndex];
|
|
|
|
KBTS_DUMPF("Feature %llu %.4s\n", FeatureRecordIndex, (char *)&FeatureRecord->Tag);
|
|
|
|
kbts__MarkOkToReadContext(Context, &FeatureRecord->Tag, 4);
|
|
kbts_un FeatureRecord_Offset;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &FeatureRecord->Offset, &FeatureRecord_Offset))
|
|
{
|
|
kbts__feature *Feature = KBTS__POINTER_OFFSET(kbts__feature, FeatureList, FeatureRecord_Offset);
|
|
kbts__ByteSwapFeature(Context, OnePastLastLookupIndex, Feature);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static kbts_b32 kbts__ByteSwapLookup(kbts__byteswap_context *Context, kbts__lookup *Lookup)
|
|
{
|
|
kbts_b32 Result = 0;
|
|
|
|
if(!kbts__AddressIsMarked(Context, Lookup))
|
|
{
|
|
Result = 1;
|
|
|
|
kbts__ByteSwapArray16Context(Context, &Lookup->Type, 3);
|
|
kbts_u16 *SubtableOffsets = KBTS__POINTER_AFTER(kbts_u16, Lookup);
|
|
|
|
kbts_un U16Count = kbts__ReadU16Unaligned(&Lookup->SubtableCount);
|
|
if(kbts__ReadU16Unaligned(&Lookup->Flag) & KBTS__LOOKUP_FLAG_USE_MARK_FILTERING_SET)
|
|
{
|
|
U16Count += 1;
|
|
}
|
|
|
|
kbts__ByteSwapArray16Context(Context, SubtableOffsets, U16Count);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
#define KBTS__DLLIST_REMOVE(Node) do {(Node)->Prev->Next = (Node)->Next; (Node)->Next->Prev = (Node)->Prev;} while(0)
|
|
#define KBTS__DLLIST_INSERT_BEFORE(A, B) do{(A)->Next = (B); (A)->Prev = (B)->Prev; (A)->Prev->Next = (A)->Next->Prev = (A);} while(0)
|
|
#define KBTS__DLLIST_INSERT_AFTER(A, B) do{(A)->Prev = (B); (A)->Next = (B)->Next; (A)->Prev->Next = (A)->Next->Prev = (A);} while(0)
|
|
#define KBTS__DLLIST_SENTINEL_INIT(Sentinel) do{(Sentinel)->Prev = (Sentinel)->Next = (Sentinel);} while(0)
|
|
|
|
static void kbts__ByteSwapCoverage(kbts__byteswap_context *Context, kbts__coverage *Coverage)
|
|
{
|
|
if(!kbts__AddressIsMarked(Context, Coverage))
|
|
{
|
|
kbts__ByteSwapArray16Context(Context, &Coverage->Format, 2);
|
|
|
|
kbts_un U16Count = 0;
|
|
kbts_u16 Coverage_Format = kbts__ReadU16Unaligned(&Coverage->Format);
|
|
kbts_un Coverage_Count = kbts__ReadU16Unaligned(&Coverage->Count);
|
|
|
|
if(Coverage_Format == 1)
|
|
{
|
|
U16Count = Coverage_Count;
|
|
}
|
|
else if(Coverage_Format == 2)
|
|
{
|
|
U16Count = Coverage_Count * 3;
|
|
}
|
|
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Coverage), U16Count);
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapDevice(kbts__byteswap_context *Context, kbts__device *Device)
|
|
{
|
|
if(!kbts__AddressIsMarked(Context, Device))
|
|
{
|
|
|
|
if(kbts__ByteSwapArray16Context(Context, &Device->U.Device.StartSize, 3))
|
|
{
|
|
/* @Incomplete
|
|
if(kbts__ReadU16Unaligned(&Device->DeltaFormat) <= 3)
|
|
{
|
|
}
|
|
*/
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapAnchor(kbts__byteswap_context *Context, kbts__anchor *Anchor)
|
|
{
|
|
kbts_un Anchor_Format;
|
|
if(!kbts__AddressIsMarked(Context, Anchor) &&
|
|
kbts__ByteSwap16InPlaceContext(Context, &Anchor->Format, &Anchor_Format))
|
|
{
|
|
kbts_un U16Count = 2;
|
|
if(Anchor_Format == 2)
|
|
{
|
|
U16Count = 3;
|
|
}
|
|
else if(Anchor_Format == 3)
|
|
{
|
|
U16Count = 4;
|
|
}
|
|
|
|
kbts__ByteSwapArray16Context(Context, (kbts_u16 *)&Anchor->X, U16Count);
|
|
|
|
if(Anchor_Format == 3)
|
|
{
|
|
kbts__device *XDevice = KBTS__POINTER_OFFSET(kbts__device, Anchor, Anchor->U.XDeviceOffset);
|
|
kbts__ByteSwapDevice(Context, XDevice);
|
|
|
|
kbts__device *YDevice = KBTS__POINTER_OFFSET(kbts__device, Anchor, Anchor->YDeviceOffset);
|
|
kbts__ByteSwapDevice(Context, YDevice);
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapBaseArray(kbts__byteswap_context *Context, kbts_u16 MarkClassCount, kbts__base_array *Array)
|
|
{
|
|
if(!kbts__AddressIsMarked(Context, Array))
|
|
{
|
|
kbts_un Array_BaseCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Array->BaseCount, &Array_BaseCount))
|
|
{
|
|
kbts_u16 *BaseAnchorOffsets = KBTS__POINTER_AFTER(kbts_u16, Array);
|
|
if(kbts__ByteSwapArray16Context(Context, BaseAnchorOffsets, Array_BaseCount * MarkClassCount))
|
|
{
|
|
KBTS__FOR(OffsetIndex, 0, Array_BaseCount * MarkClassCount)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(&BaseAnchorOffsets[OffsetIndex]);
|
|
|
|
if(Offset)
|
|
{
|
|
kbts__ByteSwapAnchor(Context, KBTS__POINTER_OFFSET(kbts__anchor, Array, Offset));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static kbts__unpacked_value_record kbts__ByteSwapValueRecord(kbts__byteswap_context *Context, void *Parent, kbts_u16 ValueFormat, kbts_u16 *Record)
|
|
{
|
|
kbts__unpacked_value_record Result = KBTS__ZERO;
|
|
|
|
if(ValueFormat &&
|
|
!kbts__AddressIsMarked(Context, Record))
|
|
{
|
|
kbts_un U16Count = kbts__PopCount32(ValueFormat);
|
|
|
|
kbts__ByteSwapArray16Context(Context, Record, U16Count);
|
|
|
|
Result = kbts__UnpackValueRecord(Parent, ValueFormat, Record);
|
|
|
|
kbts__ByteSwapDevice(Context, Result.PlacementXDevice);
|
|
kbts__ByteSwapDevice(Context, Result.PlacementYDevice);
|
|
kbts__ByteSwapDevice(Context, Result.AdvanceXDevice);
|
|
kbts__ByteSwapDevice(Context, Result.AdvanceYDevice);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE kbts_un kbts__DeltaSetIndexMapBytesPerEntry(kbts__delta_set_index_map *Map)
|
|
{
|
|
kbts_un Result = ((Map->EntryFormat >> 4) & 0x3) + 1;
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE kbts_un kbts__DeltaSetIndexMapBitsPerInnerIndex(kbts__delta_set_index_map *Map)
|
|
{
|
|
kbts_un Result = (Map->EntryFormat & 0xF) + 1;
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__ByteSwapDeltaSetIndexMap(kbts__byteswap_context *Context, kbts__delta_set_index_map *Map)
|
|
{
|
|
if(!kbts__AddressIsMarked(Context, Map) &&
|
|
kbts__MarkOkToReadContext(Context, Map, 2))
|
|
{
|
|
kbts_un MinimumSize = sizeof(*Map) + ((Map->Format == 0) ? sizeof(kbts_u16) : sizeof(kbts_u32));
|
|
kbts_un BytesPerEntry = kbts__DeltaSetIndexMapBytesPerEntry(Map);
|
|
|
|
if(KBTS__POINTER_OFFSET(char, Map, MinimumSize) <= Context->FileEnd)
|
|
{
|
|
char *Entries = 0;
|
|
kbts_un EntryCount = 0;
|
|
|
|
switch(Map->Format)
|
|
{
|
|
case 0:
|
|
{
|
|
kbts_u16 *MapCount = KBTS__POINTER_AFTER(kbts_u16, Map);
|
|
kbts_un MapCount_;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, MapCount, &MapCount_))
|
|
{
|
|
Entries = KBTS__POINTER_AFTER(char, MapCount);
|
|
EntryCount = MapCount_;
|
|
}
|
|
} break;
|
|
|
|
case 1:
|
|
{
|
|
kbts_u32 *MapCount = KBTS__POINTER_AFTER(kbts_u32, Map);
|
|
kbts_un MapCount_;
|
|
if(kbts__ByteSwap32InPlaceContext(Context, MapCount, &MapCount_))
|
|
{
|
|
Entries = KBTS__POINTER_AFTER(char, MapCount);
|
|
EntryCount = MapCount_;
|
|
}
|
|
} break;
|
|
}
|
|
|
|
if((Entries + EntryCount * BytesPerEntry) > Context->FileEnd)
|
|
{
|
|
Context->ErrorInCurrentBounds |= 1;
|
|
}
|
|
|
|
// If BytesPerEntry == 1, we have nothing to byteswap.
|
|
switch(BytesPerEntry)
|
|
{
|
|
case 1: break; // Nothing to do.
|
|
|
|
case 2:
|
|
{
|
|
kbts__ByteSwapArray16Context(Context, (kbts_u16 *)Entries, EntryCount);
|
|
} break;
|
|
|
|
case 3:
|
|
{
|
|
// Unfortunately, this can happen. UGH.
|
|
// We don't bother byteswapping 24-bit integers because they are dumb anyway.
|
|
kbts__MarkOkToReadContext(Context, Entries, EntryCount * BytesPerEntry);
|
|
} break;
|
|
|
|
case 4:
|
|
{
|
|
kbts__ByteSwapArray32Context(Context, (kbts_u32 *)Entries, EntryCount);
|
|
} break;
|
|
|
|
default: Context->ErrorInCurrentBounds |= 1; break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Context->ErrorInCurrentBounds |= 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapItemVariationStore(kbts__byteswap_context *Context, kbts__item_variation_store *Store)
|
|
{
|
|
if(!kbts__AddressIsMarked(Context, Store))
|
|
{
|
|
kbts_u32 *Store_VariationRegionListOffset = kbts__item_variation_store_VariationRegionListOffset(Store);
|
|
kbts_u16 *Store_ItemVariationDataCount = kbts__item_variation_store_ItemVariationDataCount(Store);
|
|
kbts_u32 *Store_ItemVariationDataOffsets = kbts__item_variation_store_ItemVariationDataOffsets(Store);
|
|
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Store->Format, 0))
|
|
{
|
|
kbts_un VariationRegionListOffset;
|
|
kbts_un ItemVariationDataCount;
|
|
if(kbts__ByteSwap32InPlaceContext(Context, Store_VariationRegionListOffset, &VariationRegionListOffset) &&
|
|
kbts__ByteSwap16InPlaceContext(Context, Store_ItemVariationDataCount, &ItemVariationDataCount))
|
|
{
|
|
kbts__variation_region_list *VariationRegionList = KBTS__POINTER_OFFSET(kbts__variation_region_list, Store, VariationRegionListOffset);
|
|
kbts__region_axis_coordinates *RegionAxes = KBTS__POINTER_AFTER(kbts__region_axis_coordinates, VariationRegionList);
|
|
|
|
if(kbts__ByteSwapArray16Context(Context, &VariationRegionList->AxisCount, 2))
|
|
{
|
|
kbts_un VariationRegionList_RegionCount = kbts__ReadU16Unaligned(&VariationRegionList->RegionCount);
|
|
kbts_un VariationRegionList_AxisCount = kbts__ReadU16Unaligned(&VariationRegionList->AxisCount);
|
|
|
|
kbts__ByteSwapArray16Context(Context, (kbts_u16 *)RegionAxes, VariationRegionList_RegionCount * VariationRegionList_AxisCount * 3);
|
|
}
|
|
|
|
if(!Context->ErrorInCurrentBounds &&
|
|
kbts__ByteSwapArray32Context(Context, Store_ItemVariationDataOffsets, ItemVariationDataCount))
|
|
{
|
|
KBTS__FOR(ItemVariationDataIndex, 0, ItemVariationDataCount)
|
|
{
|
|
kbts_un Offset = kbts__ReadU32Unaligned(&Store_ItemVariationDataOffsets[ItemVariationDataIndex]);
|
|
|
|
if(Offset)
|
|
{
|
|
kbts__item_variation_data *Data = KBTS__POINTER_OFFSET(kbts__item_variation_data, Store, Offset);
|
|
|
|
if(kbts__ByteSwapArray16Context(Context, &Data->ItemCount, 3))
|
|
{
|
|
kbts_u16 *RegionIndices = KBTS__POINTER_AFTER(kbts_u16, Data);
|
|
kbts_un Data_RegionIndexCount = kbts__ReadU16Unaligned(&Data->RegionIndexCount);
|
|
if(kbts__ByteSwapArray16Context(Context, RegionIndices, Data_RegionIndexCount))
|
|
{
|
|
// From the Microsoft docs:
|
|
// The LONG_WORDS flag should only be used in top-level tables that include
|
|
// 32-bit values that can be variable - currently, only the COLR table.
|
|
// As such, we do not care about (Data->WordDeltaCount & 0x8000).
|
|
|
|
kbts_un WordDeltaCount = kbts__ReadU16Unaligned(&Data->WordDeltaCount) & 0x7FFF;
|
|
|
|
char *DeltaRow = (char *)(RegionIndices + Data_RegionIndexCount);
|
|
kbts_un DeltaRowSize = Data_RegionIndexCount + WordDeltaCount;
|
|
kbts_un Data_ItemCount = kbts__ReadU16Unaligned(&Data->ItemCount);
|
|
KBTS__FOR(DataItemIndex, 0, Data_ItemCount)
|
|
{
|
|
if(!kbts__ByteSwapArray16Context(Context, (kbts_u16 *)DeltaRow, WordDeltaCount))
|
|
{
|
|
break;
|
|
}
|
|
|
|
DeltaRow += DeltaRowSize;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapMarkArray(kbts__byteswap_context *Context, kbts__mark_array *MarkArray)
|
|
{
|
|
kbts_un MarkArray_Count;
|
|
if(!kbts__AddressIsMarked(Context, MarkArray) &&
|
|
kbts__ByteSwap16InPlaceContext(Context, &MarkArray->Count, &MarkArray_Count) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, MarkArray), MarkArray_Count * 2))
|
|
{
|
|
kbts__mark_record *MarkRecords = KBTS__POINTER_AFTER(kbts__mark_record, MarkArray);
|
|
KBTS__FOR(MarkRecordIndex, 0, MarkArray_Count)
|
|
{
|
|
kbts__mark_record *MarkRecord = &MarkRecords[MarkRecordIndex];
|
|
kbts_un MarkRecord_AnchorOffset = kbts__ReadU16Unaligned(&MarkRecord->AnchorOffset);
|
|
|
|
kbts__ByteSwapAnchor(Context, KBTS__POINTER_OFFSET(kbts__anchor, MarkArray, MarkRecord_AnchorOffset));
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapChainedSequenceRuleSet(kbts__byteswap_context *Context, kbts__chained_sequence_rule_set *Set)
|
|
{
|
|
if(!kbts__AddressIsMarked(Context, Set))
|
|
{
|
|
kbts_un Set_Count;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Set->Count, &Set_Count) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Set), Set_Count))
|
|
{
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__chained_sequence_rule *Rule = kbts__GetChainedSequenceRule(Set, RuleIndex);
|
|
|
|
if(!kbts__AddressIsMarked(Context, Rule))
|
|
{
|
|
kbts_un BacktrackCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Rule->BacktrackGlyphCount, &BacktrackCount))
|
|
{
|
|
kbts_u16 *Backtrack = KBTS__POINTER_AFTER(kbts_u16, Rule);
|
|
if(kbts__ByteSwapArray16Context(Context, Backtrack, BacktrackCount))
|
|
{
|
|
kbts_un InputCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Backtrack[BacktrackCount], &InputCount))
|
|
{
|
|
kbts_u16 *Input = Backtrack + BacktrackCount + 1;
|
|
if(kbts__ByteSwapArray16Context(Context, Input, InputCount))
|
|
{
|
|
kbts_un LookaheadCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Input[InputCount - 1], &LookaheadCount))
|
|
{
|
|
kbts_u16 *Lookahead = Input + InputCount;
|
|
if(kbts__ByteSwapArray16Context(Context, Lookahead, LookaheadCount))
|
|
{
|
|
kbts_un RecordCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Lookahead[LookaheadCount], &RecordCount))
|
|
{
|
|
kbts__sequence_lookup_record *Records = (kbts__sequence_lookup_record *)(Lookahead + LookaheadCount + 1);
|
|
kbts__ByteSwapArray16Context(Context, &Records->SequenceIndex, RecordCount * 2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#ifdef KBTS_DUMP
|
|
static void kbts__DumpClassDefinition(kbts_u16 *Base)
|
|
{
|
|
kbts_u16 Format = kbts__ReadU16Unaligned(Base);
|
|
if(Format == 1)
|
|
{
|
|
kbts__class_definition_1 *ClassDef = (kbts__class_definition_1 *)Base;
|
|
kbts_u16 *ClassValues = KBTS__POINTER_AFTER(kbts_u16, ClassDef);
|
|
kbts_un ClassDef_GlyphCount = kbts__ReadU16Unaligned(&ClassDef->GlyphCount);
|
|
|
|
KBTS__FOR(GlyphIndex, 0, ClassDef_GlyphCount)
|
|
{
|
|
KBTS_DUMPF("%llx -> %u\n", kbts__ReadU16Unaligned(&ClassDef->StartGlyphId) + GlyphIndex, kbts__ReadU16Unaligned(&ClassValues[GlyphIndex]));
|
|
}
|
|
}
|
|
else if(Format == 2)
|
|
{
|
|
kbts__class_definition_2 *ClassDef = (kbts__class_definition_2 *)Base;
|
|
kbts__class_range_record *Ranges = KBTS__POINTER_AFTER(kbts__class_range_record, ClassDef);
|
|
kbts_un ClassDef_Count = kbts__ReadU16Unaligned(&ClassDef->Count);
|
|
KBTS__FOR(RangeIndex, 0, ClassDef_Count)
|
|
{
|
|
kbts__class_range_record *Range = &Ranges[RangeIndex];
|
|
|
|
KBTS_DUMPF("[%x..%x] -> %u\n", kbts__ReadU16Unaligned(&Range->StartGlyphId), kbts__ReadU16Unaligned(&Range->EndGlyphId), kbts__ReadU16Unaligned(&Range->Class));
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
|
|
static void kbts__ByteSwapClassDefinition(kbts__byteswap_context *Context, kbts_u16 *Base)
|
|
{
|
|
if(!kbts__AddressIsMarked(Context, Base))
|
|
{
|
|
kbts_un Format;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, Base, &Format))
|
|
{
|
|
if(Format == 1)
|
|
{
|
|
kbts__class_definition_1 *ClassDef = (kbts__class_definition_1 *)Base;
|
|
if(kbts__ByteSwapArray16Context(Context, &ClassDef->StartGlyphId, 2))
|
|
{
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, ClassDef), kbts__ReadU16Unaligned(&ClassDef->GlyphCount));
|
|
}
|
|
}
|
|
else if(Format == 2)
|
|
{
|
|
kbts__class_definition_2 *ClassDef = (kbts__class_definition_2 *)Base;
|
|
kbts_un ClassDef_Count;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &ClassDef->Count, &ClassDef_Count))
|
|
{
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, ClassDef), ClassDef_Count * 3);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
typedef struct kbts__glyph_class_from_table_result
|
|
{
|
|
int Found;
|
|
kbts_u16 Class;
|
|
} kbts__glyph_class_from_table_result;
|
|
|
|
static kbts__glyph_class_from_table_result kbts__GlyphClassFromTable(kbts_u16 *ClassDefinitionBase, kbts_un Id)
|
|
{
|
|
kbts__glyph_class_from_table_result Result = KBTS__ZERO;
|
|
|
|
// From the Microsoft docs:
|
|
// There is one offset to a ChainedClassSequenceRuleSet subtable for each class defined in the input sequence
|
|
// class definition table. The offsets are listed in class value order.
|
|
// This means that we do not actually care what the class _values_ are. We only care about the classes' relative
|
|
// values.
|
|
// Also from the Microsoft docs, about class definition tables:
|
|
// A class definition table (ClassDef) assigns glyphs into classes, beginning with Class 1, then Class 2, and so
|
|
// on. All glyphs not assigned to a class fall into Class 0.
|
|
// So, we should be able to pretty reliably just subtract 1 from the class to get.
|
|
kbts_u16 Format = kbts__ReadU16Unaligned(ClassDefinitionBase);
|
|
if(Format == 1)
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(GlyphClassFromTable1);
|
|
kbts__class_definition_1 *ClassDef = (kbts__class_definition_1 *)ClassDefinitionBase;
|
|
kbts_u16 *GlyphClasses = KBTS__POINTER_AFTER(kbts_u16, ClassDef);
|
|
|
|
kbts_un Offset = Id - kbts__ReadU16Unaligned(&ClassDef->StartGlyphId);
|
|
if(Offset < kbts__ReadU16Unaligned(&ClassDef->GlyphCount))
|
|
{
|
|
Result.Class = kbts__ReadU16Unaligned(&GlyphClasses[Offset]);
|
|
Result.Found = 1;
|
|
}
|
|
KBTS_INSTRUMENT_BLOCK_END(GlyphClassFromTable1);
|
|
}
|
|
else if(Format == 2)
|
|
{
|
|
kbts__class_definition_2 *ClassDef = (kbts__class_definition_2 *)ClassDefinitionBase;
|
|
kbts__class_range_record *Ranges = KBTS__POINTER_AFTER(kbts__class_range_record, ClassDef);
|
|
|
|
kbts_un RangeCount = kbts__ReadU16Unaligned(&ClassDef->Count);
|
|
if(RangeCount)
|
|
{
|
|
while(RangeCount > 1)
|
|
{
|
|
kbts_un HalfCount = RangeCount / 2;
|
|
Ranges = (kbts__ReadU16Unaligned(&Ranges[HalfCount - 1].EndGlyphId) < Id) ? (Ranges + HalfCount) : Ranges;
|
|
RangeCount -= HalfCount;
|
|
}
|
|
|
|
if((Id >= kbts__ReadU16Unaligned(&Ranges->StartGlyphId)) &&
|
|
(Id <= kbts__ReadU16Unaligned(&Ranges->EndGlyphId)))
|
|
{
|
|
Result.Class = kbts__ReadU16Unaligned(&Ranges->Class);
|
|
Result.Found = 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__cover_glyph_result kbts__CoverGlyph(kbts__coverage *Coverage, kbts_u16 GlyphId)
|
|
{
|
|
KBTS_INSTRUMENT_FUNCTION_BEGIN;
|
|
kbts__cover_glyph_result Result = KBTS__ZERO;
|
|
|
|
kbts_un Count = kbts__ReadU16Unaligned(&Coverage->Count);
|
|
|
|
if(Count)
|
|
{
|
|
kbts_u16 Format = kbts__ReadU16Unaligned(&Coverage->Format);
|
|
|
|
if(Format == 1)
|
|
{
|
|
kbts_u16 *GlyphIds = KBTS__POINTER_AFTER(kbts_u16, Coverage);
|
|
|
|
while(Count > 1)
|
|
{
|
|
kbts_un HalfCount = Count / 2;
|
|
GlyphIds = (kbts__ReadU16Unaligned(&GlyphIds[HalfCount - 1]) < GlyphId) ? (GlyphIds + HalfCount) : GlyphIds;
|
|
Count -= HalfCount;
|
|
}
|
|
|
|
if(GlyphId == kbts__ReadU16Unaligned(GlyphIds))
|
|
{
|
|
Result.Valid = 1;
|
|
Result.Index = (kbts_u32)(GlyphIds - KBTS__POINTER_AFTER(kbts_u16, Coverage));
|
|
}
|
|
}
|
|
else if(Format == 2)
|
|
{
|
|
kbts__range_record *Ranges = KBTS__POINTER_AFTER(kbts__range_record, Coverage);
|
|
|
|
while(Count > 1)
|
|
{
|
|
kbts_un HalfCount = Count / 2;
|
|
Ranges = (kbts__ReadU16Unaligned(&Ranges[HalfCount - 1].EndGlyphId) < GlyphId) ? (Ranges + HalfCount) : Ranges;
|
|
Count -= HalfCount;
|
|
}
|
|
|
|
if((GlyphId >= kbts__ReadU16Unaligned(&Ranges->StartGlyphId)) &&
|
|
(GlyphId <= kbts__ReadU16Unaligned(&Ranges->EndGlyphId)))
|
|
{
|
|
Result.Valid = 1;
|
|
Result.Index = kbts__ReadU16Unaligned(&Ranges->StartCoverageIndex) + GlyphId - kbts__ReadU16Unaligned(&Ranges->StartGlyphId);
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_FUNCTION_END;
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__ByteSwapSequenceContextSubtable(kbts__byteswap_context *Context, kbts_u16 *Base)
|
|
{
|
|
kbts_u16 Format = kbts__ReadU16Unaligned(Base);
|
|
|
|
if(Format == 1)
|
|
{
|
|
kbts__sequence_context_1 *Subst = (kbts__sequence_context_1 *)Base;
|
|
kbts_un Subst_SeqRuleSetCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Subst->SeqRuleSetCount, &Subst_SeqRuleSetCount) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Subst), Subst_SeqRuleSetCount))
|
|
{
|
|
KBTS__FOR(SetIndex, 0, Subst_SeqRuleSetCount)
|
|
{
|
|
kbts__sequence_rule_set *Set = kbts__GetSequenceRuleSet(Subst, SetIndex);
|
|
|
|
if(Set)
|
|
{
|
|
kbts_un SetRuleCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Set->Count, &SetRuleCount) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Set), SetRuleCount))
|
|
{
|
|
KBTS__FOR(RuleIndex, 0, SetRuleCount)
|
|
{
|
|
kbts__sequence_rule *Rule = kbts__GetSequenceRule(Set, RuleIndex);
|
|
|
|
if(kbts__ByteSwapArray16Context(Context, &Rule->GlyphCount, 2))
|
|
{
|
|
kbts_un Rule_GlyphCount = kbts__ReadU16Unaligned(&Rule->GlyphCount);
|
|
kbts_un Rule_SequenceLookupCount = kbts__ReadU16Unaligned(&Rule->SequenceLookupCount);
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Rule), Rule_GlyphCount - 1 + Rule_SequenceLookupCount * 2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if(Format == 2)
|
|
{
|
|
kbts__sequence_context_2 *Subst = (kbts__sequence_context_2 *)Base;
|
|
if(kbts__ByteSwapArray16Context(Context, &Subst->ClassDefOffset, 2))
|
|
{
|
|
kbts_un Subst_ClassSequenceRuleSetCount = kbts__ReadU16Unaligned(&Subst->ClassSequenceRuleSetCount);
|
|
if(kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Subst), Subst_ClassSequenceRuleSetCount))
|
|
{
|
|
kbts_un Subst_ClassDefOffset = kbts__ReadU16Unaligned(&Subst->ClassDefOffset);
|
|
kbts_u16 *ClassDefBase = KBTS__POINTER_OFFSET(kbts_u16, Subst, Subst_ClassDefOffset);
|
|
kbts__ByteSwapClassDefinition(Context, ClassDefBase);
|
|
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
KBTS__FOR(SetIndex, 0, Subst_ClassSequenceRuleSetCount)
|
|
{
|
|
kbts__class_sequence_rule_set *Set = kbts__GetClassSequenceRuleSet(Subst, SetIndex);
|
|
|
|
if(Set)
|
|
{
|
|
kbts_un Set_Count;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Set->Count, &Set_Count) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Set), Set_Count))
|
|
{
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__class_sequence_rule *Rule = kbts__GetClassSequenceRule(Set, RuleIndex);
|
|
|
|
if(kbts__ByteSwapArray16Context(Context, &Rule->GlyphCount, 2))
|
|
{
|
|
kbts_un Rule_GlyphCount = kbts__ReadU16Unaligned(&Rule->GlyphCount);
|
|
kbts_un Rule_SequenceLookupCount = kbts__ReadU16Unaligned(&Rule->SequenceLookupCount);
|
|
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Rule), Rule_GlyphCount - 1 + 2 * Rule_SequenceLookupCount);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#ifdef KBTS_DUMP
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
kbts__DumpClassDefinition(ClassDefBase);
|
|
KBTS__FOR(SetIndex, 0, Subst_ClassSequenceRuleSetCount)
|
|
{
|
|
kbts__class_sequence_rule_set *Set = kbts__GetClassSequenceRuleSet(Subst, SetIndex);
|
|
|
|
if(Set)
|
|
{
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__class_sequence_rule *Rule = kbts__GetClassSequenceRule(Set, RuleIndex);
|
|
kbts_u16 *InputSequence = KBTS__POINTER_AFTER(kbts_u16, Rule);
|
|
kbts_un Rule_GlyphCount = kbts__ReadU16Unaligned(&Rule->GlyphCount);
|
|
kbts__sequence_lookup_record *Records = (kbts__sequence_lookup_record *)(InputSequence + Rule_GlyphCount - 1);
|
|
KBTS_DUMPF("Input: [");
|
|
KBTS__FOR(GlyphIndex, 1, Rule_GlyphCount)
|
|
{
|
|
KBTS_DUMPF(", %x", kbts__ReadU16Unaligned(&InputSequence[GlyphIndex - 1]));
|
|
}
|
|
KBTS_DUMPF("]\nRecords: [");
|
|
kbts_un Rule_SequenceLookupCount = kbts__ReadU16Unaligned(&Rule->SequenceLookupCount);
|
|
KBTS__FOR(RecordIndex, 0, Rule_SequenceLookupCount)
|
|
{
|
|
kbts__sequence_lookup_record *Record = &Records[RecordIndex];
|
|
if(RecordIndex) KBTS_DUMPF(", ");
|
|
KBTS_DUMPF("%u@%u", kbts__ReadU16Unaligned(&Record->LookupListIndex), kbts__ReadU16Unaligned(&Record->SequenceIndex));
|
|
}
|
|
KBTS_DUMPF("]\n");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if(Format == 3)
|
|
{
|
|
kbts__sequence_context_3 *Subst = (kbts__sequence_context_3 *)Base;
|
|
if(kbts__ByteSwapArray16Context(Context, &Subst->GlyphCount, 2))
|
|
{
|
|
kbts_un Subst_GlyphCount = kbts__ReadU16Unaligned(&Subst->GlyphCount);
|
|
kbts_un Subst_SequenceLookupCount = kbts__ReadU16Unaligned(&Subst->SequenceLookupCount);
|
|
|
|
kbts_u16 *CoverageOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
if(kbts__ByteSwapArray16Context(Context, CoverageOffsets, Subst_GlyphCount + 2 * Subst_SequenceLookupCount))
|
|
{
|
|
KBTS__FOR(CoverageIndex, 0, Subst_GlyphCount)
|
|
{
|
|
kbts__coverage *Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&CoverageOffsets[CoverageIndex]));
|
|
|
|
kbts__ByteSwapCoverage(Context, Coverage);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
typedef kbts_u32 kbts__skip_flags;
|
|
enum kbts__skip_flags_enum
|
|
{
|
|
KBTS__SKIP_FLAG_NONE,
|
|
KBTS__SKIP_FLAG_ZWNJ = (1 << 0),
|
|
KBTS__SKIP_FLAG_ZWJ = (1 << 1),
|
|
KBTS__SKIP_FLAG_DEFAULT_IGNORABLES_NOT_SKIPPED_BY_GSUB = (1 << 2),
|
|
};
|
|
// The Harfbuzz behavior is:
|
|
// - GPOS lookups always skip ZWNJ.
|
|
// - Sequence lookups always skip ZWJ.
|
|
// - GSUB sequence lookups skip ZWNJ when requested.
|
|
// - Regular lookups skip ZWJ when requested.
|
|
#define KBTS__SKIP_FLAGS_GSUB_REGULAR(RequestedFlags) ((RequestedFlags) & KBTS__SKIP_FLAG_ZWJ)
|
|
#define KBTS__SKIP_FLAGS_GSUB_SEQUENCE(RequestedFlags) (KBTS__SKIP_FLAG_ZWJ | ((RequestedFlags) & KBTS__SKIP_FLAG_ZWNJ))
|
|
#define KBTS__SKIP_FLAGS_GPOS_REGULAR(RequestedFlags) (((RequestedFlags) & KBTS__SKIP_FLAG_ZWJ) | KBTS__SKIP_FLAG_ZWNJ | KBTS__SKIP_FLAG_DEFAULT_IGNORABLES_NOT_SKIPPED_BY_GSUB)
|
|
#define KBTS__SKIP_FLAGS_GPOS_SEQUENCE(RequestedFlags) (KBTS__SKIP_FLAG_ZWJ | KBTS__SKIP_FLAG_ZWNJ | KBTS__SKIP_FLAG_DEFAULT_IGNORABLES_NOT_SKIPPED_BY_GSUB)
|
|
|
|
static kbts__skip_flags kbts__SkipFlags(kbts_shaping_table ShapingTable, kbts__feature_id FeatureId, kbts_shaper Shaper)
|
|
{
|
|
kbts__skip_flags Result = 0;
|
|
|
|
if(ShapingTable == KBTS_SHAPING_TABLE_GPOS)
|
|
{
|
|
Result |= KBTS__SKIP_FLAG_DEFAULT_IGNORABLES_NOT_SKIPPED_BY_GSUB;
|
|
}
|
|
|
|
switch(FeatureId)
|
|
{
|
|
case KBTS__FEATURE_ID_nukt:
|
|
case KBTS__FEATURE_ID_akhn:
|
|
case KBTS__FEATURE_ID_rphf:
|
|
case KBTS__FEATURE_ID_rkrf:
|
|
case KBTS__FEATURE_ID_pref:
|
|
case KBTS__FEATURE_ID_blwf:
|
|
case KBTS__FEATURE_ID_abvf:
|
|
case KBTS__FEATURE_ID_half:
|
|
case KBTS__FEATURE_ID_pstf:
|
|
case KBTS__FEATURE_ID_vatu:
|
|
case KBTS__FEATURE_ID_cjct:
|
|
case KBTS__FEATURE_ID_pres:
|
|
case KBTS__FEATURE_ID_abvs:
|
|
case KBTS__FEATURE_ID_blws:
|
|
case KBTS__FEATURE_ID_psts:
|
|
case KBTS__FEATURE_ID_haln:
|
|
case KBTS__FEATURE_ID_cfar:
|
|
if(Shaper == KBTS_SHAPER_USE)
|
|
{
|
|
Result = KBTS__SKIP_FLAG_ZWNJ;
|
|
}
|
|
else if((Shaper == KBTS_SHAPER_INDIC) ||
|
|
(Shaper == KBTS_SHAPER_KHMER))
|
|
{
|
|
Result = 0;
|
|
}
|
|
else
|
|
{
|
|
Result = KBTS__SKIP_FLAG_ZWNJ | KBTS__SKIP_FLAG_ZWJ;
|
|
}
|
|
break;
|
|
|
|
case KBTS__FEATURE_ID_init:
|
|
if (Shaper == KBTS_SHAPER_INDIC) {Result = 0;}
|
|
else if(Shaper == KBTS_SHAPER_ARABIC) {Result = KBTS__SKIP_FLAG_ZWNJ;}
|
|
else {Result = KBTS__SKIP_FLAG_ZWNJ | KBTS__SKIP_FLAG_ZWJ;}
|
|
break;
|
|
|
|
case KBTS__FEATURE_ID_ccmp:
|
|
case KBTS__FEATURE_ID_locl:
|
|
case KBTS__FEATURE_ID_isol:
|
|
case KBTS__FEATURE_ID_fina:
|
|
case KBTS__FEATURE_ID_fin2:
|
|
case KBTS__FEATURE_ID_fin3:
|
|
case KBTS__FEATURE_ID_medi:
|
|
case KBTS__FEATURE_ID_med2:
|
|
case KBTS__FEATURE_ID_calt:
|
|
case KBTS__FEATURE_ID_liga:
|
|
case KBTS__FEATURE_ID_clig:
|
|
case KBTS__FEATURE_ID_rlig:
|
|
case KBTS__FEATURE_ID_mset:
|
|
Result = (Shaper == KBTS_SHAPER_ARABIC) ? KBTS__SKIP_FLAG_ZWNJ : KBTS__SKIP_FLAG_ZWNJ | KBTS__SKIP_FLAG_ZWJ;
|
|
break;
|
|
|
|
case KBTS__FEATURE_ID_mark:
|
|
case KBTS__FEATURE_ID_mkmk:
|
|
Result = 0;
|
|
break;
|
|
|
|
default:
|
|
Result = KBTS__SKIP_FLAG_ZWNJ | KBTS__SKIP_FLAG_ZWJ;
|
|
break;
|
|
}
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__GlyphPassesLookupFilter(kbts_glyph *Glyph, kbts__unpacked_lookup *Lookup)
|
|
{
|
|
kbts_b32 Result = 1;
|
|
kbts_u16 Class = Glyph->Classes.Class;
|
|
|
|
if(Class && (Lookup->Flags & (1 << Class)))
|
|
{
|
|
Result = 0;
|
|
}
|
|
|
|
if(Result && (Class == KBTS__GLYPH_CLASS_MARK))
|
|
{
|
|
if(Lookup->Flags & KBTS__LOOKUP_FLAG_MARK_ATTACHMENT_CLASS_FILTER)
|
|
{
|
|
kbts_u32 DesiredMarkAttachmentClass = Lookup->Flags >> 8;
|
|
|
|
if(Glyph->Classes.MarkAttachmentClass != DesiredMarkAttachmentClass)
|
|
{
|
|
Result = 0;
|
|
}
|
|
}
|
|
|
|
if(Result && Lookup->MarkFilteringSet)
|
|
{
|
|
// @Speed: We may want to save the result of the last mark filtering test on the glyph itself.
|
|
kbts__cover_glyph_result Cover = kbts__CoverGlyph(Lookup->MarkFilteringSet, Glyph->Id);
|
|
if(!Cover.Valid)
|
|
{
|
|
Result = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__SkipGlyph(kbts_glyph *Glyph, kbts__unpacked_lookup *Lookup, kbts__skip_flags SkipFlags, kbts_u32 SkipUnicodeFlags)
|
|
{
|
|
kbts_b32 Result = 0;
|
|
if(!kbts__GlyphPassesLookupFilter(Glyph, Lookup))
|
|
{
|
|
Result = 1;
|
|
}
|
|
else
|
|
{
|
|
kbts_b32 SkipDefaultIgnorable = !(Glyph->Flags & KBTS_GLYPH_FLAG_GENERATED_BY_GSUB) && (Glyph->UnicodeFlags & SkipUnicodeFlags);
|
|
if(SkipDefaultIgnorable)
|
|
{
|
|
switch(Glyph->Codepoint)
|
|
{
|
|
// Even though they are default-ignorable codepoints, the following should not be skipped during GSUB:
|
|
// Combining grapheme joiner:
|
|
case 0x34F:
|
|
// Variation selectors:
|
|
case 0x180B: case 0x180C: case 0x180D: case 0x180F: // 0x180E is the Mongolian vowel separator; not a variation selector!
|
|
// Tags:
|
|
case 0xE0020: case 0xE0021: case 0xE0022: case 0xE0023: case 0xE0024: case 0xE0025: case 0xE0026: case 0xE0027: case 0xE0028: case 0xE0029: case 0xE002A: case 0xE002B: case 0xE002C: case 0xE002D: case 0xE002E: case 0xE002F:
|
|
case 0xE0030: case 0xE0031: case 0xE0032: case 0xE0033: case 0xE0034: case 0xE0035: case 0xE0036: case 0xE0037: case 0xE0038: case 0xE0039: case 0xE003A: case 0xE003B: case 0xE003C: case 0xE003D: case 0xE003E: case 0xE003F:
|
|
case 0xE0040: case 0xE0041: case 0xE0042: case 0xE0043: case 0xE0044: case 0xE0045: case 0xE0046: case 0xE0047: case 0xE0048: case 0xE0049: case 0xE004A: case 0xE004B: case 0xE004C: case 0xE004D: case 0xE004E: case 0xE004F:
|
|
case 0xE0050: case 0xE0051: case 0xE0052: case 0xE0053: case 0xE0054: case 0xE0055: case 0xE0056: case 0xE0057: case 0xE0058: case 0xE0059: case 0xE005A: case 0xE005B: case 0xE005C: case 0xE005D: case 0xE005E: case 0xE005F:
|
|
case 0xE0060: case 0xE0061: case 0xE0062: case 0xE0063: case 0xE0064: case 0xE0065: case 0xE0066: case 0xE0067: case 0xE0068: case 0xE0069: case 0xE006A: case 0xE006B: case 0xE006C: case 0xE006D: case 0xE006E: case 0xE006F:
|
|
case 0xE0070: case 0xE0071: case 0xE0072: case 0xE0073: case 0xE0074: case 0xE0075: case 0xE0076: case 0xE0077: case 0xE0078: case 0xE0079: case 0xE007A: case 0xE007B: case 0xE007C: case 0xE007D: case 0xE007E: case 0xE007F:
|
|
{
|
|
Result = SkipFlags & KBTS__SKIP_FLAG_DEFAULT_IGNORABLES_NOT_SKIPPED_BY_GSUB;
|
|
} break;
|
|
|
|
case 0x200C: Result = SkipFlags & KBTS__SKIP_FLAG_ZWNJ; break;
|
|
case 0x200D: Result = SkipFlags & KBTS__SKIP_FLAG_ZWJ; break;
|
|
|
|
default: Result = 1; break;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__GlyphIsValid(kbts_glyph_storage *Storage, kbts_glyph *Glyph)
|
|
{
|
|
kbts_b32 Result = Glyph != &Storage->GlyphSentinel;
|
|
return Result;
|
|
}
|
|
|
|
typedef struct kbts__matrix_index
|
|
{
|
|
kbts_un WordIndex;
|
|
kbts_un BitIndex;
|
|
kbts_b32 Valid;
|
|
} kbts__matrix_index;
|
|
|
|
static kbts__matrix_index kbts__GlyphLookupMatrixIndex(kbts_un LookupIndex, kbts_un GlyphIndex, kbts_un GlyphCount)
|
|
{
|
|
kbts_un FlatIndex = LookupIndex * GlyphCount + GlyphIndex;
|
|
|
|
kbts__matrix_index Result = KBTS__ZERO;
|
|
Result.WordIndex = FlatIndex / 32;
|
|
Result.BitIndex = FlatIndex % 32;
|
|
Result.Valid = (GlyphIndex < GlyphCount);
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__matrix_index kbts__IdSequentialLookupMatrixIndex(kbts_un SequentialLookupIndex, kbts_un GlyphIndex, kbts_un SequentialLookupCount)
|
|
{
|
|
kbts_un BitsPerRow = (SequentialLookupCount + 31) & ~31;
|
|
kbts_un FlatIndex = GlyphIndex * BitsPerRow + SequentialLookupIndex;
|
|
|
|
kbts__matrix_index Result = KBTS__ZERO;
|
|
Result.WordIndex = FlatIndex / 32;
|
|
Result.BitIndex = FlatIndex % 32;
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__matrix_index kbts__GlyphLookupSubtableMatrixIndex(kbts_un SubtableIndex, kbts_un SubtableCount, kbts_un GlyphIndex, kbts_un GlyphCount)
|
|
{
|
|
kbts_un FlatIndex = SubtableIndex * GlyphCount + GlyphIndex;
|
|
|
|
kbts__matrix_index Result = KBTS__ZERO;
|
|
Result.WordIndex = FlatIndex / 32;
|
|
Result.BitIndex = FlatIndex % 32;
|
|
Result.Valid = (SubtableIndex < SubtableCount) && (GlyphIndex < GlyphCount);
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_un kbts__FlatLookupIndex(kbts_shape_scratchpad *Scratchpad, kbts_shaping_table ShapingTable, kbts_un LookupIndex)
|
|
{
|
|
kbts_un Result = (ShapingTable == KBTS_SHAPING_TABLE_GSUB) ? LookupIndex : (LookupIndex + Scratchpad->GposLookupIndexOffset);
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__GlyphIncludedInLookupSubtable(kbts_shape_scratchpad *Scratchpad,
|
|
kbts_shaping_table ShapingTable, kbts_un LookupIndex, kbts_un SubtableIndex,
|
|
kbts_glyph *AtGlyph)
|
|
{
|
|
KBTS_INSTRUMENT_FUNCTION_BEGIN;
|
|
kbts_b32 Result = 1;
|
|
|
|
if(Scratchpad->GlyphLookupSubtableMatrix)
|
|
{
|
|
kbts_u32 *GlyphLookupSubtableMatrix = Scratchpad->GlyphLookupSubtableMatrix;
|
|
kbts_u32 *LookupSubtableIndexOffsets = Scratchpad->LookupSubtableIndexOffsets;
|
|
kbts_un GlyphCount = Scratchpad->GlyphIdCount;
|
|
kbts_un SubtableCount = Scratchpad->LookupSubtableCount;
|
|
|
|
kbts_un FlatLookupIndex = kbts__FlatLookupIndex(Scratchpad, ShapingTable, LookupIndex);
|
|
kbts_un FlatSubtableIndex = LookupSubtableIndexOffsets[FlatLookupIndex] + SubtableIndex;
|
|
|
|
kbts_un Id = AtGlyph->Id;
|
|
|
|
if(Id < GlyphCount)
|
|
{
|
|
kbts__matrix_index MatrixIndex = kbts__GlyphLookupSubtableMatrixIndex(FlatSubtableIndex, SubtableCount, Id, GlyphCount);
|
|
if(!(GlyphLookupSubtableMatrix[MatrixIndex.WordIndex] & (1u << MatrixIndex.BitIndex)))
|
|
{
|
|
Result = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_FUNCTION_END;
|
|
return Result;
|
|
}
|
|
|
|
# ifdef KBTS_DUMP
|
|
static void kbts__DumpCoverage(kbts__coverage *Coverage)
|
|
{
|
|
KBTS_DUMPF("[");
|
|
kbts_u16 Coverage_Format = kbts__ReadU16Unaligned(&Coverage->Format);
|
|
|
|
if(Coverage_Format == 1)
|
|
{
|
|
kbts_u16 *GlyphIds = KBTS__POINTER_AFTER(kbts_u16, Coverage);
|
|
kbts_un Coverage_Count = kbts__ReadU16Unaligned(&Coverage->Count);
|
|
KBTS__FOR(GlyphIndex, 0, Coverage_Count)
|
|
{
|
|
KBTS_DUMPF("%x,", kbts__ReadU16Unaligned(&GlyphIds[GlyphIndex]));
|
|
}
|
|
}
|
|
else if(Coverage_Format == 2)
|
|
{
|
|
kbts__range_record *Ranges = KBTS__POINTER_AFTER(kbts__range_record, Coverage);
|
|
kbts_un Coverage_Count = kbts__ReadU16Unaligned(&Coverage->Count);
|
|
KBTS__FOR(RangeIndex, 0, Coverage_Count)
|
|
{
|
|
kbts__range_record *Range = &Ranges[RangeIndex];
|
|
KBTS_DUMPF("%x..%x @ %u,", kbts__ReadU16Unaligned(&Range->StartGlyphId), kbts__ReadU16Unaligned(&Range->EndGlyphId), kbts__ReadU16Unaligned(&Range->StartCoverageIndex));
|
|
}
|
|
}
|
|
KBTS_DUMPF("]");
|
|
}
|
|
# endif
|
|
|
|
static void kbts__ByteSwapChainedSequenceContextSubtable(kbts__byteswap_context *Context, kbts_u16 *Base)
|
|
{
|
|
kbts_u16 Format = kbts__ReadU16Unaligned(Base);
|
|
|
|
if(Format == 1)
|
|
{
|
|
kbts__chained_sequence_context_1 *Subst = (kbts__chained_sequence_context_1 *)Base;
|
|
kbts_un Subst_ChainedSequenceRuleSetCount;
|
|
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Subst->ChainedSequenceRuleSetCount, &Subst_ChainedSequenceRuleSetCount) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Subst), Subst_ChainedSequenceRuleSetCount))
|
|
{
|
|
KBTS__FOR(SetIndex, 0, Subst_ChainedSequenceRuleSetCount)
|
|
{
|
|
kbts__ByteSwapChainedSequenceRuleSet(Context, kbts__GetChainedSequenceRuleSet(Subst, SetIndex));
|
|
}
|
|
}
|
|
}
|
|
else if(Format == 2)
|
|
{
|
|
kbts__chained_sequence_context_2 *Subst = (kbts__chained_sequence_context_2 *)Base;
|
|
if(kbts__ByteSwapArray16Context(Context, &Subst->BacktrackClassDefOffset, 4))
|
|
{
|
|
kbts_un Subst_ChainedClassSequenceRuleSetCount = kbts__ReadU16Unaligned(&Subst->ChainedClassSequenceRuleSetCount);
|
|
if(kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Subst), Subst_ChainedClassSequenceRuleSetCount))
|
|
{
|
|
kbts_u16 *BacktrackClassDefinition = KBTS__POINTER_OFFSET(kbts_u16, Subst, kbts__ReadU16Unaligned(&Subst->BacktrackClassDefOffset));
|
|
kbts__ByteSwapClassDefinition(Context, BacktrackClassDefinition);
|
|
|
|
kbts_u16 *InputClassDefinition = KBTS__POINTER_OFFSET(kbts_u16, Subst, kbts__ReadU16Unaligned(&Subst->InputClassDefOffset));
|
|
kbts__ByteSwapClassDefinition(Context, InputClassDefinition);
|
|
|
|
kbts_u16 *LookaheadClassDefinition = KBTS__POINTER_OFFSET(kbts_u16, Subst, kbts__ReadU16Unaligned(&Subst->LookaheadClassDefOffset));
|
|
kbts__ByteSwapClassDefinition(Context, LookaheadClassDefinition);
|
|
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
#ifdef KBTS_DUMP
|
|
KBTS_DUMPF("Backtrack classes:\n");
|
|
// kbts__DumpClassDefinition(BacktrackClassDefinition);
|
|
KBTS_DUMPF("Input classes:\n");
|
|
// kbts__DumpClassDefinition(InputClassDefinition);
|
|
KBTS_DUMPF("Lookahead classes:\n");
|
|
// kbts__DumpClassDefinition(LookaheadClassDefinition);
|
|
#endif
|
|
|
|
KBTS__FOR(SetIndex, 0, Subst_ChainedClassSequenceRuleSetCount)
|
|
{
|
|
kbts__chained_sequence_rule_set *Set = kbts__GetChainedClassSequenceRuleSet(Subst, SetIndex);
|
|
kbts__ByteSwapChainedSequenceRuleSet(Context, Set);
|
|
|
|
#ifdef KBTS_DUMP
|
|
if(!Context->ErrorInCurrentBounds && Set)
|
|
{
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__chained_sequence_rule *Rule = kbts__GetChainedClassSequenceRule(Set, RuleIndex);
|
|
kbts__unpacked_chained_sequence_rule Unpacked = kbts__UnpackChainedSequenceRule(Rule, 0);
|
|
|
|
KBTS_DUMPF("Backtrack: [");
|
|
KBTS__FOR(BacktrackIndex, 0, Unpacked.BacktrackCount)
|
|
{
|
|
if(BacktrackIndex) KBTS_DUMPF(", ");
|
|
KBTS_DUMPF("%u", kbts__ReadU16Unaligned(&Unpacked.Backtrack[BacktrackIndex]));
|
|
}
|
|
KBTS_DUMPF("]\n"
|
|
"Input: [");
|
|
KBTS__FOR(InputIndex, 1, Unpacked.InputCount)
|
|
{
|
|
if(InputIndex) KBTS_DUMPF(", ");
|
|
KBTS_DUMPF("%u", kbts__ReadU16Unaligned(&Unpacked.Input[InputIndex - 1]));
|
|
}
|
|
KBTS_DUMPF("]\n"
|
|
"Lookahead: [");
|
|
KBTS__FOR(LookaheadIndex, 0, Unpacked.LookaheadCount)
|
|
{
|
|
if(LookaheadIndex) KBTS_DUMPF(", ");
|
|
KBTS_DUMPF("%u", kbts__ReadU16Unaligned(&Unpacked.Lookahead[LookaheadIndex]));
|
|
}
|
|
KBTS_DUMPF("]\n"
|
|
"Records: [");
|
|
KBTS__FOR(RecordIndex, 0, Unpacked.RecordCount)
|
|
{
|
|
kbts__sequence_lookup_record *Record = &Unpacked.Records[RecordIndex];
|
|
if(RecordIndex) KBTS_DUMPF(", ");
|
|
KBTS_DUMPF("%u@%u", kbts__ReadU16Unaligned(&Record->LookupListIndex), kbts__ReadU16Unaligned(&Record->SequenceIndex));
|
|
}
|
|
KBTS_DUMPF("]\n");
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if(Format == 3)
|
|
{
|
|
kbts__chained_sequence_context_3 *Subst = (kbts__chained_sequence_context_3 *)Base;
|
|
kbts__unpacked_chained_sequence_context_3 Unpacked = kbts__UnpackChainedSequenceContext3(Subst, 1);
|
|
|
|
kbts_un U16Count = Unpacked.BacktrackCount + Unpacked.InputCount + Unpacked.LookaheadCount + Unpacked.RecordCount * 2 + 4;
|
|
if(kbts__ByteSwapArray16Context(Context, &Subst->BacktrackGlyphCount, U16Count))
|
|
{
|
|
KBTS__FOR(BacktrackCoverageIndex, 0, Unpacked.BacktrackCount)
|
|
{
|
|
kbts__coverage *Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&Unpacked.BacktrackCoverageOffsets[BacktrackCoverageIndex]));
|
|
|
|
kbts__ByteSwapCoverage(Context, Coverage);
|
|
}
|
|
|
|
KBTS__FOR(InputCoverageIndex, 0, Unpacked.InputCount)
|
|
{
|
|
kbts__coverage *Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&Unpacked.InputCoverageOffsets[InputCoverageIndex]));
|
|
|
|
kbts__ByteSwapCoverage(Context, Coverage);
|
|
}
|
|
|
|
KBTS__FOR(LookaheadCoverageIndex, 0, Unpacked.LookaheadCount)
|
|
{
|
|
kbts__coverage *Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&Unpacked.LookaheadCoverageOffsets[LookaheadCoverageIndex]));
|
|
|
|
kbts__ByteSwapCoverage(Context, Coverage);
|
|
}
|
|
|
|
# ifdef KBTS_DUMP
|
|
KBTS_DUMPF(" Backtrack: ");
|
|
KBTS__FOR(BacktrackCoverageIndex, 0, Unpacked.BacktrackCount)
|
|
{
|
|
kbts__DumpCoverage(KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&Unpacked.BacktrackCoverageOffsets[BacktrackCoverageIndex])));
|
|
}
|
|
KBTS_DUMPF("\n Input: ");
|
|
KBTS__FOR(InputCoverageIndex, 0, Unpacked.InputCount)
|
|
{
|
|
kbts__DumpCoverage(KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&Unpacked.InputCoverageOffsets[InputCoverageIndex])));
|
|
}
|
|
KBTS_DUMPF("\n Lookahead: ");
|
|
KBTS__FOR(LookaheadCoverageIndex, 0, Unpacked.LookaheadCount)
|
|
{
|
|
kbts__DumpCoverage(KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&Unpacked.LookaheadCoverageOffsets[LookaheadCoverageIndex])));
|
|
}
|
|
KBTS_DUMPF("\n Lookups: [");
|
|
KBTS__FOR(RecordIndex, 0, Unpacked.RecordCount)
|
|
{
|
|
kbts__sequence_lookup_record *Record = &Unpacked.Records[RecordIndex];
|
|
|
|
KBTS_DUMPF("%u@%u,", kbts__ReadU16Unaligned(&Record->LookupListIndex), kbts__ReadU16Unaligned(&Record->SequenceIndex));
|
|
}
|
|
KBTS_DUMPF("]\n");
|
|
# endif
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapGsubLookupSubtable(kbts__byteswap_context *Context, kbts_un LookupType, kbts_u16 *Base)
|
|
{
|
|
if(!kbts__AddressIsMarked(Context, Base))
|
|
{
|
|
while(LookupType == 7)
|
|
{
|
|
kbts__extension *Subst = (kbts__extension *)Base;
|
|
kbts__ByteSwap16InPlaceContext(Context, &Subst->Format, 0);
|
|
|
|
kbts_un Subst_LookupType;
|
|
kbts_un Subst_Offset;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Subst->LookupType, &Subst_LookupType) &&
|
|
kbts__ByteSwap32InPlaceContext(Context, &Subst->Offset, &Subst_Offset))
|
|
{
|
|
KBTS_DUMPF(" Type 7.1\n"
|
|
" Offset %zu\n"
|
|
" -> %zu\n",
|
|
(char *)Base - Context->FileBase, (char *)Subst + Subst_Offset - Context->FileBase);
|
|
|
|
Base = KBTS__POINTER_OFFSET(kbts_u16, Subst, Subst_Offset);
|
|
LookupType = Subst_LookupType;
|
|
}
|
|
}
|
|
|
|
kbts_un LookupFormat;
|
|
if(!Context->ErrorInCurrentBounds &&
|
|
kbts__ByteSwap16InPlaceContext(Context, Base, &LookupFormat))
|
|
{
|
|
KBTS_DUMPF(" Type %llu.%llu\n"
|
|
" Offset %zu\n",
|
|
LookupType, LookupFormat, (char *)Base - Context->FileBase);
|
|
|
|
kbts_un LookupCoverageOffset;
|
|
if(kbts__GsubLookupBeginsWithCoverage((kbts_u16)LookupType, (kbts_u16)LookupFormat) &&
|
|
kbts__ByteSwap16InPlaceContext(Context, &Base[1], &LookupCoverageOffset))
|
|
{
|
|
kbts__coverage *Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Base, LookupCoverageOffset);
|
|
|
|
kbts__ByteSwapCoverage(Context, Coverage);
|
|
|
|
# ifdef KBTS_DUMP
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
kbts_u16 Coverage_Format = kbts__ReadU16Unaligned(&Coverage->Format);
|
|
kbts_un Coverage_Count = kbts__ReadU16Unaligned(&Coverage->Count);
|
|
|
|
KBTS_DUMPF(" Coverage %u\n", Coverage_Format);
|
|
if(Coverage_Format == 1)
|
|
{
|
|
kbts_u16 *GlyphIds = KBTS__POINTER_AFTER(kbts_u16, Coverage);
|
|
KBTS__FOR(GlyphIndex, 0, Coverage_Count)
|
|
{
|
|
KBTS_DUMPF(" %x\n", kbts__ReadU16Unaligned(&GlyphIds[GlyphIndex]));
|
|
}
|
|
}
|
|
else if(Coverage_Format == 2)
|
|
{
|
|
kbts__range_record *Ranges = KBTS__POINTER_AFTER(kbts__range_record, Coverage);
|
|
KBTS__FOR(RangeIndex, 0, Coverage_Count)
|
|
{
|
|
kbts__range_record *Range = &Ranges[RangeIndex];
|
|
kbts_u16 Range_StartGlyphId = kbts__ReadU16Unaligned(&Range->StartGlyphId);
|
|
kbts_u16 Range_EndGlyphId = kbts__ReadU16Unaligned(&Range->EndGlyphId);
|
|
kbts_u16 Range_StartCoverageIndex = kbts__ReadU16Unaligned(&Range->StartCoverageIndex);
|
|
KBTS_DUMPF(" %x..%x@%u..%u\n", Range_StartGlyphId, Range_EndGlyphId, Range_StartCoverageIndex, Range_StartCoverageIndex + (Range_EndGlyphId - Range_StartGlyphId));
|
|
}
|
|
}
|
|
}
|
|
# endif
|
|
}
|
|
|
|
switch(LookupType)
|
|
{
|
|
case 1:
|
|
{
|
|
kbts__single_substitution *Subst = (kbts__single_substitution *)Base;
|
|
kbts_un Subst_GlyphCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Subst->DeltaOrCount.GlyphCount, &Subst_GlyphCount))
|
|
{
|
|
#ifdef KBTS_DUMP
|
|
if(LookupFormat == 1)
|
|
{
|
|
KBTS_DUMPF(" += %d\n", kbts__ReadS16Unaligned(&Subst->DeltaOrCount.DeltaGlyphId));
|
|
}
|
|
#endif
|
|
|
|
if(LookupFormat == 2)
|
|
{
|
|
kbts_u16 *GlyphIds = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
kbts__ByteSwapArray16Context(Context, GlyphIds, Subst_GlyphCount);
|
|
|
|
#ifdef KBTS_DUMP
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
KBTS_DUMPF(" [");
|
|
KBTS__FOR(IdIndex, 0, Subst_GlyphCount)
|
|
{
|
|
if(IdIndex) KBTS_DUMPF(" ");
|
|
KBTS_DUMPF("%x", kbts__ReadU16Unaligned(&GlyphIds[IdIndex]));
|
|
}
|
|
KBTS_DUMPF("]\n");
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 2:
|
|
{
|
|
kbts__multiple_substitution *Subst = (kbts__multiple_substitution *)Base;
|
|
kbts_un Subst_SequenceCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Subst->SequenceCount, &Subst_SequenceCount) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Subst), Subst_SequenceCount))
|
|
{
|
|
KBTS__FOR(SequenceIndex, 0, Subst_SequenceCount)
|
|
{
|
|
kbts__sequence *Sequence = kbts__GetSequence(Subst, SequenceIndex);
|
|
|
|
kbts_un Sequence_GlyphCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Sequence->GlyphCount, &Sequence_GlyphCount))
|
|
{
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Sequence), Sequence_GlyphCount);
|
|
}
|
|
|
|
#ifdef KBTS_DUMP
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
KBTS_DUMPF(" [");
|
|
kbts_u16 *SequenceGlyphIds = KBTS__POINTER_AFTER(kbts_u16, Sequence);
|
|
KBTS__FOR(SequenceGlyphIndex, 0, Sequence_GlyphCount)
|
|
{
|
|
if(SequenceGlyphIndex) KBTS_DUMPF(" ");
|
|
KBTS_DUMPF("%x", kbts__ReadU16Unaligned(&SequenceGlyphIds[SequenceGlyphIndex]));
|
|
}
|
|
KBTS_DUMPF("]\n");
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 3:
|
|
{
|
|
kbts__alternate_substitution *Subst = (kbts__alternate_substitution *)Base;
|
|
kbts_un Subst_AlternateSetCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Subst->AlternateSetCount, &Subst_AlternateSetCount) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Subst), Subst_AlternateSetCount))
|
|
{
|
|
KBTS__FOR(SetIndex, 0, Subst_AlternateSetCount)
|
|
{
|
|
kbts__alternate_set *Set = kbts__GetAlternateSet(Subst, SetIndex);
|
|
kbts_un Set_GlyphCount;
|
|
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Set->GlyphCount, &Set_GlyphCount))
|
|
{
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Set), Set_GlyphCount);
|
|
}
|
|
|
|
#ifdef KBTS_DUMP
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
KBTS_DUMPF(" [");
|
|
kbts_u16 *SetGlyphIds = KBTS__POINTER_AFTER(kbts_u16, Set);
|
|
KBTS__FOR(SetGlyphIndex, 0, Set_GlyphCount)
|
|
{
|
|
if(SetGlyphIndex) KBTS_DUMPF(" ");
|
|
KBTS_DUMPF("%x", kbts__ReadU16Unaligned(&SetGlyphIds[SetGlyphIndex]));
|
|
}
|
|
KBTS_DUMPF("]\n");
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 4:
|
|
{
|
|
kbts__ligature_substitution *Subst = (kbts__ligature_substitution *)Base;
|
|
kbts_un Subst_LigatureSetCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Subst->LigatureSetCount, &Subst_LigatureSetCount) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Subst), Subst_LigatureSetCount))
|
|
{
|
|
KBTS__FOR(SetIndex, 0, Subst_LigatureSetCount)
|
|
{
|
|
kbts__ligature_set *Set = kbts__GetLigatureSet(Subst, SetIndex);
|
|
|
|
kbts_un Set_Count;
|
|
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Set->Count, &Set_Count) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Set), Set_Count))
|
|
{
|
|
KBTS__FOR(LigatureIndex, 0, Set_Count)
|
|
{
|
|
kbts__ligature *Ligature = kbts__GetLigature(Set, LigatureIndex);
|
|
|
|
if(kbts__ByteSwapArray16Context(Context, &Ligature->Glyph, 2))
|
|
{
|
|
kbts_un Ligature_ComponentCount = kbts__ReadU16Unaligned(&Ligature->ComponentCount);
|
|
if(Ligature_ComponentCount)
|
|
{
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Ligature), Ligature_ComponentCount - 1);
|
|
|
|
#ifdef KBTS_DUMP
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
KBTS_DUMPF("ligature: [");
|
|
kbts_u16 *ComponentIds = KBTS__POINTER_AFTER(kbts_u16, Ligature);
|
|
KBTS__FOR(ComponentIndex, 1, Ligature_ComponentCount)
|
|
{
|
|
KBTS_DUMPF("%x,", kbts__ReadU16Unaligned(&ComponentIds[ComponentIndex - 1]));
|
|
}
|
|
KBTS_DUMPF("] -> %x\n", kbts__ReadU16Unaligned(&Ligature->Glyph));
|
|
}
|
|
#endif
|
|
}
|
|
else
|
|
{
|
|
Context->ErrorInCurrentBounds = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 5:
|
|
{
|
|
kbts__ByteSwapSequenceContextSubtable(Context, Base);
|
|
}
|
|
break;
|
|
|
|
case 6:
|
|
{
|
|
kbts__ByteSwapChainedSequenceContextSubtable(Context, Base);
|
|
}
|
|
break;
|
|
|
|
case 8:
|
|
{
|
|
kbts__reverse_chain_substitution *Subst = (kbts__reverse_chain_substitution *)Base;
|
|
kbts__unpacked_reverse_chain_substitution Unpacked = kbts__UnpackReverseChainSubstitution(Subst, 1);
|
|
|
|
kbts_un U16Count = Unpacked.BacktrackCount + Unpacked.GlyphCount + Unpacked.LookaheadCount + 3;
|
|
if(kbts__ByteSwapArray16Context(Context, &Subst->BacktrackGlyphCount, U16Count))
|
|
{
|
|
KBTS__FOR(BacktrackCoverageIndex, 0, Unpacked.BacktrackCount)
|
|
{
|
|
kbts_un BacktrackCoverageOffset = kbts__ReadU16Unaligned(&Unpacked.BacktrackCoverageOffsets[BacktrackCoverageIndex]);
|
|
kbts__ByteSwapCoverage(Context, KBTS__POINTER_OFFSET(kbts__coverage, Subst, BacktrackCoverageOffset));
|
|
}
|
|
|
|
KBTS__FOR(LookaheadCoverageIndex, 0, Unpacked.LookaheadCount)
|
|
{
|
|
kbts_un LookaheadCoverageOffset = kbts__ReadU16Unaligned(&Unpacked.LookaheadCoverageOffsets[LookaheadCoverageIndex]);
|
|
kbts__ByteSwapCoverage(Context, KBTS__POINTER_OFFSET(kbts__coverage, Subst, LookaheadCoverageOffset));
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__ByteSwapGposLookupSubtable(kbts__byteswap_context *Context, kbts__lookup_list *LookupList, kbts_u16 LookupType, kbts_u16 *Base)
|
|
{
|
|
if(!kbts__AddressIsMarked(Context, Base))
|
|
{
|
|
kbts_un LookupFormat;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, Base, &LookupFormat))
|
|
{
|
|
KBTS_DUMPF(" GPOS subtable %u.%llu\n", LookupType, LookupFormat);
|
|
|
|
if(kbts__GposLookupBeginsWithCoverage(LookupType, (kbts_u16)LookupFormat))
|
|
{
|
|
kbts_un CoverageOffset;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Base[1], &CoverageOffset))
|
|
{
|
|
kbts__coverage *Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Base, CoverageOffset);
|
|
kbts__ByteSwapCoverage(Context, Coverage);
|
|
}
|
|
}
|
|
|
|
if(!Context->ErrorInCurrentBounds)
|
|
{
|
|
switch(LookupType)
|
|
{
|
|
case 1:
|
|
{
|
|
kbts__single_adjustment_1 *Adjust = (kbts__single_adjustment_1 *)Base;
|
|
kbts_un Adjust_ValueFormat;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Adjust->ValueFormat, &Adjust_ValueFormat))
|
|
{
|
|
if(LookupFormat == 1)
|
|
{
|
|
kbts__ByteSwapValueRecord(Context, Adjust, (kbts_u16)Adjust_ValueFormat, KBTS__POINTER_AFTER(kbts_u16, Adjust));
|
|
}
|
|
else if(LookupFormat == 2)
|
|
{
|
|
kbts__single_adjustment_2 *Adjust2 = (kbts__single_adjustment_2 *)Base;
|
|
kbts_un Adjust2_RecordCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Adjust2->RecordCount, &Adjust2_RecordCount))
|
|
{
|
|
kbts_u16 *At = KBTS__POINTER_AFTER(kbts_u16, Adjust2);
|
|
KBTS__FOR(RecordIndex, 0, Adjust2_RecordCount)
|
|
{
|
|
kbts__unpacked_value_record Unpacked = kbts__ByteSwapValueRecord(Context, Adjust2, (kbts_u16)Adjust_ValueFormat, At);
|
|
|
|
At += Unpacked.Size;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 2:
|
|
{
|
|
if(LookupFormat == 1)
|
|
{
|
|
kbts__pair_adjustment_1 *Adjust = (kbts__pair_adjustment_1 *)Base;
|
|
if(kbts__ByteSwapArray16Context(Context, &Adjust->ValueFormat1, 3))
|
|
{
|
|
kbts_un Adjust_SetCount = kbts__ReadU16Unaligned(&Adjust->SetCount);
|
|
|
|
kbts_u16 *SetOffsets = KBTS__POINTER_AFTER(kbts_u16, Adjust);
|
|
if(kbts__ByteSwapArray16Context(Context, SetOffsets, Adjust_SetCount))
|
|
{
|
|
kbts_u16 Adjust_ValueFormat1 = kbts__ReadU16Unaligned(&Adjust->ValueFormat1);
|
|
kbts_u16 Adjust_ValueFormat2 = kbts__ReadU16Unaligned(&Adjust->ValueFormat2);
|
|
|
|
kbts_un Size1 = kbts__PopCount32(Adjust_ValueFormat1);
|
|
kbts_un Size2 = kbts__PopCount32(Adjust_ValueFormat2);
|
|
kbts_un PairRecordSize = Size1 + Size2 + 1;
|
|
|
|
KBTS__FOR(SetIndex, 0, Adjust_SetCount)
|
|
{
|
|
kbts__pair_set *Set = KBTS__POINTER_OFFSET(kbts__pair_set, Adjust, kbts__ReadU16Unaligned(&SetOffsets[SetIndex]));
|
|
|
|
kbts_un Set_Count;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Set->Count, &Set_Count))
|
|
{
|
|
kbts_u16 *At = KBTS__POINTER_AFTER(kbts_u16, Set);
|
|
|
|
KBTS__FOR(RecordIndex, 0, Set_Count)
|
|
{
|
|
kbts__pair_value_record *PairRecord = (kbts__pair_value_record *)(At + RecordIndex * PairRecordSize);
|
|
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &PairRecord->SecondGlyph, 0))
|
|
{
|
|
kbts_u16 *Record = KBTS__POINTER_AFTER(kbts_u16, PairRecord);
|
|
|
|
kbts__unpacked_value_record Unpacked1 = kbts__ByteSwapValueRecord(Context, Set, Adjust_ValueFormat1, Record);
|
|
Record += Unpacked1.Size;
|
|
kbts__ByteSwapValueRecord(Context, Set, Adjust_ValueFormat2, Record);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if(LookupFormat == 2)
|
|
{
|
|
kbts__pair_adjustment_2 *Adjust = (kbts__pair_adjustment_2 *)Base;
|
|
kbts__ByteSwapArray16Context(Context, &Adjust->ValueFormat1, 6);
|
|
|
|
kbts_un Adjust_ClassDefinition1Offset = kbts__ReadU16Unaligned(&Adjust->ClassDefinition1Offset);
|
|
kbts_un Adjust_ClassDefinition2Offset = kbts__ReadU16Unaligned(&Adjust->ClassDefinition2Offset);
|
|
|
|
kbts__ByteSwapClassDefinition(Context, KBTS__POINTER_OFFSET(kbts_u16, Adjust, Adjust_ClassDefinition1Offset));
|
|
kbts__ByteSwapClassDefinition(Context, KBTS__POINTER_OFFSET(kbts_u16, Adjust, Adjust_ClassDefinition2Offset));
|
|
|
|
kbts_u16 *Records = KBTS__POINTER_AFTER(kbts_u16, Adjust);
|
|
|
|
kbts_u16 Adjust_ValueFormat1 = kbts__ReadU16Unaligned(&Adjust->ValueFormat1);
|
|
kbts_u16 Adjust_ValueFormat2 = kbts__ReadU16Unaligned(&Adjust->ValueFormat2);
|
|
|
|
kbts_un Size1 = kbts__PopCount32(Adjust_ValueFormat1);
|
|
kbts_un Size2 = kbts__PopCount32(Adjust_ValueFormat2);
|
|
|
|
kbts_un Adjust_Class1Count = kbts__ReadU16Unaligned(&Adjust->Class1Count);
|
|
kbts_un Adjust_Class2Count = kbts__ReadU16Unaligned(&Adjust->Class2Count);
|
|
|
|
kbts_u16 *RecordPair = Records;
|
|
KBTS__FOR(RecordIndex, 0, Adjust_Class1Count * Adjust_Class2Count)
|
|
{
|
|
kbts__ByteSwapValueRecord(Context, Adjust, Adjust_ValueFormat1, RecordPair);
|
|
RecordPair += Size1;
|
|
|
|
kbts__ByteSwapValueRecord(Context, Adjust, Adjust_ValueFormat2, RecordPair);
|
|
RecordPair += Size2;
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 3:
|
|
{
|
|
kbts__cursive_attachment *Adjust = (kbts__cursive_attachment *)Base;
|
|
kbts_un Adjust_EntryExitCount;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Adjust->EntryExitCount, &Adjust_EntryExitCount) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, Adjust), Adjust_EntryExitCount * 2))
|
|
{
|
|
kbts__entry_exit *EntryExits = KBTS__POINTER_AFTER(kbts__entry_exit, Adjust);
|
|
KBTS__FOR(EntryExitIndex, 0, Adjust_EntryExitCount)
|
|
{
|
|
kbts__entry_exit *EntryExit = &EntryExits[EntryExitIndex];
|
|
kbts_un EntryExit_EntryAnchorOffset = kbts__ReadU16Unaligned(&EntryExit->EntryAnchorOffset);
|
|
kbts_un EntryExit_ExitAnchorOffset = kbts__ReadU16Unaligned(&EntryExit->ExitAnchorOffset);
|
|
|
|
if(EntryExit_EntryAnchorOffset)
|
|
{
|
|
kbts__ByteSwapAnchor(Context, KBTS__POINTER_OFFSET(kbts__anchor, Adjust, EntryExit_EntryAnchorOffset));
|
|
}
|
|
|
|
if(EntryExit_ExitAnchorOffset)
|
|
{
|
|
kbts__ByteSwapAnchor(Context, KBTS__POINTER_OFFSET(kbts__anchor, Adjust, EntryExit_ExitAnchorOffset));
|
|
}
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 4:
|
|
case 6:
|
|
{
|
|
kbts__mark_to_base_attachment *Adjust = (kbts__mark_to_base_attachment *)Base;
|
|
kbts__ByteSwapArray16Context(Context, &Adjust->BaseCoverageOffset, 4);
|
|
|
|
kbts__ByteSwapCoverage(Context, KBTS__POINTER_OFFSET(kbts__coverage, Adjust, kbts__ReadU16Unaligned(&Adjust->BaseCoverageOffset)));
|
|
kbts__ByteSwapMarkArray(Context, KBTS__POINTER_OFFSET(kbts__mark_array, Adjust, kbts__ReadU16Unaligned(&Adjust->MarkArrayOffset)));
|
|
kbts__ByteSwapBaseArray(Context, kbts__ReadU16Unaligned(&Adjust->MarkClassCount), KBTS__POINTER_OFFSET(kbts__base_array, Adjust, kbts__ReadU16Unaligned(&Adjust->BaseArrayOffset)));
|
|
} break;
|
|
|
|
case 5:
|
|
{
|
|
kbts__mark_to_ligature_attachment *Adjust = (kbts__mark_to_ligature_attachment *)Base;
|
|
kbts__ByteSwapArray16Context(Context, &Adjust->LigatureCoverageOffset, 4);
|
|
|
|
kbts__ByteSwapCoverage(Context, KBTS__POINTER_OFFSET(kbts__coverage, Adjust, kbts__ReadU16Unaligned(&Adjust->LigatureCoverageOffset)));
|
|
kbts__ByteSwapMarkArray(Context, KBTS__POINTER_OFFSET(kbts__mark_array, Adjust, kbts__ReadU16Unaligned(&Adjust->MarkArrayOffset)));
|
|
|
|
kbts__ligature_array *LigatureArray = KBTS__POINTER_OFFSET(kbts__ligature_array, Adjust, kbts__ReadU16Unaligned(&Adjust->LigatureArrayOffset));
|
|
kbts_un LigatureArray_Count;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &LigatureArray->Count, &LigatureArray_Count) &&
|
|
kbts__ByteSwapArray16Context(Context, KBTS__POINTER_AFTER(kbts_u16, LigatureArray), LigatureArray_Count))
|
|
{
|
|
KBTS__FOR(AttachIndex, 0, LigatureArray_Count)
|
|
{
|
|
kbts__ligature_attach *Attach = kbts__GetLigatureAttach(LigatureArray, AttachIndex);
|
|
|
|
kbts_un Attach_Count;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Attach->Count, &Attach_Count))
|
|
{
|
|
kbts_un Adjust_MarkClassCount = kbts__ReadU16Unaligned(&Adjust->MarkClassCount);
|
|
|
|
kbts_u16 *AttachAnchorOffsets = KBTS__POINTER_AFTER(kbts_u16, Attach);
|
|
if(kbts__ByteSwapArray16Context(Context, AttachAnchorOffsets, Attach_Count * Adjust_MarkClassCount))
|
|
{
|
|
KBTS__FOR(ComponentIndex, 0, Attach_Count)
|
|
{
|
|
KBTS__FOR(MarkClass, 0, Adjust_MarkClassCount)
|
|
{
|
|
kbts__anchor *Anchor = kbts__GetLigatureAttachAnchor(Adjust, Attach, (kbts_u16)MarkClass, ComponentIndex);
|
|
|
|
kbts__ByteSwapAnchor(Context, Anchor);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 7:
|
|
{
|
|
kbts__ByteSwapSequenceContextSubtable(Context, Base);
|
|
} break;
|
|
|
|
case 8:
|
|
{
|
|
kbts__ByteSwapChainedSequenceContextSubtable(Context, Base);
|
|
} break;
|
|
|
|
case 9:
|
|
{
|
|
// @Cleanup: Replace recursion with a loop at the start of this function!
|
|
kbts__extension *Adjust = (kbts__extension *)Base;
|
|
|
|
kbts_un Adjust_LookupType;
|
|
kbts_un Adjust_Offset;
|
|
if(kbts__ByteSwap16InPlaceContext(Context, &Adjust->LookupType, &Adjust_LookupType) &&
|
|
kbts__ByteSwap32InPlaceContext(Context, &Adjust->Offset, &Adjust_Offset))
|
|
{
|
|
kbts__ByteSwapGposLookupSubtable(Context, LookupList, (kbts_u16)Adjust_LookupType, KBTS__POINTER_OFFSET(kbts_u16, Adjust, Adjust_Offset));
|
|
}
|
|
} break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static void *kbts__BlobTableData(kbts_blob_header *Header, kbts_blob_table_id TableId)
|
|
{
|
|
void *Result = 0;
|
|
kbts_blob_table *Table = &Header->Tables[TableId];
|
|
|
|
if(Table->Length)
|
|
{
|
|
Result = KBTS__POINTER_OFFSET(void, Header, Table->OffsetFromStartOfFile);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
#define kbts__BlobTableDataType(Header, TableId, Type) (Type *)kbts__BlobTableData((Header), (TableId))
|
|
|
|
static void *kbts__BlobTableHeaderCheckedManualSize(kbts_blob_header *Header, kbts_blob_table_id TableId, kbts_un HeaderSize, char **TableEnd, kbts_load_font_error *Error)
|
|
{
|
|
void *Result = 0;
|
|
kbts_blob_table *Table = &Header->Tables[TableId];
|
|
kbts_un TableLength = Table->Length;
|
|
|
|
if(TableLength)
|
|
{
|
|
if(TableLength >= HeaderSize)
|
|
{
|
|
Result = KBTS__POINTER_OFFSET(void, Header, Table->OffsetFromStartOfFile);
|
|
*TableEnd = KBTS__POINTER_OFFSET(char, Result, TableLength);
|
|
}
|
|
else if(Error)
|
|
{
|
|
*Error = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
#define kbts__BlobTableHeaderChecked(Header, TableId, HeaderType, TableEnd, Error) (HeaderType *)kbts__BlobTableHeaderCheckedManualSize((Header), (TableId), sizeof(HeaderType), (TableEnd), (Error))
|
|
|
|
static kbts_glyph_classes kbts__GlyphClasses(kbts_font *Font, kbts_u32 Id)
|
|
{
|
|
kbts_glyph_classes Result = KBTS__ZERO;
|
|
|
|
// Look up all glyph classes.
|
|
kbts__gdef *Gdef = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_GDEF, kbts__gdef);
|
|
if(Gdef)
|
|
{
|
|
kbts_un Gdef_ClassDefinitionOffset = kbts__ReadU16Unaligned(&Gdef->ClassDefinitionOffset);
|
|
kbts_un Gdef_MarkAttachmentClassDefinitionOffset = kbts__ReadU16Unaligned(&Gdef->MarkAttachmentClassDefinitionOffset);
|
|
|
|
if(Gdef_ClassDefinitionOffset)
|
|
{
|
|
kbts_u16 *ClassDefBase = KBTS__POINTER_OFFSET(kbts_u16, Gdef, Gdef_ClassDefinitionOffset);
|
|
Result.Class = kbts__GlyphClassFromTable(ClassDefBase, Id).Class;
|
|
}
|
|
|
|
if(Gdef_MarkAttachmentClassDefinitionOffset &&
|
|
(Result.Class == KBTS__GLYPH_CLASS_MARK))
|
|
{
|
|
kbts_u16 *MarkAttachmentClassDefBase = KBTS__POINTER_OFFSET(kbts_u16, Gdef, Gdef_MarkAttachmentClassDefinitionOffset);
|
|
Result.MarkAttachmentClass = kbts__GlyphClassFromTable(MarkAttachmentClassDefBase, Id).Class;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static int kbts__ScriptIsWeak(kbts_script Script)
|
|
{
|
|
int Result = (Script == KBTS_SCRIPT_DONT_KNOW) || (Script == KBTS_SCRIPT_DEFAULT) || (Script == KBTS_SCRIPT_DEFAULT2);
|
|
return Result;
|
|
}
|
|
|
|
static int kbts__ShaperRtl(kbts_shaper Shaper)
|
|
{
|
|
int Result = (Shaper == KBTS_SHAPER_ARABIC) || (Shaper == KBTS_SHAPER_HEBREW);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_CodepointToGlyphId(kbts_font *Font, int ICodepoint)
|
|
{
|
|
int Result = ICodepoint;
|
|
|
|
if(kbts_FontIsValid(Font))
|
|
{
|
|
Result = 0;
|
|
kbts_u32 Codepoint = (kbts_u32)ICodepoint;
|
|
kbts_u16 *CmapBase = Font->Cmap;
|
|
|
|
if(CmapBase)
|
|
{
|
|
kbts_u16 CmapFormat = kbts__ReadU16Unaligned(CmapBase);
|
|
switch(CmapFormat)
|
|
{
|
|
case 0:
|
|
{
|
|
kbts__cmap_0 *Cmap0 = (kbts__cmap_0 *)CmapBase;
|
|
|
|
if((kbts_un)Codepoint < KBTS__ARRAY_LENGTH(Cmap0->GlyphIdArray))
|
|
{
|
|
Result = Cmap0->GlyphIdArray[Codepoint];
|
|
}
|
|
} break;
|
|
|
|
case 2:
|
|
{
|
|
kbts__cmap_2 *Cmap2 = (kbts__cmap_2 *)CmapBase;
|
|
kbts__sub_header *SubHeaders = KBTS__POINTER_AFTER(kbts__sub_header, Cmap2);
|
|
|
|
kbts_u32 High = (Codepoint >> 8) & 0xFF;
|
|
|
|
if(!(Codepoint & 0xFF00))
|
|
{
|
|
High = Codepoint & 0xFF;
|
|
}
|
|
|
|
// The Microsoft documentation doesn't mention that the SubHeaderKeys are indices multiplied by 8, for some
|
|
// reason..! The Apple documentation does.
|
|
kbts_u16 SubHeaderIndex = kbts__ReadU16Unaligned(&Cmap2->SubHeaderKeys[High]) / 8;
|
|
kbts__sub_header *SubHeader = &SubHeaders[SubHeaderIndex];
|
|
|
|
if(!SubHeaderIndex)
|
|
{
|
|
// With SubHeader 0, we only use the first byte.
|
|
Codepoint = High;
|
|
}
|
|
else
|
|
{
|
|
Codepoint = Codepoint & 0xFF;
|
|
}
|
|
|
|
kbts_u32 Offset = Codepoint - kbts__ReadU16Unaligned(&SubHeader->FirstCode);
|
|
if(Offset < kbts__ReadU16Unaligned(&SubHeader->EntryCount))
|
|
{
|
|
kbts_u16 *GlyphIds = KBTS__POINTER_OFFSET(kbts_u16, &SubHeader->IdRangeOffset, kbts__ReadU16Unaligned(&SubHeader->IdRangeOffset));
|
|
kbts_un GlyphId = kbts__ReadU16Unaligned(&GlyphIds[Offset]);
|
|
|
|
if(GlyphId)
|
|
{
|
|
GlyphId += kbts__ReadS16Unaligned(&SubHeader->IdDelta);
|
|
}
|
|
|
|
Result = (kbts_u16)GlyphId;
|
|
}
|
|
} break;
|
|
|
|
case 4:
|
|
{
|
|
kbts__cmap_4 *Cmap4 = (kbts__cmap_4 *)CmapBase;
|
|
kbts_un SegmentCount = kbts__ReadU16Unaligned(&Cmap4->SegmentCountTimesTwo) / 2;
|
|
|
|
if(SegmentCount)
|
|
{
|
|
kbts_u16 *EndCodes = KBTS__POINTER_AFTER(kbts_u16, Cmap4);
|
|
kbts_u16 *StartCodes = EndCodes + SegmentCount + 1;
|
|
kbts_s16 *IdDeltas = (kbts_s16 *)(StartCodes + SegmentCount);
|
|
kbts_u16 *IdRangeOffsets = (kbts_u16 *)(IdDeltas + SegmentCount);
|
|
kbts_un SegmentIndexOffset = 0;
|
|
|
|
while(SegmentCount > 1)
|
|
{
|
|
kbts_un HalfCount = SegmentCount / 2;
|
|
SegmentIndexOffset = (kbts__ReadU16Unaligned(&EndCodes[SegmentIndexOffset + HalfCount - 1]) < Codepoint) ? (SegmentIndexOffset + HalfCount) : SegmentIndexOffset;
|
|
SegmentCount -= HalfCount;
|
|
}
|
|
|
|
kbts_u16 Start = kbts__ReadU16Unaligned(&StartCodes[SegmentIndexOffset]);
|
|
if((Codepoint >= Start) && (Codepoint <= kbts__ReadU16Unaligned(&EndCodes[SegmentIndexOffset])))
|
|
{
|
|
kbts_s16 Delta = kbts__ReadS16Unaligned(&IdDeltas[SegmentIndexOffset]);
|
|
kbts_u16 RangeOffset = kbts__ReadU16Unaligned(&IdRangeOffsets[SegmentIndexOffset]);
|
|
|
|
kbts_u16 GlyphId = (kbts_u16)Delta;
|
|
if(RangeOffset)
|
|
{
|
|
GlyphId += *(&IdRangeOffsets[SegmentIndexOffset] + (Codepoint - Start) + RangeOffset / 2);
|
|
}
|
|
else
|
|
{
|
|
GlyphId += (kbts_u16)(Codepoint);
|
|
}
|
|
Result = GlyphId;
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 6:
|
|
{
|
|
kbts__cmap_6 *Cmap6 = (kbts__cmap_6 *)CmapBase;
|
|
kbts_u16 *GlyphIds = KBTS__POINTER_AFTER(kbts_u16, Cmap6);
|
|
|
|
kbts_un Offset = Codepoint - kbts__ReadU16Unaligned(&Cmap6->FirstCode);
|
|
if(Offset < kbts__ReadU16Unaligned(&Cmap6->EntryCount))
|
|
{
|
|
Result = kbts__ReadU16Unaligned(&GlyphIds[Offset]);
|
|
}
|
|
} break;
|
|
|
|
case 12:
|
|
{
|
|
kbts__cmap_12_13 *Cmap12 = (kbts__cmap_12_13 *)CmapBase;
|
|
kbts__sequential_map_group *Groups = KBTS__POINTER_AFTER(kbts__sequential_map_group, Cmap12);
|
|
|
|
kbts_un GlyphId = 0;
|
|
kbts_un GroupCount = kbts__ReadU32Unaligned(&Cmap12->GroupCount);
|
|
if(GroupCount)
|
|
{
|
|
while(GroupCount > 1)
|
|
{
|
|
kbts_un HalfCount = GroupCount / 2;
|
|
Groups = (kbts__ReadU32Unaligned(&Groups[HalfCount - 1].EndCharacterCode) < Codepoint) ? (Groups + HalfCount) : Groups;
|
|
GroupCount -= HalfCount;
|
|
}
|
|
}
|
|
|
|
if((Codepoint >= kbts__ReadU32Unaligned(&Groups->StartCharacterCode)) &&
|
|
(Codepoint <= kbts__ReadU32Unaligned(&Groups->EndCharacterCode)))
|
|
{
|
|
kbts_un Offset = Codepoint - kbts__ReadU32Unaligned(&Groups->StartCharacterCode);
|
|
GlyphId = kbts__ReadU32Unaligned(&Groups->StartGlyphId) + Offset;
|
|
}
|
|
|
|
Result = (int)GlyphId;
|
|
} break;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_glyph kbts_CodepointToGlyph(kbts_font *Font, int ICodepoint, kbts_glyph_config *Config, int UserId)
|
|
{
|
|
kbts_u32 Codepoint = (kbts_u32)ICodepoint;
|
|
|
|
kbts_glyph Result = KBTS__ZERO;
|
|
Result.Codepoint = Codepoint;
|
|
Result.Config = Config;
|
|
Result.UserIdOrCodepointIndex = UserId;
|
|
|
|
// Look up Unicode properties.
|
|
Result.JoiningType = kbts__GetUnicodeJoiningType(Codepoint);
|
|
Result.UnicodeFlags = kbts__GetUnicodeFlags(Codepoint);
|
|
kbts_u16 SyllabicInfo = kbts__GetUnicodeSyllabicInfo(Codepoint);
|
|
Result.SyllabicClass = kbts__GetSyllabicClass(SyllabicInfo);
|
|
Result.SyllabicPosition = kbts__GetSyllabicPosition(SyllabicInfo);
|
|
Result.CombiningClass = kbts__GetUnicodeCombiningClass(Codepoint);
|
|
Result.UseClass = kbts__GetUnicodeUseClass(Codepoint);
|
|
Result.ParentInfo = kbts__GetUnicodeParentInfo(Codepoint);
|
|
|
|
Result.Id = (kbts_u16)kbts_CodepointToGlyphId(Font, ICodepoint);
|
|
|
|
if(kbts_FontIsValid(Font) && Font->Blob->Tables[KBTS_BLOB_TABLE_ID_GDEF].Length)
|
|
{
|
|
Result.Classes = kbts__GlyphClasses(Font, Result.Id);
|
|
}
|
|
else
|
|
{
|
|
// @Cleanup: This is garbage compatibility-with-broken-fonts code. I would very much like to get rid of it.
|
|
if((Result.UnicodeFlags & KBTS_UNICODE_FLAG_DEFAULT_IGNORABLE) || !(Result.UnicodeFlags & KBTS_UNICODE_FLAG_NON_SPACING_MARK))
|
|
{
|
|
Result.Classes.Class = KBTS__GLYPH_CLASS_BASE;
|
|
}
|
|
else
|
|
{
|
|
Result.Classes.Class = KBTS__GLYPH_CLASS_MARK;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
typedef struct kbts__iterate_features
|
|
{
|
|
kbts__gsub_gpos *Header;
|
|
kbts__feature_list *FeatureList;
|
|
// @Incomplete
|
|
// kbts__feature_variations *FeatureVariations;
|
|
kbts__langsys *Langsys;
|
|
|
|
kbts__feature_set EnabledFeatures;
|
|
|
|
kbts_u32 CurrentFeatureTag;
|
|
kbts_u32 CurrentFeatureFlag;
|
|
|
|
kbts_u32 FeatureIndex;
|
|
kbts__feature *Feature;
|
|
} kbts__iterate_features;
|
|
|
|
static kbts__iterate_features kbts__IterateFeatures(kbts_shape_config *Config, kbts_shaping_table ShapingTable, kbts__feature_set EnabledFeatures)
|
|
{
|
|
kbts__iterate_features Result = KBTS__ZERO;
|
|
|
|
kbts_blob_table_id TableId = (ShapingTable == KBTS_SHAPING_TABLE_GSUB) ? KBTS_BLOB_TABLE_ID_GSUB : KBTS_BLOB_TABLE_ID_GPOS;
|
|
|
|
kbts__gsub_gpos *Header = kbts__BlobTableDataType(Config->Font->Blob, TableId, kbts__gsub_gpos);
|
|
if(Header)
|
|
{
|
|
// @Incomplete
|
|
// if(Header->Minor == 1)
|
|
// {
|
|
// Result.FeatureVariations = KBTS__POINTER_OFFSET(kbts__feature_variations, Header, Header->FeatureVariationsOffset);
|
|
// }
|
|
|
|
Result.FeatureList = KBTS__POINTER_OFFSET(kbts__feature_list, Header, kbts__ReadU16Unaligned(&Header->FeatureListOffset));
|
|
Result.Header = Header;
|
|
Result.Langsys = Config->Langsys[ShapingTable];
|
|
Result.EnabledFeatures = EnabledFeatures;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__IsValidFeatureIteration(kbts__iterate_features *It)
|
|
{
|
|
kbts_b32 Result = It->Langsys != 0;
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__NextFeature(kbts__iterate_features *It)
|
|
{
|
|
kbts_b32 Result = 0;
|
|
It->Feature = 0;
|
|
|
|
if(kbts__IsValidFeatureIteration(It))
|
|
{
|
|
kbts_u16 *FeatureIndices = KBTS__POINTER_AFTER(kbts_u16, It->Langsys);
|
|
// @Incomplete
|
|
// kbts__feature_variations *FeatureVariations = It->FeatureVariations;
|
|
while(It->FeatureIndex < It->Langsys->FeatureIndexCount)
|
|
{
|
|
kbts__feature_pointer Feature = kbts__GetFeature(It->FeatureList, kbts__ReadU16Unaligned(&FeatureIndices[It->FeatureIndex]));
|
|
|
|
// We might need to swap out this feature with another.
|
|
// Check for variations.
|
|
// @Incomplete
|
|
//if(FeatureVariations)
|
|
//{
|
|
// KBTS__FOR(VariationIndex, 0, FeatureVariations->RecordCount)
|
|
// {
|
|
// kbts__feature_variation_pointer Variation = kbts__GetFeatureVariation(FeatureVariations, VariationIndex);
|
|
// KBTS__FOR(ConditionIndex, 0, Variation.ConditionSet->Count)
|
|
// {
|
|
// kbts__condition_1 *Condition = kbts__GetCondition(Variation.ConditionSet, ConditionIndex);
|
|
// KBTS_ASSERT(0);
|
|
// }
|
|
// }
|
|
//}
|
|
|
|
It->FeatureIndex += 1;
|
|
|
|
kbts_u32 FeatureId = kbts__FeatureTagToId(Feature.Tag);
|
|
if(kbts__ContainsFeature(&It->EnabledFeatures, FeatureId))
|
|
{
|
|
It->Feature = Feature.Feature;
|
|
It->CurrentFeatureTag = Feature.Tag;
|
|
if(FeatureId && (FeatureId <= 32))
|
|
{
|
|
It->CurrentFeatureFlag = (1u << (FeatureId - 1)) & KBTS__GLYPH_FEATURE_MASK;
|
|
}
|
|
Result = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
typedef struct kbts__iterate_lookups
|
|
{
|
|
kbts__lookup_list *LookupList;
|
|
kbts__feature *Feature;
|
|
|
|
kbts__lookup *Lookup;
|
|
kbts_u16 LookupIndex;
|
|
|
|
kbts_u32 LookupIndexIndex;
|
|
} kbts__iterate_lookups;
|
|
|
|
static kbts__iterate_lookups kbts__IterateLookups(kbts__lookup_list *List, kbts__feature *Feature)
|
|
{
|
|
kbts__iterate_lookups Result = KBTS__ZERO;
|
|
Result.LookupList = List;
|
|
Result.Feature = Feature;
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__NextLookup(kbts__iterate_lookups *It)
|
|
{
|
|
kbts_b32 Result = 0;
|
|
kbts__feature *Feature = It->Feature;
|
|
|
|
if(It->LookupList && Feature && (It->LookupIndexIndex < kbts__ReadU16Unaligned(&Feature->LookupIndexCount)))
|
|
{
|
|
kbts_u16 *LookupIndices = KBTS__POINTER_AFTER(kbts_u16, Feature);
|
|
|
|
It->LookupIndex = kbts__ReadU16Unaligned(&LookupIndices[It->LookupIndexIndex]);
|
|
It->Lookup = kbts__GetLookup(It->LookupList, It->LookupIndex);
|
|
|
|
Result = 1;
|
|
It->LookupIndexIndex += 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__UnbucketGlyph(kbts_shape_scratchpad *Scratchpad, kbts_glyph *Glyph)
|
|
{
|
|
if(Glyph->Bucketed)
|
|
{
|
|
Glyph->Bucketed->SortKey = KBTS__DELETED_SORT_KEY;
|
|
|
|
Glyph->Bucketed = 0;
|
|
}
|
|
}
|
|
|
|
static kbts_un kbts__IdLookupListIndex(kbts_un GlyphId, kbts_un GlyphCount)
|
|
{
|
|
kbts_un Result = KBTS__MIN(GlyphId, GlyphCount);
|
|
return Result;
|
|
}
|
|
|
|
#define KBTS__DLLIST_SORT(First, OnePastLast, Member) \
|
|
do \
|
|
{ \
|
|
kbts_glyph *DllistSort_First = (First); \
|
|
kbts_glyph *DllistSort_OnePastLast = (OnePastLast); \
|
|
kbts_glyph *DllistSort_OneBeforeFirst = DllistSort_First->Prev; \
|
|
for(kbts_glyph *DllistSort_Forward = DllistSort_First; \
|
|
DllistSort_Forward != DllistSort_OnePastLast; \
|
|
) \
|
|
{ \
|
|
kbts_glyph *DllistSort_Next = DllistSort_Forward->Next; \
|
|
kbts_un DllistSort_Member = DllistSort_Forward->Member; \
|
|
for(kbts_glyph *DllistSort_Backward = DllistSort_Forward; \
|
|
DllistSort_Backward->Prev != DllistSort_OneBeforeFirst; \
|
|
) \
|
|
{ \
|
|
if(DllistSort_Backward->Prev->Member > DllistSort_Member) \
|
|
{ \
|
|
KBTS__DLLIST_SWAP(DllistSort_Backward, DllistSort_Backward->Prev); \
|
|
} \
|
|
else \
|
|
{ \
|
|
break; \
|
|
} \
|
|
} \
|
|
DllistSort_Forward = DllistSort_Next; \
|
|
} \
|
|
} while(0)
|
|
|
|
#define KBTS__FOR_GLYPH(Storage, GlyphName) \
|
|
for(kbts_glyph *GlyphName = (Storage)->GlyphSentinel.Next; \
|
|
GlyphName != (kbts_glyph *)&(Storage)->GlyphSentinel; \
|
|
GlyphName = GlyphName->Next)
|
|
|
|
static void KBTS__DLLIST_SWAP(kbts_glyph *A, kbts_glyph *B)
|
|
{
|
|
kbts_glyph *APrev = A->Prev;
|
|
kbts_glyph *ANext = A->Next;
|
|
kbts_glyph *BPrev = B->Prev;
|
|
kbts_glyph *BNext = B->Next;
|
|
|
|
A->Prev = (BPrev == A) ? B : BPrev;
|
|
A->Next = (BNext == A) ? B : BNext;
|
|
B->Prev = (APrev == B) ? A : APrev;
|
|
B->Next = (ANext == B) ? A : ANext;
|
|
|
|
A->Prev->Next = A->Next->Prev = A;
|
|
B->Prev->Next = B->Next->Prev = B;
|
|
}
|
|
|
|
static kbts__op_list *kbts__ShaperOpLists[KBTS_SHAPER_COUNT] = {
|
|
/* DEFAULT, */ &kbts__OpList_Default,
|
|
/* ARABIC, */ &kbts__OpList_ArabicRclt,
|
|
/* HANGUL, */ &kbts__OpList_Hangul,
|
|
/* HEBREW, */ &kbts__OpList_Default,
|
|
/* INDIC, */ &kbts__OpList_Indic,
|
|
/* KHMER, */ &kbts__OpList_Khmer,
|
|
/* MYANMAR, */ &kbts__OpList_Myanmar,
|
|
/* TIBETAN, */ &kbts__OpList_Tibetan,
|
|
/* USE, */ &kbts__OpList_Use,
|
|
};
|
|
|
|
typedef struct kbts__gsub_frame
|
|
{
|
|
kbts_glyph *InputGlyph;
|
|
// This isn't really an index into anything, per se.
|
|
// It is just an offset that allows reordering for ShapeState->LookupOnePastLastGlyph.
|
|
kbts_u32 StartIndex;
|
|
|
|
kbts_u16 LookupIndex;
|
|
kbts_u16 SubtableIndex;
|
|
|
|
// Defined for nested lookups.
|
|
kbts__sequence_lookup_record *Records;
|
|
kbts_u16 RecordCount;
|
|
kbts_u16 RecordIndex;
|
|
} kbts__gsub_frame;
|
|
|
|
typedef struct kbts__pointer_bump_allocator
|
|
{
|
|
kbts_uptr At;
|
|
} kbts__pointer_bump_allocator;
|
|
|
|
static kbts__pointer_bump_allocator kbts__PointerBumpAllocator(void *Pointer)
|
|
{
|
|
kbts__pointer_bump_allocator Result;
|
|
Result.At = (kbts_uptr)Pointer;
|
|
return Result;
|
|
}
|
|
|
|
static void *kbts__PointerPush(kbts__pointer_bump_allocator *Alloc, kbts_un Size, kbts_un Align)
|
|
{
|
|
kbts_uptr Aligned = (Alloc->At + (Align - 1)) & ~(Align - 1);
|
|
Alloc->At = Aligned + Size;
|
|
|
|
void *Result = (void *)Aligned;
|
|
return Result;
|
|
}
|
|
#define kbts__PointerPushType(Pointer, Type) (Type *)kbts__PointerPush((Pointer), sizeof(Type), KBTS_ALIGNOF(Type))
|
|
#define kbts__PointerPushArray(Pointer, Type, Count) (Type *)kbts__PointerPush((Pointer), sizeof(Type) * (Count), KBTS_ALIGNOF(Type))
|
|
|
|
KBTS_INLINE kbts_un kbts__GsubSequentialLookupCount(kbts_shape_config *Config)
|
|
{
|
|
kbts_un Result = Config ? kbts__shape_config_FeatureStageFirstLookupIndices(Config)[Config->OpList.FeatureStageCount - 1] : 0;
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE kbts_un kbts__SequentialLookupCount(kbts_shape_config *Config)
|
|
{
|
|
kbts_un Result = Config ? kbts__shape_config_FeatureStageFirstLookupIndices(Config)[Config->OpList.FeatureStageCount] : 0;
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__NullAllocator(void *Data, kbts_allocator_op *Op)
|
|
{
|
|
KBTS__UNUSED(Data);
|
|
KBTS__UNUSED(Op);
|
|
}
|
|
|
|
static void kbts__DefaultAllocator(void *Data, kbts_allocator_op *Op)
|
|
{
|
|
KBTS__UNUSED(Data);
|
|
|
|
switch(Op->Kind)
|
|
{
|
|
case KBTS_ALLOCATOR_OP_KIND_ALLOCATE:
|
|
{
|
|
Op->Allocate.Pointer = KBTS_MALLOC(Data, Op->Allocate.Size);
|
|
} break;
|
|
|
|
case KBTS_ALLOCATOR_OP_KIND_FREE:
|
|
{
|
|
KBTS_FREE(Data, Op->Free.Pointer);
|
|
} break;
|
|
}
|
|
}
|
|
|
|
static void *kbts__AllocatorAllocate(kbts_allocator_function *Allocator, void *AllocatorData, kbts_un Size)
|
|
{
|
|
kbts_allocator_op AllocatorOp = KBTS__ZERO;
|
|
AllocatorOp.Kind = KBTS_ALLOCATOR_OP_KIND_ALLOCATE;
|
|
AllocatorOp.Allocate.Size = (kbts_u32)Size;
|
|
|
|
if(!Allocator)
|
|
{
|
|
Allocator = kbts__DefaultAllocator;
|
|
}
|
|
|
|
Allocator(AllocatorData, &AllocatorOp);
|
|
|
|
void *Result = AllocatorOp.Allocate.Pointer;
|
|
return Result;
|
|
}
|
|
#define kbts__AllocatorAllocateType(Allocator, AllocatorData, Type) (Type *)kbts__AllocatorAllocate((Allocator), (AllocatorData), sizeof(Type))
|
|
#define kbts__AllocatorAllocateArray(Allocator, AllocatorData, Type, Count) (Type *)kbts__AllocatorAllocate((Allocator), (AllocatorData), sizeof(Type) * (Count))
|
|
|
|
static void kbts__AllocatorFree(kbts_allocator_function *Allocator, void *AllocatorData, void *Pointer)
|
|
{
|
|
if(Pointer)
|
|
{
|
|
kbts_allocator_op AllocatorOp = KBTS__ZERO;
|
|
AllocatorOp.Kind = KBTS_ALLOCATOR_OP_KIND_FREE;
|
|
AllocatorOp.Free.Pointer = Pointer;
|
|
|
|
if(!Allocator)
|
|
{
|
|
Allocator = kbts__DefaultAllocator;
|
|
}
|
|
|
|
Allocator(AllocatorData, &AllocatorOp);
|
|
}
|
|
}
|
|
|
|
static void kbts__EnsureArenaInitialized(kbts_arena *Arena)
|
|
{
|
|
if(!Arena->BlockSentinel.Next)
|
|
{
|
|
KBTS__DLLIST_SENTINEL_INIT(&Arena->BlockSentinel);
|
|
KBTS__DLLIST_SENTINEL_INIT(&Arena->FreeBlockSentinel);
|
|
|
|
if(!Arena->Allocator)
|
|
{
|
|
Arena->Allocator = kbts__DefaultAllocator;
|
|
}
|
|
}
|
|
}
|
|
|
|
#define KBTS_ARENA_MIN_BLOCK_SIZE 4096
|
|
static kbts__arena_block *kbts__ArenaPushBlock(kbts_arena *Arena, kbts_un Size, kbts_un Align)
|
|
{
|
|
kbts__arena_block *Result = (kbts__arena_block *)&Arena->BlockSentinel;
|
|
|
|
if(!Arena->Error)
|
|
{
|
|
kbts_un BlockSize = sizeof(kbts__arena_block) + Size + KBTS_ALIGNOF(kbts__arena_block) + Align - 1;
|
|
if(BlockSize < KBTS_ARENA_MIN_BLOCK_SIZE)
|
|
{
|
|
BlockSize = KBTS_ARENA_MIN_BLOCK_SIZE;
|
|
}
|
|
|
|
Result = (kbts__arena_block *)Arena->FreeBlockSentinel.Prev;
|
|
if((Result == (kbts__arena_block *)&Arena->FreeBlockSentinel) ||
|
|
((Result->Size + sizeof(kbts__arena_block)) < BlockSize))
|
|
{
|
|
void *Base = kbts__AllocatorAllocate(Arena->Allocator, Arena->AllocatorData, BlockSize);
|
|
|
|
if(Base)
|
|
{
|
|
Result = KBTS__ALIGN_POINTER(kbts__arena_block, Base, KBTS_ALIGNOF(kbts__arena_block));
|
|
KBTS_MEMSET(Result, 0, sizeof(*Result));
|
|
Result->BaseAllocation = Base;
|
|
Result->Size = (kbts_un)(KBTS__POINTER_OFFSET(char, Base, BlockSize) - KBTS__POINTER_AFTER(char, Result));
|
|
}
|
|
else
|
|
{
|
|
Result = (kbts__arena_block *)&Arena->BlockSentinel;
|
|
Arena->Error = 1;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
KBTS__DLLIST_REMOVE(&Result->Header);
|
|
}
|
|
|
|
KBTS__DLLIST_INSERT_BEFORE(&Result->Header, &Arena->BlockSentinel);
|
|
|
|
Result->Used = 0;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static int kbts__ArenaBlockIsValid(kbts_arena *Arena, kbts__arena_block *Block)
|
|
{
|
|
int Result = Block && (&Block->Header != &Arena->BlockSentinel);
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__ClearArena(kbts_arena *Arena)
|
|
{
|
|
kbts__EnsureArenaInitialized(Arena);
|
|
|
|
kbts_arena_block_header *First = Arena->BlockSentinel.Next;
|
|
kbts_arena_block_header *Last = Arena->BlockSentinel.Prev;
|
|
|
|
if(kbts__ArenaBlockIsValid(Arena, (kbts__arena_block *)First))
|
|
{
|
|
First->Prev = Arena->FreeBlockSentinel.Prev;
|
|
Last->Next = &Arena->FreeBlockSentinel;
|
|
|
|
First->Prev->Next = First;
|
|
Last->Next->Prev = Last;
|
|
|
|
KBTS__DLLIST_SENTINEL_INIT(&Arena->BlockSentinel);
|
|
}
|
|
}
|
|
|
|
static void *kbts__PushSize(kbts_arena *Arena, kbts_un Size, kbts_un Align)
|
|
{
|
|
kbts__EnsureArenaInitialized(Arena);
|
|
void *Result = 0;
|
|
|
|
if(!Arena->Error)
|
|
{
|
|
kbts__arena_block *Block = (kbts__arena_block *)Arena->BlockSentinel.Prev;
|
|
char *BlockMemory = KBTS__POINTER_AFTER(char, Block);
|
|
|
|
if(kbts__ArenaBlockIsValid(Arena, Block))
|
|
{
|
|
char *Top = BlockMemory + Block->Used;
|
|
char *TopAligned = KBTS__ALIGN_POINTER(char, Top, Align);
|
|
|
|
if((kbts_un)((TopAligned + Size) - BlockMemory) <= Block->Size)
|
|
{
|
|
Result = TopAligned;
|
|
}
|
|
}
|
|
|
|
if(!Result)
|
|
{
|
|
Block = kbts__ArenaPushBlock(Arena, Size, Align);
|
|
|
|
if(kbts__ArenaBlockIsValid(Arena, Block))
|
|
{
|
|
BlockMemory = KBTS__POINTER_AFTER(char, Block);
|
|
char *Top = BlockMemory + Block->Used;
|
|
char *TopAligned = KBTS__ALIGN_POINTER(char, Top, Align);
|
|
|
|
Result = TopAligned;
|
|
}
|
|
}
|
|
|
|
if(Result)
|
|
{
|
|
Block->Used = (kbts_un)((char *)Result + Size - BlockMemory);
|
|
KBTS_ASSERT(Block->Used <= Block->Size);
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
#define kbts__PushType(Arena, Type) (Type *)kbts__PushSize((Arena), sizeof(Type), KBTS_ALIGNOF(Type))
|
|
#define kbts__PushArray(Arena, Type, Count) (Type *)kbts__PushSize((Arena), sizeof(Type) * (Count), KBTS_ALIGNOF(Type))
|
|
|
|
static kbts__arena_lifetime kbts__BeginLifetime(kbts_arena *Arena)
|
|
{
|
|
kbts__arena_block *Block = (kbts__arena_block *)Arena->BlockSentinel.Prev;
|
|
kbts_un Used = 0;
|
|
|
|
if(!Block)
|
|
{
|
|
Block = (kbts__arena_block *)&Arena->BlockSentinel;
|
|
}
|
|
|
|
if(kbts__ArenaBlockIsValid(Arena, Block))
|
|
{
|
|
Used = Block->Used;
|
|
}
|
|
|
|
kbts__arena_lifetime Result = KBTS__ZERO;
|
|
Result.Arena = Arena;
|
|
Result.BlockHeader = &Block->Header;
|
|
Result.Used = Used;
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__EndLifetime(kbts__arena_lifetime *Lifetime)
|
|
{
|
|
kbts_arena *Arena = Lifetime->Arena;
|
|
if(Arena && !Arena->Error)
|
|
{
|
|
kbts__arena_block *Block = (kbts__arena_block *)Lifetime->BlockHeader;
|
|
|
|
if(kbts__ArenaBlockIsValid(Lifetime->Arena, Block))
|
|
{
|
|
Block->Used = Lifetime->Used;
|
|
}
|
|
|
|
// This works even if Block is the sentinel.
|
|
for(kbts_arena_block_header *Header = Block->Header.Next;
|
|
kbts__ArenaBlockIsValid(Arena, (kbts__arena_block *)Header);
|
|
)
|
|
{
|
|
kbts_arena_block_header *Next = Header->Next;
|
|
|
|
KBTS__DLLIST_REMOVE(Header);
|
|
KBTS__DLLIST_INSERT_BEFORE(Header, &Arena->FreeBlockSentinel);
|
|
|
|
Header = Next;
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__MoveArena(kbts_arena *To, kbts_arena *From)
|
|
{
|
|
*To = *From;
|
|
|
|
if(To->BlockSentinel.Next != &From->BlockSentinel)
|
|
{
|
|
To->BlockSentinel.Next->Prev = To->BlockSentinel.Prev->Next = &To->BlockSentinel;
|
|
}
|
|
else
|
|
{
|
|
KBTS__DLLIST_SENTINEL_INIT(&To->BlockSentinel);
|
|
}
|
|
|
|
if(To->FreeBlockSentinel.Next != &From->FreeBlockSentinel)
|
|
{
|
|
To->FreeBlockSentinel.Next->Prev = To->FreeBlockSentinel.Prev->Next = &To->FreeBlockSentinel;
|
|
}
|
|
else
|
|
{
|
|
KBTS__DLLIST_SENTINEL_INIT(&To->FreeBlockSentinel);
|
|
}
|
|
}
|
|
|
|
static void kbts__FreeArena(kbts_arena *Arena)
|
|
{
|
|
kbts__EnsureArenaInitialized(Arena);
|
|
|
|
kbts_arena StackArena;
|
|
kbts__MoveArena(&StackArena, Arena);
|
|
|
|
kbts_arena_block_header *Sentinels[2] = {&StackArena.BlockSentinel, &StackArena.FreeBlockSentinel};
|
|
|
|
KBTS__FOR(SentinelIndex, 0, KBTS__ARRAY_LENGTH(Sentinels))
|
|
{
|
|
kbts_arena_block_header *Sentinel = Sentinels[SentinelIndex];
|
|
|
|
for(kbts_arena_block_header *Header = Sentinel->Next;
|
|
Header != Sentinel;
|
|
)
|
|
{
|
|
kbts_arena_block_header *Next = Header->Next;
|
|
kbts__arena_block *Block = (kbts__arena_block *)Header;
|
|
|
|
kbts__AllocatorFree(StackArena.Allocator, StackArena.AllocatorData, Block->BaseAllocation);
|
|
|
|
Header = Next;
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__ArenaAllocator(void *Data, kbts_allocator_op *Op)
|
|
{
|
|
kbts_arena *Arena = (kbts_arena *)Data;
|
|
|
|
if(Op->Kind == KBTS_ALLOCATOR_OP_KIND_ALLOCATE)
|
|
{
|
|
Op->Allocate.Pointer = kbts__PushSize(Arena, Op->Allocate.Size, 8);
|
|
}
|
|
// No free!
|
|
}
|
|
|
|
static int kbts__InitializeFixedMemoryArena(kbts_arena *Arena, void *Memory, kbts_un MemorySize)
|
|
{
|
|
int Result = 0;
|
|
KBTS_MEMSET(Arena, 0, sizeof(*Arena));
|
|
Arena->Allocator = kbts__NullAllocator;
|
|
kbts__EnsureArenaInitialized(Arena);
|
|
|
|
char *BaseAligned = KBTS__ALIGN_POINTER(char, Memory, KBTS_ALIGNOF(kbts__arena_block));
|
|
char *End = (char *)Memory + MemorySize;
|
|
kbts_un TotalBlockSize = (kbts_un)(End - BaseAligned);
|
|
|
|
if(TotalBlockSize >= sizeof(kbts__arena_block))
|
|
{
|
|
kbts__arena_block *Block = (kbts__arena_block *)BaseAligned;
|
|
|
|
Block->Header.Prev = Block->Header.Next = &Arena->BlockSentinel;
|
|
Block->Header.Prev->Next = Block->Header.Next->Prev = &Block->Header;
|
|
Block->BaseAllocation = 0;
|
|
Block->Size = TotalBlockSize - sizeof(kbts__arena_block);
|
|
Block->Used = 0;
|
|
|
|
Result = 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_un kbts_SizeOfShapeScratchpad(kbts_shape_config *Config)
|
|
{
|
|
kbts_un DecompositionSize = sizeof(kbts_glyph) * KBTS__MAXIMUM_DECOMPOSITION_CODEPOINTS;
|
|
kbts_un GsubSize = sizeof(kbts__gsub_frame) * KBTS_LOOKUP_STACK_SIZE;
|
|
kbts_un ScratchSize = KBTS__MAX(DecompositionSize, GsubSize);
|
|
|
|
kbts_un Result = sizeof(kbts_shape_scratchpad) + ScratchSize;
|
|
|
|
if(Config)
|
|
{
|
|
kbts_un BucketHeadersSize = sizeof(kbts__bucketed_glyph_block_header) * kbts__SequentialLookupCount(Config);
|
|
|
|
Result += BucketHeadersSize;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_scratchpad *kbts_PlaceShapeScratchpad(kbts_shape_config *Config, void *Memory, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
{
|
|
kbts__pointer_bump_allocator Bump = kbts__PointerBumpAllocator(Memory);
|
|
kbts_shape_scratchpad *Result = kbts__PointerPushType(&Bump, kbts_shape_scratchpad);
|
|
KBTS_MEMSET(Result, 0, sizeof(*Result));
|
|
|
|
if(!Allocator)
|
|
{
|
|
Allocator = kbts__DefaultAllocator;
|
|
}
|
|
|
|
Result->Allocator = Allocator;
|
|
Result->AllocatorData = AllocatorData;
|
|
Result->Config = Config;
|
|
|
|
// @Duplication with SizeOfShapeScratchpad().
|
|
kbts_un DecompositionSize = sizeof(kbts_glyph) * KBTS__MAXIMUM_DECOMPOSITION_CODEPOINTS;
|
|
kbts_un GsubSize = sizeof(kbts__gsub_frame) * KBTS_LOOKUP_STACK_SIZE;
|
|
kbts_un ScratchSize = KBTS__MAX(DecompositionSize, GsubSize);
|
|
|
|
Result->ScratchMemory = kbts__PointerPush(&Bump, ScratchSize, 1);
|
|
|
|
if(Config)
|
|
{
|
|
kbts_un SequentialLookupCount = kbts__SequentialLookupCount(Config);
|
|
Result->LookupGlyphBuckets = kbts__PointerPushArray(&Bump, kbts__bucketed_glyph_block_header, SequentialLookupCount);
|
|
|
|
{
|
|
kbts_blob_header *Blob = Config->Font->Blob;
|
|
|
|
Result->GlyphIdCount = Blob->GlyphCount;
|
|
Result->LookupSubtableCount = Blob->LookupSubtableCount;
|
|
Result->GposLookupIndexOffset = Blob->GposLookupIndexOffset;
|
|
|
|
if(Blob->GlyphLookupSubtableMatrixOffsetFromStartOfFile)
|
|
{
|
|
Result->GlyphLookupSubtableMatrix = KBTS__POINTER_OFFSET(kbts_u32, Blob, Blob->GlyphLookupSubtableMatrixOffsetFromStartOfFile);
|
|
}
|
|
|
|
if(Blob->LookupSubtableIndexOffsetsOffsetFromStartOfFile)
|
|
{
|
|
Result->LookupSubtableIndexOffsets = KBTS__POINTER_OFFSET(kbts_u32, Blob, Blob->LookupSubtableIndexOffsetsOffsetFromStartOfFile);
|
|
}
|
|
|
|
kbts__gdef *Gdef = kbts__BlobTableDataType(Blob, KBTS_BLOB_TABLE_ID_GDEF, kbts__gdef);
|
|
if(Gdef &&
|
|
(kbts__ReadU16Unaligned(&Gdef->Major) == 1) &&
|
|
(kbts__ReadU16Unaligned(&Gdef->Minor) >= 3) &&
|
|
kbts__ReadU32Unaligned(&Gdef->ItemVariationStoreOffset))
|
|
{
|
|
Result->GdefItemVariationStore = KBTS__POINTER_OFFSET(kbts__item_variation_store, Gdef, kbts__ReadU32Unaligned(&Gdef->ItemVariationStoreOffset));
|
|
}
|
|
}
|
|
|
|
KBTS__FOR(LookupIndex, 0, SequentialLookupCount)
|
|
{
|
|
kbts__bucketed_glyph_block_header *Sentinel = &Result->LookupGlyphBuckets[LookupIndex];
|
|
|
|
KBTS__DLLIST_SENTINEL_INIT(Sentinel);
|
|
}
|
|
|
|
Result->SequentialLookupCount = (kbts_u32)SequentialLookupCount;
|
|
}
|
|
|
|
KBTS__DLLIST_SENTINEL_INIT(&Result->FreeBucketedBlockSentinel);
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_scratchpad *kbts_PlaceShapeScratchpadFixedMemory(kbts_shape_config *Config, void *Memory, int Size)
|
|
{
|
|
kbts_shape_scratchpad *Result = 0;
|
|
kbts_un ScratchpadSize = kbts_SizeOfShapeScratchpad(Config);
|
|
kbts_un InitialSize = sizeof(kbts_arena) + ScratchpadSize;
|
|
|
|
if((Size >= 0) &&
|
|
((kbts_un)Size >= InitialSize))
|
|
{
|
|
kbts_arena *Arena = (kbts_arena *)KBTS__POINTER_OFFSET(kbts_arena, Memory, ScratchpadSize);
|
|
kbts__InitializeFixedMemoryArena(Arena, KBTS__POINTER_AFTER(void, Arena), (kbts_un)Size - InitialSize);
|
|
|
|
Result = kbts_PlaceShapeScratchpad(Config, Memory, kbts__ArenaAllocator, Arena);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_scratchpad *kbts_CreateShapeScratchpad(kbts_shape_config *Config, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
{
|
|
kbts_un Size = kbts_SizeOfShapeScratchpad(Config);
|
|
kbts_shape_scratchpad *Result = kbts_PlaceShapeScratchpad(Config, kbts__AllocatorAllocate(Allocator, AllocatorData, Size), Allocator, AllocatorData);
|
|
Result->SelfAllocated = 1;
|
|
return Result;
|
|
}
|
|
|
|
static kbts__bucketed_glyph_block *kbts__NewBucketedGlyphBlock(kbts_shape_scratchpad *Scratchpad)
|
|
{
|
|
kbts__bucketed_glyph_block_header *New = Scratchpad->FreeBucketedBlockSentinel.Prev;
|
|
if(New == &Scratchpad->FreeBucketedBlockSentinel)
|
|
{
|
|
// Allocate new blocks.
|
|
kbts_un BlocksToAllocateCount = 4096 / sizeof(kbts__bucketed_glyph_block);
|
|
kbts__bucketed_glyph_block *NewBlocks = (kbts__bucketed_glyph_block *)kbts__AllocatorAllocate(Scratchpad->Allocator, Scratchpad->AllocatorData, sizeof(kbts__bucketed_glyph_block) * BlocksToAllocateCount);
|
|
|
|
if(NewBlocks)
|
|
{
|
|
KBTS__FOR(NewBlockIndex, 0, BlocksToAllocateCount)
|
|
{
|
|
kbts__bucketed_glyph_block *NewBlock = &NewBlocks[NewBlockIndex];
|
|
NewBlock->Count = 0;
|
|
|
|
if(NewBlockIndex)
|
|
{
|
|
KBTS__DLLIST_INSERT_BEFORE(&NewBlock->Header, &Scratchpad->FreeBucketedBlockSentinel);
|
|
NewBlock->StartOfAllocation = 0;
|
|
}
|
|
else
|
|
{
|
|
NewBlock->StartOfAllocation = 1;
|
|
}
|
|
}
|
|
|
|
kbts__bucketed_glyph_block *NewBlock = &NewBlocks[0];
|
|
New = &NewBlock->Header;
|
|
}
|
|
else
|
|
{
|
|
Scratchpad->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
KBTS__DLLIST_REMOVE(New);
|
|
}
|
|
|
|
kbts__bucketed_glyph_block *Result = (kbts__bucketed_glyph_block *)New;
|
|
Result->Count = 0;
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_shape_scratchpad *kbts__CreateShapeScratchpad(kbts_shape_config *Config, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
{
|
|
kbts_un ScratchpadSize = kbts_SizeOfShapeScratchpad(Config);
|
|
kbts_shape_scratchpad *Result = kbts_PlaceShapeScratchpad(Config, kbts__AllocatorAllocate(Allocator, AllocatorData, ScratchpadSize), Allocator, AllocatorData);
|
|
Result->SelfAllocated = 1;
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__bucketed_glyph *kbts__InsertGlyphIntoBucket(kbts_shape_scratchpad *Scratchpad, kbts_un BucketIndex, kbts_glyph *Glyph, kbts_u16 FeatureValue)
|
|
{
|
|
kbts__bucketed_glyph_block_header *Sentinel = &Scratchpad->LookupGlyphBuckets[BucketIndex];
|
|
kbts__bucketed_glyph_block_header *Header = Sentinel->Prev;
|
|
kbts_b32 NeedNewBlock = (Header == Sentinel);
|
|
if(!NeedNewBlock)
|
|
{
|
|
kbts__bucketed_glyph_block *LastBlock = (kbts__bucketed_glyph_block *)Header;
|
|
NeedNewBlock = (LastBlock->Count == KBTS__BUCKETED_GLYPHS_PER_BLOCK);
|
|
}
|
|
|
|
if(NeedNewBlock)
|
|
{
|
|
kbts__bucketed_glyph_block *NewBlock = kbts__NewBucketedGlyphBlock(Scratchpad);
|
|
if(NewBlock)
|
|
{
|
|
KBTS__DLLIST_INSERT_BEFORE(&NewBlock->Header, Sentinel);
|
|
Header = &NewBlock->Header;
|
|
}
|
|
}
|
|
|
|
kbts__bucketed_glyph_block *Block = (kbts__bucketed_glyph_block *)Header;
|
|
kbts__bucketed_glyph *Result = &Block->Glyphs[Block->Count++];
|
|
|
|
Result->Glyph = Glyph;
|
|
Result->SortKey = Glyph->SortKey;
|
|
Result->FeatureValue = FeatureValue;
|
|
|
|
Glyph->Bucketed = Result;
|
|
Glyph->BucketedBucketIndex = (kbts_u16)BucketIndex;
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__BucketGlyph(kbts_shape_scratchpad *Scratchpad, kbts_glyph *Glyph, kbts_un MinimumSequentialLookupIndex, kbts_b32 ScanBackwards)
|
|
{
|
|
kbts_b32 Result = 0;
|
|
kbts_shape_config *Config = Scratchpad->Config;
|
|
kbts_un SequentialLookupCount = kbts__SequentialLookupCount(Config);
|
|
|
|
if(MinimumSequentialLookupIndex < SequentialLookupCount)
|
|
{
|
|
kbts__matrix_index LastIndex = kbts__IdSequentialLookupMatrixIndex(SequentialLookupCount - 1, Glyph->Id, SequentialLookupCount);
|
|
kbts_un OnePastLastWordIndex = LastIndex.WordIndex + 1;
|
|
|
|
if(Glyph->Id < Config->GlyphCount)
|
|
{
|
|
kbts_glyph_config *GlyphConfig = Glyph->Config;
|
|
|
|
if(!GlyphConfig)
|
|
{
|
|
kbts_u32 *IdSequentialLookupMatrix = kbts__shape_config_IdSequentialLookupMatrix(Config);
|
|
kbts__matrix_index MatrixIndex = kbts__IdSequentialLookupMatrixIndex(MinimumSequentialLookupIndex, Glyph->Id, SequentialLookupCount);
|
|
kbts_u32 *At = &IdSequentialLookupMatrix[MatrixIndex.WordIndex];
|
|
// Mask out lookups < MinimumSequentialLookupIndex.
|
|
kbts_u32 BeforeFirstMask = ((1u << MatrixIndex.BitIndex) - 1);
|
|
kbts_u32 Bits = *At++ & ~BeforeFirstMask;
|
|
kbts_un SequentialLookupIndexOffset = 0;
|
|
|
|
kbts_un WordIndex = MatrixIndex.WordIndex + 1;
|
|
while((WordIndex < OnePastLastWordIndex) &&
|
|
!Bits)
|
|
{
|
|
Bits = *At++;
|
|
|
|
WordIndex += 1;
|
|
SequentialLookupIndexOffset += KBTS__BIT_WIDTH(kbts_u32);
|
|
}
|
|
|
|
if(Bits)
|
|
{
|
|
SequentialLookupIndexOffset += (kbts_un)kbts__LsbPositionOrBitWidth32(Bits) - (kbts_un)MatrixIndex.BitIndex;
|
|
kbts_un SequentialLookupIndex = MinimumSequentialLookupIndex + SequentialLookupIndexOffset;
|
|
kbts__InsertGlyphIntoBucket(Scratchpad, SequentialLookupIndex, Glyph, 1);
|
|
Result = 1;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
kbts_u32 *IdSequentialLookupMatrix = kbts__shape_config_IdSequentialLookupMatrix(Config);
|
|
kbts__matrix_index MatrixIndex = kbts__IdSequentialLookupMatrixIndex(MinimumSequentialLookupIndex, Glyph->Id, SequentialLookupCount);
|
|
kbts__matrix_index RowIndex = kbts__IdSequentialLookupMatrixIndex(MinimumSequentialLookupIndex, 0, SequentialLookupCount);
|
|
|
|
kbts_u32 *At = &IdSequentialLookupMatrix[MatrixIndex.WordIndex];
|
|
kbts_u32 *AtEnabled = &GlyphConfig->EnabledLookupBits[RowIndex.WordIndex];
|
|
kbts_u32 *AtDisabled = &GlyphConfig->DisabledLookupBits[RowIndex.WordIndex];
|
|
|
|
// Mask out lookups < MinimumSequentialLookupIndex.
|
|
kbts_u32 BeforeFirstMask = ((1u << MatrixIndex.BitIndex) - 1);
|
|
|
|
kbts_u32 Bits = ((*At++ | *AtEnabled++) & ~(*AtDisabled++)) & ~BeforeFirstMask;
|
|
kbts_un SequentialLookupIndexOffset = 0;
|
|
|
|
kbts_un WordIndex = MatrixIndex.WordIndex + 1;
|
|
while((WordIndex < OnePastLastWordIndex) &&
|
|
!Bits)
|
|
{
|
|
Bits = ((*At++ | *AtEnabled++) & ~(*AtDisabled++));
|
|
|
|
WordIndex += 1;
|
|
SequentialLookupIndexOffset += KBTS__BIT_WIDTH(kbts_u32);
|
|
}
|
|
|
|
if(Bits)
|
|
{
|
|
SequentialLookupIndexOffset += (kbts_un)kbts__LsbPositionOrBitWidth32(Bits) - (kbts_un)MatrixIndex.BitIndex;
|
|
kbts_un SequentialLookupIndex = MinimumSequentialLookupIndex + SequentialLookupIndexOffset;
|
|
kbts_u16 FeatureValue = 1;
|
|
|
|
KBTS__FOR(NonBinaryEnabledLookupIndex, 0, GlyphConfig->NonBinaryEnabledLookupCount)
|
|
{
|
|
kbts__enabled_lookup *Enabled = &GlyphConfig->NonBinaryEnabledLookups[NonBinaryEnabledLookupIndex];
|
|
|
|
if(Enabled->SequentialLookupIndex == SequentialLookupIndex)
|
|
{
|
|
FeatureValue = (kbts_u16)Enabled->Value;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
kbts__InsertGlyphIntoBucket(Scratchpad, SequentialLookupIndex, Glyph, FeatureValue);
|
|
Result = 1;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Out-of-bounds glyphs traverse every lookup, I guess.
|
|
kbts__InsertGlyphIntoBucket(Scratchpad, MinimumSequentialLookupIndex, Glyph, 1);
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE void kbts__GsubMutate(kbts_shape_scratchpad *Scratchpad, kbts_font *Font, kbts_glyph *Glyph, kbts_un CurrentSequentialLookupIndex, kbts_u16 NewId, kbts_u32 Flags)
|
|
{
|
|
Glyph->Id = NewId;
|
|
Glyph->Classes = kbts__GlyphClasses(Font, NewId);
|
|
Glyph->Flags = (Glyph->Flags & ~KBTS_GLYPH_FLAG_FIRST_IN_MULTIPLE_SUBSTITUTION) | Flags;
|
|
|
|
kbts__UnbucketGlyph(Scratchpad, Glyph);
|
|
kbts__BucketGlyph(Scratchpad, Glyph, CurrentSequentialLookupIndex + 1, 0);
|
|
}
|
|
|
|
static kbts_b32 kbts__BucketedGlyphIsValid(kbts__bucketed_glyph *Bucketed)
|
|
{
|
|
kbts_b32 Result = (Bucketed->SortKey != KBTS__DELETED_SORT_KEY);
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__FreeBucketedGlyphBlock(kbts_shape_scratchpad *Scratchpad, kbts__bucketed_glyph_block *Block)
|
|
{
|
|
KBTS__DLLIST_REMOVE(&Block->Header);
|
|
KBTS__DLLIST_INSERT_BEFORE(&Block->Header, &Scratchpad->FreeBucketedBlockSentinel);
|
|
}
|
|
|
|
static void kbts__SortGlyphBucket(kbts_shape_scratchpad *Scratchpad, kbts_un SequentialLookupIndex)
|
|
{
|
|
kbts__bucketed_glyph_block_header *Sentinel = &Scratchpad->LookupGlyphBuckets[SequentialLookupIndex];
|
|
|
|
// @Speed: Use merge sort?
|
|
kbts__bucketed_glyph_block *ForwardBlock = (kbts__bucketed_glyph_block *)Sentinel->Next;
|
|
|
|
kbts_un DeletedCount = 0;
|
|
if(&ForwardBlock->Header != Sentinel)
|
|
{
|
|
DeletedCount += (ForwardBlock->Glyphs[0].SortKey == KBTS__DELETED_SORT_KEY);
|
|
}
|
|
|
|
kbts_un ForwardIndex = 1;
|
|
if(ForwardIndex == ForwardBlock->Count)
|
|
{
|
|
ForwardBlock = (kbts__bucketed_glyph_block *)ForwardBlock->Header.Next;
|
|
ForwardIndex = 0;
|
|
}
|
|
|
|
while(&ForwardBlock->Header != Sentinel)
|
|
{
|
|
kbts__bucketed_glyph Bucketed = ForwardBlock->Glyphs[ForwardIndex];
|
|
kbts_u32 SortKey = Bucketed.SortKey;
|
|
|
|
kbts__bucketed_glyph_block *BackwardBlock = ForwardBlock;
|
|
kbts_un BackwardIndex = ForwardIndex;
|
|
for(;;)
|
|
{
|
|
kbts__bucketed_glyph_block *NextBackwardBlock = BackwardBlock;
|
|
kbts_un NextBackwardIndex = BackwardIndex;
|
|
if(NextBackwardIndex)
|
|
{
|
|
NextBackwardIndex -= 1;
|
|
}
|
|
else
|
|
{
|
|
NextBackwardBlock = (kbts__bucketed_glyph_block *)BackwardBlock->Header.Prev;
|
|
|
|
if(&NextBackwardBlock->Header == Sentinel)
|
|
{
|
|
break;
|
|
}
|
|
|
|
NextBackwardIndex = NextBackwardBlock->Count - 1;
|
|
}
|
|
|
|
kbts_u32 ScanSortKey = NextBackwardBlock->Glyphs[NextBackwardIndex].SortKey;
|
|
|
|
if(ScanSortKey > SortKey)
|
|
{
|
|
kbts__bucketed_glyph *From = &NextBackwardBlock->Glyphs[NextBackwardIndex];
|
|
kbts__bucketed_glyph *To = &BackwardBlock->Glyphs[BackwardIndex];
|
|
|
|
BackwardBlock->Glyphs[BackwardIndex] = NextBackwardBlock->Glyphs[NextBackwardIndex];
|
|
|
|
if(From->SortKey != KBTS__DELETED_SORT_KEY)
|
|
{
|
|
To->Glyph->Bucketed = To;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
|
|
BackwardBlock = NextBackwardBlock;
|
|
BackwardIndex = NextBackwardIndex;
|
|
}
|
|
|
|
kbts__bucketed_glyph *To = &BackwardBlock->Glyphs[BackwardIndex];
|
|
*To = Bucketed;
|
|
if(SortKey != KBTS__DELETED_SORT_KEY)
|
|
{
|
|
To->Glyph->Bucketed = To;
|
|
}
|
|
|
|
DeletedCount += (SortKey == KBTS__DELETED_SORT_KEY);
|
|
|
|
ForwardIndex += 1;
|
|
if(ForwardIndex == ForwardBlock->Count)
|
|
{
|
|
ForwardBlock = (kbts__bucketed_glyph_block *)ForwardBlock->Header.Next;
|
|
ForwardIndex = 0;
|
|
}
|
|
}
|
|
|
|
for(kbts__bucketed_glyph_block_header *Header = Sentinel->Prev;
|
|
Header != Sentinel;
|
|
)
|
|
{
|
|
kbts__bucketed_glyph_block_header *Prev = Header->Prev;
|
|
kbts__bucketed_glyph_block *Block = (kbts__bucketed_glyph_block *)Header;
|
|
|
|
if(DeletedCount >= Block->Count)
|
|
{
|
|
DeletedCount -= Block->Count;
|
|
|
|
kbts__FreeBucketedGlyphBlock(Scratchpad, Block);
|
|
}
|
|
else
|
|
{
|
|
Block->Count -= (kbts_u32)DeletedCount;
|
|
|
|
break;
|
|
}
|
|
|
|
Header = Prev;
|
|
}
|
|
}
|
|
|
|
static kbts_glyph *kbts__InsertGlyph(kbts_glyph_storage *Storage, kbts_glyph *Anchor, int InsertBeforeAnchor, kbts_glyph *BaseGlyph)
|
|
{
|
|
kbts_glyph *Result = Storage->FreeGlyphSentinel.Next;
|
|
|
|
if(Result != &Storage->FreeGlyphSentinel)
|
|
{
|
|
KBTS__DLLIST_REMOVE(Result);
|
|
}
|
|
else
|
|
{
|
|
Result = kbts__PushType(&Storage->Arena, kbts_glyph);
|
|
}
|
|
|
|
if(Result)
|
|
{
|
|
if(BaseGlyph)
|
|
{
|
|
*Result = *BaseGlyph;
|
|
|
|
// No matter what, clear bucketing information on new glyphs.
|
|
Result->Bucketed = 0;
|
|
}
|
|
|
|
if(InsertBeforeAnchor)
|
|
{
|
|
Result->Next = Anchor;
|
|
Result->Prev = Anchor->Prev;
|
|
}
|
|
else
|
|
{
|
|
Result->Prev = Anchor;
|
|
Result->Next = Anchor->Next;
|
|
}
|
|
|
|
Result->Prev->Next = Result->Next->Prev = Result;
|
|
}
|
|
else
|
|
{
|
|
Storage->Error = 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
static kbts_glyph *kbts__InsertGlyphBefore(kbts_glyph_storage *Storage, kbts_glyph *Anchor, kbts_glyph *BaseGlyph)
|
|
{
|
|
kbts_glyph *Result = kbts__InsertGlyph(Storage, Anchor, 1, BaseGlyph);
|
|
return Result;
|
|
}
|
|
static kbts_glyph *kbts__InsertGlyphAfter(kbts_glyph_storage *Storage, kbts_glyph *Anchor, kbts_glyph *BaseGlyph)
|
|
{
|
|
kbts_glyph *Result = kbts__InsertGlyph(Storage, Anchor, 0, BaseGlyph);
|
|
return Result;
|
|
}
|
|
|
|
static kbts_glyph *kbts__FreeGlyph(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage, kbts_glyph *Glyph)
|
|
{
|
|
if(Glyph == Scratchpad->LookupOnePastLastGlyph)
|
|
{
|
|
Scratchpad->LookupOnePastLastGlyph = Glyph->Next;
|
|
}
|
|
if(Glyph == Scratchpad->Cluster.SentinelPrev)
|
|
{
|
|
Scratchpad->Cluster.SentinelPrev = Glyph->Prev;
|
|
}
|
|
if(Glyph == Scratchpad->Cluster.SentinelNext)
|
|
{
|
|
Scratchpad->Cluster.SentinelNext = Glyph->Next;
|
|
}
|
|
|
|
kbts__UnbucketGlyph(Scratchpad, Glyph);
|
|
|
|
KBTS__DLLIST_REMOVE(Glyph);
|
|
KBTS__DLLIST_INSERT_BEFORE(Glyph, (kbts_glyph *)&Storage->FreeGlyphSentinel);
|
|
|
|
return Glyph;
|
|
}
|
|
|
|
static kbts_glyph *kbts__SetGlyphPreserveLinksAndUserId(kbts_glyph *Dest, kbts_glyph *Source)
|
|
{
|
|
kbts_glyph *Prev = Dest->Prev;
|
|
kbts_glyph *Next = Dest->Next;
|
|
int UserId = Dest->UserIdOrCodepointIndex;
|
|
|
|
*Dest = *Source;
|
|
|
|
Dest->Prev = Prev;
|
|
Dest->Next = Next;
|
|
Dest->UserIdOrCodepointIndex = UserId;
|
|
|
|
return Dest;
|
|
}
|
|
|
|
typedef struct kbts__sequence_lookup_result
|
|
{
|
|
kbts__sequence_lookup_record *Records;
|
|
kbts_glyph *OnePastLastGlyphMatched;
|
|
|
|
// This is specified _nowhere_ in the docs, BUT some sequence lookups have 0 records, and exist just to prevent the
|
|
// next lookups from executing.
|
|
// So, checking if we got any records is not enough to figure out whether we need to "apply" this lookup.
|
|
// We need to have an explicit bool as well.
|
|
// Sigh.
|
|
kbts_b32 Matched;
|
|
|
|
kbts_u16 RecordCount;
|
|
kbts_u16 InputSequenceCountIncludingSkippedGlyphs;
|
|
} kbts__sequence_lookup_result;
|
|
|
|
typedef struct kbts__sequence_match
|
|
{
|
|
kbts_glyph *OnePastMatchGlyph;
|
|
|
|
kbts_u16 MatchCount;
|
|
kbts_u16 MatchOrSkipCount;
|
|
} kbts__sequence_match;
|
|
|
|
static kbts__sequence_match kbts__MatchCoverageSequence(kbts_glyph_storage *Storage, kbts__unpacked_lookup *Lookup, kbts_u32 SkipFlags, kbts_u32 SkipUnicodeFlags,
|
|
void *Base, kbts_u16 *CoverageOffsets, kbts_un CoverageCount,
|
|
kbts_glyph *AtGlyph, int Backward)
|
|
{
|
|
kbts_un CoverageIndex = 0;
|
|
kbts_un GlyphCounter = 0;
|
|
while(kbts__GlyphIsValid(Storage, AtGlyph) && (CoverageIndex < CoverageCount))
|
|
{
|
|
kbts__coverage *Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Base, kbts__ReadU16Unaligned(&CoverageOffsets[CoverageIndex]));
|
|
|
|
if(!kbts__SkipGlyph(AtGlyph, Lookup, SkipFlags, SkipUnicodeFlags))
|
|
{
|
|
kbts__cover_glyph_result Cover = kbts__CoverGlyph(Coverage, AtGlyph->Id);
|
|
|
|
if(Cover.Valid)
|
|
{
|
|
CoverageIndex += 1;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
AtGlyph = Backward ? AtGlyph->Prev : AtGlyph->Next;
|
|
GlyphCounter += 1;
|
|
}
|
|
|
|
kbts__sequence_match Result = KBTS__ZERO;
|
|
Result.MatchCount = (kbts_u16)CoverageIndex;
|
|
Result.MatchOrSkipCount = (kbts_u16)GlyphCounter;
|
|
Result.OnePastMatchGlyph = AtGlyph;
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__BranchlessCompareArray16(kbts_u16 *A, kbts_u16 *B, kbts_un Count)
|
|
{
|
|
kbts_u16 DifferenceMask = 0;
|
|
KBTS__FOR(Index, 0, Count)
|
|
{
|
|
// It turns out we always read aligned data from 'A' so far.
|
|
// This is a bit subtle and error-prone, but it's useful to distinguish the two for validation purposes.
|
|
DifferenceMask |= A[Index] ^ kbts__ReadU16Unaligned(&B[Index]);
|
|
}
|
|
return (kbts_b32)DifferenceMask;
|
|
}
|
|
|
|
static kbts__sequence_lookup_result kbts__DoSequenceLookup(kbts_glyph_storage *Storage, kbts__unpacked_lookup *Lookup, kbts_u16 *Base, kbts__cover_glyph_result Cover,
|
|
kbts_glyph *AtGlyph, kbts__skip_flags SkipFlags, kbts_u32 SkipUnicodeFlags)
|
|
{
|
|
KBTS_INSTRUMENT_FUNCTION_BEGIN;
|
|
kbts__sequence_lookup_result Result = KBTS__ZERO;
|
|
Result.OnePastLastGlyphMatched = AtGlyph->Next;
|
|
|
|
kbts_glyph *CurrentGlyph = AtGlyph;
|
|
kbts_glyph *InputGlyph = AtGlyph->Next;
|
|
kbts_un InputGlyphsTraversed = 1;
|
|
kbts_glyph *BacktrackGlyph = AtGlyph->Prev;
|
|
|
|
kbts_u16 LookupFormat = kbts__ReadU16Unaligned(Base);
|
|
kbts_u16 Lookup_Type = Lookup->Type;
|
|
|
|
// Lookup types 7 and 8 are dispatch mechanisms. They do not substitute anything by themselves, they only point to
|
|
// other rules.
|
|
// Some formats have multiple rules; when that happens, we only ever match on the first one that fits.
|
|
|
|
// We want to go to the right LookupType/SubtableFormat combination in a single jump, so we concatenate them here.
|
|
// GSUB format 5 == GPOS format 7.
|
|
// GSUB format 6 == GPOS format 8.
|
|
switch(((kbts_u32)Lookup_Type << 16) | (kbts_u32)LookupFormat)
|
|
{
|
|
case 0x50001:
|
|
case 0x70001:
|
|
{
|
|
kbts__sequence_context_1 *Subst = (kbts__sequence_context_1 *)Base;
|
|
kbts__sequence_rule_set *Set = kbts__GetSequenceRuleSet(Subst, Cover.Index);
|
|
|
|
if(Set)
|
|
{
|
|
enum {RuleGlyphCapacity = 64}; // @Hardcoded
|
|
kbts_u16 Ids[RuleGlyphCapacity];
|
|
kbts_u16 InputGlyphOffsets[RuleGlyphCapacity];
|
|
kbts_glyph *InputGlyphs[RuleGlyphCapacity];
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
kbts_un IdCount = 0;
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__sequence_rule *Rule = kbts__GetSequenceRule(Set, RuleIndex);
|
|
kbts_un Rule_GlyphCount = kbts__ReadU16Unaligned(&Rule->GlyphCount);
|
|
|
|
if(Rule_GlyphCount <= RuleGlyphCapacity)
|
|
{
|
|
kbts_u16 *InputSequence = KBTS__POINTER_AFTER(kbts_u16, Rule);
|
|
|
|
while(kbts__GlyphIsValid(Storage, InputGlyph) &&
|
|
((IdCount + 1) < Rule_GlyphCount))
|
|
{
|
|
if(!kbts__SkipGlyph(InputGlyph, Lookup, SkipFlags, SkipUnicodeFlags))
|
|
{
|
|
InputGlyphOffsets[IdCount] = (kbts_u16)InputGlyphsTraversed;
|
|
InputGlyphs[IdCount] = InputGlyph;
|
|
Ids[IdCount++] = InputGlyph->Id;
|
|
}
|
|
|
|
InputGlyph = InputGlyph->Next;
|
|
InputGlyphsTraversed += 1;
|
|
}
|
|
|
|
if(((IdCount + 1) >= Rule_GlyphCount) &&
|
|
!kbts__BranchlessCompareArray16(Ids, InputSequence, Rule_GlyphCount - 1))
|
|
{
|
|
Result.Records = (kbts__sequence_lookup_record *)(InputSequence + Rule_GlyphCount - 1);
|
|
Result.RecordCount = kbts__ReadU16Unaligned(&Rule->SequenceLookupCount);
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = 1;
|
|
if(Rule_GlyphCount > 1)
|
|
{
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = InputGlyphOffsets[Rule_GlyphCount - 2] + 1;
|
|
Result.OnePastLastGlyphMatched = InputGlyphs[Rule_GlyphCount - 2]->Next;
|
|
}
|
|
Result.Matched = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 0x50002:
|
|
case 0x70002:
|
|
{
|
|
kbts__sequence_context_2 *Subst = (kbts__sequence_context_2 *)Base;
|
|
kbts_u16 *ClassDefinitionBase = KBTS__POINTER_OFFSET(kbts_u16, Subst, kbts__ReadU16Unaligned(&Subst->ClassDefOffset));
|
|
|
|
enum {RuleGlyphCapacity = 64}; // @Hardcoded
|
|
kbts_u16 InputClasses[RuleGlyphCapacity];
|
|
kbts_u16 InputOffsets[RuleGlyphCapacity];
|
|
kbts_glyph *InputGlyphs[RuleGlyphCapacity];
|
|
kbts_un InputCount = 0;
|
|
|
|
// For class-based contexts, the coverage index is not used.
|
|
// Instead, we know which set to use based on the current glyph's class.
|
|
// From the Microsoft docs:
|
|
// The class value is used as the index into an array of offsets to ClassSequenceRuleSet tables.
|
|
kbts__glyph_class_from_table_result CurrentGlyphClass = kbts__GlyphClassFromTable(ClassDefinitionBase, CurrentGlyph->Id);
|
|
kbts__class_sequence_rule_set *Set = kbts__GetClassSequenceRuleSet(Subst, CurrentGlyphClass.Class);
|
|
|
|
if((CurrentGlyphClass.Class < kbts__ReadU16Unaligned(&Subst->ClassSequenceRuleSetCount)) &&
|
|
Set)
|
|
{
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__class_sequence_rule *Rule = kbts__GetClassSequenceRule(Set, RuleIndex);
|
|
kbts_un Rule_GlyphCount = kbts__ReadU16Unaligned(&Rule->GlyphCount);
|
|
|
|
if(Rule_GlyphCount <= RuleGlyphCapacity)
|
|
{
|
|
kbts_u16 *InputSequence = KBTS__POINTER_AFTER(kbts_u16, Rule);
|
|
|
|
while(kbts__GlyphIsValid(Storage, InputGlyph) &&
|
|
((InputCount + 1) < Rule_GlyphCount))
|
|
{
|
|
if(!kbts__SkipGlyph(InputGlyph, Lookup, SkipFlags, SkipUnicodeFlags))
|
|
{
|
|
InputOffsets[InputCount] = (kbts_u16)InputGlyphsTraversed;
|
|
InputGlyphs[InputCount] = InputGlyph;
|
|
InputClasses[InputCount++] = kbts__GlyphClassFromTable(ClassDefinitionBase, InputGlyph->Id).Class;
|
|
}
|
|
|
|
InputGlyph = InputGlyph->Next;
|
|
InputGlyphsTraversed += 1;
|
|
}
|
|
|
|
if(((InputCount + 1) >= Rule_GlyphCount) &&
|
|
!kbts__BranchlessCompareArray16(InputClasses, InputSequence, Rule_GlyphCount - 1))
|
|
{
|
|
Result.Records = (kbts__sequence_lookup_record *)(InputSequence + Rule_GlyphCount - 1);
|
|
Result.RecordCount = kbts__ReadU16Unaligned(&Rule->SequenceLookupCount);
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = 1;
|
|
if(Rule_GlyphCount > 1)
|
|
{
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = InputOffsets[Rule_GlyphCount - 2] + 1;
|
|
Result.OnePastLastGlyphMatched = InputGlyphs[Rule_GlyphCount - 2]->Next;
|
|
}
|
|
Result.Matched = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 0x50003:
|
|
case 0x70003:
|
|
{
|
|
kbts__sequence_context_3 *Subst = (kbts__sequence_context_3 *)Base;
|
|
kbts_u16 *CoverageOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
kbts_un Subst_GlyphCount = kbts__ReadU16Unaligned(&Subst->GlyphCount);
|
|
|
|
kbts__sequence_match InputMatch = kbts__MatchCoverageSequence(Storage, Lookup, SkipFlags, SkipUnicodeFlags, Subst, CoverageOffsets, Subst_GlyphCount, AtGlyph, 0);
|
|
|
|
if(InputMatch.MatchCount == Subst_GlyphCount)
|
|
{
|
|
Result.Records = (kbts__sequence_lookup_record *)(CoverageOffsets + Subst_GlyphCount);
|
|
Result.RecordCount = kbts__ReadU16Unaligned(&Subst->SequenceLookupCount);
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = InputMatch.MatchOrSkipCount;
|
|
Result.OnePastLastGlyphMatched = InputMatch.OnePastMatchGlyph;
|
|
Result.Matched = 1;
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 0x60001:
|
|
case 0x80001:
|
|
{
|
|
kbts__chained_sequence_context_1 *Subst = (kbts__chained_sequence_context_1 *)Base;
|
|
kbts__chained_sequence_rule_set *Set = kbts__GetChainedSequenceRuleSet(Subst, Cover.Index);
|
|
|
|
if(Set)
|
|
{
|
|
enum {RuleGlyphCapacity = 64}; // @Hardcoded
|
|
kbts_u16 BacktrackIds[RuleGlyphCapacity];
|
|
kbts_u16 InputIds[RuleGlyphCapacity];
|
|
kbts_u16 InputOffsets[RuleGlyphCapacity];
|
|
kbts_glyph *InputGlyphs[RuleGlyphCapacity];
|
|
kbts_un BacktrackCount = 0;
|
|
kbts_un InputCount = 0;
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__chained_sequence_rule *Rule = kbts__GetChainedSequenceRule(Set, RuleIndex);
|
|
kbts__unpacked_chained_sequence_rule Unpacked = kbts__UnpackChainedSequenceRule(Rule, 0);
|
|
|
|
if((Unpacked.BacktrackCount <= RuleGlyphCapacity) &&
|
|
(Unpacked.InputCount <= RuleGlyphCapacity) &&
|
|
(Unpacked.LookaheadCount <= RuleGlyphCapacity))
|
|
{
|
|
while(kbts__GlyphIsValid(Storage, BacktrackGlyph) &&
|
|
(BacktrackCount < Unpacked.BacktrackCount))
|
|
{
|
|
if(!kbts__SkipGlyph(BacktrackGlyph, Lookup, SkipFlags, SkipUnicodeFlags))
|
|
{
|
|
BacktrackIds[BacktrackCount++] = BacktrackGlyph->Id;
|
|
}
|
|
|
|
BacktrackGlyph = BacktrackGlyph->Prev;
|
|
}
|
|
|
|
kbts_un TotalInputGlyphsRequired = Unpacked.InputCount - 1 + Unpacked.LookaheadCount;
|
|
while(kbts__GlyphIsValid(Storage, InputGlyph) && (InputCount < TotalInputGlyphsRequired))
|
|
{
|
|
if(!kbts__SkipGlyph(InputGlyph, Lookup, SkipFlags, SkipUnicodeFlags))
|
|
{
|
|
InputGlyphs[InputCount] = InputGlyph;
|
|
InputOffsets[InputCount] = (kbts_u16)InputGlyphsTraversed;
|
|
InputIds[InputCount++] = InputGlyph->Id;
|
|
}
|
|
|
|
InputGlyph = InputGlyph->Next;
|
|
InputGlyphsTraversed += 1;
|
|
}
|
|
|
|
if((BacktrackCount >= Unpacked.BacktrackCount) && (InputCount >= TotalInputGlyphsRequired) &&
|
|
!kbts__BranchlessCompareArray16(BacktrackIds, Unpacked.Backtrack, Unpacked.BacktrackCount) &&
|
|
!kbts__BranchlessCompareArray16(InputIds, Unpacked.Input, Unpacked.InputCount - 1) &&
|
|
!kbts__BranchlessCompareArray16(InputIds + Unpacked.InputCount - 1, Unpacked.Lookahead, Unpacked.LookaheadCount))
|
|
{
|
|
Result.Records = Unpacked.Records;
|
|
Result.RecordCount = Unpacked.RecordCount;
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = 1;
|
|
if(Unpacked.InputCount > 1)
|
|
{
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = InputOffsets[Unpacked.InputCount - 2] + 1;
|
|
Result.OnePastLastGlyphMatched = InputGlyphs[Unpacked.InputCount - 2]->Next;
|
|
}
|
|
Result.Matched = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 0x60002:
|
|
case 0x80002:
|
|
{
|
|
kbts__chained_sequence_context_2 *Subst = (kbts__chained_sequence_context_2 *)Base;
|
|
kbts_u16 *BacktrackClassDefinition = 0;
|
|
kbts_u16 *InputClassDefinition = 0;
|
|
kbts_u16 *LookaheadClassDefinition = 0;
|
|
kbts_un Subst_BacktrackClassDefOffset = kbts__ReadU16Unaligned(&Subst->BacktrackClassDefOffset);
|
|
kbts_un Subst_InputClassDefOffset = kbts__ReadU16Unaligned(&Subst->InputClassDefOffset);
|
|
kbts_un Subst_LookaheadClassDefOffset = kbts__ReadU16Unaligned(&Subst->LookaheadClassDefOffset);
|
|
if(Subst_BacktrackClassDefOffset) {BacktrackClassDefinition = KBTS__POINTER_OFFSET(kbts_u16, Subst, Subst_BacktrackClassDefOffset);}
|
|
if(Subst_InputClassDefOffset) {InputClassDefinition = KBTS__POINTER_OFFSET(kbts_u16, Subst, Subst_InputClassDefOffset);}
|
|
if(Subst_LookaheadClassDefOffset) {LookaheadClassDefinition = KBTS__POINTER_OFFSET(kbts_u16, Subst, Subst_LookaheadClassDefOffset);}
|
|
|
|
// @Incomplete: Do this with all sequence types!
|
|
|
|
// @Hardcoded: Pre-alloc this using LookupInfo!
|
|
enum {RuleGlyphCapacity = 64};
|
|
kbts_u16 BacktrackClasses[RuleGlyphCapacity];
|
|
kbts_u16 InputClasses[RuleGlyphCapacity];
|
|
kbts_u16 InputClassOffsets[RuleGlyphCapacity];
|
|
kbts_glyph *InputGlyphs[RuleGlyphCapacity];
|
|
kbts_u16 LookaheadClasses[RuleGlyphCapacity];
|
|
kbts_un BacktrackClassCount = 0;
|
|
kbts_un InputClassCount = 0;
|
|
|
|
// Just like lookup 5.2, we use the current glyph class to figure out which set to look up.
|
|
// From the Microsoft docs:
|
|
// If found, the client then searches in the class definition table to find the class value assigned to the
|
|
// current glyph. The class value is used as the index into an array of offsets to ChainedClassSequenceRuleSet
|
|
// tables.
|
|
//
|
|
kbts_u16 CurrentGlyphClass = kbts__GlyphClassFromTable(InputClassDefinition, CurrentGlyph->Id).Class;
|
|
kbts__chained_sequence_rule_set *Set = kbts__GetChainedClassSequenceRuleSet(Subst, CurrentGlyphClass);
|
|
// If the glyph was contained in the coverage table, then it should have a valid class.
|
|
// Nevertheless, one Harfbuzz test font did not remove out-of-bounds glyph classes from the class definition
|
|
// table here, so we double-check it here.
|
|
// (It is also possible for a font to want to reuse the same class definition table across multiple lookups,
|
|
// in which case ignoring these classes becomes a feature.)
|
|
if((CurrentGlyphClass < kbts__ReadU16Unaligned(&Subst->ChainedClassSequenceRuleSetCount)) &&
|
|
Set)
|
|
{
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__chained_sequence_rule *Rule = kbts__GetChainedClassSequenceRule(Set, RuleIndex);
|
|
kbts__unpacked_chained_sequence_rule Unpacked = kbts__UnpackChainedSequenceRule(Rule, 0);
|
|
|
|
if((Unpacked.BacktrackCount <= RuleGlyphCapacity) &&
|
|
(Unpacked.InputCount <= RuleGlyphCapacity) &&
|
|
(Unpacked.LookaheadCount <= RuleGlyphCapacity))
|
|
{
|
|
while(kbts__GlyphIsValid(Storage, BacktrackGlyph) &&
|
|
(BacktrackClassCount < Unpacked.BacktrackCount))
|
|
{
|
|
if(!kbts__SkipGlyph(BacktrackGlyph, Lookup, SkipFlags, SkipUnicodeFlags))
|
|
{
|
|
// @Robustness: Do we want to break if we don't find a class?
|
|
kbts__glyph_class_from_table_result Class = kbts__GlyphClassFromTable(BacktrackClassDefinition, BacktrackGlyph->Id);
|
|
BacktrackClasses[BacktrackClassCount++] = Class.Class;
|
|
}
|
|
|
|
BacktrackGlyph = BacktrackGlyph->Prev;
|
|
}
|
|
|
|
kbts_un InputClassCountRequired = Unpacked.InputCount - 1 + Unpacked.LookaheadCount;
|
|
while(kbts__GlyphIsValid(Storage, InputGlyph) &&
|
|
(InputClassCount < InputClassCountRequired))
|
|
{
|
|
if(!kbts__SkipGlyph(InputGlyph, Lookup, SkipFlags, SkipUnicodeFlags))
|
|
{
|
|
kbts__glyph_class_from_table_result InputClass = kbts__GlyphClassFromTable(InputClassDefinition, InputGlyph->Id);
|
|
// In many cases, the font designer just wants to match "a set of glyphs" forward,
|
|
// and it doesn't matter whether those glyphs are in the input sequence or part of the lookahead.
|
|
// This happens often enough that we care to special-case it.
|
|
kbts__glyph_class_from_table_result LookaheadClass = InputClass;
|
|
if(LookaheadClassDefinition &&
|
|
(LookaheadClassDefinition != InputClassDefinition))
|
|
{
|
|
LookaheadClass = kbts__GlyphClassFromTable(LookaheadClassDefinition, InputGlyph->Id);
|
|
}
|
|
|
|
// @Robustness: Do we want to break if we don't find a class?
|
|
InputGlyphs[InputClassCount] = InputGlyph;
|
|
InputClassOffsets[InputClassCount] = (kbts_u16)InputGlyphsTraversed;
|
|
InputClasses[InputClassCount] = InputClass.Class;
|
|
LookaheadClasses[InputClassCount] = LookaheadClass.Class;
|
|
|
|
InputClassCount += 1;
|
|
}
|
|
|
|
InputGlyph = InputGlyph->Next;
|
|
InputGlyphsTraversed += 1;
|
|
}
|
|
|
|
if((BacktrackClassCount >= Unpacked.BacktrackCount) &&
|
|
(InputClassCount >= InputClassCountRequired) &&
|
|
!kbts__BranchlessCompareArray16(BacktrackClasses, Unpacked.Backtrack, Unpacked.BacktrackCount) &&
|
|
!kbts__BranchlessCompareArray16(InputClasses, Unpacked.Input, Unpacked.InputCount - 1) &&
|
|
!kbts__BranchlessCompareArray16(LookaheadClasses + Unpacked.InputCount - 1, Unpacked.Lookahead, Unpacked.LookaheadCount))
|
|
{
|
|
Result.Records = Unpacked.Records;
|
|
Result.RecordCount = Unpacked.RecordCount;
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = 1;
|
|
if(Unpacked.InputCount > 1)
|
|
{
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = InputClassOffsets[Unpacked.InputCount - 2] + 1;
|
|
Result.OnePastLastGlyphMatched = InputGlyphs[Unpacked.InputCount - 2]->Next;
|
|
}
|
|
Result.Matched = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 0x60003:
|
|
case 0x80003:
|
|
{
|
|
kbts__chained_sequence_context_3 *Subst = (kbts__chained_sequence_context_3 *)Base;
|
|
kbts__unpacked_chained_sequence_context_3 Unpacked = kbts__UnpackChainedSequenceContext3(Subst, 0);
|
|
|
|
// Since chained sequence contexts roll the coverage for the first glyph into an array, you'd think that
|
|
// the matching logic for the first glyph would be the same as for any other glyph in that array.
|
|
// You'd be wrong!
|
|
// The first glyph does _not_ have to pass glyph filtering logic. It just has to pass the coverage test.
|
|
// Every other input glyph still does, though.
|
|
kbts__cover_glyph_result CurrentCover = KBTS__ZERO;
|
|
CurrentCover.Valid = !Unpacked.InputCount || kbts__GlyphPassesLookupFilter(CurrentGlyph, Lookup);
|
|
if(Unpacked.InputCount)
|
|
{
|
|
kbts__coverage *CurrentCoverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&Unpacked.InputCoverageOffsets[0]));
|
|
CurrentCover = kbts__CoverGlyph(CurrentCoverage, CurrentGlyph->Id);
|
|
}
|
|
|
|
if(CurrentCover.Valid)
|
|
{
|
|
kbts__sequence_match BacktrackMatch = kbts__MatchCoverageSequence(Storage, Lookup, SkipFlags, SkipUnicodeFlags, Subst, Unpacked.BacktrackCoverageOffsets, Unpacked.BacktrackCount, BacktrackGlyph, 1);
|
|
kbts__sequence_match InputMatch = kbts__MatchCoverageSequence(Storage, Lookup, SkipFlags, SkipUnicodeFlags, Subst, Unpacked.InputCoverageOffsets + 1, Unpacked.InputCount - 1, InputGlyph, 0);
|
|
kbts_un MatchingInputGlyphCount = 1 + InputMatch.MatchCount;
|
|
kbts_un MatchedOrSkippedInputGlyphCount = 1 + InputMatch.MatchOrSkipCount;
|
|
kbts__sequence_match LookaheadMatch = kbts__MatchCoverageSequence(Storage, Lookup, SkipFlags, SkipUnicodeFlags, Subst, Unpacked.LookaheadCoverageOffsets, Unpacked.LookaheadCount, InputMatch.OnePastMatchGlyph, 0);
|
|
|
|
if((BacktrackMatch.MatchCount == Unpacked.BacktrackCount) &&
|
|
(MatchingInputGlyphCount == Unpacked.InputCount) &&
|
|
(LookaheadMatch.MatchCount == Unpacked.LookaheadCount))
|
|
{
|
|
Result.Records = Unpacked.Records;
|
|
Result.RecordCount = Unpacked.RecordCount;
|
|
Result.InputSequenceCountIncludingSkippedGlyphs = (kbts_u16)MatchedOrSkippedInputGlyphCount;
|
|
Result.OnePastLastGlyphMatched = InputMatch.OnePastMatchGlyph;
|
|
Result.Matched = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
|
|
KBTS_INSTRUMENT_FUNCTION_END;
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__ApplyValueRecord(kbts_glyph *Glyph, kbts__resolved_value_record *ValueRecord)
|
|
{
|
|
Glyph->OffsetX += ValueRecord->PlacementX;
|
|
Glyph->OffsetY += ValueRecord->PlacementY;
|
|
|
|
Glyph->AdvanceX += ValueRecord->AdvanceX;
|
|
Glyph->AdvanceY += ValueRecord->AdvanceY;
|
|
}
|
|
|
|
static kbts_b32 kbts__NextGlyph(kbts_glyph_storage *Storage, kbts__unpacked_lookup *Lookup, kbts_glyph *AtGlyph, kbts__skip_flags SkipFlags, kbts_u32 SkipUnicodeFlags, kbts_glyph **Match, int Backward)
|
|
{
|
|
kbts_glyph *MatchingGlyph = 0;
|
|
|
|
while(kbts__GlyphIsValid(Storage, AtGlyph))
|
|
{
|
|
if(!kbts__SkipGlyph(AtGlyph, Lookup, SkipFlags, SkipUnicodeFlags))
|
|
{
|
|
MatchingGlyph = AtGlyph;
|
|
break;
|
|
}
|
|
else
|
|
{
|
|
AtGlyph = Backward ? AtGlyph->Prev : AtGlyph->Next;
|
|
}
|
|
}
|
|
|
|
*Match = MatchingGlyph;
|
|
return MatchingGlyph != 0;
|
|
}
|
|
|
|
static void kbts__AttachGlyph(kbts_glyph_storage *Storage, kbts_glyph *Parent, kbts_glyph *Child, kbts_s32 X, kbts_s32 Y)
|
|
{
|
|
kbts_s32 DeltaOffsetX = X - Child->OffsetX;
|
|
kbts_s32 DeltaOffsetY = Y - Child->OffsetY;
|
|
|
|
Child->OffsetX = X;
|
|
Child->OffsetY = Y;
|
|
Child->Flags |= KBTS_GLYPH_FLAG_USED_IN_GPOS | KBTS_GLYPH_FLAG_NO_BREAK;
|
|
Child->AttachGlyph = Parent;
|
|
|
|
Parent->Flags |= KBTS_GLYPH_FLAG_USED_IN_GPOS;
|
|
|
|
for(kbts_glyph *MiddleGlyph = Parent->Next;
|
|
MiddleGlyph != Child;
|
|
MiddleGlyph = MiddleGlyph->Next)
|
|
{
|
|
MiddleGlyph->Flags |= KBTS_GLYPH_FLAG_NO_BREAK;
|
|
}
|
|
|
|
// @Speed: Fuck this.
|
|
// Attachments can happen in anti-topological order, so we have to fix them up here.
|
|
// We should store glyph parent/child indices instead of traversing all glyphs.
|
|
for(kbts_glyph *PostGlyph = Child->Next;
|
|
kbts__GlyphIsValid(Storage, PostGlyph);
|
|
PostGlyph = PostGlyph->Next)
|
|
{
|
|
if(PostGlyph->AttachGlyph == Child)
|
|
{
|
|
PostGlyph->OffsetX += DeltaOffsetX;
|
|
PostGlyph->OffsetY += DeltaOffsetY;
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__SetLookupOnePastLastGlyph(kbts_shape_scratchpad *Scratchpad, kbts_un Index, kbts_glyph *Glyph)
|
|
{
|
|
if(Index > Scratchpad->LookupOnePastLastGlyphIndex)
|
|
{
|
|
Scratchpad->LookupOnePastLastGlyphIndex = (kbts_u32)Index;
|
|
Scratchpad->LookupOnePastLastGlyph = Glyph;
|
|
}
|
|
}
|
|
|
|
typedef kbts_u32 kbts__cursive_flags;
|
|
enum kbts__cursive_flags_enum
|
|
{
|
|
KBTS__CURSIVE_FLAG_NONE,
|
|
KBTS__CURSIVE_FLAG_START = (1 << 0),
|
|
KBTS__CURSIVE_FLAG_END = (1 << 1),
|
|
};
|
|
|
|
KBTS_INLINE kbts__cursive_flags kbts__GetCursiveFlags(kbts_glyph *Glyph)
|
|
{
|
|
kbts__cursive_flags Result = (kbts__cursive_flags)Glyph->MarkOrdering;
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE void kbts__SetCursiveFlags(kbts_glyph *Glyph, kbts__cursive_flags CursiveFlags)
|
|
{
|
|
Glyph->MarkOrdering = (kbts_u8)CursiveFlags;
|
|
}
|
|
|
|
static kbts_b32 kbts__DoSingleAdjustment(kbts_shape_scratchpad *Scratchpad, kbts_shape_config *Config, kbts_glyph_storage *Storage,
|
|
kbts__lookup_list *LookupList, kbts_un LookupIndex, kbts_un SubtableIndex, kbts__unpacked_lookup Lookup, kbts_u16 *Base,
|
|
kbts_glyph *CurrentGlyph, kbts_un StartIndex, kbts__skip_flags RequestedSkipFlags)
|
|
{
|
|
KBTS_INSTRUMENT_FUNCTION_BEGIN;
|
|
enum{SkipUnicodeFlags = KBTS_UNICODE_FLAG_DEFAULT_IGNORABLE};
|
|
kbts__skip_flags RegularSkipFlags = KBTS__SKIP_FLAGS_GPOS_REGULAR(RequestedSkipFlags);
|
|
kbts__skip_flags SequenceSkipFlags = KBTS__SKIP_FLAGS_GPOS_SEQUENCE(RequestedSkipFlags);
|
|
|
|
kbts_b32 Result = 0;
|
|
|
|
kbts_un OnePastLastGlyphIndex = StartIndex + 1;
|
|
kbts_glyph *OnePastLastGlyph = CurrentGlyph->Next;
|
|
|
|
if(kbts__GlyphIncludedInLookupSubtable(Scratchpad, KBTS_SHAPING_TABLE_GPOS, LookupIndex, SubtableIndex, CurrentGlyph))
|
|
{
|
|
while(Lookup.Type == 9)
|
|
{
|
|
kbts__extension *Extension = (kbts__extension *)Base;
|
|
|
|
Lookup.Type = kbts__ReadU16Unaligned(&Extension->LookupType);
|
|
Base = KBTS__POINTER_OFFSET(kbts_u16, Extension, kbts__ReadU32Unaligned(&Extension->Offset));
|
|
}
|
|
|
|
kbts_u16 LookupFormat = kbts__ReadU16Unaligned(Base);
|
|
|
|
kbts__cover_glyph_result Cover = KBTS__ZERO;
|
|
Cover.Valid = kbts__GlyphPassesLookupFilter(CurrentGlyph, &Lookup);
|
|
kbts__coverage *Coverage = 0;
|
|
if(Cover.Valid &&
|
|
kbts__GposLookupBeginsWithCoverage(Lookup.Type, LookupFormat))
|
|
{
|
|
kbts_un CoverageOffset = kbts__ReadU16Unaligned(&Base[1]);
|
|
Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Base, CoverageOffset);
|
|
Cover = kbts__CoverGlyph(Coverage, CurrentGlyph->Id);
|
|
}
|
|
|
|
if(Cover.Valid)
|
|
{
|
|
kbts_un OnePastLastGlyphOffset = 0;
|
|
|
|
switch(Lookup.Type)
|
|
{
|
|
case 1:
|
|
{
|
|
kbts_u16 ValueFormat = kbts__ReadU16Unaligned(&Base[2]);
|
|
|
|
kbts__resolved_value_record ValueRecord = KBTS__ZERO;
|
|
|
|
if(LookupFormat == 1)
|
|
{
|
|
kbts__single_adjustment_1 *Adjust = (kbts__single_adjustment_1 *)Base;
|
|
|
|
ValueRecord = kbts__ResolveValueRecord(Scratchpad, Adjust, ValueFormat, KBTS__POINTER_AFTER(kbts_u16, Adjust));
|
|
}
|
|
else if(LookupFormat == 2)
|
|
{
|
|
kbts__single_adjustment_2 *Adjust = (kbts__single_adjustment_2 *)Base;
|
|
|
|
kbts_un RecordSize = kbts__PopCount32(ValueFormat);
|
|
kbts_u16 *Records = KBTS__POINTER_AFTER(kbts_u16, Adjust);
|
|
kbts_u16 *Record = Records + RecordSize * Cover.Index;
|
|
|
|
ValueRecord = kbts__ResolveValueRecord(Scratchpad, Adjust, ValueFormat, Record);
|
|
}
|
|
|
|
kbts__ApplyValueRecord(CurrentGlyph, &ValueRecord);
|
|
|
|
CurrentGlyph->Flags |= KBTS_GLYPH_FLAG_USED_IN_GPOS;
|
|
|
|
Result = 1;
|
|
} break;
|
|
|
|
case 2:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(PairPositioning);
|
|
|
|
kbts_glyph *NextGlyph;
|
|
if(kbts__NextGlyph(Storage, &Lookup, CurrentGlyph->Next, RegularSkipFlags, SkipUnicodeFlags, &NextGlyph, 0))
|
|
{
|
|
kbts_u16 NextGlyphId = NextGlyph->Id;
|
|
|
|
void *ValueRecordParent = Base;
|
|
kbts_u16 *Unpacked1Base;
|
|
kbts_u16 *Unpacked2Base;
|
|
kbts_u16 ValueFormat1;
|
|
kbts_u16 ValueFormat2 = 0;
|
|
kbts_un Size1;
|
|
kbts_un Size2;
|
|
|
|
{
|
|
kbts__pair_adjustment_1 *Adjust = (kbts__pair_adjustment_1 *)Base;
|
|
ValueFormat1 = kbts__ReadU16Unaligned(&Adjust->ValueFormat1);
|
|
ValueFormat2 = kbts__ReadU16Unaligned(&Adjust->ValueFormat2);
|
|
|
|
Size1 = kbts__PopCount32(ValueFormat1);
|
|
Size2 = kbts__PopCount32(ValueFormat2);
|
|
}
|
|
|
|
if(LookupFormat == 1)
|
|
{
|
|
kbts__pair_adjustment_1 *Adjust = (kbts__pair_adjustment_1 *)Base;
|
|
|
|
kbts_u16 *SetOffsets = KBTS__POINTER_AFTER(kbts_u16, Adjust);
|
|
kbts__pair_set *Set = KBTS__POINTER_OFFSET(kbts__pair_set, Adjust, kbts__ReadU16Unaligned(&SetOffsets[Cover.Index]));
|
|
|
|
kbts_un PairRecordSize = Size1 + Size2 + 1; // + 1 because each pair stores the next glyph ID.
|
|
kbts__pair_value_record *PairRecords = KBTS__POINTER_AFTER(kbts__pair_value_record, Set);
|
|
|
|
kbts_un PairCount = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(PairSearch);
|
|
|
|
#define KBTS__PAIR_SEARCH(PairSize) \
|
|
kbts_un PairSizeTimesPairIndex = 0; \
|
|
while(PairCount > 1) \
|
|
{ \
|
|
kbts_un HalfCount = PairCount / 2; \
|
|
PairSizeTimesPairIndex = (kbts__ReadU16Unaligned(&PairRecords[PairSizeTimesPairIndex + HalfCount*PairSize - PairSize].SecondGlyph) < NextGlyphId) ? (PairSizeTimesPairIndex + HalfCount*PairSize) : PairSizeTimesPairIndex; \
|
|
PairCount -= HalfCount; \
|
|
} \
|
|
kbts__pair_value_record *PairRecord = PairRecords + PairSizeTimesPairIndex; \
|
|
if(kbts__ReadU16Unaligned(&PairRecord->SecondGlyph) == NextGlyphId) \
|
|
{ \
|
|
kbts_u16 *Records = KBTS__POINTER_AFTER(kbts_u16, PairRecord); \
|
|
Unpacked1Base = Records; \
|
|
Unpacked2Base = Records + Size1; \
|
|
ValueRecordParent = Set; \
|
|
KBTS_INSTRUMENT_BLOCK_END(PairSearch); \
|
|
goto ApplyPairPositioning; \
|
|
}
|
|
|
|
if(PairRecordSize == 2)
|
|
{
|
|
KBTS__PAIR_SEARCH(2);
|
|
}
|
|
else if(PairRecordSize == 3)
|
|
{
|
|
KBTS__PAIR_SEARCH(3);
|
|
}
|
|
else
|
|
{
|
|
kbts__pair_value_record *PairRecord = PairRecords;
|
|
|
|
while(PairCount > 1)
|
|
{
|
|
kbts_un HalfCount = PairCount / 2;
|
|
|
|
kbts__pair_value_record *OnePastProbe = PairRecord + HalfCount * PairRecordSize;
|
|
kbts__pair_value_record *Probe = OnePastProbe - PairRecordSize;
|
|
|
|
if(kbts__ReadU16Unaligned(&Probe->SecondGlyph) < NextGlyphId)
|
|
{
|
|
PairRecord = OnePastProbe;
|
|
}
|
|
|
|
PairCount -= HalfCount;
|
|
}
|
|
|
|
if(kbts__ReadU16Unaligned(&PairRecord->SecondGlyph) == NextGlyphId)
|
|
{
|
|
kbts_u16 *Records = KBTS__POINTER_AFTER(kbts_u16, PairRecord);
|
|
|
|
Unpacked1Base = Records;
|
|
Unpacked2Base = Records + Size1;
|
|
ValueRecordParent = Set;
|
|
KBTS_INSTRUMENT_BLOCK_END(PairSearch);
|
|
|
|
goto ApplyPairPositioning;
|
|
}
|
|
}
|
|
|
|
#undef KBTS__PAIR_SEARCH
|
|
KBTS_INSTRUMENT_BLOCK_END(PairSearch);
|
|
}
|
|
else if(LookupFormat == 2)
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(PairClasses);
|
|
|
|
kbts__pair_adjustment_2 *Adjust = (kbts__pair_adjustment_2 *)Base;
|
|
kbts_u16 *ClassDef1 = KBTS__POINTER_OFFSET(kbts_u16, Adjust, kbts__ReadU16Unaligned(&Adjust->ClassDefinition1Offset));
|
|
kbts_u16 *ClassDef2 = KBTS__POINTER_OFFSET(kbts_u16, Adjust, kbts__ReadU16Unaligned(&Adjust->ClassDefinition2Offset));
|
|
|
|
kbts_un PairRecordSize = Size1 + Size2;
|
|
kbts_u16 *PairRecords = KBTS__POINTER_AFTER(kbts_u16, Adjust);
|
|
|
|
// From the Microsoft docs:
|
|
// PairPosFormat2 requires that each glyph in all pairs be assigned to a class, which is
|
|
// identified by an integer called a class value.
|
|
// This _seems_ like it would mean that, if either glyph is not specified in its respective
|
|
// class definition table, then we should skip the lookup.
|
|
// However, this seems wrong in practice. Undefined classes seem to just default to 0, and then
|
|
// the bounds check takes care of deciding whether the lookup is okay to apply or not.
|
|
// @Speed: Interleave these lookups.
|
|
kbts__glyph_class_from_table_result Class1 = kbts__GlyphClassFromTable(ClassDef1, CurrentGlyph->Id);
|
|
kbts__glyph_class_from_table_result Class2 = kbts__GlyphClassFromTable(ClassDef2, NextGlyphId);
|
|
|
|
kbts_un Adjust_Class1Count = kbts__ReadU16Unaligned(&Adjust->Class1Count);
|
|
kbts_un Adjust_Class2Count = kbts__ReadU16Unaligned(&Adjust->Class2Count);
|
|
|
|
if((Class1.Class < Adjust_Class1Count) &&
|
|
(Class2.Class < Adjust_Class2Count))
|
|
{
|
|
kbts_u16 *PairRecord = PairRecords + Class1.Class * PairRecordSize * Adjust_Class2Count + Class2.Class * PairRecordSize;
|
|
|
|
Unpacked1Base = PairRecord;
|
|
Unpacked2Base = PairRecord + Size1;
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(PairClasses);
|
|
goto ApplyPairPositioning;
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(PairClasses);
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
ApplyPairPositioning:;
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(ApplyPairPositioning);
|
|
|
|
kbts__resolved_value_record ValueRecord1 = kbts__ResolveValueRecord(Scratchpad, ValueRecordParent, ValueFormat1, Unpacked1Base);
|
|
kbts__ApplyValueRecord(CurrentGlyph, &ValueRecord1);
|
|
|
|
CurrentGlyph->Flags |= KBTS_GLYPH_FLAG_USED_IN_GPOS;
|
|
NextGlyph->Flags |= KBTS_GLYPH_FLAG_USED_IN_GPOS;
|
|
|
|
OnePastLastGlyph = CurrentGlyph->Next;
|
|
|
|
if(ValueFormat2)
|
|
{
|
|
kbts__resolved_value_record ValueRecord2 = kbts__ResolveValueRecord(Scratchpad, ValueRecordParent, ValueFormat2, Unpacked2Base);
|
|
kbts__ApplyValueRecord(NextGlyph, &ValueRecord2);
|
|
OnePastLastGlyph = NextGlyph->Next;
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(ApplyPairPositioning);
|
|
|
|
Result = 1;
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(PairPositioning);
|
|
} break;
|
|
|
|
// All three types of attachment (cursive, mark-to-base, mark-to-ligature) look backward instead of forward.
|
|
case 3:
|
|
{
|
|
kbts__cursive_attachment *Adjust = (kbts__cursive_attachment *)Base;
|
|
kbts__entry_exit *EntryExits = KBTS__POINTER_AFTER(kbts__entry_exit, Adjust);
|
|
|
|
kbts_glyph *Prev;
|
|
if(kbts__NextGlyph(Storage, &Lookup, CurrentGlyph->Prev, RegularSkipFlags, SkipUnicodeFlags, &Prev, 1))
|
|
{
|
|
// For two cursive glyphs to be aligned, they both need to be defined by the same cursive attachment table.
|
|
kbts__cover_glyph_result PrevCover = kbts__CoverGlyph(Coverage, Prev->Id);
|
|
|
|
if(PrevCover.Valid)
|
|
{
|
|
// Get anchor points for both glyphs.
|
|
kbts__entry_exit *PrevEntryExit = &EntryExits[PrevCover.Index];
|
|
kbts__entry_exit *EntryExit = &EntryExits[Cover.Index];
|
|
|
|
kbts_un PrevEntryExit_ExitAnchorOffset = kbts__ReadU16Unaligned(&PrevEntryExit->ExitAnchorOffset);
|
|
kbts_un EntryExit_EntryAnchorOffset = kbts__ReadU16Unaligned(&EntryExit->EntryAnchorOffset);
|
|
|
|
if(PrevEntryExit_ExitAnchorOffset &&
|
|
EntryExit_EntryAnchorOffset)
|
|
{
|
|
kbts__anchor *PrevExitAnchor = KBTS__POINTER_OFFSET(kbts__anchor, Adjust, PrevEntryExit_ExitAnchorOffset);
|
|
kbts__anchor *EntryAnchor = KBTS__POINTER_OFFSET(kbts__anchor, Adjust, EntryExit_EntryAnchorOffset);
|
|
|
|
kbts_s32 Anchor0X, Anchor0Y;
|
|
kbts__ResolveAnchorXy(Scratchpad, PrevExitAnchor, &Anchor0X, &Anchor0Y);
|
|
|
|
kbts_s32 Anchor1X, Anchor1Y;
|
|
kbts__ResolveAnchorXy(Scratchpad, EntryAnchor, &Anchor1X, &Anchor1Y);
|
|
|
|
kbts_s32 Advance0X = Prev->AdvanceX;
|
|
kbts_s32 Advance1X = CurrentGlyph->AdvanceX;
|
|
kbts_s32 Offset0X = Prev->OffsetX;
|
|
kbts_s32 Offset0Y = Prev->OffsetY;
|
|
kbts_s32 Offset1X = CurrentGlyph->OffsetX;
|
|
kbts_s32 Offset1Y = CurrentGlyph->OffsetY;
|
|
|
|
// Cursive positioning is made up of two parts.
|
|
// The first part is glyph-to-glyph alignment, which depends on the text direction.
|
|
// Here, we are only concerned with making the relative placements of the glyphs correct,
|
|
// insofar as they follow the specified anchor positions.
|
|
//
|
|
// The OpenType spec makes no attempt to describe how the two glyphs should be aligned, mathematically
|
|
// speaking.
|
|
//
|
|
// This is all we get:
|
|
//
|
|
// "To position glyphs using the CursivePosFormat1 subtable, a text-processing client aligns the exit
|
|
// anchor point of a glyph with the entry anchor point of the following glyph."
|
|
//
|
|
// In practice, we reproduce harfbuzz's behavior here, which is:
|
|
// - Glyph1.Offset.X is unaffected
|
|
// - Glyph1.Advance.X = Glyph1.Offset.X + Glyph1.Anchor.X, aka. the _actual position of its anchor_
|
|
// - Glyph2.Offset.X = -Glyph2.Anchor.X
|
|
// - Glyph2.Offset.Y = Glyph1.Anchor.Y - Glyph2.Anchor.Y
|
|
// - Glyph2.Advance.X -= Glyph2.Anchor.X
|
|
//
|
|
// (...where "X" here just means "the main direction". In top-to-bottom or bottom-to-top contexts, that
|
|
// would be the Y coordinate, but we do not support those yet.)
|
|
//
|
|
// So, instead of aligning everything with offsets, we use Advance to align _the rest of the string_
|
|
// horizontally with the first glyph, and not just the next glyph.
|
|
//
|
|
// It might seem dumb to modify both Glyph2.Offset _and_ Glyph2.Advance, because, when the glyphs are next
|
|
// to one another, this is equivalent to modifying Glyph1.Advance. However, due to lookup flag nonsense,
|
|
// there may be some glyphs between Glyph1 and Glyph2, and, _apparently_, it is fine to adjust them by the
|
|
// position of Glyph1's anchor point, and it is not fine to adjust them by the position of Glyph2's anchor
|
|
// point.
|
|
//
|
|
// This Advance tweak seems like it would be wrong, because any marks attached to Glyph1 will then have
|
|
// invalid positions. The hope is that this does not matter in practice, because 'mark' is applied after
|
|
// 'curs', and font designers are expected to know that and to know never to apply mark attachments
|
|
// before cursive positioning, I guess.
|
|
if(!kbts__ShaperRtl(Config->Shaper))
|
|
{
|
|
Advance0X = Offset0X + Anchor0X;
|
|
kbts_s32 Dx = -Anchor1X - Offset1X;
|
|
Advance1X += Dx;
|
|
Offset1X += Dx;
|
|
}
|
|
else
|
|
{
|
|
kbts_s32 Dx = -Anchor0X - Offset0X;
|
|
Advance0X += Dx;
|
|
Offset0X += Dx;
|
|
Advance1X = Offset1X + Anchor1X;
|
|
}
|
|
|
|
Prev->AdvanceX = Advance0X;
|
|
Prev->OffsetX = Offset0X;
|
|
Prev->Flags |= (KBTS_GLYPH_FLAG_CURSIVE | KBTS_GLYPH_FLAG_USED_IN_GPOS | KBTS_GLYPH_FLAG_NO_BREAK);
|
|
kbts__SetCursiveFlags(Prev, KBTS__CURSIVE_FLAG_START);
|
|
CurrentGlyph->AdvanceX = Advance1X;
|
|
CurrentGlyph->OffsetX = Offset1X;
|
|
CurrentGlyph->Flags |= KBTS_GLYPH_FLAG_CURSIVE | KBTS_GLYPH_FLAG_USED_IN_GPOS;
|
|
kbts__SetCursiveFlags(CurrentGlyph, KBTS__CURSIVE_FLAG_END);
|
|
|
|
for(kbts_glyph *CursiveGlyph = Prev->Next;
|
|
CursiveGlyph != CurrentGlyph;
|
|
CursiveGlyph = CursiveGlyph->Next)
|
|
{
|
|
CursiveGlyph->Flags |= KBTS_GLYPH_FLAG_NO_BREAK;
|
|
kbts__SetCursiveFlags(CursiveGlyph, 0);
|
|
}
|
|
|
|
// The second part is aligning the newly-formed cursive cluster to the "baseline". It is trickier than you'd expect.
|
|
//
|
|
// When applying cursive attachments, Glyph1 (RIGHT_TO_LEFT=0) or Glyph2 (RIGHT_TO_LEFT=1) is treated as being
|
|
// "on the baseline" and its Y coordinate is used as the reference Y coordinate for the entire cursive glyph
|
|
// cluster that has been formed so far.
|
|
// This means that, anytime we apply a cursive attachment, we have to offset _all_ of the cursive glyphs to the
|
|
// left (RIGHT_TO_LEFT=0) or to the right (RIGHT_TO_LEFT=1) of it.
|
|
// This is obviously O(n^2), and @Speed: it might be worthwhile to record cursive offsets as we go, and only resolve
|
|
// them when we actually need them, i.e. when applying a non-cursive lookup or, at the latest, when we are done with
|
|
// positioning.
|
|
//
|
|
// The glyph being attached is set at a hard relative offset from the reference glyph. Its previous Y coordinate only
|
|
// matters insofar as we need to align every other cursive glyph in its direction.
|
|
|
|
kbts_s32 CursiveDy = 0;
|
|
kbts_glyph *CursiveGlyph = CurrentGlyph;
|
|
int Backward = 0;
|
|
kbts_u32 AdjustNearbyGlyphs = (CurrentGlyph->Flags & KBTS_GLYPH_FLAG_CURSIVE);
|
|
|
|
if(!(Lookup.Flags & KBTS__LOOKUP_FLAG_RIGHT_TO_LEFT))
|
|
{
|
|
kbts_s32 NewOffset1Y = Offset0Y + Anchor0Y - Anchor1Y;
|
|
CursiveDy = NewOffset1Y - Offset1Y;
|
|
}
|
|
else
|
|
{
|
|
kbts_s32 NewOffset0Y = Offset1Y + Anchor1Y - Anchor0Y;
|
|
CursiveDy = NewOffset0Y - Offset0Y;
|
|
Backward = 1;
|
|
CursiveGlyph = Prev;
|
|
AdjustNearbyGlyphs = 1;
|
|
}
|
|
|
|
CursiveGlyph->OffsetY += CursiveDy;
|
|
|
|
if(AdjustNearbyGlyphs)
|
|
{
|
|
kbts__SetCursiveFlags(CursiveGlyph, 0);
|
|
CursiveGlyph = Backward ? CursiveGlyph->Prev : CursiveGlyph->Next;
|
|
|
|
kbts__cursive_flags StopFlag = Backward ? KBTS__CURSIVE_FLAG_END : KBTS__CURSIVE_FLAG_START;
|
|
|
|
while(kbts__GlyphIsValid(Storage, CursiveGlyph))
|
|
{
|
|
kbts__cursive_flags CursiveFlags = kbts__GetCursiveFlags(CursiveGlyph);
|
|
|
|
if(CursiveFlags & StopFlag)
|
|
{
|
|
break;
|
|
}
|
|
else if(CursiveGlyph->Flags & KBTS_GLYPH_FLAG_CURSIVE)
|
|
{
|
|
CursiveGlyph->OffsetY += CursiveDy;
|
|
}
|
|
else if(!(CursiveGlyph->Classes.Class & KBTS__GLYPH_CLASS_MARK)) // Ignore marks.
|
|
{
|
|
break;
|
|
}
|
|
|
|
CursiveGlyph = Backward ? CursiveGlyph->Prev : CursiveGlyph->Next;
|
|
}
|
|
}
|
|
|
|
Result = 1;
|
|
}
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 4:
|
|
case 6:
|
|
{
|
|
kbts__mark_to_base_attachment *Adjust = (kbts__mark_to_base_attachment *)Base;
|
|
|
|
// We want to know which glyph to attach to, and how far that glyph is from us.
|
|
// To do that, we add up all advances between it and us.
|
|
// There is a slight wrinkle here: most shapers end up zeroing mark advances at the _end_
|
|
// of the shaping process, which would retroactively make a naive advance accumulation wrong.
|
|
// We have to take that into account here, and only accumulate mark advances for shapers that
|
|
// don't do that zeroing at the end (either because they do it at the beginning of GPOS, or
|
|
// because they don't do it at all).
|
|
kbts_b32 CountMarkAdvances = !kbts__ShaperClearsMarkAdvancesInPostGposFixup(Config->Shaper);
|
|
kbts__coverage *BaseCoverage = KBTS__POINTER_OFFSET(kbts__coverage, Adjust, kbts__ReadU16Unaligned(&Adjust->BaseCoverageOffset));
|
|
kbts_un MarkClassCount = kbts__ReadU16Unaligned(&Adjust->MarkClassCount);
|
|
kbts_s32 AdvanceSinceBaseX = 0;
|
|
kbts_s32 AdvanceSinceBaseY = 0;
|
|
kbts_u32 BaseClasses = Lookup.Type == 6 ? (1 << KBTS__GLYPH_CLASS_MARK) : (1 | (1 << KBTS__GLYPH_CLASS_BASE) | (1 << KBTS__GLYPH_CLASS_LIGATURE) | (1 << KBTS__GLYPH_CLASS_COMPONENT));
|
|
kbts_glyph *BaseGlyph = 0;
|
|
|
|
for(kbts_glyph *PrevGlyph = CurrentGlyph->Prev;
|
|
kbts__GlyphIsValid(Storage, PrevGlyph);
|
|
PrevGlyph = PrevGlyph->Prev)
|
|
{
|
|
if(CountMarkAdvances || (PrevGlyph->Classes.Class != KBTS__GLYPH_CLASS_MARK))
|
|
{
|
|
AdvanceSinceBaseX += PrevGlyph->AdvanceX;
|
|
AdvanceSinceBaseY += PrevGlyph->AdvanceY;
|
|
}
|
|
|
|
if(!kbts__SkipGlyph(PrevGlyph, &Lookup, RegularSkipFlags, SkipUnicodeFlags))
|
|
{
|
|
if((1 << PrevGlyph->Classes.Class) & BaseClasses)
|
|
{
|
|
// :MultipleSubstSadness
|
|
// There is some sadness when we have to look for bases here...
|
|
// In multiple substitutions, we allow skipping covered glyphs if they are:
|
|
// - Not the first in the multiple substitution
|
|
// - Not preceded by a mark
|
|
//
|
|
// More details on the sadness can be found here:
|
|
// https://github.com/harfbuzz/harfbuzz/issues/740
|
|
// https://github.com/harfbuzz/harfbuzz/issues/1020
|
|
// https://github.com/harfbuzz/harfbuzz/issues/4124
|
|
if((Lookup.Type == 4) &&
|
|
((PrevGlyph->Flags & (KBTS_GLYPH_FLAG_FIRST_IN_MULTIPLE_SUBSTITUTION | KBTS_GLYPH_FLAG_MULTIPLE_SUBSTITUTION)) == KBTS_GLYPH_FLAG_MULTIPLE_SUBSTITUTION) && // Stop if we see the first of a multiple substitution.
|
|
(PrevGlyph->Prev->Classes.Class != KBTS__GLYPH_CLASS_MARK)) // Stop if we see any mark.
|
|
{
|
|
// Otherwise, we allow skipping uncovered glyphs.
|
|
kbts_b32 ValidBase = 0;
|
|
|
|
kbts__cover_glyph_result BaseCover = kbts__CoverGlyph(BaseCoverage, PrevGlyph->Id);
|
|
ValidBase = BaseCover.Valid;
|
|
|
|
if(ValidBase)
|
|
{
|
|
BaseGlyph = PrevGlyph;
|
|
break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
BaseGlyph = PrevGlyph;
|
|
break;
|
|
}
|
|
}
|
|
else if(Lookup.Type == 6)
|
|
{
|
|
// Unskipped non-marks block mark attachments.
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
if(BaseGlyph)
|
|
{
|
|
kbts_b32 Ok = (Lookup.Type == 4) || // This is a mark-to-base attachment
|
|
((BaseGlyph->LigatureUid == CurrentGlyph->LigatureUid) && (BaseGlyph->LigatureComponentIndexPlusOne == CurrentGlyph->LigatureComponentIndexPlusOne)) || // This is a mark-to-mark attachment, and both marks belong to the same ligature component
|
|
((BaseGlyph->Flags | CurrentGlyph->Flags) & KBTS_GLYPH_FLAG_LIGATURE); // This is a mark-to-mark attachment, and either mark was created by a ligature substitution
|
|
if(Ok)
|
|
{
|
|
// @Speed: This is duplicating work in the :MultipleSubstSadness case.
|
|
kbts__cover_glyph_result BaseCover = kbts__CoverGlyph(BaseCoverage, BaseGlyph->Id);
|
|
kbts_un BaseIndex = BaseCover.Index;
|
|
kbts_b32 ValidBase = BaseCover.Valid;
|
|
|
|
if(ValidBase)
|
|
{
|
|
kbts__base_array *BaseArray = KBTS__POINTER_OFFSET(kbts__base_array, Adjust, kbts__ReadU16Unaligned(&Adjust->BaseArrayOffset));
|
|
kbts_u16 *BaseAnchorOffsets = KBTS__POINTER_AFTER(kbts_u16, BaseArray) + BaseIndex * MarkClassCount;
|
|
kbts__mark_info MarkInfo = kbts__GetMarkInfo(Adjust, kbts__ReadU16Unaligned(&Adjust->MarkArrayOffset), Cover.Index);
|
|
|
|
kbts_u16 BaseAnchorOffset = kbts__ReadU16Unaligned(&BaseAnchorOffsets[kbts__ReadU16Unaligned(&MarkInfo.Record->Class)]);
|
|
if(BaseAnchorOffset)
|
|
{
|
|
kbts__anchor *BaseAnchor = KBTS__POINTER_OFFSET(kbts__anchor, BaseArray, BaseAnchorOffset);
|
|
kbts_s32 BaseAnchorX, BaseAnchorY;
|
|
kbts__ResolveAnchorXy(Scratchpad, BaseAnchor, &BaseAnchorX, &BaseAnchorY);
|
|
|
|
kbts_s32 MarkAnchorX, MarkAnchorY;
|
|
kbts__ResolveAnchorXy(Scratchpad, MarkInfo.Anchor, &MarkAnchorX, &MarkAnchorY);
|
|
|
|
/* From the Microsoft docs:
|
|
When a mark is combined with a given base, the mark placement is adjusted so that the mark anchor is
|
|
aligned with the base anchor for the applicable mark class. Placement of the base glyph and advances of
|
|
both glyphs are not affected.
|
|
*/
|
|
|
|
kbts_s32 NewOffsetX = BaseGlyph->OffsetX - AdvanceSinceBaseX + (BaseAnchorX - MarkAnchorX);
|
|
kbts_s32 NewOffsetY = BaseGlyph->OffsetY - AdvanceSinceBaseY + (BaseAnchorY - MarkAnchorY);
|
|
|
|
kbts__AttachGlyph(Storage, BaseGlyph, CurrentGlyph, NewOffsetX, NewOffsetY);
|
|
|
|
Result = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 5:
|
|
{
|
|
kbts__mark_to_ligature_attachment *Adjust = (kbts__mark_to_ligature_attachment *)Base;
|
|
kbts_s32 AdvanceSinceBaseX = 0;
|
|
kbts_s32 AdvanceSinceBaseY = 0;
|
|
kbts_u32 BaseClasses = (1 | (1 << KBTS__GLYPH_CLASS_BASE) | (1 << KBTS__GLYPH_CLASS_LIGATURE) | (1 << KBTS__GLYPH_CLASS_COMPONENT));
|
|
kbts_glyph *LigatureGlyph = 0;
|
|
for(kbts_glyph *PrevGlyph = CurrentGlyph->Prev;
|
|
kbts__GlyphIsValid(Storage, PrevGlyph);
|
|
PrevGlyph = PrevGlyph->Prev)
|
|
{
|
|
AdvanceSinceBaseX += PrevGlyph->AdvanceX;
|
|
AdvanceSinceBaseY += PrevGlyph->AdvanceY;
|
|
|
|
if(!kbts__SkipGlyph(PrevGlyph, &Lookup, RegularSkipFlags, SkipUnicodeFlags) && ((1 << PrevGlyph->Classes.Class) & BaseClasses))
|
|
{
|
|
LigatureGlyph = PrevGlyph;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(LigatureGlyph)
|
|
{
|
|
kbts__ligature_array *LigatureArray = KBTS__POINTER_OFFSET(kbts__ligature_array, Adjust, kbts__ReadU16Unaligned(&Adjust->LigatureArrayOffset));
|
|
|
|
kbts__cover_glyph_result LigatureCover = kbts__CoverGlyph(KBTS__POINTER_OFFSET(kbts__coverage, Adjust, kbts__ReadU16Unaligned(&Adjust->LigatureCoverageOffset)),
|
|
LigatureGlyph->Id);
|
|
|
|
kbts_un LigatureIndex = LigatureCover.Index;
|
|
kbts_b32 ValidLigature = LigatureCover.Valid;
|
|
|
|
if(ValidLigature)
|
|
{
|
|
kbts__ligature_attach *LigatureAttach = kbts__GetLigatureAttach(LigatureArray, LigatureIndex);
|
|
kbts_un LigatureAttach_Count = kbts__ReadU16Unaligned(&LigatureAttach->Count);
|
|
kbts__mark_info MarkInfo = kbts__GetMarkInfo(Adjust, kbts__ReadU16Unaligned(&Adjust->MarkArrayOffset), Cover.Index);
|
|
kbts_un LigatureComponentIndexPlusOne = CurrentGlyph->LigatureComponentIndexPlusOne;
|
|
|
|
if(CurrentGlyph->LigatureUid != LigatureGlyph->Uid)
|
|
{
|
|
// If the mark is not yet attached to the ligature, attach it now.
|
|
// Apparently, in this case, the mark should be considered part of the _last_ component of the ligature.
|
|
LigatureComponentIndexPlusOne = LigatureAttach_Count;
|
|
}
|
|
|
|
if(LigatureComponentIndexPlusOne <= LigatureAttach_Count)
|
|
{
|
|
kbts_un AnchorIndex = LigatureComponentIndexPlusOne;
|
|
if(AnchorIndex)
|
|
{
|
|
AnchorIndex -= 1;
|
|
}
|
|
else
|
|
{
|
|
AnchorIndex = LigatureAttach_Count - 1;
|
|
}
|
|
|
|
kbts__anchor *LigatureAnchor = kbts__GetLigatureAttachAnchor(Adjust, LigatureAttach, kbts__ReadU16Unaligned(&MarkInfo.Record->Class), AnchorIndex);
|
|
kbts_s32 LigatureAnchorX, LigatureAnchorY;
|
|
kbts__ResolveAnchorXy(Scratchpad, LigatureAnchor, &LigatureAnchorX, &LigatureAnchorY);
|
|
|
|
kbts_s32 MarkAnchorX, MarkAnchorY;
|
|
kbts__ResolveAnchorXy(Scratchpad, MarkInfo.Anchor, &MarkAnchorX, &MarkAnchorY);
|
|
|
|
kbts_s32 NewOffsetX = LigatureGlyph->OffsetX - AdvanceSinceBaseX + (LigatureAnchorX - MarkAnchorX);
|
|
kbts_s32 NewOffsetY = LigatureGlyph->OffsetY - AdvanceSinceBaseY + (LigatureAnchorY - MarkAnchorY);
|
|
|
|
kbts__AttachGlyph(Storage, LigatureGlyph, CurrentGlyph, NewOffsetX, NewOffsetY);
|
|
|
|
CurrentGlyph->LigatureComponentIndexPlusOne = (kbts_u16)LigatureComponentIndexPlusOne;
|
|
CurrentGlyph->LigatureUid = LigatureGlyph->Uid;
|
|
// I'm not sure why, but Harfbuzz only clears this in mark-to-ligature substitutions, and not in mark-to-base or
|
|
// mark-to-mark.
|
|
CurrentGlyph->AdvanceX = 0;
|
|
CurrentGlyph->AdvanceY = 0;
|
|
|
|
for(kbts_glyph *MiddleGlyph = LigatureGlyph->Next;
|
|
MiddleGlyph != CurrentGlyph;
|
|
MiddleGlyph = MiddleGlyph->Next)
|
|
{
|
|
MiddleGlyph->Flags |= KBTS_GLYPH_FLAG_NO_BREAK;
|
|
}
|
|
|
|
Result = 1;
|
|
}
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 7:
|
|
case 8:
|
|
{
|
|
kbts__sequence_lookup_result SequenceLookup = kbts__DoSequenceLookup(Storage, &Lookup, Base, Cover, CurrentGlyph, SequenceSkipFlags, SkipUnicodeFlags);
|
|
if(SequenceLookup.RecordCount)
|
|
{
|
|
kbts__gdef *Gdef = kbts__BlobTableDataType(Config->Font->Blob, KBTS_BLOB_TABLE_ID_GDEF, kbts__gdef);
|
|
|
|
KBTS__FOR(RecordIndex, 0, SequenceLookup.RecordCount)
|
|
{
|
|
kbts__sequence_lookup_record *Record = &SequenceLookup.Records[RecordIndex];
|
|
kbts_un Record_LookupListIndex = kbts__ReadU16Unaligned(&Record->LookupListIndex);
|
|
kbts_un Record_SequenceIndex = kbts__ReadU16Unaligned(&Record->SequenceIndex);
|
|
kbts__lookup *PackedRecordLookup = kbts__GetLookup(LookupList, Record_LookupListIndex);
|
|
|
|
if(PackedRecordLookup)
|
|
{
|
|
kbts__unpacked_lookup RecordLookup = kbts__UnpackLookup(Gdef, PackedRecordLookup);
|
|
|
|
kbts_glyph *NestedCurrentGlyph = CurrentGlyph;
|
|
kbts_un NestedCurrentGlyphIndex = 0;
|
|
{ // Figure out where in the input sequence we need to apply the lookup.
|
|
kbts_un SequenceIndex = 0;
|
|
for(kbts_glyph *Glyph = CurrentGlyph;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
Glyph = Glyph->Next)
|
|
{
|
|
if(!kbts__SkipGlyph(Glyph, &Lookup, SequenceSkipFlags, SkipUnicodeFlags))
|
|
{
|
|
if(SequenceIndex == Record_SequenceIndex)
|
|
{
|
|
NestedCurrentGlyph = Glyph;
|
|
|
|
break;
|
|
}
|
|
|
|
SequenceIndex += 1;
|
|
}
|
|
|
|
NestedCurrentGlyphIndex += 1;
|
|
}
|
|
}
|
|
|
|
KBTS__FOR(NestedSubtableIndex, 0, RecordLookup.SubtableCount)
|
|
{
|
|
kbts_u16 *NestedBase = KBTS__POINTER_OFFSET(kbts_u16, PackedRecordLookup, kbts__ReadU16Unaligned(&RecordLookup.SubtableOffsets[NestedSubtableIndex]));
|
|
|
|
kbts__DoSingleAdjustment(Scratchpad, Config, Storage, LookupList,
|
|
Record_LookupListIndex, NestedSubtableIndex, RecordLookup, NestedBase,
|
|
NestedCurrentGlyph, StartIndex + NestedCurrentGlyphIndex, RequestedSkipFlags);
|
|
}
|
|
}
|
|
}
|
|
|
|
OnePastLastGlyphIndex = StartIndex + SequenceLookup.InputSequenceCountIncludingSkippedGlyphs;
|
|
OnePastLastGlyph = SequenceLookup.OnePastLastGlyphMatched;
|
|
}
|
|
} break;
|
|
}
|
|
|
|
kbts__SetLookupOnePastLastGlyph(Scratchpad, OnePastLastGlyphIndex + OnePastLastGlyphOffset, OnePastLastGlyph);
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_FUNCTION_END;
|
|
return Result;
|
|
}
|
|
|
|
typedef kbts_u32 kbts__mcm_sequence_state;
|
|
enum kbts__mcm_sequence_state_enum
|
|
{
|
|
KBTS__MCM_SEQUENCE_STATE_NONE,
|
|
KBTS__MCM_SEQUENCE_STATE_OUT,
|
|
KBTS__MCM_SEQUENCE_STATE_IN,
|
|
};
|
|
|
|
typedef kbts_u32 kbts__hangul_syllable_type;
|
|
enum kbts__hangul_syllable_type_enum
|
|
{
|
|
KBTS__HANGUL_SYLLABLE_TYPE_NONE,
|
|
|
|
KBTS__HANGUL_SYLLABLE_TYPE_L,
|
|
KBTS__HANGUL_SYLLABLE_TYPE_V,
|
|
KBTS__HANGUL_SYLLABLE_TYPE_T,
|
|
KBTS__HANGUL_SYLLABLE_TYPE_LV,
|
|
KBTS__HANGUL_SYLLABLE_TYPE_LVT,
|
|
|
|
KBTS__HANGUL_SYLLABLE_TYPE_COUNT,
|
|
};
|
|
|
|
typedef struct kbts__hangul_syllable_info
|
|
{
|
|
kbts__hangul_syllable_type Type;
|
|
kbts_u32 Composable;
|
|
} kbts__hangul_syllable_info;
|
|
|
|
static kbts__hangul_syllable_info kbts__HangulSyllableInfo(kbts_u32 Codepoint)
|
|
{
|
|
kbts__hangul_syllable_info Result = KBTS__ZERO;
|
|
|
|
if((Codepoint >= 0x1100) && (Codepoint <= 0x115F))
|
|
{
|
|
Result.Type = KBTS__HANGUL_SYLLABLE_TYPE_L;
|
|
Result.Composable = (Codepoint < 0x1113);
|
|
}
|
|
else if((Codepoint >= 0x1160) && (Codepoint <= 0x11A7))
|
|
{
|
|
Result.Type = KBTS__HANGUL_SYLLABLE_TYPE_V;
|
|
Result.Composable = ((Codepoint >= 0x1161) & (Codepoint <= 0x1175));
|
|
}
|
|
else if((Codepoint >= 0x11A8) && (Codepoint <= 0x11FF))
|
|
{
|
|
Result.Type = KBTS__HANGUL_SYLLABLE_TYPE_T;
|
|
Result.Composable = (Codepoint < 0x11C3);
|
|
}
|
|
else if((Codepoint >= 0xA960) && (Codepoint <= 0xA97C))
|
|
{
|
|
Result.Type = KBTS__HANGUL_SYLLABLE_TYPE_L;
|
|
}
|
|
else if((Codepoint == 0xAC00) && (Codepoint <= 0xD7A3))
|
|
{
|
|
Result.Type = KBTS__HANGUL_SYLLABLE_TYPE_LVT;
|
|
|
|
if(!((Codepoint - 0xAC00) % 28))
|
|
{
|
|
Result.Type = KBTS__HANGUL_SYLLABLE_TYPE_LV;
|
|
}
|
|
}
|
|
else if((Codepoint >= 0xD7B0) && (Codepoint <= 0xD7C6))
|
|
{
|
|
Result.Type = KBTS__HANGUL_SYLLABLE_TYPE_V;
|
|
}
|
|
else if((Codepoint >= 0xD7CB) && (Codepoint <= 0xD7FB))
|
|
{
|
|
Result.Type = KBTS__HANGUL_SYLLABLE_TYPE_T;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE kbts_u32 kbts__SyllabicClassIsConsonant(kbts_indic_syllabic_class Class)
|
|
{
|
|
kbts_u32 Result =
|
|
KBTS__IN_SET(Class, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_CONSONANT)(KBTS_INDIC_SYLLABIC_CLASS_RA)(KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_WITH_STACKER)(KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_MEDIAL)));
|
|
return Result;
|
|
}
|
|
|
|
enum
|
|
{
|
|
KBTS__FEATURE_MATCH_FLAG_KA_JA = (1 << 0),
|
|
KBTS__FEATURE_MATCH_FLAG_SSA_NYA = (1 << 1),
|
|
KBTS__FEATURE_MATCH_FLAG_RA_HA_VA = (1 << 2),
|
|
KBTS__FEATURE_MATCH_FLAG_YA = (1 << 3),
|
|
KBTS__FEATURE_MATCH_FLAG_CONSONANT = (1 << 4),
|
|
KBTS__FEATURE_MATCH_FLAG_NUKTA = (1 << 5),
|
|
KBTS__FEATURE_MATCH_FLAG_HALANT = (1 << 6),
|
|
KBTS__FEATURE_MATCH_FLAG_ZWJ = (1 << 7),
|
|
KBTS__FEATURE_MATCH_FLAG_ZWNJ = (1 << 8),
|
|
KBTS__FEATURE_MATCH_FLAG_INITIAL = (1 << 10),
|
|
KBTS__FEATURE_MATCH_FLAG_POST_BASE = (1 << 11),
|
|
|
|
KBTS__FEATURE_MATCH_FLAG_RPHF = KBTS__FEATURE_FLAG0(rphf),
|
|
};
|
|
# define KBTS__FEATURE_MATCH_MASK(W0, W1, W2, W3) (((kbts_u64)(W0) << 48) | ((kbts_u64)(W1) << 32) | ((kbts_u64)(W0) << 16) | (kbts_u64)(W0))
|
|
# define KBTS__FEATURE_MATCH_MASK_AKHN KBTS__FEATURE_MATCH_MASK(0, KBTS__FEATURE_MATCH_FLAG_KA_JA, KBTS__FEATURE_MATCH_FLAG_HALANT, KBTS__FEATURE_MATCH_FLAG_SSA_NYA)
|
|
# define KBTS__FEATURE_MATCH_MASK_BLWF_PRE KBTS__FEATURE_MATCH_MASK(0, 0, KBTS__FEATURE_MATCH_FLAG_RA_HA_VA | KBTS__FEATURE_MATCH_FLAG_INITIAL, KBTS__FEATURE_MATCH_FLAG_HALANT)
|
|
# define KBTS__FEATURE_MATCH_MASK_BLWF_PRE_OK KBTS__FEATURE_MATCH_MASK(0, 0, KBTS__FEATURE_MATCH_FLAG_RA_HA_VA, KBTS__FEATURE_MATCH_FLAG_HALANT)
|
|
# define KBTS__FEATURE_MATCH_MASK_BLWF_POST KBTS__FEATURE_MATCH_MASK(0, 0, KBTS__FEATURE_MATCH_FLAG_HALANT, KBTS__FEATURE_MATCH_FLAG_RA_HA_VA)
|
|
# define KBTS__FEATURE_MATCH_MASK_CJCT KBTS__FEATURE_MATCH_MASK(0, KBTS__FEATURE_MATCH_FLAG_CONSONANT, KBTS__FEATURE_MATCH_FLAG_HALANT, KBTS__FEATURE_MATCH_FLAG_CONSONANT)
|
|
# define KBTS__FEATURE_MATCH_MASK_HALF KBTS__FEATURE_MATCH_MASK(KBTS__FEATURE_MATCH_FLAG_CONSONANT | KBTS__FEATURE_MATCH_FLAG_RPHF | KBTS__FEATURE_MATCH_FLAG_POST_BASE, KBTS__FEATURE_MATCH_FLAG_HALANT, KBTS__FEATURE_MATCH_FLAG_ZWNJ, KBTS__FEATURE_MATCH_FLAG_CONSONANT)
|
|
# define KBTS__FEATURE_MATCH_MASK_HALF_OK KBTS__FEATURE_MATCH_MASK(KBTS__FEATURE_MATCH_FLAG_CONSONANT, KBTS__FEATURE_MATCH_FLAG_HALANT, 0, 0)
|
|
# define KBTS__FEATURE_MATCH_MASK_NUKT KBTS__FEATURE_MATCH_MASK(0, 0, KBTS__FEATURE_MATCH_FLAG_CONSONANT, KBTS__FEATURE_MATCH_FLAG_HALANT)
|
|
# define KBTS__FEATURE_MATCH_MASK_PSTF KBTS__FEATURE_MATCH_MASK(0, 0, KBTS__FEATURE_MATCH_FLAG_HALANT | KBTS__FEATURE_MATCH_FLAG_INITIAL, KBTS__FEATURE_MATCH_FLAG_YA)
|
|
# define KBTS__FEATURE_MATCH_MASK_VATU KBTS__FEATURE_MATCH_MASK(0, KBTS__FEATURE_MATCH_FLAG_CONSONANT, KBTS__FEATURE_MATCH_FLAG_HALANT, KBTS__FEATURE_MATCH_FLAG_RA_HA_VA)
|
|
|
|
typedef kbts_u32 kbts__substitution_result_flags;
|
|
enum kbts__substitution_result_flags_enum
|
|
{
|
|
KBTS__SUBSTITUTION_RESULT_FLAG_MATCHED_SUBSTITUTION = (1 << 0),
|
|
KBTS__SUBSTITUTION_RESULT_FLAG_TRIED_TO_INSERT_WHILE_CHECK_ONLY = (1 << 1),
|
|
KBTS__SUBSTITUTION_RESULT_FLAG_MATCHED_SEQUENCE = (1 << 2),
|
|
};
|
|
|
|
static void kbts__BeginLookupApplication(kbts_shape_scratchpad *Scratchpad, kbts_glyph *Glyph)
|
|
{
|
|
Scratchpad->LookupOnePastLastGlyph = Glyph->Next;
|
|
Scratchpad->LookupOnePastLastGlyphIndex = 0;
|
|
}
|
|
static kbts_glyph *kbts__EndLookupApplication(kbts_shape_scratchpad *Scratchpad)
|
|
{
|
|
kbts_glyph *Result = Scratchpad->LookupOnePastLastGlyph;
|
|
return Result;
|
|
}
|
|
|
|
static kbts_un kbts__CurrentBakedFeatureStageIndex(kbts_shape_scratchpad *Scratchpad)
|
|
{
|
|
kbts_un Result = Scratchpad->FeatureStagesRead - 1;
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE kbts_u16 kbts__NextGlyphUid(kbts_shape_scratchpad *Scratchpad)
|
|
{
|
|
kbts_u16 Result = (kbts_u16)++Scratchpad->NextGlyphUid;
|
|
return Result;
|
|
}
|
|
|
|
static kbts__substitution_result_flags kbts__DoSubstitution(kbts_shape_scratchpad *Scratchpad, kbts_shape_config *Config, kbts_glyph_storage *Storage,
|
|
kbts__lookup_list *LookupList, kbts_un SequentialLookupIndex, kbts_u16 FeatureValue,
|
|
kbts__gsub_frame *Frames, kbts_un *FrameCount_,
|
|
int CheckOnly, kbts__skip_flags RequestedSkipFlags, kbts_u32 GeneratedGlyphFlags)
|
|
{
|
|
kbts__substitution_result_flags Result = 0;
|
|
kbts_font *Font = Config->Font;
|
|
enum {SkipUnicodeFlags = KBTS_UNICODE_FLAG_DEFAULT_IGNORABLE};
|
|
kbts__skip_flags RegularSkipFlags = KBTS__SKIP_FLAGS_GSUB_REGULAR(RequestedSkipFlags);
|
|
kbts__skip_flags SequenceSkipFlags = KBTS__SKIP_FLAGS_GSUB_SEQUENCE(RequestedSkipFlags);
|
|
GeneratedGlyphFlags |= KBTS_GLYPH_FLAG_GENERATED_BY_GSUB;
|
|
|
|
kbts_un FrameCount = *FrameCount_;
|
|
kbts__gsub_frame *Frame = &Frames[FrameCount - 1];
|
|
|
|
kbts__lookup *PackedLookup = kbts__GetLookup(LookupList, Frame->LookupIndex);
|
|
if(PackedLookup)
|
|
{
|
|
kbts__unpacked_lookup Lookup = kbts__UnpackLookup(kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_GDEF, kbts__gdef), PackedLookup);
|
|
kbts_u16 BaseLookupType = Lookup.Type;
|
|
|
|
kbts_glyph *CurrentGlyph = Frame->InputGlyph;
|
|
|
|
while(Frame->SubtableIndex < Lookup.SubtableCount)
|
|
{
|
|
kbts_u16 *Subtable = KBTS__POINTER_OFFSET(kbts_u16, PackedLookup, kbts__ReadU16Unaligned(&Lookup.SubtableOffsets[Frame->SubtableIndex]));
|
|
// In a type-7 lookup, each subtable can specify a different lookup type.
|
|
// We still want to pass kbts__unpacked_lookup around as a useful bag of arguments, though.
|
|
// So, we restore the original lookup's type here before resolving each subtable.
|
|
Lookup.Type = BaseLookupType;
|
|
|
|
while(Lookup.Type == 7)
|
|
{
|
|
kbts__extension *Extension = (kbts__extension *)Subtable;
|
|
Lookup.Type = kbts__ReadU16Unaligned(&Extension->LookupType);
|
|
Subtable = KBTS__POINTER_OFFSET(kbts_u16, Extension, kbts__ReadU32Unaligned(&Extension->Offset));
|
|
}
|
|
|
|
if(kbts__GlyphIncludedInLookupSubtable(Scratchpad, KBTS_SHAPING_TABLE_GSUB, Frame->LookupIndex, Frame->SubtableIndex, CurrentGlyph))
|
|
{
|
|
kbts__cover_glyph_result Cover = KBTS__ZERO;
|
|
Cover.Valid = kbts__GlyphPassesLookupFilter(CurrentGlyph, &Lookup);
|
|
if(Cover.Valid &&
|
|
kbts__GsubLookupBeginsWithCoverage(Lookup.Type, kbts__ReadU16Unaligned(&Subtable[0])))
|
|
{
|
|
kbts__coverage *Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Subtable, kbts__ReadU16Unaligned(&Subtable[1]));
|
|
Cover = kbts__CoverGlyph(Coverage, CurrentGlyph->Id);
|
|
}
|
|
|
|
if(Cover.Valid)
|
|
{
|
|
kbts_un OnePastLastGlyphOffset = 1;
|
|
kbts_glyph *OnePastLastGlyph = CurrentGlyph->Next;
|
|
|
|
if((Lookup.Type == 5) || (Lookup.Type == 6))
|
|
{
|
|
kbts__sequence_lookup_result SequenceLookup = kbts__DoSequenceLookup(Storage, &Lookup, Subtable, Cover, CurrentGlyph, SequenceSkipFlags, SkipUnicodeFlags);
|
|
|
|
if(SequenceLookup.Matched)
|
|
{
|
|
Frame->Records = SequenceLookup.Records;
|
|
Frame->RecordCount = (kbts_u16)SequenceLookup.RecordCount;
|
|
Frame->RecordIndex = 0;
|
|
|
|
Frame->SubtableIndex = 0xFFFE;
|
|
|
|
OnePastLastGlyphOffset = SequenceLookup.InputSequenceCountIncludingSkippedGlyphs;
|
|
OnePastLastGlyph = SequenceLookup.OnePastLastGlyphMatched;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Do single substitution.
|
|
|
|
switch(Lookup.Type)
|
|
{
|
|
case 1:
|
|
{
|
|
Result |= KBTS__SUBSTITUTION_RESULT_FLAG_MATCHED_SUBSTITUTION;
|
|
|
|
if(!CheckOnly)
|
|
{
|
|
kbts__single_substitution *Subst = (kbts__single_substitution *)Subtable;
|
|
|
|
kbts_u16 NewId = 0;
|
|
kbts_u16 Subst_Format = kbts__ReadU16Unaligned(&Subst->Format);
|
|
|
|
if(Subst_Format == 1)
|
|
{
|
|
// From the Microsoft docs:
|
|
// "Addition of deltaGlyphID is modulo 65536."
|
|
NewId = (CurrentGlyph->Id + (kbts_u32)kbts__ReadS16Unaligned(&Subst->DeltaOrCount.DeltaGlyphId)) & 0xFFFF;
|
|
}
|
|
else if(Subst_Format == 2)
|
|
{
|
|
kbts_u16 *SubstituteGlyphIds = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
NewId = kbts__ReadU16Unaligned(&SubstituteGlyphIds[Cover.Index]);
|
|
}
|
|
|
|
kbts__GsubMutate(Scratchpad, Font, CurrentGlyph, SequentialLookupIndex, NewId, GeneratedGlyphFlags);
|
|
}
|
|
} break;
|
|
|
|
case 2:
|
|
{
|
|
kbts__multiple_substitution *Subst = (kbts__multiple_substitution *)Subtable;
|
|
kbts__sequence *Sequence = kbts__GetSequence(Subst, Cover.Index);
|
|
kbts_un Sequence_GlyphCount = kbts__ReadU16Unaligned(&Sequence->GlyphCount);
|
|
Result |= KBTS__SUBSTITUTION_RESULT_FLAG_MATCHED_SUBSTITUTION;
|
|
|
|
if(!CheckOnly)
|
|
{
|
|
kbts_u16 *SubstGlyphIds = KBTS__POINTER_AFTER(kbts_u16, Sequence);
|
|
kbts_un GrowCount = Sequence_GlyphCount - 1;
|
|
|
|
if(Sequence_GlyphCount)
|
|
{
|
|
kbts_glyph OriginalGlyph = *CurrentGlyph;
|
|
kbts_glyph *LastInsert = CurrentGlyph;
|
|
|
|
kbts_un RunningSortKey = CurrentGlyph->SortKey;
|
|
kbts_un SortKeyInterval = CurrentGlyph->SortKeyInterval / Sequence_GlyphCount;
|
|
KBTS__FOR(SubstGlyphIndex, 0, Sequence_GlyphCount)
|
|
{
|
|
kbts_u32 NewGlyphFlags = GeneratedGlyphFlags | KBTS_GLYPH_FLAG_MULTIPLE_SUBSTITUTION;
|
|
kbts_u16 NewGlyphId = kbts__ReadU16Unaligned(&SubstGlyphIds[SubstGlyphIndex]);
|
|
|
|
kbts_glyph *NewGlyph = CurrentGlyph;
|
|
if(SubstGlyphIndex)
|
|
{
|
|
NewGlyph = kbts__InsertGlyphAfter(Storage, LastInsert, &OriginalGlyph);
|
|
|
|
if(!NewGlyph)
|
|
{
|
|
Scratchpad->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
return Result;
|
|
}
|
|
|
|
NewGlyph->Uid = kbts__NextGlyphUid(Scratchpad);
|
|
}
|
|
else
|
|
{
|
|
NewGlyphFlags |= KBTS_GLYPH_FLAG_FIRST_IN_MULTIPLE_SUBSTITUTION;
|
|
}
|
|
|
|
NewGlyph->SortKey = (kbts_u32)RunningSortKey;
|
|
NewGlyph->SortKeyInterval = (kbts_u32)SortKeyInterval;
|
|
|
|
kbts__GsubMutate(Scratchpad, Font, NewGlyph, SequentialLookupIndex, NewGlyphId, GeneratedGlyphFlags | NewGlyphFlags);
|
|
|
|
LastInsert = NewGlyph;
|
|
RunningSortKey += SortKeyInterval;
|
|
}
|
|
|
|
OnePastLastGlyph = LastInsert->Next;
|
|
Scratchpad->ApproximateOutputGlyphCount += (kbts_u32)GrowCount;
|
|
}
|
|
else
|
|
{
|
|
kbts__FreeGlyph(Scratchpad, Storage, CurrentGlyph);
|
|
}
|
|
|
|
OnePastLastGlyphOffset = 1 + GrowCount;
|
|
|
|
// Shift other frames' input cursors.
|
|
KBTS__FOR(FrameIndex, 0, FrameCount - 1)
|
|
{
|
|
kbts__gsub_frame *OtherFrame = &Frames[FrameIndex];
|
|
|
|
if(OtherFrame->StartIndex > Frame->StartIndex)
|
|
{
|
|
OtherFrame->StartIndex = (kbts_u16)(OtherFrame->StartIndex + GrowCount);
|
|
}
|
|
}
|
|
}
|
|
else if(Sequence_GlyphCount > 1)
|
|
{
|
|
Result |= KBTS__SUBSTITUTION_RESULT_FLAG_TRIED_TO_INSERT_WHILE_CHECK_ONLY;
|
|
}
|
|
} break;
|
|
|
|
case 3:
|
|
{
|
|
Result |= KBTS__SUBSTITUTION_RESULT_FLAG_MATCHED_SUBSTITUTION;
|
|
|
|
if(!CheckOnly)
|
|
{
|
|
kbts__alternate_substitution *Subst = (kbts__alternate_substitution *)Subtable;
|
|
kbts__alternate_set *Set = kbts__GetAlternateSet(Subst, Cover.Index);
|
|
kbts_u16 *AltGlyphIds = KBTS__POINTER_AFTER(kbts_u16, Set);
|
|
|
|
kbts_un AlternateIndex = FeatureValue - 1;
|
|
if(AlternateIndex >= kbts__ReadU16Unaligned(&Set->GlyphCount))
|
|
{
|
|
AlternateIndex = 0;
|
|
}
|
|
|
|
kbts_u16 NewId = kbts__ReadU16Unaligned(&AltGlyphIds[AlternateIndex]);
|
|
kbts__GsubMutate(Scratchpad, Font, CurrentGlyph, SequentialLookupIndex, NewId, GeneratedGlyphFlags);
|
|
}
|
|
} break;
|
|
|
|
case 4:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(GSUB_Ligature);
|
|
|
|
kbts__ligature_substitution *Subst = (kbts__ligature_substitution *)Subtable;
|
|
kbts__ligature_set *Set = kbts__GetLigatureSet(Subst, Cover.Index);
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
KBTS__FOR(LigatureIndex, 0, Set_Count)
|
|
{
|
|
kbts__ligature *Ligature = kbts__GetLigature(Set, LigatureIndex);
|
|
kbts_u16 *ComponentIds = KBTS__POINTER_AFTER(kbts_u16, Ligature);
|
|
kbts_un ComponentCount = kbts__ReadU16Unaligned(&Ligature->ComponentCount);
|
|
|
|
kbts_un MatchingGlyphCount = 1;
|
|
|
|
{
|
|
kbts_glyph *LigatureGlyphCursor = CurrentGlyph->Next;
|
|
while(kbts__GlyphIsValid(Storage, LigatureGlyphCursor) &&
|
|
(MatchingGlyphCount < ComponentCount))
|
|
{
|
|
// A ligature may contain an explicit ZWJ, which SkipGlyph() would probably skip.
|
|
// The expected behavior in that case is to assume the font designer knows what they are doing
|
|
// and match the ZWJ.
|
|
if(LigatureGlyphCursor->Id == kbts__ReadU16Unaligned(&ComponentIds[MatchingGlyphCount - 1]))
|
|
{
|
|
MatchingGlyphCount += 1;
|
|
}
|
|
else if(!kbts__SkipGlyph(LigatureGlyphCursor, &Lookup, RegularSkipFlags, SkipUnicodeFlags))
|
|
{
|
|
break;
|
|
}
|
|
|
|
LigatureGlyphCursor = LigatureGlyphCursor->Next;
|
|
}
|
|
}
|
|
|
|
if(MatchingGlyphCount == ComponentCount)
|
|
{
|
|
Result |= KBTS__SUBSTITUTION_RESULT_FLAG_MATCHED_SUBSTITUTION;
|
|
|
|
if(!CheckOnly)
|
|
{
|
|
kbts_u32 LigatureUid = kbts__NextGlyphUid(Scratchpad);
|
|
|
|
{ // For glyphs that aren't part of the ligature, store which component it is attached to.
|
|
// For glyphs that _are_, eat them.
|
|
kbts_un LigatureGlyphCount = 1;
|
|
kbts_un GrowCount = 0;
|
|
|
|
// Consider this example:
|
|
// ABCD -> DB (A and C form a ligature)
|
|
// DB -> DEB (E is inserted in whatever way)
|
|
// DEB -> FB (D and E form a ligature)
|
|
// In that case, 'B' was supposed to be attached to D, but D does not exist anymore.
|
|
// To handle this case, we go through the ligature, counting the total flattened components
|
|
// and the ligature info of the last glyph that is part of the ligature.
|
|
// Then, all trailing marks get are re-attached to the new ligature, and their component indices
|
|
// are adjusted to take into account the new (flattened) component count.
|
|
// (I say 'flattened' here because a previous ligature glyph counts as multiple components.)
|
|
kbts_un PreviousLigatureUid = CurrentGlyph->LigatureUid;
|
|
kbts_un PreviousComponentCount = CurrentGlyph->LigatureComponentCount;
|
|
if(!PreviousComponentCount)
|
|
{
|
|
PreviousComponentCount = 1;
|
|
}
|
|
kbts_un RunningComponentCount = PreviousComponentCount;
|
|
|
|
kbts_glyph *LigatureGlyphCursor = CurrentGlyph->Next;
|
|
while(kbts__GlyphIsValid(Storage, LigatureGlyphCursor) && (LigatureGlyphCount < ComponentCount))
|
|
{
|
|
kbts_glyph *Next = LigatureGlyphCursor->Next;
|
|
|
|
if(LigatureGlyphCursor->Id == kbts__ReadU16Unaligned(&ComponentIds[LigatureGlyphCount - 1]))
|
|
{
|
|
PreviousLigatureUid = LigatureGlyphCursor->LigatureUid;
|
|
PreviousComponentCount = LigatureGlyphCursor->LigatureComponentCount;
|
|
if(!PreviousComponentCount)
|
|
{
|
|
PreviousComponentCount = 1;
|
|
}
|
|
RunningComponentCount += PreviousComponentCount;
|
|
|
|
LigatureGlyphCount += 1;
|
|
|
|
// Eat!
|
|
kbts__FreeGlyph(Scratchpad, Storage, LigatureGlyphCursor);
|
|
GrowCount -= 1;
|
|
}
|
|
else if(kbts__SkipGlyph(LigatureGlyphCursor, &Lookup, RegularSkipFlags, SkipUnicodeFlags))
|
|
{
|
|
LigatureGlyphCursor->LigatureComponentIndexPlusOne = (kbts_u16)LigatureGlyphCount;
|
|
LigatureGlyphCursor->LigatureUid = (kbts_u16)LigatureUid;
|
|
LigatureGlyphCursor->LigatureComponentCount = (kbts_u16)ComponentCount;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
|
|
LigatureGlyphCursor = Next;
|
|
}
|
|
|
|
OnePastLastGlyph = CurrentGlyph->Next;
|
|
|
|
// Re-attach trailing marks that were part of a component ligature to the new ligature.
|
|
if(PreviousLigatureUid)
|
|
{
|
|
kbts_un DeltaComponentCount = RunningComponentCount - PreviousComponentCount;
|
|
|
|
while(kbts__GlyphIsValid(Storage, LigatureGlyphCursor))
|
|
{
|
|
kbts_un PreviousComponentIndexPlusOne = LigatureGlyphCursor->LigatureComponentIndexPlusOne;
|
|
|
|
if((LigatureGlyphCursor->Classes.Class == KBTS__GLYPH_CLASS_MARK) &&
|
|
(LigatureGlyphCursor->LigatureUid == PreviousLigatureUid) &&
|
|
PreviousComponentIndexPlusOne)
|
|
{
|
|
if(PreviousComponentIndexPlusOne > PreviousComponentCount)
|
|
{
|
|
PreviousComponentIndexPlusOne = PreviousComponentCount;
|
|
}
|
|
|
|
kbts_un NewComponentIndexPlusOne = PreviousComponentIndexPlusOne + DeltaComponentCount;
|
|
|
|
LigatureGlyphCursor->LigatureUid = (kbts_u16)LigatureUid;
|
|
LigatureGlyphCursor->LigatureComponentIndexPlusOne = (kbts_u16)NewComponentIndexPlusOne;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
|
|
LigatureGlyphCursor = LigatureGlyphCursor->Next;
|
|
}
|
|
}
|
|
|
|
// Update frame input cursors.
|
|
KBTS__FOR(FrameIndex, 0, FrameCount - 1)
|
|
{
|
|
kbts__gsub_frame *OtherFrame = &Frames[FrameIndex];
|
|
|
|
if(OtherFrame->StartIndex >= Frame->StartIndex)
|
|
{
|
|
OtherFrame->StartIndex += (kbts_u16)GrowCount;
|
|
}
|
|
}
|
|
|
|
Scratchpad->ApproximateOutputGlyphCount += (kbts_u32)GrowCount;
|
|
}
|
|
|
|
// Currently, we only take the main glyph's config into account while making the ligature's config.
|
|
// Maybe we should merge all of the components' configs into one instead?
|
|
kbts__GsubMutate(Scratchpad, Font, CurrentGlyph, SequentialLookupIndex, kbts__ReadU16Unaligned(&Ligature->Glyph), GeneratedGlyphFlags | KBTS_GLYPH_FLAG_LIGATURE);
|
|
CurrentGlyph->Uid = (kbts_u16)LigatureUid;
|
|
CurrentGlyph->LigatureUid = (kbts_u16)LigatureUid;
|
|
CurrentGlyph->LigatureComponentCount = (kbts_u16)ComponentCount;
|
|
|
|
// Harfbuzz does this, because Uniscribe does this, and so we do the same. Sigh.
|
|
CurrentGlyph->Flags &= ~KBTS_GLYPH_FLAG_MULTIPLE_SUBSTITUTION;
|
|
}
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(GSUB_Ligature);
|
|
} break;
|
|
|
|
case 8:
|
|
{
|
|
kbts__reverse_chain_substitution *Subst = (kbts__reverse_chain_substitution *)Subtable;
|
|
kbts__unpacked_reverse_chain_substitution Unpacked = kbts__UnpackReverseChainSubstitution(Subst, 0);
|
|
|
|
// :BoundsChecking
|
|
if(Cover.Index < Unpacked.GlyphCount)
|
|
{
|
|
// Should we use regular or sequence skip flags here?
|
|
kbts__sequence_match BacktrackMatch = kbts__MatchCoverageSequence(Storage, &Lookup, RegularSkipFlags, SkipUnicodeFlags, Subst, Unpacked.BacktrackCoverageOffsets, Unpacked.BacktrackCount,
|
|
CurrentGlyph->Prev, 1);
|
|
kbts__sequence_match LookaheadMatch = kbts__MatchCoverageSequence(Storage, &Lookup, RegularSkipFlags, SkipUnicodeFlags, Subst, Unpacked.LookaheadCoverageOffsets, Unpacked.LookaheadCount,
|
|
CurrentGlyph->Next, 0);
|
|
if((BacktrackMatch.MatchCount == Unpacked.BacktrackCount) &&
|
|
(LookaheadMatch.MatchCount == Unpacked.LookaheadCount))
|
|
{
|
|
Result |= KBTS__SUBSTITUTION_RESULT_FLAG_MATCHED_SUBSTITUTION;
|
|
kbts__GsubMutate(Scratchpad, Font, CurrentGlyph, SequentialLookupIndex, kbts__ReadU16Unaligned(&Unpacked.SubstituteGlyphIds[Cover.Index]), GeneratedGlyphFlags);
|
|
}
|
|
}
|
|
} break;
|
|
}
|
|
|
|
if(Result & KBTS__SUBSTITUTION_RESULT_FLAG_MATCHED_SUBSTITUTION)
|
|
{
|
|
Frame->SubtableIndex = 0xFFFE;
|
|
|
|
// From the Microsoft docs:
|
|
// To move to the "next" glyph, the client skips all the glyphs that participated in the lookup operation:
|
|
// glyphs that were substituted/positioned as well as any other glyphs in the matched input sequence.
|
|
}
|
|
}
|
|
|
|
kbts__SetLookupOnePastLastGlyph(Scratchpad, Frame->StartIndex + OnePastLastGlyphOffset, OnePastLastGlyph);
|
|
}
|
|
}
|
|
|
|
Frame->SubtableIndex += 1;
|
|
}
|
|
|
|
if(Frame->RecordIndex < Frame->RecordCount)
|
|
{
|
|
kbts__sequence_lookup_record *SequenceRecord = &Frame->Records[Frame->RecordIndex++];
|
|
|
|
if(FrameCount < KBTS_LOOKUP_STACK_SIZE)
|
|
{
|
|
kbts__gsub_frame NewFrame = KBTS__ZERO;
|
|
NewFrame.LookupIndex = kbts__ReadU16Unaligned(&SequenceRecord->LookupListIndex);
|
|
NewFrame.StartIndex = Frame->StartIndex;
|
|
NewFrame.InputGlyph = Frame->InputGlyph;
|
|
|
|
kbts_un SequenceRecord_SequenceIndex = kbts__ReadU16Unaligned(&SequenceRecord->SequenceIndex);
|
|
|
|
if(SequenceRecord_SequenceIndex)
|
|
{
|
|
// @Speed: Re-scan the sequence to find where we are in the _filtered_ sequence.
|
|
kbts_un SequenceInputIndex = 0;
|
|
for(kbts_glyph *FilterGlyph = Frame->InputGlyph->Next;
|
|
kbts__GlyphIsValid(Storage, FilterGlyph);
|
|
FilterGlyph = FilterGlyph->Next)
|
|
{
|
|
// @Incomplete: SequenceSkipFlags? 0?
|
|
// What do we use here?
|
|
if(!kbts__SkipGlyph(FilterGlyph, &Lookup, 0, SkipUnicodeFlags))
|
|
{
|
|
SequenceInputIndex += 1;
|
|
|
|
if(SequenceInputIndex == SequenceRecord_SequenceIndex)
|
|
{
|
|
NewFrame.InputGlyph = FilterGlyph;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
NewFrame.StartIndex += 1;
|
|
}
|
|
}
|
|
|
|
Frames[FrameCount++] = NewFrame;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Only actually pop the frame if we haven't pushed anything else in the meantime.
|
|
if(Frame == &Frames[FrameCount - 1])
|
|
{
|
|
FrameCount -= 1;
|
|
}
|
|
|
|
*FrameCount_ = FrameCount;
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__glyph_list kbts__PushGlyphList(kbts_glyph_storage *Storage, kbts_glyph *First, kbts_glyph *Last)
|
|
{
|
|
kbts__glyph_list Result = KBTS__ZERO;
|
|
|
|
Result.SentinelPrev = Storage->GlyphSentinel.Prev;
|
|
Result.SentinelNext = Storage->GlyphSentinel.Next;
|
|
Result.OneBeforeFirst = First->Prev;
|
|
Result.OnePastLast = Last->Next;
|
|
|
|
First->Prev = Last->Next = (kbts_glyph *)&Storage->GlyphSentinel;
|
|
First->Prev->Next = First;
|
|
Last->Next->Prev = Last;
|
|
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__PopGlyphList(kbts_glyph_storage *Storage, kbts__glyph_list *List)
|
|
{
|
|
List->OneBeforeFirst->Next = Storage->GlyphSentinel.Next;
|
|
List->OnePastLast->Prev = Storage->GlyphSentinel.Prev;
|
|
|
|
// Storage->GlyphSentinel.Prev->Next = Storage->GlyphSentinel.Next->Prev = &Storage->GlyphSentinel;
|
|
|
|
if((kbts_glyph *)&Storage->GlyphSentinel != List->OneBeforeFirst)
|
|
{
|
|
Storage->GlyphSentinel.Next = List->SentinelNext;
|
|
}
|
|
if((kbts_glyph *)&Storage->GlyphSentinel != List->OnePastLast)
|
|
{
|
|
Storage->GlyphSentinel.Prev = List->SentinelPrev;
|
|
}
|
|
|
|
Storage->GlyphSentinel.Prev->Next = Storage->GlyphSentinel.Next->Prev = (kbts_glyph *)&Storage->GlyphSentinel;
|
|
|
|
KBTS_MEMSET(List, 0, sizeof(*List));
|
|
}
|
|
|
|
static void kbts__GsubFrameInitialize(kbts__gsub_frame *Frame, kbts_glyph *InputGlyph, kbts_u16 LookupIndex)
|
|
{
|
|
KBTS_MEMSET(Frame, 0, sizeof(*Frame));
|
|
Frame->InputGlyph = InputGlyph;
|
|
Frame->LookupIndex = LookupIndex;
|
|
}
|
|
|
|
static int kbts__WouldSubstitute(kbts_shape_scratchpad *Scratchpad, kbts_shape_config *Config, kbts_glyph_storage *Storage,
|
|
kbts__lookup_list *LookupList,
|
|
kbts__gsub_frame *Frames, kbts__feature *Feature, kbts__skip_flags SkipFlags,
|
|
kbts_glyph *Glyphs, kbts_un GlyphCount)
|
|
{
|
|
int Result = 0;
|
|
|
|
KBTS_ASSERT(GlyphCount <= 4);
|
|
kbts_glyph TempSentinel;
|
|
kbts_glyph Scratch[4];
|
|
|
|
KBTS__FOR(GlyphIndex, 0, GlyphCount)
|
|
{
|
|
kbts_glyph *ScratchGlyph = &Scratch[GlyphIndex];
|
|
|
|
// Glyphs is assumed to be in-order on the stack or something.
|
|
// This is one of the rare places where we manipulate arrays.
|
|
*ScratchGlyph = Glyphs[GlyphIndex];
|
|
ScratchGlyph->Prev = ScratchGlyph - 1;
|
|
ScratchGlyph->Next = ScratchGlyph + 1;
|
|
}
|
|
Scratch[0].Prev = &TempSentinel;
|
|
Scratch[GlyphCount - 1].Next = &TempSentinel;
|
|
TempSentinel.Next = &Scratch[0];
|
|
TempSentinel.Prev = &Scratch[GlyphCount - 1];
|
|
|
|
kbts__glyph_list OldList = kbts__PushGlyphList(Storage, &Scratch[0], &Scratch[GlyphCount - 1]);
|
|
|
|
kbts__iterate_lookups IterateLookups = kbts__IterateLookups(LookupList, Feature);
|
|
while(kbts__NextLookup(&IterateLookups))
|
|
{
|
|
if(IterateLookups.Lookup)
|
|
{
|
|
kbts_glyph *CurrentGlyph = &Scratch[0];
|
|
while(kbts__GlyphIsValid(Storage, CurrentGlyph))
|
|
{
|
|
kbts__GsubFrameInitialize(&Frames[0], CurrentGlyph, IterateLookups.LookupIndex);
|
|
kbts_un FrameCount = 1;
|
|
|
|
kbts__BeginLookupApplication(Scratchpad, CurrentGlyph);
|
|
|
|
while(FrameCount)
|
|
{
|
|
kbts__substitution_result_flags SubstitutionResult = kbts__DoSubstitution(Scratchpad, Config, Storage, LookupList, 0, 0, Frames, &FrameCount, 1, SkipFlags, 0);
|
|
|
|
if(SubstitutionResult & KBTS__SUBSTITUTION_RESULT_FLAG_MATCHED_SUBSTITUTION)
|
|
{
|
|
Result = 1;
|
|
goto Done;
|
|
}
|
|
}
|
|
|
|
CurrentGlyph = kbts__EndLookupApplication(Scratchpad);
|
|
}
|
|
}
|
|
}
|
|
|
|
Done:;
|
|
kbts__PopGlyphList(Storage, &OldList);
|
|
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__DllistReverseSublist(kbts_glyph *First, kbts_glyph *OnePastLast)
|
|
{
|
|
kbts_glyph *OneBeforeFirst = First->Prev;
|
|
kbts_glyph *Last = First;
|
|
|
|
for(kbts_glyph *Glyph = First;
|
|
;
|
|
)
|
|
{
|
|
kbts_glyph *Next = Glyph->Next;
|
|
|
|
Glyph->Next = Glyph->Prev;
|
|
Glyph->Prev = Next;
|
|
|
|
Last = Glyph;
|
|
Glyph = Next;
|
|
if(Glyph == OnePastLast)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(First != OnePastLast)
|
|
{
|
|
Last->Prev = OneBeforeFirst;
|
|
Last->Prev->Next = Last;
|
|
First->Next = OnePastLast;
|
|
First->Next->Prev = First;
|
|
}
|
|
}
|
|
|
|
static void kbts__FreeGlyphBucket(kbts_shape_scratchpad *Scratchpad, kbts_un SequentialLookupIndex)
|
|
{
|
|
kbts__bucketed_glyph_block_header *Sentinel = &Scratchpad->LookupGlyphBuckets[SequentialLookupIndex];
|
|
|
|
kbts__bucketed_glyph_block_header *First = Sentinel->Next;
|
|
kbts__bucketed_glyph_block_header *Last = Sentinel->Prev;
|
|
if(First != Sentinel)
|
|
{
|
|
First->Prev = Scratchpad->FreeBucketedBlockSentinel.Prev;
|
|
Last->Next = &Scratchpad->FreeBucketedBlockSentinel;
|
|
|
|
First->Prev->Next = First;
|
|
Last->Next->Prev = Last;
|
|
|
|
KBTS__DLLIST_SENTINEL_INIT(Sentinel);
|
|
}
|
|
}
|
|
|
|
static void kbts__LoadParents(kbts_glyph *Glyph, kbts_glyph_parent *Parents, kbts_un *ParentCount_, kbts_u32 *ParentsLoaded_)
|
|
{
|
|
kbts_s32 *ParentDeltas = kbts__GetParentInfoDeltas(Glyph->ParentInfo);
|
|
kbts_un ParentCount = kbts__GetParentInfoCount(Glyph->ParentInfo);
|
|
|
|
kbts_un DoubleDecompositionCount = 0;
|
|
KBTS__FOR(ParentIndex, 0, ParentCount)
|
|
{
|
|
kbts_glyph_parent Parent = KBTS__ZERO;
|
|
Parent.Codepoint = Glyph->Codepoint + (kbts_u32)ParentDeltas[ParentIndex];
|
|
|
|
kbts_u64 Decomposition = kbts__GetUnicodeDecomposition(Parent.Codepoint);
|
|
Parent.Codepoint1 = kbts__GetDecompositionCodepoint(Decomposition, 1);
|
|
|
|
Parents[DoubleDecompositionCount++] = Parent;
|
|
}
|
|
|
|
*ParentCount_ = DoubleDecompositionCount;
|
|
*ParentsLoaded_ = 0;
|
|
}
|
|
|
|
static void kbts__ExecuteOp(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage)
|
|
{
|
|
KBTS_INSTRUMENT_FUNCTION_BEGIN;
|
|
kbts_shape_config *Config = Scratchpad->Config;
|
|
|
|
if(Config)
|
|
{
|
|
kbts_font *Font = Config->Font;
|
|
kbts__op_kind OpKind = Scratchpad->OpKind;
|
|
|
|
switch(OpKind)
|
|
{
|
|
case KBTS__OP_KIND_PRE_NORMALIZE_DOTTED_CIRCLES:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(PRE_NORMALIZE_DOTTED_CIRCLES);
|
|
|
|
// Before even trying to normalize anything, there are some _exceptions_ we have to take care of.
|
|
// The USE spec gives us a list of codepoint sequences which necessitate insertion of a dotted circle.
|
|
// These sequences are from IndicShapingInvalidClusters.txt.
|
|
kbts_u64 Codepoints; Codepoints = 0; // 0xABBBBBCCCCCDDDDD
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
kbts_u32 NewCodepoint; NewCodepoint = Glyph->Codepoint & 0x1FFFFF;
|
|
Codepoints = (Codepoints << 21) | NewCodepoint;
|
|
|
|
// This switch is faster than any table lookup I could come up with in my tests.
|
|
#define KBTS_C2(A, B) case (((kbts_u64)(A) << 21) | (kbts_u64)(B)):
|
|
switch(Codepoints & (((kbts_u64)1 << 42) - 1))
|
|
{
|
|
default:
|
|
if((Codepoints & (((kbts_u64)1 << 63) - 1)) == (((kbts_u64)0x930 << 42) | ((kbts_u64)0x94D << 21) | ((kbts_u64)0x907)))
|
|
{
|
|
KBTS_C2(0x905, 0x93A)
|
|
KBTS_C2(0x905, 0x93B)
|
|
KBTS_C2(0x905, 0x93E)
|
|
KBTS_C2(0x905, 0x945)
|
|
KBTS_C2(0x905, 0x946)
|
|
KBTS_C2(0x905, 0x949)
|
|
KBTS_C2(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2(0xC4A, 0xC55)
|
|
KBTS_C2(0xC89, 0xCBE)
|
|
KBTS_C2(0xC8B, 0xCBE)
|
|
KBTS_C2(0xC92, 0xCCC)
|
|
KBTS_C2(0xD07, 0xD57)
|
|
KBTS_C2(0xD09, 0xD57)
|
|
KBTS_C2(0xD0E, 0xD46)
|
|
KBTS_C2(0xD12, 0xD3E)
|
|
KBTS_C2(0xD12, 0xD57)
|
|
KBTS_C2(0xD85, 0xDCF)
|
|
KBTS_C2(0xD85, 0xDD0)
|
|
KBTS_C2(0xD85, 0xDD1)
|
|
KBTS_C2(0xD8B, 0xDDF)
|
|
KBTS_C2(0xD8D, 0xDD8)
|
|
KBTS_C2(0xD8F, 0xDDF)
|
|
KBTS_C2(0xD91, 0xDCA)
|
|
KBTS_C2(0xD91, 0xDD9)
|
|
KBTS_C2(0xD91, 0xDDA)
|
|
KBTS_C2(0xD91, 0xDDC)
|
|
KBTS_C2(0xD91, 0xDDD)
|
|
KBTS_C2(0xD91, 0xDDE)
|
|
KBTS_C2(0xD94, 0xDDF)
|
|
KBTS_C2(0x11005, 0x11038)
|
|
KBTS_C2(0x1100B, 0x1103E)
|
|
KBTS_C2(0x1100F, 0x11042)
|
|
KBTS_C2(0x11200, 0x1122C)
|
|
KBTS_C2(0x11200, 0x11231)
|
|
KBTS_C2(0x11200, 0x11233)
|
|
KBTS_C2(0x11206, 0x1122C)
|
|
KBTS_C2(0x1122C, 0x11230)
|
|
KBTS_C2(0x1122C, 0x11231)
|
|
KBTS_C2(0x11240, 0x1122E)
|
|
KBTS_C2(0x112B0, 0x112E0)
|
|
KBTS_C2(0x112B0, 0x112E5)
|
|
KBTS_C2(0x112B0, 0x112E6)
|
|
KBTS_C2(0x112B0, 0x112E7)
|
|
KBTS_C2(0x112B0, 0x112E8)
|
|
KBTS_C2(0x11481, 0x114B0)
|
|
KBTS_C2(0x1148B, 0x114BA)
|
|
KBTS_C2(0x1148D, 0x114BA)
|
|
KBTS_C2(0x114AA, 0x114B5)
|
|
KBTS_C2(0x114AA, 0x114B6)
|
|
KBTS_C2(0x11600, 0x11639)
|
|
KBTS_C2(0x11600, 0x1163A)
|
|
KBTS_C2(0x11601, 0x11639)
|
|
KBTS_C2(0x11601, 0x1163A)
|
|
KBTS_C2(0x11680, 0x116AD)
|
|
KBTS_C2(0x11680, 0x116B4)
|
|
KBTS_C2(0x11680, 0x116B5)
|
|
KBTS_C2(0x11686, 0x116B2)
|
|
{
|
|
kbts_glyph *NewGlyph = kbts__InsertGlyphBefore(Storage, Glyph, &Config->DottedCircle);
|
|
if(!NewGlyph)
|
|
{
|
|
goto OutOfMemory;
|
|
}
|
|
} break;
|
|
}
|
|
}
|
|
#undef KBTS_C2
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(PRE_NORMALIZE_DOTTED_CIRCLES);
|
|
} break;
|
|
|
|
case KBTS__OP_KIND_NORMALIZE:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(NORMALIZE);
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(Decompose);
|
|
{ // Full NFD decomposition
|
|
kbts_glyph *DecompositionGlyphs = (kbts_glyph *)Scratchpad->ScratchMemory;
|
|
kbts_un CodepointsToDecomposeCount = 0;
|
|
kbts_un InputGlyphCount = 0;
|
|
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
InputGlyphCount += 1;
|
|
|
|
kbts_u64 GlyphDecomposition = kbts__GetUnicodeDecomposition(Glyph->Codepoint);
|
|
|
|
if(kbts__GetDecompositionSize(GlyphDecomposition))
|
|
{
|
|
kbts_glyph *PrevAnchor = Glyph->Prev;
|
|
|
|
DecompositionGlyphs[0] = *Glyph;
|
|
CodepointsToDecomposeCount = 1;
|
|
|
|
kbts__FreeGlyph(Scratchpad, Storage, Glyph);
|
|
|
|
while(CodepointsToDecomposeCount)
|
|
{
|
|
kbts_glyph GlyphToDecompose = DecompositionGlyphs[--CodepointsToDecomposeCount];
|
|
kbts_u64 Decomposition = 0;
|
|
kbts_u32 DecompositionSize = 0;
|
|
int AnyUnsupported = 0;
|
|
kbts_glyph Decomposed[2];
|
|
|
|
if(!(GlyphToDecompose.Flags & KBTS_GLYPH_FLAG_DO_NOT_DECOMPOSE))
|
|
{
|
|
Decomposition = kbts__GetUnicodeDecomposition(GlyphToDecompose.Codepoint);
|
|
DecompositionSize = kbts__GetDecompositionSize(Decomposition);
|
|
|
|
// Only do single decompositions if the current glyph is not supported.
|
|
if((DecompositionSize == 2) ||
|
|
!GlyphToDecompose.Id)
|
|
{
|
|
// Only decompose when the font supports the decomposed form.
|
|
KBTS__FOR(DecompositionIndex, 0, DecompositionSize)
|
|
{
|
|
kbts_glyph DecompositionGlyph = kbts_CodepointToGlyph(Font, (int)kbts__GetDecompositionCodepoint(Decomposition, DecompositionIndex), GlyphToDecompose.Config, GlyphToDecompose.UserIdOrCodepointIndex);
|
|
|
|
AnyUnsupported |= !DecompositionGlyph.Id;
|
|
Decomposed[DecompositionIndex] = DecompositionGlyph;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
AnyUnsupported = 1;
|
|
}
|
|
}
|
|
|
|
if(AnyUnsupported | !DecompositionSize)
|
|
{
|
|
kbts_glyph *NewGlyph = kbts__InsertGlyphAfter(Storage, PrevAnchor, &GlyphToDecompose);
|
|
if(!NewGlyph)
|
|
{
|
|
goto OutOfMemory;
|
|
}
|
|
|
|
PrevAnchor = NewGlyph;
|
|
}
|
|
else
|
|
{
|
|
KBTS_ASSERT((CodepointsToDecomposeCount + DecompositionSize) <= KBTS__MAXIMUM_DECOMPOSITION_CODEPOINTS);
|
|
|
|
if(Decomposition & KBTS_UNICODE_DECOMPOSITION_DO_NOT_RECURSE0)
|
|
{
|
|
Decomposed[0].Flags |= KBTS_GLYPH_FLAG_DO_NOT_DECOMPOSE;
|
|
}
|
|
if(Decomposition & KBTS_UNICODE_DECOMPOSITION_DO_NOT_RECURSE1)
|
|
{
|
|
Decomposed[1].Flags |= KBTS_GLYPH_FLAG_DO_NOT_DECOMPOSE;
|
|
}
|
|
|
|
KBTS__FOR(DecompositionIndex, 0, DecompositionSize)
|
|
{
|
|
// We reverse the glyphs here because we use a stack.
|
|
DecompositionGlyphs[CodepointsToDecomposeCount++] = Decomposed[DecompositionSize - 1 - DecompositionIndex];
|
|
}
|
|
}
|
|
}
|
|
|
|
Glyph = PrevAnchor;
|
|
}
|
|
}
|
|
|
|
Scratchpad->ApproximateInputGlyphCount = (kbts_u32)InputGlyphCount;
|
|
Scratchpad->ApproximateOutputGlyphCount = (kbts_u32)InputGlyphCount;
|
|
}
|
|
KBTS_INSTRUMENT_BLOCK_END(Decompose);
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(Recompose);
|
|
{ // Selective recomposition.
|
|
// The OpenType shaping documents say that Hebrew Alphabetic Presentation Form compositions aren't canonical,
|
|
// but looking at UnicodeData.txt, it seems like they totally are, so they are handled here.
|
|
kbts_glyph *LastBase = 0;
|
|
kbts_un LastBaseParentCount = 0;
|
|
kbts_un PreSlashDecimalDigitCount = 0;
|
|
kbts_glyph *PreSlashGlyph = 0;
|
|
kbts_glyph *DigitGlyph = 0;
|
|
kbts_un DecimalDigitCount = 0;
|
|
kbts_b32 InFraction = 0;
|
|
kbts_b32 FetchedLastBaseParents = 0;
|
|
kbts_u32 LastBaseParentsLoaded = 0;
|
|
kbts_glyph_parent LastBaseParents[KBTS_MAXIMUM_RECOMPOSITION_PARENTS];
|
|
kbts_u16 LastBaseParentIds[KBTS_MAXIMUM_RECOMPOSITION_PARENTS];
|
|
|
|
kbts_u32 BeforeFractionSlashGlyphFlags = KBTS_GLYPH_FLAG_NUMR | KBTS_GLYPH_FLAG_FRAC;
|
|
kbts_u32 AfterFractionSlashGlyphFlags = KBTS_GLYPH_FLAG_DNOM | KBTS_GLYPH_FLAG_FRAC;
|
|
if(kbts__ShaperRtl(Config->Shaper))
|
|
{
|
|
// RTL needs to invert NUMR and DNOM.
|
|
kbts_u32 Swap = BeforeFractionSlashGlyphFlags;
|
|
BeforeFractionSlashGlyphFlags = AfterFractionSlashGlyphFlags;
|
|
AfterFractionSlashGlyphFlags = Swap;
|
|
}
|
|
|
|
kbts_b32 ShouldFlip = (Scratchpad->RunDirection == KBTS_DIRECTION_RTL);
|
|
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
Glyph->Uid = kbts__NextGlyphUid(Scratchpad);
|
|
|
|
// In RTL, mirror all glyphs when their mirror is covered.
|
|
if(ShouldFlip &&
|
|
(Glyph->UnicodeFlags & KBTS_UNICODE_FLAG_MIRRORED))
|
|
{
|
|
kbts_u32 MatchingBracketCodepoint = kbts__GetUnicodeMirrorCodepoint(Glyph->Codepoint);
|
|
kbts_glyph MatchingBracket = kbts_CodepointToGlyph(Font, (int)MatchingBracketCodepoint, Glyph->Config, 0);
|
|
if(MatchingBracket.Id)
|
|
{
|
|
kbts__SetGlyphPreserveLinksAndUserId(Glyph, &MatchingBracket);
|
|
}
|
|
}
|
|
|
|
|
|
if(!Glyph->CombiningClass)
|
|
{
|
|
LastBase = Glyph;
|
|
FetchedLastBaseParents = 0;
|
|
}
|
|
|
|
kbts_b32 Recomposed = 0;
|
|
|
|
if(LastBase &&
|
|
(Glyph->UnicodeFlags & KBTS_UNICODE_FLAG_RECOMPOSITION_RHS))
|
|
{
|
|
if(!FetchedLastBaseParents)
|
|
{
|
|
// From the Microsoft docs:
|
|
// USE decomposes split vowel characters belonging to UISC = Vowel_Dependent according to character
|
|
// decomposition mappings defined in UnicodeData.txt
|
|
// Cluster validation, is done based on the decomposed state of a split vowel.
|
|
//
|
|
// (Note: our Matra corresponds to Vowel_Dependent + Pure_Killer.)
|
|
if((Config->Shaper != KBTS_SHAPER_USE) ||
|
|
(LastBase->SyllabicClass != KBTS_INDIC_SYLLABIC_CLASS_MATRA))
|
|
{
|
|
kbts__LoadParents(LastBase, LastBaseParents, &LastBaseParentCount, &LastBaseParentsLoaded);
|
|
}
|
|
else
|
|
{
|
|
LastBaseParentCount = 0;
|
|
}
|
|
|
|
FetchedLastBaseParents = 1;
|
|
}
|
|
|
|
kbts_un DoubleRecompositionCount = LastBaseParentCount;
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(ParentNSquaredStupidity);
|
|
KBTS__FOR(ParentIndex, 0, DoubleRecompositionCount)
|
|
{
|
|
kbts_glyph_parent *Parent = &LastBaseParents[ParentIndex];
|
|
kbts_u32 Codepoint1 = Parent->Codepoint1;
|
|
|
|
if(Glyph->Codepoint == Codepoint1)
|
|
{
|
|
kbts_u16 ParentId = LastBaseParentIds[ParentIndex];
|
|
|
|
if(!(LastBaseParentsLoaded & (1u << ParentIndex)))
|
|
{
|
|
ParentId = (kbts_u16)kbts_CodepointToGlyphId(Font, (int)Parent->Codepoint);
|
|
LastBaseParentIds[ParentIndex] = ParentId;
|
|
}
|
|
|
|
if(ParentId)
|
|
{
|
|
// Both match. Reclaim space.
|
|
kbts_glyph ParentGlyph = kbts_CodepointToGlyph(Font, (int)Parent->Codepoint, 0, 0);
|
|
ParentGlyph.Uid = LastBase->Uid;
|
|
ParentGlyph.UserIdOrCodepointIndex = LastBase->UserIdOrCodepointIndex;
|
|
ParentGlyph.Config = LastBase->Config;
|
|
|
|
kbts_glyph *Next = Glyph->Next;
|
|
kbts__FreeGlyph(Scratchpad, Storage, Glyph);
|
|
Glyph = Next;
|
|
|
|
Recomposed = 1;
|
|
kbts__SetGlyphPreserveLinksAndUserId(LastBase, &ParentGlyph);
|
|
|
|
// Refresh the parent list for nested recompositions.
|
|
kbts__LoadParents(LastBase, LastBaseParents, &LastBaseParentCount, &LastBaseParentsLoaded);
|
|
|
|
break;
|
|
}
|
|
else
|
|
{
|
|
// This glyph is never good. Forget it.
|
|
LastBaseParents[ParentIndex] = LastBaseParents[LastBaseParentCount - 1];
|
|
LastBaseParentIds[ParentIndex] = LastBaseParentIds[LastBaseParentCount - 1];
|
|
LastBaseParentsLoaded &= ~(1u << ParentIndex);
|
|
LastBaseParentsLoaded |= (LastBaseParentsLoaded & (1u << (LastBaseParentCount - 1))) >> (LastBaseParentCount - 1 - ParentIndex);
|
|
|
|
LastBaseParentCount -= 1;
|
|
DoubleRecompositionCount -= 1;
|
|
ParentIndex -= 1;
|
|
}
|
|
}
|
|
}
|
|
KBTS_INSTRUMENT_BLOCK_END(ParentNSquaredStupidity);
|
|
}
|
|
|
|
// It is safe to look for fractions here, because decimal digits/the fraction slash are not marks or
|
|
// jamos, so they should not get reordered after this pass.
|
|
if(Glyph->UnicodeFlags & KBTS_UNICODE_FLAG_DECIMAL_DIGIT)
|
|
{
|
|
if(InFraction)
|
|
{
|
|
// We are in the post-slash part of the fraction.
|
|
Glyph->Flags |= AfterFractionSlashGlyphFlags;
|
|
// Only flag the pre-slash part of the fraction if there is a post-slash part.
|
|
KBTS__FOR(DecimalDigitIndex, 0, PreSlashDecimalDigitCount)
|
|
{
|
|
PreSlashGlyph->Flags |= BeforeFractionSlashGlyphFlags;
|
|
PreSlashGlyph = PreSlashGlyph->Next;
|
|
}
|
|
PreSlashDecimalDigitCount = 0;
|
|
}
|
|
if(!DecimalDigitCount)
|
|
{
|
|
DigitGlyph = Glyph;
|
|
}
|
|
DecimalDigitCount += 1;
|
|
}
|
|
else if((Glyph->Codepoint == 0x2044) &&
|
|
(!InFraction || DecimalDigitCount))
|
|
{
|
|
// Fraction slash.
|
|
Glyph->Flags |= KBTS_GLYPH_FLAG_FRAC;
|
|
PreSlashDecimalDigitCount = DecimalDigitCount;
|
|
PreSlashGlyph = DigitGlyph;
|
|
InFraction = DecimalDigitCount != 0;
|
|
DecimalDigitCount = 0;
|
|
}
|
|
else
|
|
{
|
|
InFraction = 0;
|
|
}
|
|
|
|
if(Recomposed)
|
|
{
|
|
// @Robustness: This doesn't work when LastBase != Glyph->Prev, does it?
|
|
Glyph = Glyph->Prev; // Handle recursive recomposition.
|
|
}
|
|
}
|
|
}
|
|
KBTS_INSTRUMENT_BLOCK_END(Recompose);
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(MarkReordering);
|
|
{ // Unicode mark reordering.
|
|
for(kbts_glyph *Glyph = Storage->GlyphSentinel.Next;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
)
|
|
{
|
|
kbts_u8 CombiningClass = Glyph->CombiningClass;
|
|
|
|
if(CombiningClass)
|
|
{
|
|
Glyph->MarkOrdering = CombiningClass;
|
|
|
|
kbts_glyph *SequenceGlyph = Glyph->Next;
|
|
for(;
|
|
kbts__GlyphIsValid(Storage, SequenceGlyph);
|
|
SequenceGlyph = SequenceGlyph->Next)
|
|
{
|
|
kbts_u8 SequenceGlyphCombiningClass = SequenceGlyph->CombiningClass;
|
|
if(SequenceGlyphCombiningClass)
|
|
{
|
|
SequenceGlyph->MarkOrdering = SequenceGlyphCombiningClass;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
kbts_glyph *AfterSequence = SequenceGlyph;
|
|
if(kbts__GlyphIsValid(Storage, AfterSequence))
|
|
{
|
|
AfterSequence = AfterSequence->Next;
|
|
}
|
|
|
|
KBTS__DLLIST_SORT(Glyph, SequenceGlyph, MarkOrdering);
|
|
|
|
#ifdef KBTS_SANITY_CHECK
|
|
{
|
|
kbts_glyph *Glyph0 = OneBeforeSequence->Next;
|
|
kbts_glyph *Glyph1 = Glyph0->Next;
|
|
KBTS__FOR(SequenceIndex, 1, MarkSequenceLength)
|
|
{
|
|
KBTS_ASSERT(Glyph0->MarkOrdering <= Glyph1->MarkOrdering);
|
|
|
|
Glyph0 = Glyph0->Next;
|
|
Glyph1 = Glyph1->Next;
|
|
}
|
|
}
|
|
#endif
|
|
|
|
Glyph = AfterSequence;
|
|
}
|
|
else
|
|
{
|
|
Glyph = Glyph->Next;
|
|
}
|
|
}
|
|
}
|
|
KBTS_INSTRUMENT_BLOCK_END(MarkReordering);
|
|
|
|
if(Config->Script == KBTS_SCRIPT_ARABIC)
|
|
{
|
|
enum {KBTS_REMAPPED_CCC_33 = 27};
|
|
|
|
for(kbts_glyph *Glyph = Storage->GlyphSentinel.Next;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
)
|
|
{
|
|
kbts_glyph *Next = Glyph->Next;
|
|
|
|
// Find a mark sequence.
|
|
kbts_u8 CombiningClass = Glyph->CombiningClass;
|
|
|
|
if(CombiningClass)
|
|
{
|
|
// Arabic: Reorder sequences of mark glyphs.
|
|
//
|
|
// From the Unicode standard:
|
|
// - Move any shadda characters (ccc=33) to the beginning of S.
|
|
// - If a sequence of ccc=230 characters begins with any MCM characters, move the sequence of such MCM
|
|
// characters
|
|
// to the beginning of S (before any characters with ccc=33).
|
|
// - If a sequence of ccc=220 characters begins with any MCM characters, move the sequence of such MCM
|
|
// characters
|
|
// to the beginning of S (before any MCM with ccc=230 or ccc=33).
|
|
//
|
|
// Final ordering: 220 230 shadda other
|
|
|
|
kbts__mcm_sequence_state Mcm220SequenceState = 0;
|
|
kbts__mcm_sequence_state Mcm230SequenceState = 0;
|
|
|
|
kbts_glyph *SequenceGlyph = Glyph;
|
|
for(;
|
|
kbts__GlyphIsValid(Storage, SequenceGlyph);
|
|
SequenceGlyph = SequenceGlyph->Next)
|
|
{
|
|
kbts_u16 SequenceGlyphCombiningClass = SequenceGlyph->CombiningClass;
|
|
kbts_u16 SequenceGlyphFlags = SequenceGlyph->UnicodeFlags;
|
|
|
|
kbts_u8 MarkOrdering = 3;
|
|
|
|
if(SequenceGlyphCombiningClass == KBTS_REMAPPED_CCC_33)
|
|
{
|
|
MarkOrdering = 2;
|
|
}
|
|
else if(SequenceGlyphCombiningClass == 220)
|
|
{
|
|
if(SequenceGlyphFlags & KBTS_UNICODE_FLAG_MODIFIER_COMBINING_MARK)
|
|
{
|
|
if(Mcm220SequenceState != KBTS__MCM_SEQUENCE_STATE_OUT)
|
|
{
|
|
Mcm220SequenceState = KBTS__MCM_SEQUENCE_STATE_IN;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Mcm220SequenceState = KBTS__MCM_SEQUENCE_STATE_OUT;
|
|
}
|
|
|
|
if(Mcm220SequenceState == KBTS__MCM_SEQUENCE_STATE_IN)
|
|
{
|
|
MarkOrdering = 0;
|
|
}
|
|
|
|
Mcm230SequenceState = KBTS__MCM_SEQUENCE_STATE_NONE;
|
|
}
|
|
else if(SequenceGlyphCombiningClass == 230)
|
|
{
|
|
if(SequenceGlyphFlags & KBTS_UNICODE_FLAG_MODIFIER_COMBINING_MARK)
|
|
{
|
|
if(Mcm230SequenceState != KBTS__MCM_SEQUENCE_STATE_OUT)
|
|
{
|
|
Mcm230SequenceState = KBTS__MCM_SEQUENCE_STATE_IN;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Mcm230SequenceState = KBTS__MCM_SEQUENCE_STATE_OUT;
|
|
}
|
|
|
|
if(Mcm230SequenceState == KBTS__MCM_SEQUENCE_STATE_IN)
|
|
{
|
|
MarkOrdering = 1;
|
|
}
|
|
}
|
|
else if(SequenceGlyphCombiningClass)
|
|
{
|
|
Mcm220SequenceState = KBTS__MCM_SEQUENCE_STATE_NONE;
|
|
Mcm230SequenceState = KBTS__MCM_SEQUENCE_STATE_NONE;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
|
|
SequenceGlyph->MarkOrdering = MarkOrdering;
|
|
}
|
|
|
|
KBTS__DLLIST_SORT(Glyph, SequenceGlyph, MarkOrdering);
|
|
|
|
#ifdef KBTS_SANITY_CHECK
|
|
{
|
|
kbts_glyph *Glyph0 = OneBeforeGlyph->Next;
|
|
for(kbts_glyph *Glyph1 = Glyph0->Next;
|
|
Glyph1 != SequenceGlyph;
|
|
Glyph1 = Glyph1->Next)
|
|
{
|
|
KBTS_ASSERT(Glyph0->MarkOrdering <= Glyph1->MarkOrdering);
|
|
Glyph0 = Glyph1;
|
|
}
|
|
}
|
|
#endif
|
|
|
|
Next = SequenceGlyph;
|
|
}
|
|
|
|
Glyph = Next;
|
|
}
|
|
}
|
|
else if((Config->Script == KBTS_SCRIPT_THAI) || (Config->Script == KBTS_SCRIPT_LAO))
|
|
{
|
|
// Decompose sara/sala ams.
|
|
kbts_glyph *AboveBaseGlyph; AboveBaseGlyph = 0;
|
|
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
kbts_u32 Codepoint = Glyph->Codepoint;
|
|
|
|
switch(Codepoint)
|
|
{
|
|
// Sara am/sala am.
|
|
// We match both because storing the sara am codepoint that corresponds to the current script
|
|
// doesn't seem that worthwhile, given that this is already a pretty big switch case.
|
|
// If we choose to use a unicode flag or indic syllabic category to notate above-base marks,
|
|
// then this loops gets a lot tighter and it would probably become the right call to pre-determine
|
|
// the sara am codepoint.
|
|
case 0xE33: case 0xEB3: // Sara am
|
|
{
|
|
if(!AboveBaseGlyph)
|
|
{
|
|
AboveBaseGlyph = Glyph;
|
|
}
|
|
|
|
kbts_glyph *NewGlyph = kbts__InsertGlyphBefore(Storage, AboveBaseGlyph, &Config->Nikhahit);
|
|
if(!NewGlyph)
|
|
{
|
|
goto OutOfMemory;
|
|
}
|
|
|
|
kbts_glyph_config *GlyphConfig = Glyph->Config;
|
|
|
|
NewGlyph->UserIdOrCodepointIndex = Glyph->UserIdOrCodepointIndex;
|
|
NewGlyph->Config = GlyphConfig;
|
|
|
|
kbts__SetGlyphPreserveLinksAndUserId(Glyph, &Config->SaraAa);
|
|
Glyph->Config = GlyphConfig;
|
|
|
|
AboveBaseGlyph = 0;
|
|
} break;
|
|
|
|
case 0xE31: case 0xE34: case 0xE35: case 0xE36: case 0xE37: case 0xE3B:
|
|
case 0xE47: case 0xE48: case 0xE49: case 0xE4A: case 0xE4B: case 0xE4C: case 0xE4D: case 0xE4E:
|
|
case 0xEB1: case 0xEB4: case 0xEB5: case 0xEB6: case 0xEB7: case 0xEBB:
|
|
case 0xEC7: case 0xEC8: case 0xEC9: case 0xECA: case 0xECB: case 0xECC: case 0xECD: case 0xECE:
|
|
if(!AboveBaseGlyph)
|
|
{
|
|
AboveBaseGlyph = Glyph;
|
|
}
|
|
break;
|
|
|
|
default:
|
|
AboveBaseGlyph = 0;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(NORMALIZE);
|
|
} break;
|
|
|
|
case KBTS__OP_KIND_NORMALIZE_HANGUL:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(NORMALIZE_HANGUL);
|
|
|
|
for(kbts_glyph *Glyph = Storage->GlyphSentinel.Next;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
)
|
|
{
|
|
kbts_glyph *Next = Glyph->Next;
|
|
int UserId = Glyph->UserIdOrCodepointIndex;
|
|
kbts_glyph_config *GlyphConfig = Glyph->Config;
|
|
|
|
kbts_un L = 0;
|
|
kbts_un V = 0;
|
|
kbts_un T = 0;
|
|
kbts_un LvtGlyphCount = 0;
|
|
kbts_glyph LvtGlyphs[4];
|
|
|
|
kbts__hangul_syllable_info LInfo = kbts__HangulSyllableInfo(Glyph->Codepoint);
|
|
if(LInfo.Type >= KBTS__HANGUL_SYLLABLE_TYPE_LV)
|
|
{
|
|
kbts_un SIndex = (Glyph->Codepoint - 0xAC00);
|
|
|
|
L = 0x1100 + SIndex / 588;
|
|
V = 0x1161 + (SIndex % 588) / 28;
|
|
|
|
kbts_un TIndex = SIndex % 28;
|
|
if(TIndex)
|
|
{
|
|
T = 0x11A7 + TIndex;
|
|
}
|
|
}
|
|
else if(LInfo.Type == KBTS__HANGUL_SYLLABLE_TYPE_L)
|
|
{
|
|
L = Glyph->Codepoint;
|
|
}
|
|
|
|
if(L)
|
|
{
|
|
kbts__hangul_syllable_info VInfo = KBTS__ZERO;
|
|
|
|
if(!V && kbts__GlyphIsValid(Storage, Next))
|
|
{
|
|
kbts_u32 VCodepoint = Next->Codepoint;
|
|
kbts__hangul_syllable_info MaybeVInfo = kbts__HangulSyllableInfo(VCodepoint);
|
|
|
|
if(MaybeVInfo.Type == KBTS__HANGUL_SYLLABLE_TYPE_V)
|
|
{
|
|
V = VCodepoint;
|
|
VInfo = MaybeVInfo;
|
|
|
|
Next = Next->Next;
|
|
}
|
|
}
|
|
|
|
if(V)
|
|
{
|
|
kbts__hangul_syllable_info TInfo = KBTS__ZERO;
|
|
|
|
if(!T && kbts__GlyphIsValid(Storage, Next))
|
|
{
|
|
kbts_u32 TCodepoint = Next->Codepoint;
|
|
|
|
kbts__hangul_syllable_info MaybeTInfo = kbts__HangulSyllableInfo(TCodepoint);
|
|
|
|
if(MaybeTInfo.Type == KBTS__HANGUL_SYLLABLE_TYPE_T)
|
|
{
|
|
T = TCodepoint;
|
|
TInfo = MaybeTInfo;
|
|
|
|
Next = Next->Next;
|
|
}
|
|
}
|
|
|
|
// Check for any tone marks that we need to swap to the front of the syllable.
|
|
// The OpenType shaping documents say that we need to do this after applying GSUB features, but
|
|
// harfbuzz does it before, so it's probably fine to do it here?
|
|
// It's also basically free to do here, which is nice.
|
|
if(kbts__GlyphIsValid(Storage, Next))
|
|
{
|
|
kbts_u32 ToneMarkCodepoint = Next->Codepoint;
|
|
|
|
if((ToneMarkCodepoint >= 0x302E) && (ToneMarkCodepoint <= 0x302F))
|
|
{
|
|
LvtGlyphs[LvtGlyphCount++] = kbts_CodepointToGlyph(Font, (int)ToneMarkCodepoint, GlyphConfig, UserId);
|
|
|
|
Next = Next->Next;
|
|
}
|
|
}
|
|
|
|
if(LInfo.Composable & VInfo.Composable & TInfo.Composable)
|
|
{
|
|
// Try LVT.
|
|
kbts_un LvtCodepoint = 0xAC00 + (L - 0x1100) * 588 + (V - 0x1161) * 28 + (T - 0x11A7);
|
|
|
|
kbts_glyph LvtGlyph = kbts_CodepointToGlyph(Font, (int)LvtCodepoint, GlyphConfig, UserId);
|
|
if(LvtGlyph.Id)
|
|
{
|
|
LvtGlyphs[LvtGlyphCount++] = LvtGlyph;
|
|
}
|
|
}
|
|
|
|
if(!LvtGlyphCount)
|
|
{
|
|
kbts_glyph LvGlyph = KBTS__ZERO;
|
|
if(LInfo.Composable & VInfo.Composable)
|
|
{
|
|
// Try LV.
|
|
kbts_un LvCodepoint = 0xAC00 + (L - 0x1100) * 588 + (V - 0x1161) * 28;
|
|
|
|
LvGlyph = kbts_CodepointToGlyph(Font, (int)LvCodepoint, GlyphConfig, UserId);
|
|
}
|
|
|
|
if(LvGlyph.Id)
|
|
{
|
|
LvtGlyphs[LvtGlyphCount++] = LvGlyph;
|
|
}
|
|
else
|
|
{
|
|
// Do L-V.
|
|
kbts_glyph LGlyph = kbts_CodepointToGlyph(Font, (int)L, GlyphConfig, UserId);
|
|
LGlyph.Flags |= KBTS_GLYPH_FLAG_LJMO;
|
|
|
|
kbts_glyph VGlyph = kbts_CodepointToGlyph(Font, (int)V, GlyphConfig, UserId);
|
|
VGlyph.Flags |= KBTS_GLYPH_FLAG_VJMO;
|
|
|
|
LvtGlyphs[LvtGlyphCount++] = LGlyph;
|
|
LvtGlyphs[LvtGlyphCount++] = VGlyph;
|
|
}
|
|
|
|
if(T)
|
|
{
|
|
kbts_glyph TGlyph = kbts_CodepointToGlyph(Font, (int)T, GlyphConfig, UserId);
|
|
TGlyph.Flags |= KBTS_GLYPH_FLAG_TJMO;
|
|
|
|
LvtGlyphs[LvtGlyphCount++] = TGlyph;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(!LvtGlyphCount)
|
|
{
|
|
kbts_glyph NewGlyph = kbts_CodepointToGlyph(Font, (int)Glyph->Codepoint, GlyphConfig, UserId);
|
|
|
|
LvtGlyphs[LvtGlyphCount++] = NewGlyph;
|
|
}
|
|
|
|
{ // Insert the LVT glyphs.
|
|
kbts_glyph *LastConsumed = Next->Prev;
|
|
|
|
// Remove the sub-list from the main list.
|
|
Glyph->Prev->Next = LastConsumed->Next;
|
|
LastConsumed->Next->Prev = Glyph->Prev;
|
|
|
|
// Send it to the free list.
|
|
Glyph->Prev = (kbts_glyph *)&Storage->FreeGlyphSentinel;
|
|
LastConsumed->Next = Storage->FreeGlyphSentinel.Next;
|
|
Glyph->Prev->Next = Glyph;
|
|
LastConsumed->Next->Prev = LastConsumed;
|
|
|
|
for(kbts_un LvtGlyphIndex = 0;
|
|
LvtGlyphIndex < LvtGlyphCount;
|
|
++LvtGlyphIndex)
|
|
{
|
|
kbts_glyph *LvtGlyph = &LvtGlyphs[LvtGlyphIndex];
|
|
kbts_glyph *NewGlyph = kbts__InsertGlyphBefore(Storage, Next, LvtGlyph);
|
|
|
|
if(!NewGlyph)
|
|
{
|
|
goto OutOfMemory;
|
|
}
|
|
}
|
|
}
|
|
|
|
Glyph = Next;
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(NORMALIZE_HANGUL);
|
|
}
|
|
break;
|
|
|
|
case KBTS__OP_KIND_BEGIN_GSUB:
|
|
{
|
|
enum{SortKeyInterval = 0x10000};
|
|
kbts_un RunningSortKey = SortKeyInterval;
|
|
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
Glyph->SortKey = (kbts_u32)RunningSortKey;
|
|
Glyph->SortKeyInterval = SortKeyInterval;
|
|
|
|
kbts__BucketGlyph(Scratchpad, Glyph, 0, 0);
|
|
|
|
RunningSortKey += SortKeyInterval;
|
|
}
|
|
} break;
|
|
|
|
case KBTS__OP_KIND_GSUB_FEATURES:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(GSUB_FEATURES);
|
|
|
|
// @Duplication
|
|
kbts__gsub_gpos *FontGsub = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_GSUB, kbts__gsub_gpos);
|
|
kbts__lookup_list *LookupList = kbts__GetLookupList(FontGsub);
|
|
|
|
kbts__gsub_frame *Frames = (kbts__gsub_frame *)Scratchpad->ScratchMemory;
|
|
|
|
kbts_u32 FilterMask = Config->Shaper == KBTS_SHAPER_USE ? KBTS__USE_GLYPH_FEATURE_MASK : KBTS__GLYPH_FEATURE_MASK;
|
|
|
|
kbts_un FeatureStageIndex = kbts__CurrentBakedFeatureStageIndex(Scratchpad);
|
|
kbts_un FirstSequentialLookupIndex = kbts__shape_config_FeatureStageFirstLookupIndices(Config)[FeatureStageIndex];
|
|
kbts_un OnePastLastSequentialLookupIndex = kbts__shape_config_FeatureStageFirstLookupIndices(Config)[FeatureStageIndex + 1];
|
|
KBTS__FOR(SequentialLookupIndex, FirstSequentialLookupIndex, OnePastLastSequentialLookupIndex)
|
|
{
|
|
kbts__sequential_lookup *SequentialLookup = &kbts__shape_config_SequentialLookups(Config)[SequentialLookupIndex];
|
|
kbts_un LookupIndex = SequentialLookup->LookupIndex;
|
|
kbts_u32 SkipFlags = SequentialLookup->SkipFlags;
|
|
kbts_u32 GlyphFilter = SequentialLookup->GlyphFilter;
|
|
|
|
kbts__bucketed_glyph_block_header *Sentinel = &Scratchpad->LookupGlyphBuckets[SequentialLookupIndex];
|
|
|
|
if(Sentinel->Next != Sentinel)
|
|
{
|
|
kbts_u16 PackedLookup_Type = 0;
|
|
{
|
|
kbts__lookup *PackedLookup = kbts__GetLookup(LookupList, LookupIndex);
|
|
|
|
if(PackedLookup)
|
|
{
|
|
PackedLookup_Type = kbts__ReadU16Unaligned(&PackedLookup->Type);
|
|
}
|
|
}
|
|
kbts_b32 LookupTypeIs8 = (PackedLookup_Type == 8);
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(GsubSortBucket);
|
|
|
|
if(PackedLookup_Type >= 4)
|
|
{
|
|
kbts__SortGlyphBucket(Scratchpad, SequentialLookupIndex);
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(GsubSortBucket);
|
|
|
|
for(kbts__bucketed_glyph_block_header *BlockHeader = (LookupTypeIs8) ? Sentinel->Prev : Sentinel->Next;
|
|
BlockHeader != Sentinel;
|
|
BlockHeader = (LookupTypeIs8) ? BlockHeader->Prev : BlockHeader->Next)
|
|
{
|
|
kbts__bucketed_glyph_block *Block = (kbts__bucketed_glyph_block *)BlockHeader;
|
|
kbts_un BlockGlyphCount = Block->Count;
|
|
|
|
KBTS__FOR(GlyphIndex_, 0, BlockGlyphCount)
|
|
{
|
|
kbts_un GlyphIndex = (LookupTypeIs8) ? (BlockGlyphCount - 1 - GlyphIndex_) : GlyphIndex_;
|
|
kbts__bucketed_glyph *Bucketed = &Block->Glyphs[GlyphIndex];
|
|
|
|
if(kbts__BucketedGlyphIsValid(Bucketed))
|
|
{
|
|
kbts_glyph *Glyph = Bucketed->Glyph;
|
|
kbts_u16 FeatureValue = Bucketed->FeatureValue;
|
|
kbts_u32 GlyphFlags = Glyph->Flags;
|
|
kbts_glyph *Prev = Glyph->Prev;
|
|
|
|
if(Glyph->Config)
|
|
{
|
|
GlyphFlags |= Glyph->Config->EnabledFilterFlags;
|
|
GlyphFlags &= ~Glyph->Config->DisabledFilterFlags;
|
|
}
|
|
|
|
kbts__BeginLookupApplication(Scratchpad, Glyph);
|
|
kbts_u32 EffectiveGlyphFilter = GlyphFilter & FilterMask;
|
|
|
|
if((GlyphFlags & EffectiveGlyphFilter) == EffectiveGlyphFilter)
|
|
{
|
|
kbts__gsub_frame FirstFrame = KBTS__ZERO;
|
|
FirstFrame.LookupIndex = (kbts_u16)LookupIndex;
|
|
FirstFrame.InputGlyph = Glyph;
|
|
|
|
Frames[0] = FirstFrame;
|
|
kbts_un FrameCount = 1;
|
|
|
|
while(FrameCount)
|
|
{
|
|
// These flags are used by USE.
|
|
kbts_u32 GeneratedGlyphFlags = GlyphFilter & (KBTS_GLYPH_FLAG_RPHF | KBTS_GLYPH_FLAG_PREF);
|
|
kbts__DoSubstitution(Scratchpad, Config, Storage, LookupList, SequentialLookupIndex, FeatureValue, Frames, &FrameCount, 0, SkipFlags, GeneratedGlyphFlags);
|
|
|
|
if((Scratchpad->ApproximateOutputGlyphCount / Scratchpad->ApproximateInputGlyphCount) >= KBTS_MAX_OUTPUT_GLYPHS_PER_INPUT_GLYPH)
|
|
{
|
|
Scratchpad->Error = KBTS_SHAPE_ERROR_GENERATED_TOO_MANY_GLYPHS;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts_glyph *OnePastLast = kbts__EndLookupApplication(Scratchpad);
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(GsubRebucketTouchedGlyphs);
|
|
|
|
for(kbts_glyph *MatchedGlyph = Prev->Next;
|
|
MatchedGlyph != OnePastLast;
|
|
MatchedGlyph = MatchedGlyph->Next)
|
|
{
|
|
// Queue for the next bucket.
|
|
if(MatchedGlyph->Bucketed &&
|
|
(MatchedGlyph->BucketedBucketIndex == SequentialLookupIndex))
|
|
{
|
|
// We are scheduled for the current bucket. Cancel that, and move on to the next.
|
|
kbts__UnbucketGlyph(Scratchpad, MatchedGlyph);
|
|
kbts__BucketGlyph(Scratchpad, MatchedGlyph, SequentialLookupIndex + 1, 0);
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(GsubRebucketTouchedGlyphs);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts__FreeGlyphBucket(Scratchpad, SequentialLookupIndex);
|
|
}
|
|
|
|
Scratchpad->SequentialLookupIndexIndex = (kbts_u32)OnePastLastSequentialLookupIndex;
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(GSUB_FEATURES);
|
|
}
|
|
break;
|
|
|
|
case KBTS__OP_KIND_FLAG_JOINING_LETTERS:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(FLAG_JOINING_LETTERS);
|
|
kbts_u64 JoiningTypesMatchLookup =
|
|
(((1ull << KBTS_UNICODE_JOINING_TYPE_RIGHT) | (1ull << KBTS_UNICODE_JOINING_TYPE_DUAL) | (1ull << KBTS_UNICODE_JOINING_TYPE_FORCE)) << (8 * KBTS_UNICODE_JOINING_TYPE_LEFT)) |
|
|
(((1ull << KBTS_UNICODE_JOINING_TYPE_RIGHT) | (1ull << KBTS_UNICODE_JOINING_TYPE_DUAL) | (1ull << KBTS_UNICODE_JOINING_TYPE_FORCE)) << (8 * KBTS_UNICODE_JOINING_TYPE_DUAL)) |
|
|
(((1ull << KBTS_UNICODE_JOINING_TYPE_RIGHT) | (1ull << KBTS_UNICODE_JOINING_TYPE_DUAL) | (1ull << KBTS_UNICODE_JOINING_TYPE_FORCE)) << (8 * KBTS_UNICODE_JOINING_TYPE_FORCE));
|
|
|
|
kbts_u64 JoiningFeatureTransition = ((kbts_u64)KBTS_JOINING_FEATURE_INIT << (8 * KBTS_JOINING_FEATURE_ISOL)) | ((kbts_u64)KBTS_JOINING_FEATURE_MEDI << (8 * KBTS_JOINING_FEATURE_FINA)) |
|
|
((kbts_u64)KBTS_JOINING_FEATURE_MEDI << (8 * KBTS_JOINING_FEATURE_MEDI)) | ((kbts_u64)KBTS_JOINING_FEATURE_MED2 << (8 * KBTS_JOINING_FEATURE_MED2));
|
|
|
|
// Tag letters for joining features.
|
|
kbts_glyph PreviousGlyph_ = KBTS__ZERO;
|
|
kbts_glyph *PreviousGlyph = &PreviousGlyph_;
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
if(Glyph->JoiningType != KBTS_UNICODE_JOINING_TYPE_TRANSPARENT)
|
|
{
|
|
Glyph->JoiningFeature = (kbts_joining_feature)(!PreviousGlyph->JoiningType ? KBTS_JOINING_FEATURE_INIT : KBTS_JOINING_FEATURE_FINA);
|
|
|
|
if(JoiningTypesMatchLookup & (1ull << (Glyph->JoiningType + 8 * PreviousGlyph->JoiningType)))
|
|
{
|
|
PreviousGlyph->JoiningFeature = (JoiningFeatureTransition >> (8 * PreviousGlyph->JoiningFeature)) & 0xFF;
|
|
PreviousGlyph->Flags = (PreviousGlyph->Flags & ~KBTS__JOINING_FEATURE_MASK) | KBTS__JOINING_FEATURE_TO_GLYPH_FLAG(PreviousGlyph->JoiningFeature);
|
|
|
|
Glyph->JoiningFeature = KBTS_JOINING_FEATURE_FINA;
|
|
}
|
|
else
|
|
{
|
|
Glyph->JoiningFeature = KBTS_JOINING_FEATURE_ISOL;
|
|
}
|
|
|
|
if(Glyph->JoiningFeature)
|
|
{
|
|
// Be careful that this properly maps kbts_joining_feature to KBTS_GLYPH_FLAG!
|
|
Glyph->Flags = (Glyph->Flags & ~KBTS__JOINING_FEATURE_MASK) | KBTS__JOINING_FEATURE_TO_GLYPH_FLAG(Glyph->JoiningFeature);
|
|
}
|
|
|
|
PreviousGlyph = Glyph;
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(FLAG_JOINING_LETTERS);
|
|
}
|
|
break;
|
|
|
|
case KBTS__OP_KIND_GPOS_METRICS:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(GPOS_METRICS);
|
|
// hmtx/vmtx pass.
|
|
kbts_b32 ClearMarkAdvances = (Config->Shaper == KBTS_SHAPER_MYANMAR) || (Config->Shaper == KBTS_SHAPER_USE);
|
|
|
|
kbts_u32 Orientation = KBTS_ORIENTATION_HORIZONTAL; // @Hardcoded
|
|
kbts_blob_table_id HeaTableId = KBTS_BLOB_TABLE_ID_HHEA;
|
|
kbts_blob_table_id MtxTableId = KBTS_BLOB_TABLE_ID_HMTX;
|
|
if(Orientation == KBTS_ORIENTATION_VERTICAL)
|
|
{
|
|
HeaTableId = KBTS_BLOB_TABLE_ID_VHEA;
|
|
MtxTableId = KBTS_BLOB_TABLE_ID_VMTX;
|
|
}
|
|
|
|
kbts__hea *Hea = kbts__BlobTableDataType(Font->Blob, HeaTableId, kbts__hea);
|
|
kbts_u16 *Mtx = kbts__BlobTableDataType(Font->Blob, MtxTableId, kbts_u16);
|
|
kbts__hvar_vvar_common *Hvar = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_HVAR, kbts__hvar_vvar_common);
|
|
kbts__item_variation_store *HvarStore = Hvar ? KBTS__POINTER_OFFSET(kbts__item_variation_store, Hvar, kbts__ReadU32Unaligned(&Hvar->ItemVariationStoreOffset)) : 0;
|
|
kbts_s16 *VariationVectorNormalized = Scratchpad->VariationVectorNormalized;
|
|
|
|
kbts_un Hea_MetricCount = Hea ? kbts__ReadU16Unaligned(&Hea->MetricCount) : 0;
|
|
kbts_un Mtx_MetricCapacity = 0;
|
|
|
|
kbts__long_mtx *LongMetrics = 0;
|
|
// :LeftSideBearing
|
|
// kbts_s16 *ShortMetrics = 0;
|
|
if(Hea && Mtx)
|
|
{
|
|
LongMetrics = (kbts__long_mtx *)Mtx;
|
|
// :LeftSideBearing
|
|
// ShortMetrics = (kbts_s16 *)(LongMetrics + Hea->MetricCount);
|
|
|
|
Mtx_MetricCapacity = Font->Blob->Tables[MtxTableId].Length / sizeof(kbts__long_mtx);
|
|
}
|
|
|
|
kbts_un MetricCapacity = KBTS__MIN(Hea_MetricCount, Mtx_MetricCapacity);
|
|
|
|
kbts__long_mtx DefaultMetric = {1024, 0};
|
|
kbts__head *Head = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_HEAD, kbts__head);
|
|
if(Head)
|
|
{
|
|
DefaultMetric.Advance = kbts__ReadU16Unaligned(&Head->UnitsPerEm);
|
|
if(Orientation == KBTS_ORIENTATION_HORIZONTAL)
|
|
{
|
|
DefaultMetric.Advance /= 2;
|
|
}
|
|
}
|
|
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
kbts__SetCursiveFlags(Glyph, 0);
|
|
|
|
kbts__long_mtx Metric = DefaultMetric;
|
|
if(LongMetrics)
|
|
{
|
|
kbts_u32 Id = Glyph->Id;
|
|
|
|
// At the end of shaping, default ignorable glyphs that are not generated by GSUB are replaced with zero-width
|
|
// whitespace glyphs (or a zero-width empty glyph if no whitespace glyph is present).
|
|
// (By the way, we do this because Harfbuzz does it, and Harfbuzz does it probably because Uniscribe does it.)
|
|
// We handle this in two steps:
|
|
// - The first is here. We want cursive attachments, and mark-to-base attachments, and other relative placements
|
|
// to take the zero width into account, and zeroing the width right at the beginning of GPOS is the most
|
|
// straighforward way to accomplish this.
|
|
// (@Incomplete: It is likely that we also need to take the default ignorable case into account when accumulating
|
|
// cursive offsets.)
|
|
// - In POST_GPOS_FIXUP, we perform the glyph ID substitution. We have to wait until all GPOS features have been
|
|
// executed to do this because they might possibly match the original ID.
|
|
if(!(Glyph->Flags & KBTS_GLYPH_FLAG_GENERATED_BY_GSUB) &&
|
|
(Glyph->UnicodeFlags & KBTS_UNICODE_FLAG_DEFAULT_IGNORABLE))
|
|
{
|
|
Metric.Advance = 0;
|
|
// :LeftSideBearing
|
|
// Metric.PreviousSideBearing = 0;
|
|
}
|
|
else if(Id < MetricCapacity)
|
|
{
|
|
KBTS_MEMCPY(&Metric, &LongMetrics[Id], sizeof(Metric));
|
|
}
|
|
else if(MetricCapacity)
|
|
{
|
|
Metric.Advance = kbts__ReadU16Unaligned(&LongMetrics[MetricCapacity - 1].Advance);
|
|
// :LeftSideBearing
|
|
// Metric.PreviousSideBearing = ShortMetrics[Id - MetricCapacity];
|
|
}
|
|
}
|
|
|
|
if(Hvar)
|
|
{
|
|
kbts_un OuterIndex = 0;
|
|
kbts_un InnerIndex = (kbts_un)Glyph->Id;
|
|
kbts_un Hvar_AdvanceWidthMappingOffset = kbts__ReadU32Unaligned(&Hvar->AdvanceWidthMappingOffset);
|
|
|
|
if(Hvar_AdvanceWidthMappingOffset)
|
|
{
|
|
kbts__delta_set_index_map *AdvanceIndexMap = KBTS__POINTER_OFFSET(kbts__delta_set_index_map, Hvar, Hvar_AdvanceWidthMappingOffset);
|
|
kbts_un MapCount = 0;
|
|
char *Map = 0;
|
|
|
|
switch(AdvanceIndexMap->Format)
|
|
{
|
|
case 0:
|
|
{
|
|
kbts_u16 *MapCount_ = KBTS__POINTER_AFTER(kbts_u16, AdvanceIndexMap);
|
|
|
|
MapCount = kbts__ReadU16Unaligned(MapCount_);
|
|
Map = KBTS__POINTER_AFTER(char, MapCount_);
|
|
} break;
|
|
|
|
case 1:
|
|
{
|
|
kbts_u32 *MapCount_ = KBTS__POINTER_AFTER(kbts_u32, AdvanceIndexMap);
|
|
|
|
MapCount = kbts__ReadU32Unaligned(MapCount_);
|
|
Map = KBTS__POINTER_AFTER(char, MapCount_);
|
|
} break;
|
|
}
|
|
|
|
if(MapCount)
|
|
{
|
|
kbts_un MapLookupIndex = (InnerIndex < MapCount) ? InnerIndex : (MapCount - 1);
|
|
kbts_un BytesPerEntry = kbts__DeltaSetIndexMapBytesPerEntry(AdvanceIndexMap);
|
|
kbts_un BitsPerInnerIndex = kbts__DeltaSetIndexMapBitsPerInnerIndex(AdvanceIndexMap);
|
|
|
|
char *AtLookupEntry = Map + MapLookupIndex * BytesPerEntry;
|
|
kbts_u32 LookupEntry = 0;
|
|
switch(BytesPerEntry)
|
|
{
|
|
case 1: LookupEntry = *(kbts_u8 *)AtLookupEntry; break;
|
|
case 2: LookupEntry = kbts__ReadU16Unaligned((kbts_u16 *)AtLookupEntry); break;
|
|
case 3: LookupEntry = (kbts_u32)(kbts_u8)AtLookupEntry[2] | ((kbts_u32)(kbts_u8)AtLookupEntry[1] << 8) | ((kbts_u32)(kbts_u8)AtLookupEntry[0] << 16); break;
|
|
case 4: LookupEntry = kbts__ReadU32Unaligned((kbts_u32 *)AtLookupEntry); break;
|
|
}
|
|
|
|
InnerIndex = LookupEntry & ((1 << BitsPerInnerIndex) - 1);
|
|
OuterIndex = LookupEntry >> BitsPerInnerIndex;
|
|
}
|
|
}
|
|
|
|
float Delta = kbts__ItemVariationStoreDelta(HvarStore, OuterIndex, InnerIndex, VariationVectorNormalized);
|
|
Metric.Advance += (kbts_u16)kbts__Round32(Delta);
|
|
}
|
|
|
|
if(!ClearMarkAdvances | (Glyph->Classes.Class != KBTS__GLYPH_CLASS_MARK))
|
|
{
|
|
if(Orientation == KBTS_ORIENTATION_HORIZONTAL)
|
|
{
|
|
// :LeftSideBearing
|
|
// Why does harfbuzz not take bearings into account in these tests?
|
|
// P.X += Metric.PreviousSideBearing;
|
|
Glyph->AdvanceX = Metric.Advance;
|
|
}
|
|
else
|
|
{
|
|
// :LeftSideBearing
|
|
// Why does harfbuzz not take bearings into account in these tests?
|
|
// P.Y += Metric.PreviousSideBearing;
|
|
Glyph->AdvanceY = Metric.Advance;
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(GPOS_METRICS);
|
|
}
|
|
break;
|
|
|
|
case KBTS__OP_KIND_GPOS_FEATURES:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(GPOS_FEATURES);
|
|
|
|
kbts__gsub_gpos *Gpos = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_GPOS, kbts__gsub_gpos);
|
|
kbts__gdef *Gdef = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_GDEF, kbts__gdef);
|
|
|
|
kbts__lookup_list *LookupList = kbts__GetLookupList(Gpos);
|
|
kbts_un FeatureStageIndex = kbts__CurrentBakedFeatureStageIndex(Scratchpad);
|
|
|
|
kbts_un FirstSequentialLookupIndex = kbts__shape_config_FeatureStageFirstLookupIndices(Config)[FeatureStageIndex];
|
|
kbts_un OnePastLastSequentialLookupIndex = kbts__shape_config_FeatureStageFirstLookupIndices(Config)[FeatureStageIndex + 1];
|
|
KBTS__FOR(SequentialLookupIndex, FirstSequentialLookupIndex, OnePastLastSequentialLookupIndex)
|
|
{
|
|
kbts__sequential_lookup *SequentialLookup = &kbts__shape_config_SequentialLookups(Config)[SequentialLookupIndex];
|
|
kbts_un LookupIndex = SequentialLookup->LookupIndex;
|
|
kbts_u32 SkipFlags = SequentialLookup->SkipFlags;
|
|
|
|
kbts__bucketed_glyph_block_header *Sentinel = &Scratchpad->LookupGlyphBuckets[SequentialLookupIndex];
|
|
|
|
if(Sentinel->Next != Sentinel)
|
|
{
|
|
kbts__lookup *PackedLookup = kbts__GetLookup(LookupList, LookupIndex);
|
|
|
|
kbts__unpacked_lookup Lookup = KBTS__ZERO;
|
|
if(PackedLookup)
|
|
{
|
|
Lookup = kbts__UnpackLookup(Gdef, PackedLookup);
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(GposSortBucket);
|
|
|
|
if(Lookup.Type >= 2)
|
|
{
|
|
kbts__SortGlyphBucket(Scratchpad, SequentialLookupIndex);
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(GposSortBucket);
|
|
|
|
for(kbts__bucketed_glyph_block_header *BlockHeader = Sentinel->Next;
|
|
BlockHeader != Sentinel;
|
|
BlockHeader = BlockHeader->Next)
|
|
{
|
|
kbts__bucketed_glyph_block *Block = (kbts__bucketed_glyph_block *)BlockHeader;
|
|
kbts_un BlockGlyphCount = Block->Count;
|
|
|
|
KBTS__FOR(GlyphIndex, 0, BlockGlyphCount)
|
|
{
|
|
kbts__bucketed_glyph *Bucketed = &Block->Glyphs[GlyphIndex];
|
|
|
|
if(kbts__BucketedGlyphIsValid(Bucketed))
|
|
{
|
|
kbts_glyph *Glyph = Bucketed->Glyph;
|
|
kbts__BeginLookupApplication(Scratchpad, Glyph);
|
|
|
|
KBTS__FOR(SubtableIndex, 0, Lookup.SubtableCount)
|
|
{
|
|
kbts_u16 *Subtable = KBTS__POINTER_OFFSET(kbts_u16, PackedLookup, kbts__ReadU16Unaligned(&Lookup.SubtableOffsets[SubtableIndex]));
|
|
|
|
if(kbts__DoSingleAdjustment(Scratchpad, Config, Storage,
|
|
LookupList, LookupIndex, SubtableIndex, Lookup, Subtable,
|
|
Glyph, 0, SkipFlags))
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
kbts_glyph *OnePastLast = kbts__EndLookupApplication(Scratchpad);
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(GposRebucketTouchedGlyphs);
|
|
|
|
// @Speed: We can record just the IDs of the glyphs we traverse here into a flat array
|
|
// so that attachment lookups are faster.
|
|
for(kbts_glyph *MatchedGlyph = Glyph;
|
|
MatchedGlyph != OnePastLast;
|
|
MatchedGlyph = MatchedGlyph->Next)
|
|
{
|
|
// Queue for the next bucket.
|
|
|
|
if(MatchedGlyph->Bucketed &&
|
|
(MatchedGlyph->BucketedBucketIndex == SequentialLookupIndex))
|
|
{
|
|
// We are scheduled for the current bucket. Cancel that, and move on to the next.
|
|
kbts__UnbucketGlyph(Scratchpad, MatchedGlyph);
|
|
kbts__BucketGlyph(Scratchpad, MatchedGlyph, SequentialLookupIndex + 1, 1);
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(GposRebucketTouchedGlyphs);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts__FreeGlyphBucket(Scratchpad, SequentialLookupIndex);
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(GPOS_FEATURES);
|
|
}
|
|
break;
|
|
|
|
case KBTS__OP_KIND_POST_GPOS_FIXUP:
|
|
{
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(POST_GPOS_FIXUP);
|
|
kbts_glyph WhitespaceGlyph = Config->Whitespace;
|
|
int ClearMarkAdvances = kbts__ShaperClearsMarkAdvancesInPostGposFixup(Config->Shaper);
|
|
|
|
if(Scratchpad->RunDirection == KBTS_DIRECTION_RTL)
|
|
{
|
|
// Flip direction.
|
|
// This might seem like a totally superfluous thing to do, because we have to do a bunch
|
|
// of work to reverse glyph order while still preserving their relative positions.
|
|
// However, for mainly LTR documents, the anchor position will naturally be left-aligned,
|
|
// while, in RTL documents, it will naturally right-align.
|
|
// As such, going through the glyph sequence and reversing it is needed _anyway_ at some point,
|
|
// and we might as well do it here, because this is where we can take resolve attachments
|
|
// for relatively cheap, since they are always back-looking. (The next paragraph explains this
|
|
// in more detail.)
|
|
|
|
// The unintuitive part about this pass is the glyph advances.
|
|
// Normally, when iterating over a sequence of glyphs, we see base glyphs before marks. Obviously.
|
|
// However, when flipping the sequence, we see the marks before seeing the bases, which means we
|
|
// won't have accumulated the base glyph's advance yet! So we have to go through the sequence here
|
|
// and compensate for missing advances by precomputing them and baking them into the marks.
|
|
// Another way to reach the same result would be to keep marks on the same side as their bases when
|
|
// flipping, but that is not what Harfbuzz does, and, the day we decide we want to diverge from Harfbuzz,
|
|
// we will very likely be better off not flipping the sequence at all and deleting all of this garbage code.
|
|
kbts_s32 MarkAttachAdvanceX = 0;
|
|
kbts_s32 MarkAttachAdvanceY = 0;
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
kbts_glyph *Attach = Glyph->AttachGlyph;
|
|
if(Attach)
|
|
{
|
|
kbts_s32 AttachAdvanceX = MarkAttachAdvanceX;
|
|
kbts_s32 AttachAdvanceY = MarkAttachAdvanceY;
|
|
if(Attach->Classes.Class != KBTS__GLYPH_CLASS_MARK)
|
|
{
|
|
AttachAdvanceX = Attach->AdvanceX;
|
|
AttachAdvanceY = Attach->AdvanceY;
|
|
}
|
|
Glyph->OffsetX += AttachAdvanceX;
|
|
Glyph->OffsetY += AttachAdvanceY;
|
|
MarkAttachAdvanceX = AttachAdvanceX;
|
|
MarkAttachAdvanceY = AttachAdvanceY;
|
|
}
|
|
}
|
|
|
|
// Swap.
|
|
// @Speed: We could just choose the correct links when traversing instead.
|
|
kbts__DllistReverseSublist((kbts_glyph *)&Storage->GlyphSentinel, (kbts_glyph *)&Storage->GlyphSentinel);
|
|
}
|
|
|
|
// Make default ignorables that weren't explicitly created by the font invisible.
|
|
//
|
|
// It is tempting to put this loop inside of an if(WhitespaceGlyph.Id), just like we do
|
|
// for dotted circle insertion. However, Harfbuzz does not do this!
|
|
// When the font does not contain a dotted circle, nothing is inserted, but when the font
|
|
// does not contain a whitespace glyph, _we still insert an empty glyph_.
|
|
for(kbts_glyph *Glyph = Storage->GlyphSentinel.Next;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
)
|
|
{
|
|
kbts_glyph *Next = Glyph->Next;
|
|
int Keep = 0;
|
|
|
|
// It might be tempting to keep glyphs that were used in GPOS, but Harfbuzz doesn't care.
|
|
if(!(Glyph->Flags & KBTS_GLYPH_FLAG_GENERATED_BY_GSUB) && (Glyph->UnicodeFlags & KBTS_UNICODE_FLAG_DEFAULT_IGNORABLE))
|
|
{
|
|
// This glyph is default ignorable and should be ignored.
|
|
if(WhitespaceGlyph.Id)
|
|
{
|
|
Keep = 1;
|
|
|
|
kbts_glyph_config *GlyphConfig = Glyph->Config;
|
|
kbts__SetGlyphPreserveLinksAndUserId(Glyph, &WhitespaceGlyph);
|
|
Glyph->Config = GlyphConfig;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if(ClearMarkAdvances && (Glyph->Classes.Class == KBTS__GLYPH_CLASS_MARK))
|
|
{
|
|
Glyph->AdvanceX = Glyph->AdvanceY = 0;
|
|
}
|
|
Keep = 1;
|
|
}
|
|
|
|
if(!Keep)
|
|
{
|
|
kbts__FreeGlyph(Scratchpad, Storage, Glyph);
|
|
}
|
|
|
|
Glyph = Next;
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(POST_GPOS_FIXUP);
|
|
}
|
|
break;
|
|
|
|
case KBTS__OP_KIND_STCH_POSTPASS:
|
|
{
|
|
#if 0
|
|
KBTS__FOR_GLYPH(ShapeState, Glyph)
|
|
{
|
|
if(Glyph->Flags & (KBTS_GLYPH_FLAG_STCH_ENDPOINT | KBTS_GLYPH_FLAG_STCH_EXTENSION))
|
|
{
|
|
kbts_glyph *Extension = 0;
|
|
|
|
kbts_s32 EndpointWidth = 0;
|
|
kbts_s32 ExtensionWidth = 0;
|
|
|
|
while(kbts__GlyphIsValid(ShapeState, Glyph))
|
|
{
|
|
kbts_glyph *AtGlyph = &Glyphs[At];
|
|
|
|
if(AtGlyph->Flags & KBTS_GLYPH_FLAG_STCH_ENDPOINT)
|
|
{
|
|
EndpointWidth += AtGlyph->AdvanceX;
|
|
|
|
At += 1;
|
|
}
|
|
else if(AtGlyph->Flags & KBTS_GLYPH_FLAG_STCH_EXTENSION)
|
|
{
|
|
ExtensionIndex = At;
|
|
ExtensionWidth += AtGlyph->AdvanceX;
|
|
SawExtension = 1;
|
|
|
|
At += 1;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
kbts_sn WordWidth = 0;
|
|
|
|
while(At < GlyphArray->Count)
|
|
{
|
|
kbts_glyph *AtGlyph = &Glyphs[At];
|
|
|
|
int Ok = 0;
|
|
|
|
if(!(AtGlyph->Flags & (KBTS_GLYPH_FLAG_STCH_ENDPOINT | KBTS_GLYPH_FLAG_STCH_EXTENSION)) && (AtGlyph->UnicodeFlags & KBTS_UNICODE_FLAG_PART_OF_WORD))
|
|
{
|
|
Ok = 1;
|
|
}
|
|
|
|
if(Ok)
|
|
{
|
|
WordWidth += AtGlyph->AdvanceX;
|
|
|
|
At += 1;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(WordWidth > EndpointWidth)
|
|
{
|
|
kbts_sn ExtensionCount = (WordWidth - EndpointWidth) / ExtensionWidth;
|
|
if((ExtensionWidth * ExtensionCount) < (WordWidth - EndpointWidth))
|
|
{
|
|
ExtensionCount += 1;
|
|
}
|
|
|
|
(void)ExtensionCount;
|
|
(void)ExtensionIndex;
|
|
(void)SawExtension;
|
|
/* @Incomplete
|
|
kbts_glyph_adjustment *ExtensionAdjustment = &Positions[ExtensionIndex];
|
|
ExtensionAdjustment->LastRepeatIndex = ExtensionCount - 1;
|
|
ExtensionAdjustment->RepeatOffsetX = (WordWidth - EndpointWidth - ExtensionWidth) / ExtensionCount;
|
|
*/
|
|
}
|
|
|
|
GlyphIndex = At;
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
break;
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
OutOfMemory:;
|
|
Scratchpad->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_FUNCTION_END;
|
|
}
|
|
|
|
static kbts_glyph kbts__Substitute1(kbts_shape_scratchpad *Scratchpad, kbts_shape_config *Config, kbts_glyph_storage *Storage,
|
|
kbts__lookup_list *LookupList, kbts__feature *Feature, kbts__skip_flags SkipFlags, kbts_glyph *Glyph)
|
|
{
|
|
kbts_glyph Result = *Glyph;
|
|
kbts_glyph TempSentinel;
|
|
TempSentinel.Prev = TempSentinel.Next = &Result;
|
|
Result.Prev = Result.Next = &TempSentinel;
|
|
kbts__glyph_list List = kbts__PushGlyphList(Storage, &Result, &Result);
|
|
|
|
kbts__iterate_lookups IterateLookups = kbts__IterateLookups(LookupList, Feature);
|
|
while(kbts__NextLookup(&IterateLookups))
|
|
{
|
|
if(IterateLookups.Lookup)
|
|
{
|
|
kbts__gsub_frame Frames[8];
|
|
{
|
|
kbts__gsub_frame *Frame = &Frames[0];
|
|
kbts__GsubFrameInitialize(Frame, &Result, IterateLookups.LookupIndex);
|
|
}
|
|
kbts_un FrameCount = 1;
|
|
|
|
while(FrameCount)
|
|
{
|
|
kbts__substitution_result_flags SubstitutionResult = kbts__DoSubstitution(Scratchpad, Config, Storage,
|
|
LookupList, Scratchpad->SequentialLookupIndexIndex, 0, Frames, &FrameCount, 0, SkipFlags, 0);
|
|
if(SubstitutionResult & KBTS__SUBSTITUTION_RESULT_FLAG_TRIED_TO_INSERT_WHILE_CHECK_ONLY)
|
|
{
|
|
goto Done;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Done:;
|
|
kbts__PopGlyphList(Storage, &List);
|
|
return Result;
|
|
}
|
|
|
|
typedef struct kbts__attach_state
|
|
{
|
|
kbts__syllabic_position CurrentPosition;
|
|
kbts__syllabic_position LastPositionThatWasNotPreBaseMatra;
|
|
kbts_indic_syllabic_class LastClass;
|
|
kbts_glyph *Start;
|
|
kbts_glyph *OnePastLast;
|
|
kbts_glyph *At;
|
|
} kbts__attach_state;
|
|
|
|
static kbts_glyph *kbts__BeginCluster(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage,
|
|
kbts_glyph *Glyph)
|
|
{
|
|
kbts_shape_config *Config = Scratchpad->Config;
|
|
kbts_font *Font = Config->Font;
|
|
kbts_glyph *Result = Glyph->Next;
|
|
|
|
Scratchpad->RealCluster = 0;
|
|
|
|
switch(Config->Shaper)
|
|
{
|
|
case KBTS_SHAPER_INDIC:
|
|
{
|
|
kbts__lookup_list *LookupList = kbts__GetLookupList(kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_GSUB, kbts__gsub_gpos));
|
|
|
|
int NonCluster = 0;
|
|
while(kbts__GlyphIsValid(Storage, Glyph) &&
|
|
((Glyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_OTHER) ||
|
|
(Glyph->SyllabicClass >= KBTS_INDIC_SYLLABIC_CLASS_COUNT)))
|
|
{
|
|
NonCluster = 1;
|
|
Glyph = Glyph->Next;
|
|
}
|
|
|
|
Result = Glyph;
|
|
|
|
if(!NonCluster)
|
|
{
|
|
kbts_un ScanGlyphIndex = 0;
|
|
kbts_un State = 0;
|
|
kbts_un Broken = 1;
|
|
kbts_un BrokenState = 0;
|
|
kbts_glyph *FirstGlyphs[3] = KBTS__ZERO;
|
|
|
|
while(kbts__GlyphIsValid(Storage, Glyph) &&
|
|
(State < KBTS_INDIC_SYLLABIC_STATE_COUNT))
|
|
{
|
|
kbts_un Class = Glyph->SyllabicClass;
|
|
|
|
if(Class < KBTS_INDIC_SYLLABIC_CLASS_COUNT)
|
|
{
|
|
if(KBTS__IN_SET(Class, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_RA)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_CONSONANT)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_VOWEL)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_DOTTED_CIRCLE)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_PLACEHOLDER)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_SYMBOL))))
|
|
{
|
|
Broken = 0;
|
|
}
|
|
BrokenState = (BrokenState << 1) | Broken;
|
|
|
|
if(ScanGlyphIndex < KBTS__ARRAY_LENGTH(FirstGlyphs))
|
|
{
|
|
FirstGlyphs[ScanGlyphIndex] = Glyph;
|
|
}
|
|
|
|
State = kbts_IndicSyllabicTransition[Class][State];
|
|
State -= 1; // @Incomplete @Cleanup: Decrement every state by 1 in the transition table.
|
|
Glyph = Glyph->Next;
|
|
ScanGlyphIndex += 1;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(State > KBTS_INDIC_SYLLABIC_STATE_COUNT)
|
|
{
|
|
ScanGlyphIndex -= State - KBTS_INDIC_SYLLABIC_STATE_COUNT;
|
|
BrokenState >>= State - KBTS_INDIC_SYLLABIC_STATE_COUNT;
|
|
|
|
while(State > KBTS_INDIC_SYLLABIC_STATE_COUNT)
|
|
{
|
|
Glyph = Glyph->Prev;
|
|
State -= 1;
|
|
}
|
|
|
|
if(!ScanGlyphIndex)
|
|
{
|
|
// If we backtrack all the way to the beginning, still eat a character.
|
|
ScanGlyphIndex = 1;
|
|
}
|
|
}
|
|
|
|
// NOTE: Symbols, vedics, modifiers, matras have their syllabic positions tagged at build time.
|
|
// It is tempting to use Unicode's positional information for consonants, too, but OpenType
|
|
// _strongly_ recommends that shapers use the font's tables instead, ie. doing tentative lookups
|
|
// with specific features.
|
|
|
|
kbts__gsub_frame *Frames = (kbts__gsub_frame *)Scratchpad->ScratchMemory;
|
|
kbts_glyph *OnePastLastSyllableGlyph = Glyph;
|
|
kbts_glyph *FirstGlyph = FirstGlyphs[0];
|
|
kbts_glyph *OneBeforeSyllableGlyph = FirstGlyph->Prev;
|
|
|
|
if((Config->Script == KBTS_SCRIPT_KANNADA) && (ScanGlyphIndex >= 3) &&
|
|
(FirstGlyphs[0]->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_RA) &&
|
|
(FirstGlyphs[1]->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_HALANT) &&
|
|
(FirstGlyphs[2]->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_ZWJ))
|
|
{
|
|
// In older versions of Unicode (~4.x, pre-2004), Ra-Virama-Zwj was recommended in Kannada
|
|
// to communicate the intent of displaying (Ra + (next consonant as below-base form)).
|
|
// This was changed in Unicode 5. Now, the recommended sequence to display (Ra +
|
|
// (next consonant as below-base form)) is Ra-Zwj-Virama.
|
|
// Since Ra-Virama-Zwj is not a useful sequence that happens organically in Kannada,
|
|
// we are free to transform it into Ra-Zwj-Virama here without losing information.
|
|
KBTS__DLLIST_SWAP(FirstGlyphs[1], FirstGlyphs[2]);
|
|
|
|
// Also swap this, because this is used below for OnePastReph.
|
|
kbts_glyph *Swap = FirstGlyphs[1];
|
|
FirstGlyphs[1] = FirstGlyphs[2];
|
|
FirstGlyphs[2] = Swap;
|
|
}
|
|
|
|
kbts_glyph_flags RephFlags = KBTS_GLYPH_FLAG_RPHF;
|
|
kbts_glyph *OnePastReph = FirstGlyphs[0];
|
|
kbts_un OnePastRephIndex = 0;
|
|
{ // Reph tagging.
|
|
// This first pass only figures out where the reph ends.
|
|
// We delay updating glyph properties until we know whether the reph is the base or not.
|
|
kbts_glyph *Second = FirstGlyphs[1];
|
|
kbts_glyph *Third = FirstGlyphs[2];
|
|
kbts__feature *Rphf = Config->Rphf;
|
|
|
|
switch(Config->IndicScriptProperties.RephEncoding)
|
|
{
|
|
case KBTS__REPH_ENCODING_LOGICAL_REPHA:
|
|
if(FirstGlyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_REPHA)
|
|
{
|
|
RephFlags = 0;
|
|
OnePastRephIndex = 1;
|
|
}
|
|
break;
|
|
|
|
case KBTS__REPH_ENCODING_IMPLICIT:
|
|
if((ScanGlyphIndex >= 2) &&
|
|
(Second->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_HALANT))
|
|
{
|
|
kbts_glyph Scratch[2];
|
|
Scratch[0] = *FirstGlyphs[0];
|
|
Scratch[1] = *FirstGlyphs[1];
|
|
|
|
if(kbts__WouldSubstitute(Scratchpad, Config, Storage, LookupList, Frames, Rphf, 0, Scratch, 2))
|
|
{
|
|
OnePastRephIndex = 2;
|
|
}
|
|
}
|
|
break;
|
|
|
|
case KBTS__REPH_ENCODING_EXPLICIT:
|
|
if((ScanGlyphIndex >= 3) &&
|
|
(Second->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_HALANT) &&
|
|
(Third->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_ZWJ))
|
|
{
|
|
kbts_glyph Scratch[3];
|
|
Scratch[0] = *FirstGlyphs[0];
|
|
Scratch[1] = *FirstGlyphs[1];
|
|
Scratch[2] = *FirstGlyphs[2];
|
|
|
|
if(kbts__WouldSubstitute(Scratchpad, Config, Storage, LookupList, Frames, Rphf, 0, Scratch, 3))
|
|
{
|
|
OnePastRephIndex = 3;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
|
|
// Extend the reph with suffixed joiners.
|
|
if(OnePastRephIndex)
|
|
{
|
|
OnePastReph = FirstGlyphs[OnePastRephIndex - 1]->Next;
|
|
while(kbts__GlyphIsValid(Storage, OnePastReph) &&
|
|
KBTS__IN_SET(OnePastReph->SyllabicClass, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_ZWJ)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_ZWNJ))))
|
|
{
|
|
OnePastReph = OnePastReph->Next;
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts__feature *Pref = Config->Pref;
|
|
kbts_glyph *BaseGlyph = OnePastLastSyllableGlyph;
|
|
kbts_glyph *LastConsonant = 0;
|
|
kbts__syllabic_position LastConsonantPosition = KBTS__SYLLABIC_POSITION_SYLLABLE_BASE;
|
|
if(Config->DottedCircle.Id && (BrokenState & 1))
|
|
{
|
|
BaseGlyph = kbts__InsertGlyphBefore(Storage, OnePastReph, &Config->DottedCircle);
|
|
if(!BaseGlyph)
|
|
{
|
|
goto OutOfMemory;
|
|
}
|
|
|
|
BaseGlyph->UserIdOrCodepointIndex = OnePastReph->UserIdOrCodepointIndex;
|
|
}
|
|
else
|
|
{
|
|
// Going backwards, tag blwf and pstf consonants until we get to the base.
|
|
kbts_glyph Scratch[3];
|
|
Scratch[0] = Config->Virama;
|
|
Scratch[2] = Config->Virama;
|
|
|
|
kbts__feature *Locl = Config->Locl;
|
|
kbts__feature *Vatu = Config->Vatu;
|
|
|
|
// pstf forms come last, then blwf.
|
|
kbts__feature *SectionFeature = Config->Pstf;
|
|
kbts__syllabic_position SectionPosition = KBTS__SYLLABIC_POSITION_POSTBASE_CONSONANT;
|
|
// If we see no consonant/matra, then surely we want to attach to the base.
|
|
kbts__syllabic_position SyllabicPosition = KBTS__SYLLABIC_POSITION_SYLLABLE_BASE;
|
|
kbts_indic_syllabic_class LastClass = KBTS_INDIC_SYLLABIC_CLASS_COUNT;
|
|
|
|
for(Glyph = OnePastLastSyllableGlyph->Prev;
|
|
;
|
|
Glyph = Glyph->Prev)
|
|
{
|
|
kbts_indic_syllabic_class Class = Glyph->SyllabicClass;
|
|
|
|
switch(Class)
|
|
{
|
|
case KBTS_INDIC_SYLLABIC_CLASS_CONSONANT:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_RA:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_WITH_STACKER:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_MEDIAL:
|
|
// Apply locl first.
|
|
Scratch[1] = kbts__Substitute1(Scratchpad, Config, Storage, LookupList, Locl, KBTS__SKIP_FLAG_ZWNJ | KBTS__SKIP_FLAG_ZWJ, Glyph);
|
|
|
|
// Microsoft says to "move backwards until a consonant is found that does not have a below-base
|
|
// or post-base form".
|
|
// As with everything else the spec says, it is wrong. There are cases in which the only consonant
|
|
// in a syllable has a below-base or post-base form. In those cases, we still want them to be the
|
|
// syllable base.
|
|
// So, as we sweep backward, set the base index on consonants unconditionally.
|
|
// @Robustness: Do we want to update Base only if we do not match Pref/Vatu?
|
|
BaseGlyph = Glyph;
|
|
|
|
if(kbts__WouldSubstitute(Scratchpad, Config, Storage, LookupList, Frames, Pref, 0, Scratch, 2) ||
|
|
kbts__WouldSubstitute(Scratchpad, Config, Storage, LookupList, Frames, Pref, 0, Scratch + 1, 2) ||
|
|
kbts__WouldSubstitute(Scratchpad, Config, Storage, LookupList, Frames, Vatu, 0, Scratch, 2) ||
|
|
kbts__WouldSubstitute(Scratchpad, Config, Storage, LookupList, Frames, Vatu, 0, Scratch + 1, 2))
|
|
{
|
|
SyllabicPosition = KBTS__SYLLABIC_POSITION_POSTBASE_CONSONANT;
|
|
}
|
|
else
|
|
{
|
|
for(;;)
|
|
{
|
|
if(kbts__WouldSubstitute(Scratchpad, Config, Storage, LookupList, Frames, SectionFeature, 0, Scratch, 2) ||
|
|
kbts__WouldSubstitute(Scratchpad, Config, Storage, LookupList, Frames, SectionFeature, 0, Scratch + 1, 2))
|
|
{
|
|
SyllabicPosition = SectionPosition;
|
|
break;
|
|
}
|
|
else if(SectionPosition == KBTS__SYLLABIC_POSITION_POSTBASE_CONSONANT)
|
|
{
|
|
SectionFeature = Config->Blwf;
|
|
SectionPosition = KBTS__SYLLABIC_POSITION_BELOWBASE_CONSONANT;
|
|
// Retry with Blwf.
|
|
}
|
|
else
|
|
{
|
|
goto DoneScanningForBase;
|
|
}
|
|
}
|
|
}
|
|
|
|
if(!LastConsonant)
|
|
{
|
|
LastConsonant = Glyph;
|
|
LastConsonantPosition = SyllabicPosition;
|
|
}
|
|
|
|
Glyph->SyllabicPosition = SyllabicPosition;
|
|
break;
|
|
|
|
case KBTS_INDIC_SYLLABIC_CLASS_VOWEL:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_PLACEHOLDER:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_DOTTED_CIRCLE:
|
|
BaseGlyph = Glyph;
|
|
goto DoneScanningForBase;
|
|
break;
|
|
|
|
case KBTS_INDIC_SYLLABIC_CLASS_HALANT:
|
|
if(LastClass == KBTS_INDIC_SYLLABIC_CLASS_ZWJ)
|
|
{
|
|
// Explicit half form.
|
|
// Since half forms are always before the base, we can safely stop here.
|
|
goto DoneScanningForBase;
|
|
}
|
|
KBTS__FALLTHROUGH;
|
|
case KBTS_INDIC_SYLLABIC_CLASS_NUKTA:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_ZWJ:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_ZWNJ:
|
|
// @Incomplete: Register Shifter
|
|
Glyph->SyllabicPosition = SyllabicPosition;
|
|
break;
|
|
}
|
|
|
|
LastClass = Class;
|
|
if(Glyph == OnePastReph)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
DoneScanningForBase:;
|
|
}
|
|
|
|
// Fix reph position now.
|
|
if(OnePastReph != FirstGlyph)
|
|
{
|
|
kbts__syllabic_position RephPosition = KBTS__SYLLABIC_POSITION_RA_TO_BECOME_REPH;
|
|
kbts_glyph_flags Flags = RephFlags;
|
|
kbts_un RephGlyphCount = OnePastRephIndex;
|
|
if(BaseGlyph == OnePastLastSyllableGlyph)
|
|
{
|
|
RephPosition = KBTS__SYLLABIC_POSITION_SYLLABLE_BASE;
|
|
Flags = 0;
|
|
|
|
BaseGlyph = OnePastReph = FirstGlyph;
|
|
}
|
|
|
|
KBTS__FOR(GlyphIndex, 0, RephGlyphCount)
|
|
{
|
|
kbts_glyph *RephGlyph = FirstGlyphs[GlyphIndex];
|
|
RephGlyph->SyllabicPosition = RephPosition;
|
|
RephGlyph->Flags |= Flags;
|
|
}
|
|
}
|
|
|
|
if(BaseGlyph != OnePastLastSyllableGlyph)
|
|
{
|
|
BaseGlyph->SyllabicPosition = KBTS__SYLLABIC_POSITION_SYLLABLE_BASE;
|
|
|
|
if(!LastConsonant)
|
|
{
|
|
LastConsonant = BaseGlyph;
|
|
// LastConsonantPosition is already set to SYLLABLE_BASE.
|
|
}
|
|
}
|
|
|
|
{ // Reorder marks.
|
|
// @Cleanup @Speed: Supposedly, NORMALIZE already does this...
|
|
kbts_glyph *ReorderGlyph = OnePastLastSyllableGlyph->Prev;
|
|
while(ReorderGlyph != OneBeforeSyllableGlyph)
|
|
{
|
|
if(ReorderGlyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_NUKTA)
|
|
{
|
|
kbts_glyph *Prev = ReorderGlyph->Prev;
|
|
|
|
while((Prev != OneBeforeSyllableGlyph) &&
|
|
KBTS__IN_SET(Prev->SyllabicClass, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_HALANT)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_VEDIC_SIGN))))
|
|
{
|
|
kbts_glyph *NextPrev = Prev->Prev;
|
|
|
|
KBTS__DLLIST_SWAP(Prev, Prev->Next);
|
|
|
|
Prev = NextPrev;
|
|
}
|
|
|
|
ReorderGlyph = Prev;
|
|
}
|
|
else
|
|
{
|
|
ReorderGlyph = ReorderGlyph->Prev;
|
|
}
|
|
}
|
|
}
|
|
|
|
{ // @Temporary @Cleanup
|
|
// Left matras should be ordered backwards.
|
|
// We want to bake this ordering into our sort, so we increase our syllabic position bits
|
|
// and sub-order matras with the low nibble. (There should only be 4 matras tops, anyway.)
|
|
kbts_un LeftMatraCount = 0;
|
|
for(Glyph = OneBeforeSyllableGlyph->Next;
|
|
Glyph != OnePastLastSyllableGlyph;
|
|
Glyph = Glyph->Next)
|
|
{
|
|
kbts_un SyllabicPosition = Glyph->SyllabicPosition;
|
|
|
|
SyllabicPosition <<= 4;
|
|
|
|
if(SyllabicPosition == (KBTS__SYLLABIC_POSITION_PREBASE_MATRA << 4))
|
|
{
|
|
SyllabicPosition += (15 - LeftMatraCount++) & 0xF;
|
|
}
|
|
|
|
Glyph->SyllabicPosition = (kbts_u8)SyllabicPosition;
|
|
}
|
|
}
|
|
|
|
{ // Attach stuff to the right of consonants/matras.
|
|
// Pre-base consonants, the base consonant, and matras all have right attachments,
|
|
// while post-base consonants have left attachments.
|
|
// Since matras always come after all consonants, we try to separate the buffer into three parts:
|
|
// a pre-base+base part (right attachments), a post-base consonant part (left attachments), and
|
|
// a post-consonant part (right attachments again).
|
|
// This part handles right attachments. Left attachments were handled in the base syllable search.
|
|
kbts__attach_state States[2] = {
|
|
{
|
|
KBTS__SYLLABIC_POSITION_RA_TO_BECOME_REPH << 4,
|
|
KBTS__SYLLABIC_POSITION_RA_TO_BECOME_REPH << 4,
|
|
KBTS_INDIC_SYLLABIC_CLASS_COUNT,
|
|
OnePastReph,
|
|
BaseGlyph,
|
|
OnePastReph,
|
|
},
|
|
{
|
|
(kbts_u8)(LastConsonantPosition << 4),
|
|
(kbts_u8)(LastConsonantPosition << 4),
|
|
KBTS_INDIC_SYLLABIC_CLASS_COUNT,
|
|
LastConsonant ? LastConsonant->Next : OnePastLastSyllableGlyph,
|
|
OnePastLastSyllableGlyph,
|
|
LastConsonant ? LastConsonant->Next : OnePastLastSyllableGlyph,
|
|
},
|
|
};
|
|
for(;;)
|
|
{
|
|
int Done = 1;
|
|
|
|
KBTS__FOR(StateIndex, 0, KBTS__ARRAY_LENGTH(States))
|
|
{
|
|
kbts__attach_state *Attach = &States[StateIndex];
|
|
|
|
if(Attach->At != Attach->OnePastLast)
|
|
{
|
|
Glyph = Attach->At;
|
|
|
|
kbts_indic_syllabic_class Class = Glyph->SyllabicClass;
|
|
switch(Class)
|
|
{
|
|
case KBTS_INDIC_SYLLABIC_CLASS_CONSONANT:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_RA:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_WITH_STACKER:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_MEDIAL:
|
|
// This only happens in the pre-base state.
|
|
Glyph->SyllabicPosition = (KBTS__SYLLABIC_POSITION_PREBASE_CONSONANT << 4);
|
|
Attach->CurrentPosition = (KBTS__SYLLABIC_POSITION_PREBASE_CONSONANT << 4);
|
|
break;
|
|
|
|
case KBTS_INDIC_SYLLABIC_CLASS_MATRA_POST:
|
|
// This specific category (which is composed of a single character) may come after
|
|
// a syllable modifier in a sequence like Consonant-SyllableModifier-MatraPost.
|
|
// In this very particular case (!), the syllable modifier is attached _to the matra_,
|
|
// and not to the consonant.
|
|
if(Attach->LastClass == KBTS_INDIC_SYLLABIC_CLASS_SYLLABLE_MODIFIER)
|
|
{
|
|
Glyph->Prev->SyllabicPosition = Glyph->SyllabicPosition;
|
|
}
|
|
KBTS__FALLTHROUGH;
|
|
case KBTS_INDIC_SYLLABIC_CLASS_MATRA:
|
|
Attach->CurrentPosition = Glyph->SyllabicPosition;
|
|
if((Attach->CurrentPosition >> 4) != KBTS__SYLLABIC_POSITION_PREBASE_MATRA)
|
|
{
|
|
Attach->LastPositionThatWasNotPreBaseMatra = Attach->CurrentPosition;
|
|
}
|
|
break;
|
|
|
|
case KBTS_INDIC_SYLLABIC_CLASS_HALANT:
|
|
if((Attach->CurrentPosition >> 4) == KBTS__SYLLABIC_POSITION_PREBASE_MATRA)
|
|
{
|
|
// Uniscribe does not reorder halants with pre-base matras. Not sure why.
|
|
Glyph->SyllabicPosition = Attach->LastPositionThatWasNotPreBaseMatra;
|
|
break;
|
|
}
|
|
KBTS__FALLTHROUGH;
|
|
case KBTS_INDIC_SYLLABIC_CLASS_NUKTA:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_ZWJ:
|
|
case KBTS_INDIC_SYLLABIC_CLASS_ZWNJ:
|
|
// @Incomplete: Register Shifter
|
|
Glyph->SyllabicPosition = Attach->CurrentPosition;
|
|
break;
|
|
}
|
|
|
|
Attach->LastClass = Class;
|
|
Attach->At = Glyph->Next;
|
|
Done = 0;
|
|
}
|
|
}
|
|
|
|
if(Done)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
{ // Do the sort!
|
|
// NOTE: It is important that we sort _now_, because some characters will be reordered across the base from
|
|
// where they started, which can change which features will apply to them.
|
|
KBTS__DLLIST_SORT(OneBeforeSyllableGlyph->Next, OnePastLastSyllableGlyph, SyllabicPosition);
|
|
|
|
#ifdef KBTS_SANITY_CHECK
|
|
{
|
|
kbts_glyph *Glyph0 = OneBeforeSyllableGlyph->Next;
|
|
if(Glyph0 != OnePastLastSyllableGlyph)
|
|
{
|
|
for(kbts_glyph *Glyph1 = Glyph0->Next;
|
|
kbts__GlyphIsValid(C, Glyph1);
|
|
Glyph1 = Glyph1->Next)
|
|
{
|
|
if(Glyph1 != OnePastLastSyllableGlyph)
|
|
{
|
|
KBTS_ASSERT(Glyph0->SyllabicPosition <= Glyph1->SyllabicPosition);
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
|
|
// @Temporary @Cleanup
|
|
// Revert our syllabic position shift for now.
|
|
for(Glyph = OneBeforeSyllableGlyph->Next;
|
|
Glyph != OnePastLastSyllableGlyph;
|
|
Glyph = Glyph->Next)
|
|
{
|
|
Glyph->SyllabicPosition >>= 4;
|
|
}
|
|
|
|
// This is what Harfbuzz does:
|
|
|
|
// - NUKT, AKHN, RKRF, VATU, CJCT are active for all characters, but they count ZWJ/ZWNJ in their sequence
|
|
// lookups.
|
|
// - Note that, by default, Harfbuzz skips ZWJ/ZWNJ in sequence lookups, and selectively disables it for CJCT.
|
|
// - Anyway, since these are active for all characters, we don't need flags for them.
|
|
|
|
// (RPHF was already handled before sorting.)
|
|
|
|
{ // All pre-base glyphs get HALF, which is then selectively disabled in front of ZWNJs.
|
|
kbts_glyph_flags BaseFlags = 0;
|
|
if(!Config->IndicScriptProperties.BlwfPostOnly)
|
|
{
|
|
BaseFlags = KBTS_GLYPH_FLAG_BLWF;
|
|
}
|
|
|
|
kbts_indic_syllabic_class LastClass = 0;
|
|
for(Glyph = BaseGlyph->Prev;
|
|
Glyph != OneBeforeSyllableGlyph;
|
|
Glyph = Glyph->Prev)
|
|
{
|
|
kbts_glyph_flags Flags = BaseFlags;
|
|
|
|
if(LastClass != KBTS_INDIC_SYLLABIC_CLASS_ZWNJ)
|
|
{
|
|
Flags |= KBTS_GLYPH_FLAG_HALF;
|
|
}
|
|
|
|
Glyph->Flags |= Flags;
|
|
LastClass = Glyph->SyllabicClass;
|
|
}
|
|
}
|
|
|
|
// All post-base glyphs get BLWF, ABVF, PSTF. Some get PREF.
|
|
kbts_glyph Scratch[2];
|
|
KBTS_MEMSET(Scratch, 0, sizeof(Scratch));
|
|
kbts_glyph *LastGlyph; LastGlyph = 0;
|
|
for(Glyph = BaseGlyph->Next;
|
|
Glyph != OnePastLastSyllableGlyph;
|
|
Glyph = Glyph->Next)
|
|
{
|
|
// It is tempting to apply PREF to every glyph after the base.
|
|
// However, the PREF flag is also used to find the syllable base again in EndCluster,
|
|
// so we have to be precise with it.
|
|
Scratch[1] = *Glyph;
|
|
if(kbts__WouldSubstitute(Scratchpad, Config, Storage, LookupList, Frames, Pref, 0, Scratch, 2))
|
|
{
|
|
LastGlyph->Flags |= KBTS_GLYPH_FLAG_PREF;
|
|
Glyph->Flags |= KBTS_GLYPH_FLAG_PREF;
|
|
}
|
|
|
|
Glyph->Flags |= (KBTS_GLYPH_FLAG_BLWF | KBTS_GLYPH_FLAG_ABVF | KBTS_GLYPH_FLAG_PSTF);
|
|
Scratch[0] = Scratch[1];
|
|
LastGlyph = Glyph;
|
|
}
|
|
|
|
// The base only inherits stuff after it, up to whatever and not including what was grabbed by
|
|
// post-base consonants.
|
|
if(BaseGlyph != OnePastLastSyllableGlyph)
|
|
{
|
|
BaseGlyph->SyllabicPosition = KBTS__SYLLABIC_POSITION_SYLLABLE_BASE;
|
|
|
|
kbts_u64 Classes = (1ull << KBTS_INDIC_SYLLABIC_CLASS_HALANT) |
|
|
(1ull << KBTS_INDIC_SYLLABIC_CLASS_VEDIC_SIGN) |
|
|
(1ull << KBTS_INDIC_SYLLABIC_CLASS_NUKTA) |
|
|
(1ull << KBTS_INDIC_SYLLABIC_CLASS_ZWJ) |
|
|
(1ull << KBTS_INDIC_SYLLABIC_CLASS_ZWNJ);
|
|
|
|
kbts_glyph *Next = BaseGlyph->Next;
|
|
while((Next != OnePastLastSyllableGlyph) &&
|
|
(Next->SyllabicPosition < KBTS__SYLLABIC_POSITION_SYLLABLE_BASE) &&
|
|
((1ull << Next->SyllabicClass) & Classes))
|
|
{
|
|
Next->SyllabicPosition = KBTS__SYLLABIC_POSITION_SYLLABLE_BASE;
|
|
|
|
Next = Next->Next;
|
|
}
|
|
}
|
|
|
|
Result = OnePastLastSyllableGlyph;
|
|
Scratchpad->RealCluster = 1;
|
|
}
|
|
} break;
|
|
|
|
case KBTS_SHAPER_USE:
|
|
{
|
|
int NonCluster = 0;
|
|
while(kbts__GlyphIsValid(Storage, Glyph) &&
|
|
((Glyph->UseClass == KBTS_USE_SYLLABIC_CLASS_OTHER) ||
|
|
(Glyph->UseClass == KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_MOD_POST)))
|
|
{
|
|
NonCluster = 1;
|
|
|
|
Glyph = Glyph->Next;
|
|
}
|
|
|
|
if(!NonCluster)
|
|
{
|
|
// Parse a real cluster.
|
|
kbts_u8 State = 0;
|
|
|
|
kbts_glyph *StartGlyph = Glyph;
|
|
while(kbts__GlyphIsValid(Storage, Glyph) &&
|
|
(State < KBTS_USE_STATE_s0))
|
|
{
|
|
if(Glyph->UseClass < KBTS_USE_SYLLABIC_CLASS_COUNT)
|
|
{
|
|
State = kbts_UseTransition[Glyph->UseClass][State];
|
|
// @Incomplete: Remove this!!!
|
|
State -= 1;
|
|
Glyph = Glyph->Next;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(State >= KBTS_USE_STATE_s0)
|
|
{
|
|
Glyph = Glyph->Prev;
|
|
}
|
|
if(kbts__GlyphIsValid(Storage, Glyph) &&
|
|
(Glyph->UseClass == KBTS_USE_SYLLABIC_CLASS_ZWNJ))
|
|
{
|
|
Glyph = Glyph->Next;
|
|
}
|
|
if(Glyph == StartGlyph)
|
|
{
|
|
Glyph = Glyph->Next;
|
|
}
|
|
|
|
Scratchpad->RealCluster = 1;
|
|
}
|
|
|
|
Result = Glyph;
|
|
} break;
|
|
|
|
case KBTS_SHAPER_KHMER:
|
|
{
|
|
int NonCluster = 0;
|
|
while(kbts__GlyphIsValid(Storage, Glyph) &&
|
|
((Glyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_OTHER) ||
|
|
(Glyph->SyllabicClass >= KBTS_KHMER_SYLLABIC_CLASS_COUNT)))
|
|
{
|
|
Glyph = Glyph->Next;
|
|
NonCluster = 1;
|
|
}
|
|
|
|
Result = Glyph;
|
|
|
|
if(!NonCluster)
|
|
{
|
|
kbts_u8 State = 0;
|
|
kbts_glyph *FirstGlyph = Glyph;
|
|
kbts_glyph *OneBeforeSyllableGlyph = Glyph->Prev;
|
|
|
|
while(kbts__GlyphIsValid(Storage, Glyph) &&
|
|
(State < KBTS_KHMER_SYLLABIC_STATE_COUNT))
|
|
{
|
|
kbts_indic_syllabic_class Class = Glyph->SyllabicClass;
|
|
|
|
if(Class < KBTS_KHMER_SYLLABIC_CLASS_COUNT)
|
|
{
|
|
State = kbts_KhmerSyllabicTransition[Class][State];
|
|
// @Incomplete: Remove this!
|
|
State -= 1;
|
|
Glyph = Glyph->Next;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(State >= KBTS_KHMER_SYLLABIC_STATE_COUNT)
|
|
{
|
|
Glyph = Glyph->Prev;
|
|
}
|
|
if(Glyph == FirstGlyph)
|
|
{
|
|
Glyph = Glyph->Next;
|
|
}
|
|
|
|
kbts_glyph *OnePastLastSyllableGlyph = Glyph;
|
|
|
|
if(Config->DottedCircle.Id &&
|
|
!KBTS__IN_SET64(FirstGlyph->SyllabicClass, KBTS__SET64((KBTS_INDIC_SYLLABIC_CLASS_CONSONANT)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_RA)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_VOWEL)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_DOTTED_CIRCLE)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_PLACEHOLDER))))
|
|
{
|
|
// Broken cluster.
|
|
// Insert a dotted circle.
|
|
kbts_glyph *NewFirstGlyph = kbts__InsertGlyphBefore(Storage, FirstGlyph, &Config->DottedCircle);
|
|
if(!NewFirstGlyph)
|
|
{
|
|
goto OutOfMemory;
|
|
}
|
|
|
|
NewFirstGlyph->UserIdOrCodepointIndex = FirstGlyph->UserIdOrCodepointIndex;
|
|
FirstGlyph = NewFirstGlyph;
|
|
}
|
|
|
|
// In Khmer, the first glyph is always the base.
|
|
|
|
kbts_glyph *PreBaseGlyphs[3];
|
|
int SawHalantRa = 0;
|
|
kbts_un PreBaseGlyphCount = 0;
|
|
kbts_un Classes = 0;
|
|
|
|
kbts_u32 AddFlags = KBTS_GLYPH_FLAG_ABVF | KBTS_GLYPH_FLAG_BLWF | KBTS_GLYPH_FLAG_PSTF;
|
|
|
|
kbts_glyph *LastGlyph = OnePastLastSyllableGlyph;
|
|
for(Glyph = OnePastLastSyllableGlyph->Prev;
|
|
Glyph != OneBeforeSyllableGlyph;
|
|
Glyph = Glyph->Prev)
|
|
{
|
|
kbts_indic_syllabic_class Class = Glyph->SyllabicClass;
|
|
|
|
if(Glyph == FirstGlyph)
|
|
{
|
|
AddFlags = 0;
|
|
}
|
|
|
|
Glyph->Flags |= AddFlags;
|
|
|
|
Classes = ((Classes << 8) | Class) & 0xFFFF;
|
|
|
|
if(Class == KBTS_INDIC_SYLLABIC_CLASS_VOWEL_PRE)
|
|
{
|
|
PreBaseGlyphs[PreBaseGlyphCount++] = Glyph;
|
|
}
|
|
else if(!SawHalantRa && (Classes == (KBTS_INDIC_SYLLABIC_CLASS_HALANT | (KBTS_INDIC_SYLLABIC_CLASS_RA << 8))))
|
|
{
|
|
Glyph->Flags |= KBTS_GLYPH_FLAG_PREF;
|
|
LastGlyph->Flags |= KBTS_GLYPH_FLAG_PREF;
|
|
|
|
PreBaseGlyphs[PreBaseGlyphCount++] = Glyph;
|
|
PreBaseGlyphs[PreBaseGlyphCount++] = LastGlyph;
|
|
|
|
// All of the glyphs written so far need to be flagged with cfar.
|
|
// @Speed: Detect the Halant-Ra sequence in the FSM loop.
|
|
for(kbts_glyph *PostRaGlyph = LastGlyph->Next;
|
|
PostRaGlyph != OnePastLastSyllableGlyph;
|
|
PostRaGlyph = PostRaGlyph->Next)
|
|
{
|
|
PostRaGlyph->Flags |= KBTS_GLYPH_FLAG_CFAR;
|
|
}
|
|
|
|
SawHalantRa = 1;
|
|
}
|
|
|
|
LastGlyph = Glyph;
|
|
}
|
|
|
|
while(PreBaseGlyphCount)
|
|
{
|
|
kbts_glyph *PreBaseGlyph = PreBaseGlyphs[--PreBaseGlyphCount];
|
|
KBTS__DLLIST_REMOVE(PreBaseGlyph);
|
|
KBTS__DLLIST_INSERT_AFTER(PreBaseGlyph, OneBeforeSyllableGlyph);
|
|
}
|
|
|
|
Result = OnePastLastSyllableGlyph;
|
|
}
|
|
} break;
|
|
|
|
case KBTS_SHAPER_MYANMAR:
|
|
{
|
|
int NonCluster = 0;
|
|
while(kbts__GlyphIsValid(Storage, Glyph) &&
|
|
((Glyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_OTHER) ||
|
|
(Glyph->SyllabicClass >= KBTS_MYANMAR_SYLLABIC_CLASS_COUNT)))
|
|
{
|
|
NonCluster = 1;
|
|
Glyph = Glyph->Next;
|
|
}
|
|
|
|
if(!NonCluster)
|
|
{
|
|
kbts_u8 State = 0;
|
|
kbts_glyph *FirstGlyph = Glyph;
|
|
while(kbts__GlyphIsValid(Storage, Glyph) &&
|
|
(State < KBTS_MYANMAR_SYLLABIC_STATE_COUNT))
|
|
{
|
|
kbts_indic_syllabic_class Class = Glyph->SyllabicClass;
|
|
|
|
if(Class < KBTS_MYANMAR_SYLLABIC_CLASS_COUNT)
|
|
{
|
|
State = kbts_MyanmarSyllabicTransition[Class][State];
|
|
// @Incomplete: Remove this!
|
|
State -= 1;
|
|
|
|
Glyph = Glyph->Next;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(State >= KBTS_MYANMAR_SYLLABIC_STATE_COUNT)
|
|
{
|
|
Glyph = Glyph->Prev;
|
|
}
|
|
if(Glyph == FirstGlyph)
|
|
{
|
|
Glyph = Glyph->Next;
|
|
}
|
|
|
|
Scratchpad->RealCluster = 1;
|
|
}
|
|
|
|
Result = Glyph;
|
|
} break;
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
OutOfMemory:;
|
|
Scratchpad->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__EndCluster(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage)
|
|
{
|
|
kbts_shape_config *Config = Scratchpad->Config;
|
|
|
|
switch(Config->Shaper)
|
|
{
|
|
case KBTS_SHAPER_INDIC:
|
|
if(kbts__GlyphIsValid(Storage, Storage->GlyphSentinel.Next))
|
|
{
|
|
// Final syllable reordering.
|
|
// We are just copying Harfbuzz here, because I've read all the documentation I can and, frankly, I have no idea.
|
|
kbts__feature *Pref = Config->Pref;
|
|
|
|
kbts_u32 ViramaId = Config->Virama.Id;
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
// Harfbuzz tests for (ligated | multiplied) here.
|
|
// I don't really get why, because, supposedly, all viramas should be
|
|
// classified as halants regardless.
|
|
if(ViramaId && (Glyph->Id == ViramaId))
|
|
{
|
|
Glyph->SyllabicClass = KBTS_INDIC_SYLLABIC_CLASS_HALANT;
|
|
Glyph->Flags &= ~(KBTS_GLYPH_FLAG_LIGATURE | KBTS_GLYPH_FLAG_MULTIPLE_SUBSTITUTION);
|
|
}
|
|
else if(Glyph->Flags & KBTS_GLYPH_FLAG_LIGATURE)
|
|
{
|
|
// We can't know the syllabic classes of ligatures for sure.
|
|
Glyph->SyllabicClass = KBTS_INDIC_SYLLABIC_CLASS_COUNT;
|
|
}
|
|
}
|
|
|
|
// Locate the syllable base.
|
|
kbts_glyph *BaseGlyph = (kbts_glyph *)&Storage->GlyphSentinel;
|
|
{
|
|
kbts_glyph *AfterPreBase = Storage->GlyphSentinel.Next;
|
|
while(kbts__GlyphIsValid(Storage, AfterPreBase) &&
|
|
(AfterPreBase->SyllabicPosition < KBTS__SYLLABIC_POSITION_SYLLABLE_BASE))
|
|
{
|
|
AfterPreBase = AfterPreBase->Next;
|
|
}
|
|
|
|
if(kbts__GlyphIsValid(Storage, AfterPreBase))
|
|
{
|
|
BaseGlyph = AfterPreBase;
|
|
|
|
if(Pref && kbts__GlyphIsValid(Storage, AfterPreBase->Next))
|
|
{
|
|
// If we find a pre-base-reordering ra, then the base is probably right after it!
|
|
kbts_glyph *AtGlyph = AfterPreBase->Next;
|
|
while(kbts__GlyphIsValid(Storage, AtGlyph) &&
|
|
!(AtGlyph->Flags & KBTS_GLYPH_FLAG_PREF))
|
|
{
|
|
AtGlyph = AtGlyph->Next;
|
|
}
|
|
|
|
// If we are not a consonant, then we are attached to a consonant.
|
|
// If we are a pref-able consonant, but we did not form a pref, then we should be right after the base.
|
|
// Either way, we are very close to the base.
|
|
kbts_glyph *Prefable = AtGlyph; // Read like "pref-able". :)
|
|
if(kbts__GlyphIsValid(Storage, Prefable) &&
|
|
(!(Prefable->Flags & KBTS_GLYPH_FLAG_GENERATED_BY_GSUB) ||
|
|
!(Prefable->Flags & KBTS_GLYPH_FLAG_LIGATURE) ||
|
|
(Prefable->Flags & KBTS_GLYPH_FLAG_MULTIPLE_SUBSTITUTION)))
|
|
{
|
|
while(kbts__GlyphIsValid(Storage, Prefable) &&
|
|
(Prefable->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_HALANT))
|
|
{
|
|
Prefable = Prefable->Next;
|
|
}
|
|
|
|
if(kbts__GlyphIsValid(Storage, Prefable))
|
|
{
|
|
Prefable->SyllabicPosition = KBTS__SYLLABIC_POSITION_SYLLABLE_BASE;
|
|
BaseGlyph = Prefable;
|
|
// Fall through to the Malayalam test.
|
|
}
|
|
}
|
|
}
|
|
|
|
if(Config->Script == KBTS_SCRIPT_MALAYALAM)
|
|
{
|
|
// In Malayalam, the base is after below-base forms.
|
|
// (We actually just give all below-base forms the base pos.)
|
|
// @Speed: This would be way simpler with a null sentinel at the end of Glyphs!
|
|
kbts_glyph *AtGlyph = BaseGlyph->Next;
|
|
while(kbts__GlyphIsValid(Storage, AtGlyph))
|
|
{
|
|
while(kbts__GlyphIsValid(Storage, AtGlyph) &&
|
|
KBTS__IN_SET(AtGlyph->SyllabicClass, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_ZWJ)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_ZWNJ))))
|
|
{
|
|
AtGlyph = AtGlyph->Next;
|
|
}
|
|
|
|
if(kbts__GlyphIsValid(Storage, AtGlyph) &&
|
|
(AtGlyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_HALANT))
|
|
{
|
|
AtGlyph = AtGlyph->Next;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
|
|
while(kbts__GlyphIsValid(Storage, AtGlyph) &&
|
|
KBTS__IN_SET(AtGlyph->SyllabicClass, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_ZWJ)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_ZWNJ))))
|
|
{
|
|
AtGlyph = AtGlyph->Next;
|
|
}
|
|
|
|
if(kbts__GlyphIsValid(Storage, AtGlyph))
|
|
{
|
|
if(kbts__SyllabicClassIsConsonant(AtGlyph->SyllabicClass) &&
|
|
(AtGlyph->SyllabicPosition == KBTS__SYLLABIC_POSITION_BELOWBASE_CONSONANT))
|
|
{
|
|
AtGlyph->SyllabicPosition = KBTS__SYLLABIC_POSITION_SYLLABLE_BASE;
|
|
BaseGlyph = AtGlyph;
|
|
// Do not break; keep matching below-base forms.
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(kbts__GlyphIsValid(Storage, BaseGlyph) &&
|
|
kbts__GlyphIsValid(Storage, BaseGlyph->Prev) &&
|
|
(BaseGlyph->SyllabicPosition > KBTS__SYLLABIC_POSITION_SYLLABLE_BASE))
|
|
{
|
|
BaseGlyph = BaseGlyph->Prev;
|
|
}
|
|
|
|
if(!kbts__GlyphIsValid(Storage, BaseGlyph) &&
|
|
(BaseGlyph->Prev->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_ZWJ))
|
|
{
|
|
BaseGlyph = BaseGlyph->Prev;
|
|
}
|
|
|
|
if(kbts__GlyphIsValid(Storage, BaseGlyph))
|
|
{
|
|
while(kbts__GlyphIsValid(Storage, BaseGlyph->Prev) &&
|
|
KBTS__IN_SET(BaseGlyph->SyllabicClass, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_NUKTA)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_HALANT))))
|
|
{
|
|
BaseGlyph = BaseGlyph->Prev;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Reorder matras.
|
|
if(kbts__GlyphIsValid(Storage, BaseGlyph->Prev) &&
|
|
(Storage->GlyphSentinel.Prev != Storage->GlyphSentinel.Next) /* GlyphCount > 1 */)
|
|
{
|
|
kbts_glyph *FirstGlyph = Storage->GlyphSentinel.Next;
|
|
kbts_glyph *To = BaseGlyph->Prev;
|
|
if(!kbts__GlyphIsValid(Storage, BaseGlyph))
|
|
{
|
|
To = To->Prev;
|
|
}
|
|
|
|
if((Config->Script != KBTS_SCRIPT_MALAYALAM) && (Config->Script != KBTS_SCRIPT_TAMIL))
|
|
{
|
|
kbts_glyph *LastGlyph = To->Next;
|
|
|
|
for(;;)
|
|
{
|
|
while((To != FirstGlyph) &&
|
|
!KBTS__IN_SET(To->SyllabicClass, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_MATRA)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_MATRA_POST)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_HALANT))))
|
|
{
|
|
LastGlyph = To;
|
|
To = To->Prev;
|
|
}
|
|
|
|
if((To->SyllabicClass != KBTS_INDIC_SYLLABIC_CLASS_HALANT) ||
|
|
(To->SyllabicPosition == KBTS__SYLLABIC_POSITION_PREBASE_MATRA))
|
|
{
|
|
// We have nothing to move.
|
|
To = FirstGlyph;
|
|
|
|
break;
|
|
}
|
|
else if((To != FirstGlyph) &&
|
|
kbts__GlyphIsValid(Storage, LastGlyph) &&
|
|
(LastGlyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_ZWJ))
|
|
{
|
|
// Zwj+Halant cancels matra movement when the Halant is not attached to the matra.
|
|
To = To->Prev;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
if((To != FirstGlyph) &&
|
|
(To->SyllabicPosition != KBTS__SYLLABIC_POSITION_PREBASE_MATRA))
|
|
{
|
|
for(kbts_glyph *Matra = To->Prev;
|
|
kbts__GlyphIsValid(Storage, Matra);
|
|
)
|
|
{
|
|
kbts_glyph *MatraPrev = Matra->Prev;
|
|
|
|
if(Matra->SyllabicPosition == KBTS__SYLLABIC_POSITION_PREBASE_MATRA)
|
|
{
|
|
KBTS__DLLIST_REMOVE(Matra);
|
|
KBTS__DLLIST_INSERT_AFTER(Matra, To);
|
|
|
|
To = Matra->Prev;
|
|
}
|
|
|
|
Matra = MatraPrev;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Reorder reph.
|
|
// We should only reorder reph when it is a single Repha glyph, and not a Ra sequence.
|
|
kbts_glyph *First = Storage->GlyphSentinel.Next;
|
|
kbts_glyph *Second = First->Next;
|
|
if((First->SyllabicPosition == KBTS__SYLLABIC_POSITION_RA_TO_BECOME_REPH) &&
|
|
kbts__GlyphIsValid(Storage, Second) &&
|
|
(Second->SyllabicPosition != KBTS__SYLLABIC_POSITION_RA_TO_BECOME_REPH))
|
|
{
|
|
kbts__reph_position RephPosition = Config->IndicScriptProperties.RephPosition;
|
|
kbts_glyph *To = 0;
|
|
|
|
for(kbts_glyph *Glyph = First;
|
|
Glyph != BaseGlyph;
|
|
)
|
|
{
|
|
kbts_glyph *Next = Glyph->Next;
|
|
|
|
if(Glyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_HALANT)
|
|
{
|
|
To = Glyph;
|
|
|
|
if(Next != BaseGlyph)
|
|
{
|
|
kbts_u8 NextClass = Next->SyllabicClass;
|
|
|
|
if((NextClass == KBTS_INDIC_SYLLABIC_CLASS_ZWJ) ||
|
|
(NextClass == KBTS_INDIC_SYLLABIC_CLASS_ZWNJ))
|
|
{
|
|
To = Next;
|
|
}
|
|
}
|
|
|
|
break;
|
|
}
|
|
|
|
Glyph = Next;
|
|
}
|
|
|
|
if(!To)
|
|
{
|
|
// @Cleanup: We can merge these loops.
|
|
if(RephPosition == KBTS__REPH_POSITION_AFTER_SUBJOINED)
|
|
{
|
|
for(kbts_glyph *Glyph = BaseGlyph;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
Glyph = Glyph->Next)
|
|
{
|
|
kbts_u8 SyllabicPosition = Glyph->SyllabicPosition;
|
|
|
|
if(KBTS__IN_SET(SyllabicPosition, KBTS__SET32((KBTS__SYLLABIC_POSITION_POSTBASE_CONSONANT)
|
|
(KBTS__SYLLABIC_POSITION_AFTER_POST)
|
|
(KBTS__SYLLABIC_POSITION_SMVD))))
|
|
{
|
|
To = Glyph->Prev;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if(RephPosition == KBTS__REPH_POSITION_AFTER_MAIN)
|
|
{
|
|
for(kbts_glyph *Glyph = BaseGlyph;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
Glyph = Glyph->Next)
|
|
{
|
|
if(Glyph->SyllabicPosition > KBTS__SYLLABIC_POSITION_AFTER_MAIN)
|
|
{
|
|
To = Glyph->Prev;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(!To)
|
|
{
|
|
// As a fallback, move reph to the end of the syllable.
|
|
for(kbts_glyph *Glyph = Storage->GlyphSentinel.Prev;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
Glyph = Glyph->Prev)
|
|
{
|
|
if(Glyph->SyllabicPosition != KBTS__SYLLABIC_POSITION_SMVD)
|
|
{
|
|
To = Glyph;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
// Matras will still come after reph.
|
|
kbts_glyph *Glyph = To;
|
|
if(Glyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_HALANT)
|
|
{
|
|
for(kbts_glyph *Matra = BaseGlyph->Next;
|
|
Matra != To;
|
|
Matra = Matra->Next)
|
|
{
|
|
kbts_u8 Class = Matra->SyllabicClass;
|
|
|
|
if(KBTS__IN_SET(Class, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_MATRA)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_MATRA_POST)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_MEDIAL))))
|
|
{
|
|
To = To->Prev;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(To &&
|
|
(First != To))
|
|
{
|
|
// Do the reorder!
|
|
KBTS__DLLIST_REMOVE(First);
|
|
KBTS__DLLIST_INSERT_AFTER(First, To);
|
|
}
|
|
}
|
|
|
|
// Reorder pre-base-reordering consonants.
|
|
if(Pref)
|
|
{
|
|
First = Storage->GlyphSentinel.Next;
|
|
kbts_glyph *PrefGlyph = 0;
|
|
|
|
for(kbts_glyph *Glyph = BaseGlyph->Next;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
Glyph = Glyph->Next)
|
|
{
|
|
if(Glyph->Flags & KBTS_GLYPH_FLAG_PREF)
|
|
{
|
|
PrefGlyph = Glyph;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(PrefGlyph)
|
|
{
|
|
// Harfbuzz says the ideal is to check that this glyph was generated by the pref feature specifically,
|
|
// but then just uses a generic flag like this.
|
|
// The ideal solution would not be very difficult to implement!
|
|
if(PrefGlyph->Flags & KBTS_GLYPH_FLAG_GENERATED_BY_GSUB)
|
|
{
|
|
kbts_glyph *To = First;
|
|
|
|
kbts_glyph *Last = BaseGlyph;
|
|
for(kbts_glyph *Glyph = BaseGlyph->Prev;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
Glyph = Glyph->Prev)
|
|
{
|
|
kbts_u8 Class = Glyph->SyllabicClass;
|
|
|
|
if(KBTS__IN_SET(Class, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_MATRA)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_MATRA_POST)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_MEDIAL)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_HALANT))))
|
|
{
|
|
To = Last;
|
|
|
|
break;
|
|
}
|
|
|
|
Last = Glyph;
|
|
}
|
|
|
|
if(To != First)
|
|
{
|
|
kbts_glyph *Prev = To->Prev;
|
|
kbts_u8 CurrentClass = To->SyllabicClass;
|
|
|
|
if((Prev->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_HALANT) &&
|
|
KBTS__IN_SET(CurrentClass, KBTS__SET32((KBTS_INDIC_SYLLABIC_CLASS_ZWJ)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_ZWNJ))))
|
|
{
|
|
To = To->Next;
|
|
}
|
|
}
|
|
|
|
// Do the reorder!
|
|
KBTS__DLLIST_REMOVE(PrefGlyph);
|
|
KBTS__DLLIST_INSERT_BEFORE(PrefGlyph, To);
|
|
}
|
|
}
|
|
}
|
|
|
|
{ // Mark matras at the beginning of a word for init application.
|
|
// It is tempting to check for this at the same time as the reph reordering, but glyphs could have been
|
|
// reordered since then and the reordering procedure is clearly defined to happen in sequential steps.
|
|
First = Storage->GlyphSentinel.Next; // I don't think this needs to be reloaded, but you never know.
|
|
|
|
if((First->SyllabicPosition == KBTS__SYLLABIC_POSITION_PREBASE_MATRA) && Scratchpad->ClusterAtStartOfWord)
|
|
{
|
|
First->Flags |= KBTS_GLYPH_FLAG_INIT;
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case KBTS_SHAPER_USE:
|
|
{
|
|
kbts_u64 PostBaseSet = KBTS__SET64((KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_ABOVE) (KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_BELOW)
|
|
(KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_MOD_ABOVE) (KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_MOD_BELOW)
|
|
(KBTS_USE_SYLLABIC_CLASS_CONS_FINAL_MOD_POST) (KBTS_USE_SYLLABIC_CLASS_CONS_MED_ABOVE)
|
|
(KBTS_USE_SYLLABIC_CLASS_CONS_MED_BELOW) (KBTS_USE_SYLLABIC_CLASS_CONS_MED_POST)
|
|
(KBTS_USE_SYLLABIC_CLASS_CONS_MED_PRE) (KBTS_USE_SYLLABIC_CLASS_VOWEL_ABOVE)
|
|
(KBTS_USE_SYLLABIC_CLASS_VOWEL_BELOW) (KBTS_USE_SYLLABIC_CLASS_VOWEL_POST)
|
|
(KBTS_USE_SYLLABIC_CLASS_VOWEL_PRE) (KBTS_USE_SYLLABIC_CLASS_VOWEL_MOD_ABOVE)
|
|
(KBTS_USE_SYLLABIC_CLASS_VOWEL_MOD_BELOW) (KBTS_USE_SYLLABIC_CLASS_VOWEL_MOD_POST)
|
|
(KBTS_USE_SYLLABIC_CLASS_VOWEL_MOD_PRE));
|
|
kbts_u64 HalantSet = KBTS__SET64((KBTS_USE_SYLLABIC_CLASS_HALANT)
|
|
(KBTS_USE_SYLLABIC_CLASS_HALANT_OR_VOWEL_MODIFIER)
|
|
(KBTS_USE_SYLLABIC_CLASS_INVISIBLE_STACKER));
|
|
|
|
// In the reorderings below, we check for halants because that's what Harfbuzz does.
|
|
// Nowhere does Microsoft mention that halants should block reorderings!
|
|
kbts_glyph *Repha = Storage->GlyphSentinel.Next;
|
|
if((Repha->UseClass == KBTS_USE_SYLLABIC_CLASS_REPHA) ||
|
|
(Repha->Flags & KBTS_GLYPH_FLAG_RPHF))
|
|
{
|
|
kbts_glyph *To = Repha->Next;
|
|
for(;
|
|
kbts__GlyphIsValid(Storage, To);
|
|
To = To->Next)
|
|
{
|
|
// Microsoft says that rephas are reordered "after a following full base", which is needlessly vague.
|
|
// Harfbuzz reorders them in front of the first post-base glyph.
|
|
if(KBTS__IN_SET64(To->UseClass, PostBaseSet) ||
|
|
(!(To->Flags & KBTS_GLYPH_FLAG_LIGATURE) &&
|
|
KBTS__IN_SET64(To->UseClass, HalantSet)))
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
KBTS__DLLIST_REMOVE(Repha);
|
|
KBTS__DLLIST_INSERT_BEFORE(Repha, To);
|
|
}
|
|
|
|
{
|
|
// Microsoft says that pre-base vowels and vowel modifiers should be reordered "before the base glyph
|
|
// and, if present, before a pre-base glyph reordered via the 'pref' feature".
|
|
// In practice, we tag 'pref'-generated glyphs with the VOWEL_PRE class so that they get reordered here.
|
|
// Note that the final reordered glyphs end up backwards from their original order.
|
|
kbts_glyph *PreBaseVowels[16]; // @Robustness: How many vowels can there realistically be in a single cluster?
|
|
kbts_un PreBaseVowelCount = 0;
|
|
kbts_u64 SawBase = 0;
|
|
for(kbts_glyph *Glyph = Storage->GlyphSentinel.Prev;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
Glyph = Glyph->Prev)
|
|
{
|
|
SawBase |= KBTS__IN_SET64(Glyph->UseClass, KBTS__SET64((KBTS_USE_SYLLABIC_CLASS_BASE)
|
|
(KBTS_USE_SYLLABIC_CLASS_BASE_OTHER)
|
|
(KBTS_USE_SYLLABIC_CLASS_BASE_NUM)));
|
|
|
|
kbts_u32 Flags = Glyph->Flags;
|
|
// Only accept the first glyphs produced by multiple substitutions.
|
|
if(((Flags & KBTS_GLYPH_FLAG_FIRST_IN_MULTIPLE_SUBSTITUTION) ||
|
|
!(Flags & KBTS_GLYPH_FLAG_MULTIPLE_SUBSTITUTION)) &&
|
|
(KBTS__IN_SET64(Glyph->UseClass, KBTS__SET64((KBTS_USE_SYLLABIC_CLASS_VOWEL_PRE)
|
|
(KBTS_USE_SYLLABIC_CLASS_VOWEL_MOD_PRE))) ||
|
|
(Flags & KBTS_GLYPH_FLAG_PREF)))
|
|
{
|
|
if(PreBaseVowelCount < KBTS__ARRAY_LENGTH(PreBaseVowels))
|
|
{
|
|
PreBaseVowels[PreBaseVowelCount++] = Glyph;
|
|
}
|
|
}
|
|
else if(!(Glyph->Flags & KBTS_GLYPH_FLAG_LIGATURE) &&
|
|
KBTS__IN_SET64(Glyph->UseClass, HalantSet))
|
|
{
|
|
// Reordering stops at halants, apparently.
|
|
// We want to write the vowels in the reverse order they appear in the glyph sequence.
|
|
// Since we are iterating backwards, they already _are_ backwards in the PreBaseVowels array,
|
|
// so there's no need to do anything.
|
|
kbts_glyph *InsertAfter = Glyph;
|
|
KBTS__FOR(PreBaseVowelIndex, 0, PreBaseVowelCount)
|
|
{
|
|
kbts_glyph *PreBaseVowel = PreBaseVowels[PreBaseVowelIndex];
|
|
|
|
KBTS__DLLIST_REMOVE(PreBaseVowel);
|
|
KBTS__DLLIST_INSERT_AFTER(PreBaseVowel, InsertAfter);
|
|
InsertAfter = PreBaseVowel;
|
|
}
|
|
PreBaseVowelCount = 0;
|
|
|
|
// Valid bases only show up before halants.
|
|
SawBase = 0;
|
|
}
|
|
}
|
|
|
|
kbts_glyph *DottedCircleInsertBefore = Storage->GlyphSentinel.Next;
|
|
|
|
{ // Flush the rest of the vowels.
|
|
kbts_glyph *InsertAfter = (kbts_glyph *)&Storage->GlyphSentinel;
|
|
KBTS__FOR(PreBaseVowelIndex, 0, PreBaseVowelCount)
|
|
{
|
|
kbts_glyph *PreBaseVowel = PreBaseVowels[PreBaseVowelIndex];
|
|
|
|
KBTS__DLLIST_REMOVE(PreBaseVowel);
|
|
KBTS__DLLIST_INSERT_AFTER(PreBaseVowel, InsertAfter);
|
|
|
|
InsertAfter = PreBaseVowel;
|
|
}
|
|
}
|
|
|
|
if(Scratchpad->RealCluster && !SawBase && Config->DottedCircle.Id)
|
|
{
|
|
kbts_glyph *DottedCircle = kbts__InsertGlyphBefore(Storage, DottedCircleInsertBefore, &Config->DottedCircle);
|
|
if(!DottedCircle)
|
|
{
|
|
goto OutOfMemory;
|
|
}
|
|
|
|
DottedCircle->UserIdOrCodepointIndex = DottedCircleInsertBefore->UserIdOrCodepointIndex;
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case KBTS_SHAPER_MYANMAR:
|
|
if(Scratchpad->RealCluster)
|
|
{
|
|
kbts_glyph *BaseGlyph = (kbts_glyph *)&Storage->GlyphSentinel;
|
|
kbts_glyph *First = BaseGlyph->Next;
|
|
kbts_glyph *Second = First->Next;
|
|
kbts_glyph *Third = Second->Next;
|
|
kbts_glyph *OnePastReph = First;
|
|
|
|
kbts_un MinimumGlyphCount = 0;
|
|
|
|
if(kbts__GlyphIsValid(Storage, First))
|
|
{
|
|
MinimumGlyphCount += 1;
|
|
|
|
if(kbts__GlyphIsValid(Storage, Second))
|
|
{
|
|
MinimumGlyphCount += 1;
|
|
|
|
if(kbts__GlyphIsValid(Storage, Third))
|
|
{
|
|
MinimumGlyphCount += 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
if((MinimumGlyphCount == 3) &&
|
|
(First->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_RA) &&
|
|
(Second->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_ASAT) &&
|
|
(Third->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_HALANT))
|
|
{
|
|
First->SyllabicPosition = KBTS__SYLLABIC_POSITION_AFTER_MAIN;
|
|
Second->SyllabicPosition = KBTS__SYLLABIC_POSITION_AFTER_MAIN;
|
|
Third->SyllabicPosition = KBTS__SYLLABIC_POSITION_AFTER_MAIN;
|
|
|
|
OnePastReph = Third->Next;
|
|
BaseGlyph = First;
|
|
}
|
|
|
|
kbts_u64 BaseSet = KBTS__SET64((KBTS_INDIC_SYLLABIC_CLASS_CONSONANT)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_CONSONANT_WITH_STACKER)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_RA)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_VOWEL)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_PLACEHOLDER)
|
|
(KBTS_INDIC_SYLLABIC_CLASS_DOTTED_CIRCLE));
|
|
|
|
// Scan for a non-reph base glyph.
|
|
for(kbts_glyph *Glyph = OnePastReph;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
Glyph = Glyph->Next)
|
|
{
|
|
kbts_indic_syllabic_class Class = Glyph->SyllabicClass;
|
|
|
|
if(!kbts__GlyphIsValid(Storage, BaseGlyph) &&
|
|
KBTS__IN_SET64(Class, BaseSet))
|
|
{
|
|
BaseGlyph = Glyph;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
// Otherwise, reph can be the base.
|
|
// @Cleanup: I'm pretty sure this is @Duplication with the reph check above.
|
|
if(!kbts__GlyphIsValid(Storage, BaseGlyph) &&
|
|
(OnePastReph != First))
|
|
{
|
|
BaseGlyph = First;
|
|
}
|
|
|
|
if(kbts__GlyphIsValid(Storage, BaseGlyph))
|
|
{
|
|
kbts__syllabic_position LastPosition = KBTS__SYLLABIC_POSITION_SYLLABLE_BASE;
|
|
kbts__syllabic_position SectionPosition = KBTS__SYLLABIC_POSITION_AFTER_MAIN;
|
|
kbts_glyph *LastPreBaseMatra = (kbts_glyph *)&Storage->GlyphSentinel;
|
|
for(kbts_glyph *Glyph = BaseGlyph->Next;
|
|
kbts__GlyphIsValid(Storage, Glyph);
|
|
)
|
|
{
|
|
kbts_glyph *Next = Glyph->Next; // Make sure we preserve the link when reversing.
|
|
kbts__syllabic_position Position = SectionPosition;
|
|
|
|
switch(Glyph->SyllabicClass)
|
|
{
|
|
case KBTS_INDIC_SYLLABIC_CLASS_MEDIAL_RA:
|
|
Position = KBTS__SYLLABIC_POSITION_PREBASE_CONSONANT;
|
|
break;
|
|
|
|
case KBTS_INDIC_SYLLABIC_CLASS_VOWEL_PRE:
|
|
{
|
|
Position = KBTS__SYLLABIC_POSITION_PREBASE_MATRA;
|
|
|
|
// According to Unicode 15.0:
|
|
// For combining characters placed to the left of a base character, the combining characters start from the base
|
|
// character and are arranged leftward.
|
|
// Since these guys will get reordered into being pre-base, we need to flip them.
|
|
if(kbts__GlyphIsValid(Storage, LastPreBaseMatra))
|
|
{
|
|
kbts__DllistReverseSublist(LastPreBaseMatra, Glyph->Next);
|
|
}
|
|
else
|
|
{
|
|
// When we reverse, this will become the "last" pre-base matra again, so we only need to set it once.
|
|
LastPreBaseMatra = Glyph;
|
|
}
|
|
} break;
|
|
|
|
case KBTS_INDIC_SYLLABIC_CLASS_VARIATION_SELECTOR:
|
|
Position = LastPosition;
|
|
break;
|
|
|
|
case KBTS_INDIC_SYLLABIC_CLASS_VOWEL_BELOW:
|
|
if(Position == KBTS__SYLLABIC_POSITION_AFTER_MAIN)
|
|
{
|
|
Position = KBTS__SYLLABIC_POSITION_BELOWBASE_CONSONANT;
|
|
}
|
|
else if(Position == KBTS__SYLLABIC_POSITION_BELOWBASE_CONSONANT)
|
|
{
|
|
Position = SectionPosition;
|
|
}
|
|
break;
|
|
|
|
case KBTS_INDIC_SYLLABIC_CLASS_VEDIC_SIGN:
|
|
if(Position == KBTS__SYLLABIC_POSITION_BELOWBASE_CONSONANT)
|
|
{
|
|
Position = KBTS__SYLLABIC_POSITION_BEFORE_SUBJOINED;
|
|
}
|
|
break;
|
|
}
|
|
|
|
if((SectionPosition == KBTS__SYLLABIC_POSITION_BELOWBASE_CONSONANT) && (Glyph->SyllabicClass == KBTS_INDIC_SYLLABIC_CLASS_VEDIC_SIGN))
|
|
{
|
|
SectionPosition = KBTS__SYLLABIC_POSITION_AFTER_SUBJOINED;
|
|
Position = SectionPosition;
|
|
}
|
|
|
|
Glyph->SyllabicPosition = Position;
|
|
LastPosition = Position;
|
|
Glyph = Next;
|
|
}
|
|
}
|
|
|
|
if(MinimumGlyphCount > 1)
|
|
{
|
|
KBTS__DLLIST_SORT(Storage->GlyphSentinel.Next, (kbts_glyph *)&Storage->GlyphSentinel, SyllabicPosition);
|
|
|
|
#ifdef KBTS_SANITY_CHECK
|
|
{
|
|
kbts_glyph *Left = C->GlyphSentinel.Next;
|
|
kbts_glyph *Right = Left->Next;
|
|
while(kbts__GlyphIsValid(C, Right))
|
|
{
|
|
kbts_glyph *Next = Right->Next;
|
|
|
|
KBTS_ASSERT(Left->SyllabicPosition <= Right->SyllabicPosition);
|
|
|
|
Left = Right;
|
|
Right = Next;
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
} break;
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
OutOfMemory:;
|
|
Scratchpad->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
}
|
|
|
|
static kbts_b32 kbts__ReadOp(kbts_shape_scratchpad *Scratchpad, kbts__op_kind End)
|
|
{
|
|
KBTS_INSTRUMENT_FUNCTION_BEGIN;
|
|
kbts_b32 Result = 0;
|
|
kbts_shape_config *Config = Scratchpad->Config;
|
|
|
|
if(Config)
|
|
{
|
|
kbts__op_list *OpList = &Config->OpList;
|
|
|
|
if(Scratchpad->Ip < OpList->OpCount)
|
|
{
|
|
kbts__op_kind Kind = OpList->Ops[Scratchpad->Ip++];
|
|
|
|
// @Cleanup
|
|
if((Kind == KBTS__OP_KIND_GSUB_FEATURES_WITH_USER) ||
|
|
(Kind == KBTS__OP_KIND_GSUB_FEATURES) ||
|
|
(Kind == KBTS__OP_KIND_GPOS_FEATURES))
|
|
{
|
|
Scratchpad->FeatureStagesRead += 1;
|
|
|
|
if(Kind == KBTS__OP_KIND_GSUB_FEATURES_WITH_USER)
|
|
{
|
|
Kind = KBTS__OP_KIND_GSUB_FEATURES;
|
|
}
|
|
}
|
|
|
|
Scratchpad->OpKind = Kind;
|
|
Result = (Kind != End);
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_FUNCTION_END;
|
|
return Result;
|
|
}
|
|
|
|
typedef struct kbts__murmur_state
|
|
{
|
|
kbts_u32 State;
|
|
kbts_u32 BytesHashed;
|
|
} kbts__murmur_state;
|
|
|
|
static void kbts__MurmurBegin(kbts__murmur_state *State, kbts_u32 Seed)
|
|
{
|
|
State->State = Seed;
|
|
State->BytesHashed = 0;
|
|
}
|
|
|
|
static void kbts__MurmurAbsorb(kbts__murmur_state *State, kbts_u32 Value)
|
|
{
|
|
kbts_un H = State->State;
|
|
|
|
kbts_un K = Value * 0xCC9E2D51;
|
|
K = (((K << 15) | (K >> 17)) * 0x1B873593) & 0xFFFFFFFF;
|
|
|
|
kbts_un HxK = H ^ K;
|
|
H = (((HxK << 13) | (HxK >> 19)) * 5 + 0xE6546B64) & 0xFFFFFFFF;
|
|
|
|
State->State = (kbts_u32)H;
|
|
State->BytesHashed += 4;
|
|
}
|
|
|
|
static kbts_u32 kbts__MurmurFinalize(kbts__murmur_state *State)
|
|
{
|
|
kbts_un H = State->State;
|
|
kbts_un L = State->BytesHashed;
|
|
kbts_un HxL = H ^ L;
|
|
|
|
kbts_un Result = (HxL ^ (HxL >> 16)) * 0x85EBCA6B;
|
|
Result = (Result ^ ((Result & 0xFFFFFFFF) >> 13)) * 0xC2B2AE35;
|
|
Result ^= (Result & 0xFFFFFFFF) >> 16;
|
|
|
|
return (kbts_u32)Result;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeConfigUid(kbts_shape_config *Config, kbts_uid *Uid)
|
|
{
|
|
if(Config)
|
|
{
|
|
KBTS_MEMCPY(Uid, &Config->Uid, sizeof(*Uid));
|
|
}
|
|
else
|
|
{
|
|
KBTS_MEMSET(Uid, 0, sizeof(*Uid));
|
|
}
|
|
}
|
|
|
|
static kbts_shape_config *kbts__PlaceShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector, void *Memory, kbts_un *Size, kbts_uid *Uid)
|
|
{
|
|
kbts_shape_config *Result = 0;
|
|
kbts__pointer_bump_allocator Bump = kbts__PointerBumpAllocator(Memory);
|
|
|
|
if(kbts_FontIsValid(Font))
|
|
{
|
|
kbts_shape_config Config = KBTS__ZERO;
|
|
|
|
Result = kbts__PointerPushType(&Bump, kbts_shape_config);
|
|
|
|
Config.Font = Font;
|
|
Config.Script = Script;
|
|
Config.Language = Language;
|
|
|
|
kbts__gsub_gpos *ShapingTables[2] = {
|
|
kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_GSUB, kbts__gsub_gpos),
|
|
kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_GPOS, kbts__gsub_gpos),
|
|
};
|
|
|
|
kbts__gsub_gpos *Gsub = ShapingTables[0];
|
|
|
|
kbts_un AxisCount;
|
|
{
|
|
int AxisCountS;
|
|
int InstanceCount;
|
|
kbts_GetVariationInfo(Font, &AxisCountS, &InstanceCount);
|
|
|
|
AxisCount = (kbts_un)AxisCountS;
|
|
}
|
|
|
|
kbts_s16 VariationVectorNormalized[KBTS__MAX_VARIATION_AXIS_COUNT];
|
|
kbts_NormalizeVariationVector(Font, VariationVector, VariationVectorNormalized);
|
|
|
|
kbts__murmur_state Murmur;
|
|
kbts__MurmurBegin(&Murmur, 0xBfACB51B);
|
|
|
|
{ // Initialize the hash with the full name of the font.
|
|
kbts_u64 Blob64 = (kbts_u64)Font->Blob;
|
|
kbts__MurmurBegin(&Murmur, Blob64 & 0xFFFFFFFF);
|
|
|
|
kbts__name *Name = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_NAME, kbts__name);
|
|
if(Name)
|
|
{
|
|
kbts__name_record *Records = KBTS__POINTER_AFTER(kbts__name_record, Name);
|
|
char *StringBase = KBTS__POINTER_OFFSET(char, Name, kbts__ReadU16Unaligned(&Name->StringStorageOffset));
|
|
|
|
kbts_un Offset = 0;
|
|
kbts_un Length = 0;
|
|
kbts_un Name_Count = kbts__ReadU16Unaligned(&Name->Count);
|
|
KBTS__FOR(RecordIndex, 0, Name_Count)
|
|
{
|
|
kbts__name_record *Record = &Records[RecordIndex];
|
|
|
|
if(kbts__ReadU16Unaligned(&Record->PlatformId) == 3)
|
|
{
|
|
kbts_u16 Record_NameId = kbts__ReadU16Unaligned(&Record->NameId);
|
|
|
|
if((Record_NameId == 3) /* UID */ ||
|
|
(Record_NameId == 4) /* If we can't find a UID, use the full name */)
|
|
{
|
|
Offset = kbts__ReadU16Unaligned(&Record->StringOffset);
|
|
Length = kbts__ReadU16Unaligned(&Record->Length);
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
if(Length)
|
|
{
|
|
char *At = StringBase + Offset;
|
|
kbts_un Left = Length;
|
|
while(Left >= 4)
|
|
{
|
|
kbts_u32 Word = kbts__ReadU32Unaligned((kbts_u32 *)At);
|
|
|
|
kbts__MurmurAbsorb(&Murmur, Word);
|
|
|
|
At += 4;
|
|
Left -= 4;
|
|
}
|
|
|
|
if(Left)
|
|
{
|
|
kbts_u32 LastBytes = kbts__ReadU32UnalignedEndOfBuffer(At, Left);
|
|
kbts__MurmurAbsorb(&Murmur, LastBytes);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Find the appropriate language system in GSUB/GPOS.
|
|
kbts__script_properties *ScriptProperties = &kbts__ScriptProperties[Script];
|
|
int FoundScriptIsIndic3 = 0;
|
|
|
|
KBTS__FOR(ShapingTableIndex, 0, KBTS_SHAPING_TABLE_COUNT)
|
|
{
|
|
kbts__gsub_gpos *ShapingTable = ShapingTables[ShapingTableIndex];
|
|
|
|
if(ShapingTable)
|
|
{
|
|
kbts__script_list *ScriptList = KBTS__POINTER_OFFSET(kbts__script_list, ShapingTable, kbts__ReadU16Unaligned(&ShapingTable->ScriptListOffset));
|
|
kbts_un ScriptList_Count = kbts__ReadU16Unaligned(&ScriptList->Count);
|
|
|
|
kbts__langsys *ChosenLangsys = 0;
|
|
kbts_u32 DesiredTag = ScriptProperties->Tag;
|
|
kbts_u32 LatinFallbackTag = KBTS_FOURCC('l', 'a', 't', 'n');
|
|
|
|
KBTS__FOR(ScriptIndex, 0, ScriptList_Count)
|
|
{
|
|
kbts__script_pointer ThisScript = kbts__GetScript(ScriptList, ScriptIndex);
|
|
kbts_u32 Tag = ThisScript.Tag;
|
|
|
|
// The OpenType spec does not define or even mention "Indic3" scripts at all.
|
|
// Nevertheless, Harfbuzz at least checks for '3' at the end of script tags, and, if one exists, they choose USE.
|
|
kbts_b32 Indic3 = (ThisScript.Tag >> 24) == '3';
|
|
kbts_u32 MatchMask = Indic3 ? 0xFFFFFF : 0xFFFFFFFF;
|
|
kbts_b32 Default = (Tag == KBTS_FOURCC('D', 'F', 'L', 'T')) | (Tag == KBTS_FOURCC('d', 'f', 'l', 't'));
|
|
kbts_b32 PerfectMatch = !((Tag ^ DesiredTag) & MatchMask);
|
|
if(!ScriptIndex || PerfectMatch || Default || (Tag == LatinFallbackTag))
|
|
{
|
|
kbts__langsys *Langsys = kbts__GetDefaultLangsys(ThisScript.Script);
|
|
KBTS__FOR(LangsysIndex, 0, ThisScript.Script->Count)
|
|
{
|
|
kbts__langsys_pointer LangsysPointer = kbts__GetLangsys(ThisScript.Script, LangsysIndex);
|
|
|
|
if(LangsysPointer.Tag == Language)
|
|
{
|
|
Langsys = LangsysPointer.Langsys;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
// Only try the latin fallback if we don't find a DFLT tag.
|
|
LatinFallbackTag = Default ? 0 : LatinFallbackTag;
|
|
|
|
// It is tempting to try to look for another script if the one we want has no langsys.
|
|
// However, it is possible for a script to purposefully have no langsys at all. In that case,
|
|
// the shaper should not apply any GSUB features.
|
|
// So, store the result _regardless_ of whether Langsys is null or not.
|
|
ChosenLangsys = Langsys;
|
|
if(ShapingTableIndex == KBTS_SHAPING_TABLE_GSUB)
|
|
{
|
|
// Apparently, it is allowed to have script-specific GSUB tables, and a huge DFLT GPOS table.
|
|
FoundScriptIsIndic3 = Indic3;
|
|
}
|
|
// And then get out if we found the appropriate script, even if the langsys is null!
|
|
if(PerfectMatch)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
Config.Langsys[ShapingTableIndex] = ChosenLangsys;
|
|
}
|
|
}
|
|
|
|
Config.IndicScriptProperties = kbts__IndicScriptProperties(Script);
|
|
Config.Shaper = FoundScriptIsIndic3 ? (kbts_shaper)KBTS_SHAPER_USE : ScriptProperties->Shaper;
|
|
Config.OpList = *kbts__ShaperOpLists[Config.Shaper];
|
|
|
|
KBTS_MEMSET(&Config.Features, 0, sizeof(Config.Features));
|
|
KBTS__FOR(StageIndex, 0, Config.OpList.FeatureStageCount)
|
|
{
|
|
kbts__feature_stage *Stage = &Config.OpList.FeatureStages[StageIndex];
|
|
|
|
KBTS__FOR(WordIndex, 0, KBTS__ARRAY_LENGTH(Config.Features.Flags))
|
|
{
|
|
Config.Features.Flags[WordIndex] |= Stage->Features.Flags[WordIndex];
|
|
}
|
|
}
|
|
|
|
kbts__feature *Rclt = 0;
|
|
kbts__feature_set SyllableFeatureSet = {{KBTS__FEATURE_FLAG0(rphf) | KBTS__FEATURE_FLAG0(blwf) | KBTS__FEATURE_FLAG0(half) | KBTS__FEATURE_FLAG0(pstf) | KBTS__FEATURE_FLAG0(pref),
|
|
0, KBTS__FEATURE_FLAG2(rclt) | KBTS__FEATURE_FLAG2(locl), KBTS__FEATURE_FLAG3(vatu)}};
|
|
kbts__iterate_features IterateFeatures = kbts__IterateFeatures(&Config, KBTS_SHAPING_TABLE_GSUB, SyllableFeatureSet);
|
|
while(kbts__NextFeature(&IterateFeatures))
|
|
{
|
|
switch(IterateFeatures.CurrentFeatureTag)
|
|
{
|
|
case KBTS_FEATURE_TAG_blwf: Config.Blwf = IterateFeatures.Feature; break;
|
|
case KBTS_FEATURE_TAG_pref: Config.Pref = IterateFeatures.Feature; break;
|
|
case KBTS_FEATURE_TAG_pstf: Config.Pstf = IterateFeatures.Feature; break;
|
|
case KBTS_FEATURE_TAG_locl: Config.Locl = IterateFeatures.Feature; break;
|
|
case KBTS_FEATURE_TAG_rphf: Config.Rphf = IterateFeatures.Feature; break;
|
|
case KBTS_FEATURE_TAG_half: Config.Half = IterateFeatures.Feature; break;
|
|
case KBTS_FEATURE_TAG_vatu: Config.Vatu = IterateFeatures.Feature; break;
|
|
case KBTS_FEATURE_TAG_rclt: Rclt = IterateFeatures.Feature; break;
|
|
}
|
|
}
|
|
|
|
if((Config.Shaper == KBTS_SHAPER_ARABIC) && !Rclt)
|
|
{
|
|
Config.OpList = kbts__OpList_ArabicNoRclt;
|
|
}
|
|
|
|
if(Config.IndicScriptProperties.ViramaCodepoint)
|
|
{
|
|
kbts_shape_scratchpad DummyScratchpad = KBTS__ZERO;
|
|
kbts_glyph_storage DummyStorage = KBTS__ZERO;
|
|
KBTS__DLLIST_SENTINEL_INIT(&DummyStorage.GlyphSentinel);
|
|
KBTS__DLLIST_SENTINEL_INIT(&DummyStorage.FreeGlyphSentinel);
|
|
|
|
// Bake the locl-ized virama.
|
|
kbts_glyph Virama = kbts_CodepointToGlyph(Font, (int)Config.IndicScriptProperties.ViramaCodepoint, 0, 0);
|
|
Config.Virama = kbts__Substitute1(&DummyScratchpad, &Config, &DummyStorage, kbts__GetLookupList(Gsub), Config.Locl, KBTS__SKIP_FLAG_ZWNJ | KBTS__SKIP_FLAG_ZWJ, &Virama);
|
|
}
|
|
|
|
if((Config.Script == KBTS_SCRIPT_THAI) || (Config.Script == KBTS_SCRIPT_LAO))
|
|
{
|
|
kbts_u32 NikhahitCodepoint = (Config.Script == KBTS_SCRIPT_THAI) ? 0xE4D : 0xECD;
|
|
kbts_u32 SaraAaCodepoint = (Config.Script == KBTS_SCRIPT_THAI) ? 0xE32 : 0xEB2;
|
|
Config.Nikhahit = kbts_CodepointToGlyph(Font, (int)NikhahitCodepoint, 0, 0);
|
|
Config.SaraAa = kbts_CodepointToGlyph(Font, (int)SaraAaCodepoint, 0, 0);
|
|
}
|
|
|
|
Config.DottedCircle = kbts_CodepointToGlyph(Font, 0x25CC, 0, 0);
|
|
Config.Whitespace = kbts_CodepointToGlyph(Font, ' ', 0, 0);
|
|
|
|
kbts_u16 *FeatureStageFirstLookupIndices = kbts__PointerPushArray(&Bump, kbts_u16, Config.OpList.FeatureStageCount + 1);
|
|
if(Memory)
|
|
{
|
|
KBTS__FOR(FeatureStageIndex, 0, Config.OpList.FeatureStageCount + 1)
|
|
{
|
|
FeatureStageFirstLookupIndices[FeatureStageIndex] = 0;
|
|
}
|
|
}
|
|
|
|
if(ShapingTables[KBTS_SHAPING_TABLE_GSUB] || ShapingTables[KBTS_SHAPING_TABLE_GPOS])
|
|
{ // Initialize sequential lookups.
|
|
kbts_un GlyphCount = Font->Blob->GlyphCount;
|
|
|
|
kbts_u32 *GlyphLookupMatrix = KBTS__POINTER_OFFSET(kbts_u32, Font->Blob, Font->Blob->GlyphLookupMatrixOffsetFromStartOfFile);
|
|
kbts_un GposLookupIndexOffset = Font->Blob->GposLookupIndexOffset;
|
|
|
|
kbts__sequential_lookup *SequentialLookups = 0;
|
|
kbts_u32 *IdSequentialLookupMatrix = 0;
|
|
kbts_un SequentialLookupCount = 0;
|
|
|
|
KBTS__FOR(Iter, 0, 2)
|
|
{
|
|
kbts_un ThisSequentialLookupCount = 0;
|
|
kbts_un FeatureStageIndex = 0;
|
|
|
|
KBTS__FOR(OpIndex, 0, Config.OpList.OpCount)
|
|
{
|
|
kbts__op_kind Op = Config.OpList.Ops[OpIndex];
|
|
kbts_b32 UserFeaturesAllowed = KBTS__IN_SET(Op, KBTS__SET32((KBTS__OP_KIND_GSUB_FEATURES_WITH_USER)
|
|
(KBTS__OP_KIND_GPOS_FEATURES)));
|
|
|
|
if(KBTS__IN_SET(Op, KBTS__SET32((KBTS__OP_KIND_GSUB_FEATURES)
|
|
(KBTS__OP_KIND_GSUB_FEATURES_WITH_USER)
|
|
(KBTS__OP_KIND_GPOS_FEATURES))))
|
|
{
|
|
kbts__feature_stage *FeatureStage = &Config.OpList.FeatureStages[FeatureStageIndex];
|
|
kbts_shaping_table ShapingTable = (kbts_shaping_table)((Op == KBTS__OP_KIND_GPOS_FEATURES) ? KBTS_SHAPING_TABLE_GPOS : KBTS_SHAPING_TABLE_GSUB);
|
|
kbts__gsub_gpos *GsubGpos = ShapingTables[ShapingTable];
|
|
kbts__langsys *Langsys = Config.Langsys[ShapingTable];
|
|
kbts_un BakedFeatureLookupIndexCount = 0;
|
|
|
|
kbts__baked_feature BakedFeatures[KBTS_MAX_SIMULTANEOUS_FEATURES];
|
|
kbts_u16 BakedFeatureLookupIndicesRead[KBTS_MAX_SIMULTANEOUS_FEATURES];
|
|
|
|
if(GsubGpos && Langsys)
|
|
{
|
|
kbts__feature_list *FeatureList = KBTS__POINTER_OFFSET(kbts__feature_list, GsubGpos, kbts__ReadU16Unaligned(&GsubGpos->FeatureListOffset));
|
|
kbts_u16 *FeatureIndices = KBTS__POINTER_AFTER(kbts_u16, Langsys);
|
|
kbts__feature_variations *FeatureVariations = 0;
|
|
|
|
if((kbts__ReadU16Unaligned(&GsubGpos->Minor) == 1) &&
|
|
kbts__ReadU32Unaligned(&GsubGpos->FeatureVariationsOffset) &&
|
|
VariationVector &&
|
|
(AxisCount < KBTS__MAX_VARIATION_AXIS_COUNT))
|
|
{
|
|
FeatureVariations = KBTS__POINTER_OFFSET(kbts__feature_variations, GsubGpos, kbts__ReadU32Unaligned(&GsubGpos->FeatureVariationsOffset));
|
|
}
|
|
|
|
kbts_un Langsys_FeatureIndexCount = kbts__ReadU16Unaligned(&Langsys->FeatureIndexCount);
|
|
kbts_un BakedFeatureCount = 0;
|
|
|
|
KBTS__FOR(FeatureIndexIndex, 0, Langsys_FeatureIndexCount)
|
|
{
|
|
kbts_un FeatureIndex = kbts__ReadU16Unaligned(&FeatureIndices[FeatureIndexIndex]);
|
|
kbts__feature_pointer Feature = kbts__GetFeature(FeatureList, FeatureIndex);
|
|
|
|
if(FeatureVariations)
|
|
{
|
|
// Substitute features.
|
|
// @Speed: This is N-squared and omega slow!
|
|
kbts__feature_variation_record *VariationRecords = KBTS__POINTER_AFTER(kbts__feature_variation_record, FeatureVariations);
|
|
kbts_un FeatureVariations_RecordCount = kbts__ReadU32Unaligned(&FeatureVariations->RecordCount);
|
|
|
|
KBTS__FOR(VariationIndex, 0, FeatureVariations_RecordCount)
|
|
{
|
|
kbts__feature_variation_record *VariationRecord = &VariationRecords[VariationIndex];
|
|
kbts__condition_set *ConditionSet = KBTS__POINTER_OFFSET(kbts__condition_set, FeatureVariations, kbts__ReadU32Unaligned(&VariationRecord->ConditionSetOffset));
|
|
kbts_u32 *ConditionOffsets = KBTS__POINTER_AFTER(kbts_u32, ConditionSet);
|
|
kbts_un ConditionSet_Count = kbts__ReadU16Unaligned(&ConditionSet->Count);
|
|
|
|
KBTS__FOR(ConditionIndex, 0, ConditionSet_Count)
|
|
{
|
|
kbts__condition_1 *Condition = KBTS__POINTER_OFFSET(kbts__condition_1, ConditionSet, kbts__ReadU32Unaligned(&ConditionOffsets[ConditionIndex]));
|
|
kbts_un Condition_AxisIndex = kbts__ReadU16Unaligned(&Condition->AxisIndex);
|
|
|
|
if(Condition_AxisIndex < AxisCount)
|
|
{
|
|
kbts_s16 Input = VariationVectorNormalized[Condition_AxisIndex];
|
|
|
|
if((Input >= kbts__ReadS16Unaligned(&Condition->FilterRangeMinValue)) &&
|
|
(Input <= kbts__ReadS16Unaligned(&Condition->FilterRangeMaxValue)))
|
|
{
|
|
kbts__feature_table_substitution *FeatureTableSubstitution = KBTS__POINTER_OFFSET(kbts__feature_table_substitution, FeatureVariations, kbts__ReadU32Unaligned(&VariationRecord->FeatureTableSubstitutionOffset));
|
|
kbts__feature_table_substitution_record *SubstitutionRecords = KBTS__POINTER_AFTER(kbts__feature_table_substitution_record, FeatureTableSubstitution);
|
|
kbts_un FeatureTableSubstitution_Count = kbts__ReadU16Unaligned(&FeatureTableSubstitution->Count);
|
|
|
|
KBTS__FOR(SubstitutionRecordIndex, 0, FeatureTableSubstitution_Count)
|
|
{
|
|
kbts__feature_table_substitution_record *SubstitutionRecord = &SubstitutionRecords[SubstitutionRecordIndex];
|
|
kbts_un SubstitutionRecord_FeatureIndex = kbts__ReadU16Unaligned(&SubstitutionRecord->FeatureIndex);
|
|
|
|
if(SubstitutionRecord_FeatureIndex == FeatureIndex)
|
|
{
|
|
kbts__feature *SubstitutingFeature = KBTS__POINTER_OFFSET(kbts__feature, FeatureTableSubstitution, kbts__ReadU32Unaligned(&SubstitutionRecord->AlternateFeatureOffset));
|
|
|
|
Feature.Feature = SubstitutingFeature;
|
|
|
|
break;
|
|
}
|
|
else if(SubstitutionRecord_FeatureIndex > FeatureIndex)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts_u32 FeatureId = kbts__FeatureTagToId(Feature.Tag);
|
|
// We add all features indiscriminately for ops that might incorporate user features.
|
|
kbts_un Feature_LookupIndexCount = kbts__ReadU16Unaligned(&Feature.Feature->LookupIndexCount);
|
|
if(Feature_LookupIndexCount &&
|
|
// We add "all" features to user feature stages, except for features that are a default part of the shaper.
|
|
// If a user asks for a default feature explicitly, it is unclear whether it should be applied now or in its
|
|
// default stage.
|
|
// Leaving the feature in its default stage seems like the better thing to do, because, supposedly, these features
|
|
// will have been designed to apply at a specific point in the pipeline, and moving them makes little sense.
|
|
((UserFeaturesAllowed &&
|
|
!kbts__ContainsFeature(&Config.Features, FeatureId)) ||
|
|
kbts__ContainsFeature(&FeatureStage->Features, FeatureId)))
|
|
{
|
|
kbts__MurmurAbsorb(&Murmur, KBTS__POINTER_DIFF32(Feature.Feature, Font->Blob));
|
|
|
|
kbts__baked_feature BakedFeature = KBTS__ZERO;
|
|
BakedFeature.FeatureTag = Feature.Tag;
|
|
BakedFeature.FeatureId = FeatureId;
|
|
// CAREFUL: We use SkipFlags as a temporary index until the end of the stage.
|
|
BakedFeature.SkipFlags = kbts__SkipFlags(ShapingTable, BakedFeature.FeatureId, Config.Shaper);
|
|
BakedFeature.Count = (kbts_u32)Feature_LookupIndexCount;
|
|
// These point directly into the file.
|
|
BakedFeature.Indices = KBTS__POINTER_AFTER(kbts_u16, Feature.Feature);
|
|
|
|
// For Myanmar, we could try and tag glyphs depending on their Indic properties in BeginCluster, just like we do for
|
|
// Indic scripts.
|
|
// However, Harfbuzz does _not_ do this, so it seems like a bunch of work that would, at best, make us diverge from
|
|
// Harfbuzz more often.
|
|
if((Config.Shaper != KBTS_SHAPER_MYANMAR) && (FeatureId >= 1) && (FeatureId <= 32))
|
|
{
|
|
// These must properly map KBTS__FEATURE_ID to kbts_glyph_flags!
|
|
BakedFeature.GlyphFilter = (1u << (FeatureId - 1)) & KBTS__GLYPH_FEATURE_MASK;
|
|
}
|
|
|
|
BakedFeatures[BakedFeatureCount] = BakedFeature;
|
|
|
|
BakedFeatureCount += 1;
|
|
BakedFeatureLookupIndexCount += BakedFeature.Count;
|
|
|
|
if(BakedFeatureCount >= KBTS_MAX_SIMULTANEOUS_FEATURES)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS__FOR(BakedFeatureIndex, 0, BakedFeatureCount)
|
|
{
|
|
BakedFeatureLookupIndicesRead[BakedFeatureIndex] = 0;
|
|
}
|
|
|
|
kbts_u16 LastLowestLookupIndex = 0xFFFF;
|
|
kbts_un BakedFeatureLookupIndicesLeft = BakedFeatureLookupIndexCount;
|
|
while(BakedFeatureLookupIndicesLeft)
|
|
{
|
|
kbts_u16 LowestLookupIndex = 0xFFFF;
|
|
|
|
KBTS__FOR(BakedFeatureIndex, 0, BakedFeatureCount)
|
|
{
|
|
kbts__baked_feature *BakedFeature = &BakedFeatures[BakedFeatureIndex];
|
|
kbts_un LookupIndicesRead = BakedFeatureLookupIndicesRead[BakedFeatureIndex];
|
|
|
|
if(LookupIndicesRead < BakedFeature->Count)
|
|
{
|
|
kbts_u16 NextIndex = kbts__ReadU16Unaligned(&BakedFeature->Indices[LookupIndicesRead]);
|
|
|
|
if(NextIndex < LowestLookupIndex)
|
|
{
|
|
LowestLookupIndex = NextIndex;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Handle the case where a single lookup is part of multiple features.
|
|
kbts_u32 GlyphFilter = 0;
|
|
kbts_u32 SkipFlags = 0;
|
|
kbts_b32 DefaultEnabled = 0;
|
|
KBTS__FOR(BakedFeatureIndex, 0, BakedFeatureCount)
|
|
{
|
|
kbts__baked_feature *BakedFeature = &BakedFeatures[BakedFeatureIndex];
|
|
kbts_un LookupIndicesRead = BakedFeatureLookupIndicesRead[BakedFeatureIndex];
|
|
|
|
if(LookupIndicesRead < BakedFeature->Count)
|
|
{
|
|
kbts_u16 NextIndex = kbts__ReadU16Unaligned(&BakedFeature->Indices[LookupIndicesRead]);
|
|
|
|
if(NextIndex == LowestLookupIndex)
|
|
{
|
|
GlyphFilter |= BakedFeature->GlyphFilter;
|
|
SkipFlags |= BakedFeature->SkipFlags;
|
|
|
|
BakedFeatureLookupIndicesRead[BakedFeatureIndex] += 1;
|
|
BakedFeatureLookupIndicesLeft -= 1;
|
|
|
|
if(kbts__ContainsFeature(&FeatureStage->Features, BakedFeature->FeatureId))
|
|
{
|
|
DefaultEnabled = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(LowestLookupIndex != LastLowestLookupIndex)
|
|
{
|
|
if(Iter && Memory && DefaultEnabled)
|
|
{
|
|
kbts_un FlatLookupIndex = (ShapingTable == KBTS_SHAPING_TABLE_GSUB) ? LowestLookupIndex : (LowestLookupIndex + GposLookupIndexOffset);
|
|
KBTS__FOR(GlyphIndex, 0, GlyphCount)
|
|
{
|
|
kbts__matrix_index MatrixIndex = kbts__GlyphLookupMatrixIndex(FlatLookupIndex, GlyphIndex, GlyphCount);
|
|
if(GlyphLookupMatrix[MatrixIndex.WordIndex] & (1u << MatrixIndex.BitIndex))
|
|
{
|
|
kbts__matrix_index SequentialMatrixIndex = kbts__IdSequentialLookupMatrixIndex(ThisSequentialLookupCount, GlyphIndex, SequentialLookupCount);
|
|
IdSequentialLookupMatrix[SequentialMatrixIndex.WordIndex] |= 1u << SequentialMatrixIndex.BitIndex;
|
|
}
|
|
}
|
|
}
|
|
|
|
if(!Iter)
|
|
{
|
|
ThisSequentialLookupCount += 1;
|
|
}
|
|
else
|
|
{
|
|
kbts__sequential_lookup *SequentialLookup = &SequentialLookups[ThisSequentialLookupCount++];
|
|
if(Memory)
|
|
{
|
|
SequentialLookup->GlyphFilter = GlyphFilter;
|
|
SequentialLookup->SkipFlags = SkipFlags;
|
|
SequentialLookup->LookupIndex = LowestLookupIndex;
|
|
}
|
|
}
|
|
}
|
|
|
|
LastLowestLookupIndex = LowestLookupIndex;
|
|
}
|
|
}
|
|
|
|
if(Iter && Memory)
|
|
{
|
|
FeatureStageFirstLookupIndices[FeatureStageIndex + 1] = (kbts_u16)ThisSequentialLookupCount;
|
|
}
|
|
|
|
KBTS_ASSERT(FeatureStageIndex < Config.OpList.FeatureStageCount);
|
|
FeatureStageIndex += 1;
|
|
}
|
|
}
|
|
|
|
if(!Iter)
|
|
{
|
|
// We have the sequential lookup count. We can allocate our stuff.
|
|
SequentialLookupCount = ThisSequentialLookupCount;
|
|
SequentialLookups = kbts__PointerPushArray(&Bump, kbts__sequential_lookup, SequentialLookupCount);
|
|
|
|
kbts_un LastSequentialLookupIndex = 0;
|
|
if(SequentialLookupCount)
|
|
{
|
|
LastSequentialLookupIndex = SequentialLookupCount - 1;
|
|
}
|
|
kbts_un LastGlyphIndex = 0;
|
|
if(GlyphCount)
|
|
{
|
|
LastGlyphIndex = GlyphCount - 1;
|
|
}
|
|
|
|
kbts__matrix_index LastMatrixIndex = kbts__IdSequentialLookupMatrixIndex(LastSequentialLookupIndex, LastGlyphIndex, SequentialLookupCount);
|
|
kbts_un IdSequentialLookupMatrixSizeInWords = LastMatrixIndex.WordIndex + 1;
|
|
kbts_un IdSequentialLookupMatrixSizeInBytes = sizeof(kbts_u32) * IdSequentialLookupMatrixSizeInWords;
|
|
IdSequentialLookupMatrix = (kbts_u32 *)kbts__PointerPush(&Bump, IdSequentialLookupMatrixSizeInBytes, KBTS_ALIGNOF(kbts_u32));
|
|
if(Memory)
|
|
{
|
|
KBTS_MEMSET(IdSequentialLookupMatrix, 0, IdSequentialLookupMatrixSizeInBytes);
|
|
}
|
|
}
|
|
}
|
|
|
|
Config.OffsetToSequentialLookups = KBTS__POINTER_DIFF32(SequentialLookups, Result);
|
|
Config.OffsetToIdSequentialLookupMatrix = KBTS__POINTER_DIFF32(IdSequentialLookupMatrix, Result);
|
|
Config.GlyphCount = Font->Blob->GlyphCount;
|
|
Config.LookupCount = Font->Blob->LookupCount;
|
|
}
|
|
|
|
Config.OffsetToFeatureStageFirstLookupIndices = KBTS__POINTER_DIFF32(FeatureStageFirstLookupIndices, Result);
|
|
Config.Uid.Data[0] = kbts__MurmurFinalize(&Murmur);
|
|
|
|
if(Memory)
|
|
{
|
|
Config.SizeNotCountingAlignment = (kbts_u32)(Bump.At - (kbts_uptr)Result);
|
|
*Result = Config;
|
|
}
|
|
|
|
if(Uid)
|
|
{
|
|
KBTS_MEMCPY(Uid, &Config.Uid, sizeof(*Uid));
|
|
}
|
|
}
|
|
|
|
if(!Memory)
|
|
{
|
|
// We add the align, just to make sure we can accept any incoming pointer.
|
|
*Size = ((Bump.At - (kbts_uptr)(void *)Memory) + KBTS_ALIGNOF(kbts_shape_config));
|
|
|
|
Result = 0;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_SizeOfShapeConfig2(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector)
|
|
{
|
|
kbts_un Size;
|
|
kbts__PlaceShapeConfig(Font, Script, Language, VariationVector, 0, &Size, 0);
|
|
|
|
return (int)Size;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_SizeOfShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language)
|
|
{
|
|
return kbts_SizeOfShapeConfig2(Font, Script, Language, 0);
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_config *kbts_PlaceShapeConfig2(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector, void *Memory, kbts_uid *Uid)
|
|
{
|
|
kbts_un Size;
|
|
kbts_shape_config *Result = kbts__PlaceShapeConfig(Font, Script, Language, VariationVector, Memory, &Size, Uid);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_config *kbts_PlaceShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language, void *Memory)
|
|
{
|
|
return kbts_PlaceShapeConfig2(Font, Script, Language, 0, Memory, 0);
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_config *kbts_CreateShapeConfig2(kbts_font *Font, kbts_script Script, kbts_language Language, float *VariationVector, kbts_allocator_function *Allocator, void *AllocatorData, kbts_uid *Uid)
|
|
{
|
|
if(!Allocator)
|
|
{
|
|
Allocator = kbts__DefaultAllocator;
|
|
}
|
|
|
|
kbts_un Size;
|
|
kbts__PlaceShapeConfig(Font, Script, Language, VariationVector, 0, &Size, Uid);
|
|
kbts_shape_config *Result = kbts__PlaceShapeConfig(Font, Script, Language, VariationVector, kbts__AllocatorAllocate(Allocator, AllocatorData, Size), &Size, Uid);
|
|
if(Result)
|
|
{
|
|
Result->Allocator = Allocator;
|
|
Result->AllocatorData = AllocatorData;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_config *kbts_CreateShapeConfig(kbts_font *Font, kbts_script Script, kbts_language Language, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
{
|
|
return kbts_CreateShapeConfig2(Font, Script, Language, 0, Allocator, AllocatorData, 0);
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_DestroyShapeConfig(kbts_shape_config *Config)
|
|
{
|
|
if(Config && Config->Allocator)
|
|
{
|
|
kbts__AllocatorFree(Config->Allocator, Config->AllocatorData, Config);
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_SizeOfShapeContext(void)
|
|
{
|
|
int Result = sizeof(kbts_shape_context);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_context *kbts_PlaceShapeContext2(kbts_allocator_function *Allocator, void *AllocatorData, void *Memory, kbts_shape_context_flags Flags)
|
|
{
|
|
kbts_shape_context *Result = (kbts_shape_context *)Memory;
|
|
|
|
if(Memory)
|
|
{
|
|
if(!Allocator)
|
|
{
|
|
Allocator = kbts__DefaultAllocator;
|
|
}
|
|
|
|
KBTS_MEMSET(Result, 0, sizeof(*Result));
|
|
|
|
Result->PermanentArena.Allocator = Allocator;
|
|
Result->PermanentArena.AllocatorData = AllocatorData;
|
|
|
|
Result->FontArena.Allocator = Allocator;
|
|
Result->FontArena.AllocatorData = AllocatorData;
|
|
|
|
Result->ConfigArena.Allocator = Allocator;
|
|
Result->ConfigArena.AllocatorData = AllocatorData;
|
|
|
|
Result->ScratchArena.Allocator = Allocator;
|
|
Result->ScratchArena.AllocatorData = AllocatorData;
|
|
|
|
Result->GlyphStorage.Arena.Allocator = Allocator;
|
|
Result->GlyphStorage.Arena.AllocatorData = AllocatorData;
|
|
|
|
Result->PublicFlags = Flags;
|
|
|
|
KBTS__DLLIST_SENTINEL_INIT(&Result->ExistingShapeConfigBlockSentinel);
|
|
KBTS__DLLIST_SENTINEL_INIT(&Result->ExistingGlyphConfigBlockSentinel);
|
|
KBTS__DLLIST_SENTINEL_INIT(&Result->FontBlockSentinel);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_context *kbts_PlaceShapeContext(kbts_allocator_function *Allocator, void *AllocatorData, void *Memory)
|
|
{
|
|
kbts_shape_context *Result = kbts_PlaceShapeContext2(Allocator, AllocatorData, Memory, KBTS_SHAPE_CONTEXT_FLAG_NONE);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_context *kbts_PlaceShapeContextFixedMemory2(void *Memory, int Size, kbts_shape_context_flags Flags)
|
|
{
|
|
kbts_shape_context *Result = 0;
|
|
kbts_un SizeOfShapeContext = kbts_SizeOfShapeContext();
|
|
kbts_un ContextAndArenaSize = sizeof(kbts_arena) + SizeOfShapeContext;
|
|
|
|
if((Size >= 0) && ((kbts_un)Size >= ContextAndArenaSize))
|
|
{
|
|
kbts_arena *Arena = (kbts_arena *)KBTS__POINTER_OFFSET(kbts_arena, Memory, SizeOfShapeContext);
|
|
kbts__InitializeFixedMemoryArena(Arena, KBTS__POINTER_AFTER(void, Arena), (kbts_un)Size - ContextAndArenaSize);
|
|
|
|
Result = kbts_PlaceShapeContext2(kbts__ArenaAllocator, Arena, Memory, Flags);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_context *kbts_PlaceShapeContextFixedMemory(void *Memory, int Size)
|
|
{
|
|
kbts_shape_context *Result = kbts_PlaceShapeContextFixedMemory2(Memory, Size, KBTS_SHAPE_CONTEXT_FLAG_NONE);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_context *kbts_CreateShapeContext2(kbts_allocator_function *Allocator, void *AllocatorData, kbts_shape_context_flags Flags)
|
|
{
|
|
if(!Allocator)
|
|
{
|
|
Allocator = kbts__DefaultAllocator;
|
|
}
|
|
|
|
kbts_shape_context *Result = kbts_PlaceShapeContext2(Allocator, AllocatorData, kbts__AllocatorAllocate(Allocator, AllocatorData, (kbts_un)kbts_SizeOfShapeContext()), Flags);
|
|
Result->SelfAllocator = Allocator;
|
|
Result->SelfAllocatorData = AllocatorData;
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_context *kbts_CreateShapeContext(kbts_allocator_function *Allocator, void *AllocatorData)
|
|
{
|
|
kbts_shape_context *Result = kbts_CreateShapeContext2(Allocator, AllocatorData, KBTS_SHAPE_CONTEXT_FLAG_NONE);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_DestroyShapeContext(kbts_shape_context *Context)
|
|
{
|
|
if(Context)
|
|
{
|
|
KBTS__FOR(HugeShapeConfigIndex, 0, Context->HugeShapeConfigCount)
|
|
{
|
|
kbts__huge_shape_config *HugeShapeConfig = &Context->HugeShapeConfigs[HugeShapeConfigIndex];
|
|
kbts__existing_shape_config_block *Block = HugeShapeConfig->Block;
|
|
kbts__existing_shape_config *Existing = &Block->Items[HugeShapeConfig->IndexWithinBlock];
|
|
|
|
kbts_DestroyShapeConfig(Existing->Config);
|
|
}
|
|
|
|
kbts__FreeArena(&Context->PermanentArena);
|
|
kbts__FreeArena(&Context->ConfigArena);
|
|
kbts__FreeArena(&Context->ScratchArena);
|
|
kbts__FreeArena(&Context->FontArena);
|
|
kbts__FreeArena(&Context->GlyphStorage.Arena);
|
|
|
|
if(Context->SelfAllocator)
|
|
{
|
|
kbts__AllocatorFree(Context->SelfAllocator, Context->SelfAllocatorData, Context);
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT kbts_direction kbts_ScriptDirection(kbts_script Script)
|
|
{
|
|
kbts_direction Result = ((Script == KBTS_SCRIPT_ARABIC) || (Script == KBTS_SCRIPT_HEBREW)) ? KBTS_DIRECTION_RTL : KBTS_DIRECTION_LTR;
|
|
return Result;
|
|
}
|
|
|
|
static kbts__context_font *kbts__ShapePushFont(kbts_shape_context *Context, kbts_u32 *Handle)
|
|
{
|
|
kbts__context_font *Result = 0;
|
|
|
|
if(!Context->Error)
|
|
{
|
|
kbts__arena_lifetime Lifetime = kbts__BeginLifetime(&Context->FontArena);
|
|
|
|
kbts__context_font_block_header *LastBlockHeader = Context->FontBlockSentinel.Prev;
|
|
|
|
if(!(Context->FontCount & (KBTS__CONTEXT_FONTS_PER_BLOCK - 1)))
|
|
{
|
|
kbts__context_font_block *NewBlock = kbts__PushType(&Context->FontArena, kbts__context_font_block);
|
|
KBTS_MEMSET(NewBlock, 0, sizeof(*NewBlock));
|
|
|
|
if(NewBlock)
|
|
{
|
|
kbts__context_font_block_header *NewBlockHeader = &NewBlock->Header;
|
|
|
|
KBTS__DLLIST_INSERT_BEFORE(NewBlockHeader, &Context->FontBlockSentinel);
|
|
|
|
KBTS__FOR(FontIndex, 0, KBTS__CONTEXT_FONTS_PER_BLOCK)
|
|
{
|
|
NewBlock->Fonts[FontIndex].Generation = 0;
|
|
}
|
|
|
|
LastBlockHeader = NewBlockHeader;
|
|
}
|
|
else
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
}
|
|
|
|
if(!Context->Error)
|
|
{
|
|
kbts__context_font_block *LastBlock = (kbts__context_font_block *)LastBlockHeader;
|
|
kbts_un NewFontIndex = Context->FontCount++;
|
|
|
|
Result = &LastBlock->Fonts[NewFontIndex & (KBTS__CONTEXT_FONTS_PER_BLOCK - 1)];
|
|
Result->Lifetime = Lifetime;
|
|
Result->Generation += 1;
|
|
KBTS__ZERO_TYPE(&Result->Info);
|
|
|
|
*Handle = ((kbts_u32)Result->Generation << 16) | (kbts_u32)NewFontIndex;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static float kbts__Fixed16_16ToFloat(kbts__fixed16_16 X)
|
|
{
|
|
float Result = (float)(X.Value >> 16) + (float)(X.Value & 0xFFFF) * (1.0f / 65536.0f);
|
|
return Result;
|
|
}
|
|
|
|
static float kbts__Fixed16_16ToFloatFromMemory(kbts__fixed16_16 *X)
|
|
{
|
|
kbts__fixed16_16 Loaded;
|
|
KBTS_MEMCPY(&Loaded, X, sizeof(Loaded));
|
|
float Result = kbts__Fixed16_16ToFloat(Loaded);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_GetVariationInfo(kbts_font *Font, int *AxisCount_, int *InstanceCount_)
|
|
{
|
|
int AxisCount = 0;
|
|
int InstanceCount = 0;
|
|
|
|
if(Font && Font->Blob)
|
|
{
|
|
kbts__fvar *Fvar = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_FVAR, kbts__fvar);
|
|
|
|
if(Fvar)
|
|
{
|
|
AxisCount = kbts__ReadU16Unaligned(&Fvar->AxisCount);
|
|
InstanceCount = kbts__ReadU16Unaligned(&Fvar->InstanceCount);
|
|
}
|
|
}
|
|
|
|
if(AxisCount_)
|
|
{
|
|
*AxisCount_ = AxisCount;
|
|
}
|
|
|
|
if(InstanceCount_)
|
|
{
|
|
*InstanceCount_ = InstanceCount;
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_NormalizeVariationVector(kbts_font *Font, float *VariationVector, kbts_s16 *VariationVectorNormalized)
|
|
{
|
|
if(Font && Font->Blob &&
|
|
VariationVector)
|
|
{
|
|
kbts__fvar *Fvar = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_FVAR, kbts__fvar);
|
|
kbts__avar *Avar = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_AVAR, kbts__avar);
|
|
|
|
if(Fvar)
|
|
{
|
|
kbts__variation_axis_record *Axes = KBTS__POINTER_OFFSET(kbts__variation_axis_record, Fvar, kbts__ReadU16Unaligned(&Fvar->AxesArrayOffset));
|
|
kbts_un AxisCount = kbts__ReadU16Unaligned(&Fvar->AxisCount);
|
|
|
|
kbts__segment_maps *SegmentMaps = Avar ? KBTS__POINTER_AFTER(kbts__segment_maps, Avar) : 0;
|
|
|
|
KBTS__FOR(AxisIndex, 0, AxisCount)
|
|
{
|
|
kbts__variation_axis_record *Axis = &Axes[AxisIndex];
|
|
|
|
kbts_un PositionMapCount = SegmentMaps ? kbts__ReadU16Unaligned(&SegmentMaps->PositionMapCount) : 0;
|
|
|
|
float AxisMin = kbts__Fixed16_16ToFloatFromMemory(&Axis->MinValue);
|
|
float AxisDefault = kbts__Fixed16_16ToFloatFromMemory(&Axis->DefaultValue);
|
|
float AxisMax = kbts__Fixed16_16ToFloatFromMemory(&Axis->MaxValue);
|
|
|
|
float InputCoord = VariationVector[AxisIndex];
|
|
|
|
if(InputCoord < AxisMin)
|
|
{
|
|
InputCoord = AxisMin;
|
|
}
|
|
else if(InputCoord > AxisMax)
|
|
{
|
|
InputCoord = AxisMax;
|
|
}
|
|
|
|
float NormalizedInputFloat;
|
|
if(InputCoord < AxisDefault)
|
|
{
|
|
NormalizedInputFloat = -(AxisDefault - InputCoord) / (AxisDefault - AxisMin);
|
|
}
|
|
else if (InputCoord > AxisDefault)
|
|
{
|
|
NormalizedInputFloat = (InputCoord - AxisDefault) / (AxisMax - AxisDefault);
|
|
}
|
|
else
|
|
{
|
|
NormalizedInputFloat = 0;
|
|
}
|
|
|
|
#ifdef KBTS__VARIATION_NORMALIZATION_COMPATIBILITY
|
|
NormalizedInputFloat = (float)kbts__Floor32(NormalizedInputFloat * 65536.0f + 0.5f) / 65536.0f;
|
|
kbts_s16 NormalizedInputFixed = (kbts_s16)(((kbts_s32)(NormalizedInputFloat * 65536.0f) + 2) >> 2);
|
|
#else
|
|
kbts_s16 NormalizedInputFixed = kbts__FloatToFixed2_14(NormalizedInputFloat);
|
|
#endif
|
|
|
|
if(PositionMapCount)
|
|
{
|
|
kbts__axis_value_map *AxisValueMaps = KBTS__POINTER_AFTER(kbts__axis_value_map, SegmentMaps);
|
|
|
|
// @Speed: Binary search?
|
|
kbts_s16 Last_From = kbts__ReadS16Unaligned(&AxisValueMaps[0].FromCoordinate);
|
|
kbts_s16 Last_To = kbts__ReadS16Unaligned(&AxisValueMaps[0].ToCoordinate);
|
|
float From0 = kbts__Fixed2_14ToFloat(Last_From);
|
|
|
|
#ifdef KBTS__VARIATION_NORMALIZATION_COMPATIBILITY
|
|
KBTS__FOR(PositionMapIndex, 1, PositionMapCount)
|
|
{
|
|
kbts__axis_value_map *Current = &AxisValueMaps[PositionMapIndex];
|
|
kbts_s16 Current_From = kbts__ReadS16Unaligned(&Current->FromCoordinate);
|
|
kbts_s16 Current_To = kbts__ReadS16Unaligned(&Current->ToCoordinate);
|
|
float From1 = kbts__Fixed2_14ToFloat(Current_From);
|
|
|
|
if(From1 >= NormalizedInputFloat)
|
|
{
|
|
float To0 = kbts__Fixed2_14ToFloat(Last_To);
|
|
float To1 = kbts__Fixed2_14ToFloat(Current_To);
|
|
|
|
float LerpFactor = (NormalizedInputFloat - From0) / (From1 - From0);
|
|
float RemappedFloat = To0 + (To1 - To0) * LerpFactor;
|
|
|
|
RemappedFloat = (float)kbts__Round32(RemappedFloat * 65536.0f);
|
|
kbts_s16 RemappedFixed = (kbts_s16)(((kbts_s32)RemappedFloat + 2) >> 2);
|
|
|
|
VariationVectorNormalized[AxisIndex] = RemappedFixed;
|
|
|
|
break;
|
|
}
|
|
|
|
From0 = From1;
|
|
Last_From = Current_From;
|
|
Last_To = Current_To;
|
|
}
|
|
#else
|
|
KBTS__FOR(PositionMapIndex, 1, PositionMapCount)
|
|
{
|
|
kbts__axis_value_map *Current = &AxisValueMaps[PositionMapIndex];
|
|
kbts_s16 Current_From = kbts__ReadS16Unaligned(&Current->FromCoordinate);
|
|
kbts_s16 Current_To = kbts__ReadS16Unaligned(&Current->ToCoordinate);
|
|
|
|
if(Current_From >= NormalizedInputFixed)
|
|
{
|
|
float From0 = kbts__Fixed2_14ToFloat(Last_From);
|
|
float To0 = kbts__Fixed2_14ToFloat(Last_To);
|
|
float From1 = kbts__Fixed2_14ToFloat(Current_From);
|
|
float To1 = kbts__Fixed2_14ToFloat(Current_To);
|
|
|
|
float LerpFactor = (NormalizedInputFloat - From0) / (From1 - From0);
|
|
float RemappedFloat = To0 + (To1 - To0) * LerpFactor;
|
|
|
|
kbts_s16 RemappedFixed = kbts__FloatToFixed2_14(RemappedFloat);
|
|
|
|
VariationVectorNormalized[AxisIndex] = RemappedFixed;
|
|
|
|
break;
|
|
}
|
|
|
|
Last_From = Current_From;
|
|
Last_To = Current_To;
|
|
}
|
|
#endif
|
|
}
|
|
else
|
|
{
|
|
VariationVectorNormalized[AxisIndex] = NormalizedInputFixed;
|
|
}
|
|
|
|
if(SegmentMaps)
|
|
{
|
|
kbts__axis_value_map *AxisValueMaps = KBTS__POINTER_AFTER(kbts__axis_value_map, SegmentMaps);
|
|
SegmentMaps = (kbts__segment_maps *)(AxisValueMaps + PositionMapCount);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static kbts_u16 kbts__StringIdFromOpenTypeStringId(kbts_u16 OpenTypeStringId)
|
|
{
|
|
kbts_u16 Result = OpenTypeStringId;
|
|
|
|
if(OpenTypeStringId < KBTS_FONT_INFO_STRING_ID_COUNT1)
|
|
{
|
|
static const kbts_u8 OpenTypeStringIdToKbts[KBTS_FONT_INFO_STRING_ID_COUNT1] = {
|
|
KBTS_FONT_INFO_STRING_ID_COPYRIGHT,
|
|
KBTS_FONT_INFO_STRING_ID_FAMILY,
|
|
KBTS_FONT_INFO_STRING_ID_SUBFAMILY,
|
|
KBTS_FONT_INFO_STRING_ID_UID,
|
|
KBTS_FONT_INFO_STRING_ID_FULL_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_VERSION,
|
|
KBTS_FONT_INFO_STRING_ID_POSTSCRIPT_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_TRADEMARK,
|
|
KBTS_FONT_INFO_STRING_ID_MANUFACTURER,
|
|
KBTS_FONT_INFO_STRING_ID_DESIGNER,
|
|
KBTS_FONT_INFO_STRING_ID_DESCRIPTION,
|
|
KBTS_FONT_INFO_STRING_ID_VENDOR_URL,
|
|
KBTS_FONT_INFO_STRING_ID_DESIGNER_URL,
|
|
KBTS_FONT_INFO_STRING_ID_LICENSE,
|
|
KBTS_FONT_INFO_STRING_ID_LICENSE_URL,
|
|
KBTS_FONT_INFO_STRING_ID_RESERVED,
|
|
KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_FAMILY,
|
|
KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_SUBFAMILY,
|
|
KBTS_FONT_INFO_STRING_ID_COMPATIBLE_FULL_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_SAMPLE_TEXT,
|
|
KBTS_FONT_INFO_STRING_ID_POSTSCRIPT_CID_FINDFONT_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_WWS_FAMILY_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_WWS_SUBFAMILY_NAME,
|
|
KBTS_FONT_INFO_STRING_ID_LIGHT_BACKGROUND_PALETTE,
|
|
KBTS_FONT_INFO_STRING_ID_DARK_BACKGROUND_PALETTE,
|
|
KBTS_FONT_INFO_STRING_ID_VARIATIONS_POSTSCRIPT_NAME_PREFIX,
|
|
};
|
|
|
|
Result = OpenTypeStringIdToKbts[OpenTypeStringId];
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_GetVariationAxisInfo(kbts_font *Font, int AxisIndex, kbts_variation_axis_info *Info)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(Font && Font->Blob)
|
|
{
|
|
kbts__fvar *Fvar = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_FVAR, kbts__fvar);
|
|
|
|
if(Fvar &&
|
|
((unsigned)AxisIndex < kbts__ReadU16Unaligned(&Fvar->AxisCount)))
|
|
{
|
|
kbts__variation_axis_record *Axes = KBTS__POINTER_OFFSET(kbts__variation_axis_record, Fvar, kbts__ReadU16Unaligned(&Fvar->AxesArrayOffset));
|
|
kbts__variation_axis_record *Axis = &Axes[AxisIndex];
|
|
|
|
Info->Tag = kbts__ReadU32Unaligned(&Axis->Tag);
|
|
Info->MinimumValue = kbts__Fixed16_16ToFloatFromMemory(&Axis->MinValue);
|
|
Info->DefaultValue = kbts__Fixed16_16ToFloatFromMemory(&Axis->DefaultValue);
|
|
Info->MaximumValue = kbts__Fixed16_16ToFloatFromMemory(&Axis->MaxValue);
|
|
Info->Flags = kbts__ReadU16Unaligned(&Axis->Flags);
|
|
Info->NameStringId = kbts__StringIdFromOpenTypeStringId(kbts__ReadU16Unaligned(&Axis->AxisNameId));
|
|
|
|
Result = 1;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_GetVariationInstance(kbts_font *Font, int InstanceIndex, kbts_variation_instance_info *Info, float *VariationVector)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(Font && Font->Blob)
|
|
{
|
|
kbts__fvar *Fvar = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_FVAR, kbts__fvar);
|
|
|
|
if(Fvar &&
|
|
((unsigned)InstanceIndex < kbts__ReadU16Unaligned(&Fvar->InstanceCount)))
|
|
{
|
|
kbts_un AxisCount = kbts__ReadU16Unaligned(&Fvar->AxisCount);
|
|
kbts_un InstanceSize = kbts__ReadU16Unaligned(&Fvar->InstanceSize);
|
|
kbts__variation_axis_record *Axes = KBTS__POINTER_OFFSET(kbts__variation_axis_record, Fvar, kbts__ReadU16Unaligned(&Fvar->AxesArrayOffset));
|
|
kbts__instance_record *Instance = KBTS__POINTER_OFFSET(kbts__instance_record, Axes, AxisCount * kbts__ReadU16Unaligned(&Fvar->AxisSize) + InstanceIndex * InstanceSize);
|
|
kbts__fixed16_16 *InstanceCoordinates = KBTS__POINTER_AFTER(kbts__fixed16_16, Instance);
|
|
kbts_u16 *PostscriptNameId = (kbts_u16 *)(InstanceCoordinates + AxisCount);
|
|
|
|
kbts_variation_instance_flags Flags = 0;
|
|
kbts_u16 PostscriptNameStringId = 0xFFFF;
|
|
if(InstanceSize == (AxisCount * sizeof(kbts__fixed16_16) + 6))
|
|
{
|
|
Flags |= KBTS_VARIATION_INSTANCE_FLAG_HAS_POSTSCRIPT_NAME;
|
|
PostscriptNameStringId = kbts__ReadU16Unaligned(PostscriptNameId);
|
|
}
|
|
|
|
Info->SubfamilyNameStringId = kbts__StringIdFromOpenTypeStringId(kbts__ReadU16Unaligned(&Instance->SubfamilyNameId));
|
|
Info->PostscriptNameStringId = kbts__StringIdFromOpenTypeStringId(PostscriptNameStringId);
|
|
Info->Flags = Flags;
|
|
|
|
if(VariationVector)
|
|
{
|
|
KBTS__FOR(AxisIndex, 0, AxisCount)
|
|
{
|
|
VariationVector[AxisIndex] = kbts__Fixed16_16ToFloatFromMemory(&InstanceCoordinates[AxisIndex]);
|
|
}
|
|
}
|
|
|
|
Result = 1;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE int kbts__IsNan32(float X)
|
|
{
|
|
int Result = (X != X);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT float kbts_FontMetric(kbts_font *Font, kbts_u32 Tag, float *VariationVector)
|
|
{
|
|
float Result = 0;
|
|
|
|
if(Font && Font->Blob)
|
|
{
|
|
if(VariationVector)
|
|
{
|
|
kbts__mvar *Mvar = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_MVAR, kbts__mvar);
|
|
|
|
if(Mvar)
|
|
{
|
|
kbts__mvar_value_record *FoundValueRecord = 0;
|
|
|
|
char *AtValueRecords = KBTS__POINTER_AFTER(char, Mvar);
|
|
kbts_un Mvar_ValueRecordCount = kbts__ReadU16Unaligned(&Mvar->ValueRecordCount);
|
|
KBTS__FOR(ValueRecordIndex, 0, Mvar_ValueRecordCount)
|
|
{
|
|
kbts__mvar_value_record *ValueRecord = (kbts__mvar_value_record *)AtValueRecords;
|
|
|
|
if(kbts__ReadU32Unaligned(&ValueRecord->Tag) == Tag)
|
|
{
|
|
FoundValueRecord = ValueRecord;
|
|
|
|
break;
|
|
}
|
|
|
|
AtValueRecords += kbts__ReadU16Unaligned(&Mvar->ValueRecordSize);
|
|
}
|
|
|
|
if(FoundValueRecord)
|
|
{
|
|
kbts__item_variation_store *Store = KBTS__POINTER_OFFSET(kbts__item_variation_store, Mvar, kbts__ReadU16Unaligned(&Mvar->ItemVariationStoreOffset));
|
|
kbts_u32 *Store_VariationRegionListOffset = kbts__item_variation_store_VariationRegionListOffset(Store);
|
|
|
|
kbts__variation_region_list *VariationRegionList = KBTS__POINTER_OFFSET(kbts__variation_region_list, Store, kbts__ReadU32Unaligned(Store_VariationRegionListOffset));
|
|
// @Hardcoded
|
|
if(kbts__ReadU16Unaligned(&VariationRegionList->AxisCount) <= 64)
|
|
{
|
|
kbts_s16 VariationVectorNormalized[64];
|
|
kbts_NormalizeVariationVector(Font, VariationVector, (kbts_s16 *)VariationVectorNormalized);
|
|
|
|
Result = kbts__ItemVariationStoreDelta(Store, kbts__ReadU16Unaligned(&FoundValueRecord->DeltaSetOuterIndex), kbts__ReadU16Unaligned(&FoundValueRecord->DeltaSetInnerIndex), VariationVectorNormalized);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// No valid variation table. Fall back to static font info.
|
|
kbts_font_info2_2 Info;
|
|
Info.Base.Size = sizeof(Info);
|
|
kbts_GetFontInfo2(Font, &Info.Base);
|
|
|
|
switch(Tag)
|
|
{
|
|
case KBTS_FOURCC('v', 'a', 's', 'c'): Result = (float)Info.Ascent; break;
|
|
case KBTS_FOURCC('v', 'd', 's', 'c'): Result = (float)Info.Descent; break;
|
|
case KBTS_FOURCC('v', 'l', 'g', 'p'): Result = (float)Info.LineGap; break;
|
|
case KBTS_FOURCC('c', 'p', 'h', 't'): Result = (float)Info.CapitalHeight; break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__context_font *kbts__GetContextFont(kbts_shape_context *Context, kbts_u32 ContextFontHandle)
|
|
{
|
|
kbts__context_font *Result = 0;
|
|
if(!Context->Error)
|
|
{
|
|
kbts_un FontIndex = ContextFontHandle & 0xFFFF;
|
|
if(FontIndex < Context->FontCount)
|
|
{
|
|
kbts_un RunningIndex = FontIndex;
|
|
kbts__context_font_block_header *BlockHeader = Context->FontBlockSentinel.Next;
|
|
while(RunningIndex >= KBTS__CONTEXT_FONTS_PER_BLOCK)
|
|
{
|
|
BlockHeader = BlockHeader->Next;
|
|
RunningIndex -= KBTS__CONTEXT_FONTS_PER_BLOCK;
|
|
}
|
|
|
|
kbts__context_font_block *Block = (kbts__context_font_block *)BlockHeader;
|
|
kbts__context_font *Font = &Block->Fonts[RunningIndex];
|
|
kbts_un FontGeneration = ContextFontHandle >> 16;
|
|
|
|
if(Font->Generation == FontGeneration)
|
|
{
|
|
Result = Font;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
typedef kbts_u32 kbts__shape_set_font_variations_flags;
|
|
enum kbts__shape_set_font_variations_flags_enum
|
|
{
|
|
KBTS__SHAPE_SET_FONT_VARIATIONS_FLAG_NONE = 0,
|
|
KBTS__SHAPE_SET_FONT_VARIATIONS_FLAG_SET_TO_DEFAULT_IF_NOT_EXPLICITLY_SET = 1,
|
|
};
|
|
|
|
static int kbts__ShapeSetFontVariations(kbts_shape_context *Context, kbts_u32 ContextFontHandle, kbts_variation *Variations, int VariationCount, kbts__shape_set_font_variations_flags Flags)
|
|
{
|
|
int Result = 0;
|
|
kbts__context_font *ContextFont = kbts__GetContextFont(Context, ContextFontHandle);
|
|
|
|
if(ContextFont)
|
|
{
|
|
int AxisCount;
|
|
kbts_GetVariationInfo(ContextFont->Info.Font, &AxisCount, 0);
|
|
|
|
if(AxisCount > 0)
|
|
{
|
|
float *VariationVector = ContextFont->Info.VariationVector;
|
|
|
|
for(int AxisIndex = 0;
|
|
AxisIndex < AxisCount;
|
|
++AxisIndex)
|
|
{
|
|
kbts_variation_axis_info AxisInfo;
|
|
kbts_GetVariationAxisInfo(ContextFont->Info.Font, AxisIndex, &AxisInfo);
|
|
|
|
float AxisValue = AxisInfo.DefaultValue;
|
|
int Found = 0;
|
|
|
|
for(int VariationIndex = 0;
|
|
VariationIndex < VariationCount;
|
|
++VariationIndex)
|
|
{
|
|
kbts_variation *Variation = &Variations[VariationIndex];
|
|
|
|
if(Variation->Tag == AxisInfo.Tag)
|
|
{
|
|
AxisValue = Variation->Value;
|
|
Result += 1;
|
|
Found = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(Found ||
|
|
(Flags & KBTS__SHAPE_SET_FONT_VARIATIONS_FLAG_SET_TO_DEFAULT_IF_NOT_EXPLICITLY_SET))
|
|
{
|
|
VariationVector[AxisIndex] = AxisValue;
|
|
}
|
|
}
|
|
|
|
ContextFont->Info.Flags |= KBTS__CONTEXT_FONT_FLAG_VARIATIONS_DIRTY;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeSetFontVariations(kbts_shape_context *Context, kbts_u32 ContextFontHandle, kbts_variation *Variations, int VariationCount)
|
|
{
|
|
return kbts__ShapeSetFontVariations(Context, ContextFontHandle, Variations, VariationCount, 0);
|
|
}
|
|
|
|
static void kbts__InitializeContextFont(kbts_shape_context *Context, kbts__context_font *ContextFont, kbts_font *Font)
|
|
{
|
|
KBTS_ASSERT(Font->Blob);
|
|
ContextFont->Info.Font = Font;
|
|
|
|
int AxisCount;
|
|
kbts_GetVariationInfo(Font, &AxisCount, 0);
|
|
ContextFont->Info.VariationVector = kbts__PushArray(&Context->FontArena, float, AxisCount);
|
|
}
|
|
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFont2(kbts_shape_context *Context, kbts_font *Font, kbts_variation *Variations, int VariationCount, kbts_u32 *ContextFontHandle_)
|
|
{
|
|
kbts_u32 ContextFontHandle = 0xFFFF0000u;
|
|
|
|
if(!Context->Error && Font && Font->Blob)
|
|
{
|
|
kbts__context_font *ContextFont = kbts__ShapePushFont(Context, &ContextFontHandle);
|
|
|
|
if(ContextFont)
|
|
{
|
|
kbts__InitializeContextFont(Context, ContextFont, Font);
|
|
|
|
kbts__ShapeSetFontVariations(Context, ContextFontHandle, Variations, VariationCount, KBTS__SHAPE_SET_FONT_VARIATIONS_FLAG_SET_TO_DEFAULT_IF_NOT_EXPLICITLY_SET);
|
|
}
|
|
}
|
|
|
|
if(ContextFontHandle_)
|
|
{
|
|
*ContextFontHandle_ = ContextFontHandle;
|
|
}
|
|
|
|
return Font;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFont(kbts_shape_context *Context, kbts_font *Font)
|
|
{
|
|
kbts_font *Result = kbts_ShapePushFont2(Context, Font, 0, 0, 0);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_font *kbts_ShapePopFont(kbts_shape_context *Context)
|
|
{
|
|
kbts_font *Result = 0;
|
|
|
|
if(!Context->Error && Context->FontCount)
|
|
{
|
|
kbts__context_font_block *Block = (kbts__context_font_block *)Context->FontBlockSentinel.Prev;
|
|
kbts_un BlockFontIndex = (Context->FontCount - 1) & (KBTS__CONTEXT_FONTS_PER_BLOCK - 1);
|
|
kbts__context_font *Font = &Block->Fonts[BlockFontIndex];
|
|
Result = Font->Info.Font;
|
|
|
|
if(!BlockFontIndex)
|
|
{
|
|
// The EndLifetime() call below will also free this font block.
|
|
KBTS__DLLIST_REMOVE(&Block->Header);
|
|
}
|
|
|
|
kbts__EndLifetime(&Font->Lifetime);
|
|
Context->FontCount -= 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
#ifndef KB_TEXT_SHAPE_NO_CRT
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFontFromFile2(kbts_shape_context *Context, const char *FileName, int FontIndex, kbts_variation *Variations, int VariationCount, kbts_u32 *ContextFontHandle_)
|
|
{
|
|
kbts_font *Result = 0;
|
|
kbts_u32 ContextFontHandle = 0xFFFF0000u;
|
|
kbts__context_font *ContextFont = kbts__ShapePushFont(Context, &ContextFontHandle);
|
|
|
|
if(ContextFont)
|
|
{
|
|
Result = kbts__PushType(&Context->FontArena, kbts_font);
|
|
if(Result)
|
|
{
|
|
*Result = kbts_FontFromFile(FileName, FontIndex, kbts__ArenaAllocator, &Context->FontArena, 0, 0);
|
|
|
|
if(!Result->Error)
|
|
{
|
|
kbts__InitializeContextFont(Context, ContextFont, Result);
|
|
|
|
kbts__ShapeSetFontVariations(Context, ContextFontHandle, Variations, VariationCount, KBTS__SHAPE_SET_FONT_VARIATIONS_FLAG_SET_TO_DEFAULT_IF_NOT_EXPLICITLY_SET);
|
|
}
|
|
else
|
|
{
|
|
kbts_ShapePopFont(Context);
|
|
Result = 0;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
}
|
|
|
|
if(ContextFontHandle_)
|
|
{
|
|
*ContextFontHandle_ = ContextFontHandle;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFontFromFile(kbts_shape_context *Context, const char *FileName, int FontIndex)
|
|
{
|
|
kbts_font *Result = kbts_ShapePushFontFromFile2(Context, FileName, FontIndex, 0, 0, 0);
|
|
return Result;
|
|
}
|
|
#endif
|
|
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFontFromMemory2(kbts_shape_context *Context, void *Memory, int Length, int FontIndex, kbts_variation *Variations, int VariationCount, kbts_u32 *ContextFontHandle_)
|
|
{
|
|
kbts_font *Result = 0;
|
|
kbts_u32 ContextFontHandle = 0xFFFF0000u;
|
|
|
|
if(Length > 0)
|
|
{
|
|
kbts__context_font *ContextFont = kbts__ShapePushFont(Context, &ContextFontHandle);
|
|
|
|
if(ContextFont)
|
|
{
|
|
Result = kbts__PushType(&Context->FontArena, kbts_font);
|
|
|
|
if(Result)
|
|
{
|
|
KBTS_MEMSET(Result, 0, sizeof(*Result));
|
|
|
|
int ScratchSize, OutputSize;
|
|
kbts_load_font_state State = KBTS__ZERO;
|
|
kbts_load_font_error Error = kbts_LoadFont(Result, &State, Memory, Length, FontIndex, &ScratchSize, &OutputSize);
|
|
if(Error == KBTS_LOAD_FONT_ERROR_NEED_TO_CREATE_BLOB)
|
|
{
|
|
void *Scratch = kbts__PushSize(&Context->ScratchArena, (kbts_un)ScratchSize, 8);
|
|
void *Output = kbts__PushSize(&Context->FontArena, (kbts_un)OutputSize, 8);
|
|
|
|
Error = kbts_PlaceBlob(Result, &State, Scratch, Output);
|
|
}
|
|
|
|
if(!Error)
|
|
{
|
|
kbts__InitializeContextFont(Context, ContextFont, Result);
|
|
|
|
kbts__ShapeSetFontVariations(Context, ContextFontHandle, Variations, VariationCount, KBTS__SHAPE_SET_FONT_VARIATIONS_FLAG_SET_TO_DEFAULT_IF_NOT_EXPLICITLY_SET);
|
|
}
|
|
else
|
|
{
|
|
kbts_ShapePopFont(Context);
|
|
Result = 0;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_font *kbts_ShapePushFontFromMemory(kbts_shape_context *Context, void *Memory, int Length, int FontIndex)
|
|
{
|
|
kbts_font *Result = kbts_ShapePushFontFromMemory2(Context, Memory, Length, FontIndex, 0, 0, 0);
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__EnsureGlyphStorageInitialized(kbts_glyph_storage *Storage)
|
|
{
|
|
if(!Storage->GlyphSentinel.Next)
|
|
{
|
|
KBTS__DLLIST_SENTINEL_INIT(&Storage->GlyphSentinel);
|
|
KBTS__DLLIST_SENTINEL_INIT(&Storage->FreeGlyphSentinel);
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_InitializeGlyphStorage(kbts_glyph_storage *Storage, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(Storage)
|
|
{
|
|
Result = 1;
|
|
KBTS_MEMSET(Storage, 0, sizeof(*Storage));
|
|
|
|
Storage->Arena.Allocator = Allocator;
|
|
Storage->Arena.AllocatorData = AllocatorData;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_InitializeGlyphStorageFixedMemory(kbts_glyph_storage *Storage, void *Memory, int MemorySize)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(Storage &&
|
|
(MemorySize > 0))
|
|
{
|
|
KBTS_MEMSET(Storage, 0, sizeof(*Storage));
|
|
|
|
Result = kbts__InitializeFixedMemoryArena(&Storage->Arena, Memory, (kbts_un)MemorySize);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_glyph_iterator kbts_ActiveGlyphIterator(kbts_glyph_storage *Storage)
|
|
{
|
|
kbts_glyph_iterator Result = KBTS__ZERO;
|
|
|
|
if(Storage && !Storage->Error)
|
|
{
|
|
kbts__EnsureGlyphStorageInitialized(Storage);
|
|
|
|
Result.GlyphStorage = Storage;
|
|
Result.CurrentGlyph = Storage->GlyphSentinel.Next;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ClearActiveGlyphs(kbts_glyph_storage *Storage)
|
|
{
|
|
if(!Storage->Error)
|
|
{
|
|
kbts__EnsureGlyphStorageInitialized(Storage);
|
|
|
|
kbts_glyph *First = Storage->GlyphSentinel.Next;
|
|
kbts_glyph *Last = Storage->GlyphSentinel.Prev;
|
|
|
|
if(kbts__GlyphIsValid(Storage, First))
|
|
{
|
|
// Free all previous glyphs.
|
|
First->Prev = Storage->FreeGlyphSentinel.Prev;
|
|
Last->Next = &Storage->FreeGlyphSentinel;
|
|
First->Prev->Next = First;
|
|
Last->Next->Prev = Last;
|
|
}
|
|
|
|
KBTS__DLLIST_SENTINEL_INIT(&Storage->GlyphSentinel);
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_FreeAllGlyphs(kbts_glyph_storage *Storage)
|
|
{
|
|
kbts__FreeArena(&Storage->Arena);
|
|
|
|
KBTS__DLLIST_SENTINEL_INIT(&Storage->GlyphSentinel);
|
|
KBTS__DLLIST_SENTINEL_INIT(&Storage->FreeGlyphSentinel);
|
|
}
|
|
|
|
KBTS_EXPORT kbts_glyph *kbts_PushGlyph(kbts_glyph_storage *Storage, kbts_font *Font, int Codepoint, kbts_glyph_config *Config, int UserId)
|
|
{
|
|
kbts_glyph *Result = 0;
|
|
|
|
if(!Storage->Error)
|
|
{
|
|
kbts__EnsureGlyphStorageInitialized(Storage);
|
|
|
|
kbts_glyph Template = KBTS__ZERO;
|
|
if(Font)
|
|
{
|
|
Template = kbts_CodepointToGlyph(Font, Codepoint, Config, UserId);
|
|
}
|
|
else
|
|
{
|
|
Template.Codepoint = (kbts_u32)Codepoint;
|
|
Template.Config = Config;
|
|
// We do not want to use the template's UserId here, because it is just a bag of properties!
|
|
// We want to keep the original UserId.
|
|
}
|
|
|
|
Result = kbts__InsertGlyphBefore(Storage, &Storage->GlyphSentinel, &Template);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_u32 kbts__GlyphConfigHash(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, kbts_un OverrideCount)
|
|
{
|
|
kbts__murmur_state Murmur;
|
|
kbts__MurmurBegin(&Murmur, ShapeConfig->Uid.Data[0] ^ ShapeConfig->Uid.Data[1] ^ ShapeConfig->Uid.Data[2] ^ ShapeConfig->Uid.Data[3]);
|
|
|
|
// Note that different override orders will result in different hashes.
|
|
KBTS__FOR(OverrideIndex, 0, OverrideCount)
|
|
{
|
|
kbts_feature_override *Override = &Overrides[OverrideIndex];
|
|
|
|
kbts__MurmurAbsorb(&Murmur, Override->Tag);
|
|
kbts__MurmurAbsorb(&Murmur, (kbts_u32)Override->Value);
|
|
}
|
|
|
|
kbts_u32 Result = kbts__MurmurFinalize(&Murmur);
|
|
return Result;
|
|
}
|
|
|
|
static kbts_glyph_config *kbts__PlaceGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount, void *Memory, kbts_un *Size_)
|
|
{
|
|
kbts__pointer_bump_allocator Bump = kbts__PointerBumpAllocator(Memory);
|
|
kbts_glyph_config *Result = kbts__PointerPushType(&Bump, kbts_glyph_config);
|
|
|
|
if(ShapeConfig)
|
|
{
|
|
if(Memory)
|
|
{
|
|
KBTS_MEMSET(Result, 0, sizeof(*Result));
|
|
}
|
|
|
|
kbts_un SequentialLookupCount = kbts__SequentialLookupCount(ShapeConfig);
|
|
kbts_un LastSequentialLookupIndex = (SequentialLookupCount) ? (SequentialLookupCount - 1) : 0;
|
|
kbts__matrix_index LastRowEntryMatrixIndex = kbts__IdSequentialLookupMatrixIndex(LastSequentialLookupIndex, 0, SequentialLookupCount);
|
|
kbts_un MatrixRowSizeInBytes = sizeof(kbts_u32) * (LastRowEntryMatrixIndex.WordIndex + 1);
|
|
kbts_u32 *EnabledLookupBits = (kbts_u32 *)kbts__PointerPush(&Bump, MatrixRowSizeInBytes, KBTS_ALIGNOF(kbts_u32));
|
|
kbts_u32 *DisabledLookupBits = (kbts_u32 *)kbts__PointerPush(&Bump, MatrixRowSizeInBytes, KBTS_ALIGNOF(kbts_u32));
|
|
if(Memory)
|
|
{
|
|
KBTS_MEMSET(EnabledLookupBits, 0, MatrixRowSizeInBytes);
|
|
KBTS_MEMSET(DisabledLookupBits, 0, MatrixRowSizeInBytes);
|
|
}
|
|
|
|
kbts_glyph_flags EnabledFilterFlags = 0;
|
|
kbts_glyph_flags DisabledFilterFlags = 0;
|
|
|
|
kbts__enabled_lookup NonBinaryEnabledLookups[KBTS_MAX_SIMULTANEOUS_FEATURES];
|
|
kbts_un NonBinaryEnabledLookupCount = 0;
|
|
|
|
kbts__feature_set OverriddenFeatures = KBTS__ZERO;
|
|
KBTS__FOR(OverrideIndex, 0, (kbts_un)OverrideCount)
|
|
{
|
|
kbts_feature_override *Override = &Overrides[OverrideIndex];
|
|
kbts__AddFeature(&OverriddenFeatures, kbts__FeatureTagToId(Override->Tag));
|
|
|
|
kbts_glyph_flags *Flags = Override->Value ? &EnabledFilterFlags : &DisabledFilterFlags;
|
|
|
|
switch(Override->Tag)
|
|
{
|
|
case KBTS_FEATURE_TAG_isol: *Flags |= KBTS_GLYPH_FLAG_ISOL; break;
|
|
case KBTS_FEATURE_TAG_fina: *Flags |= KBTS_GLYPH_FLAG_FINA; break;
|
|
case KBTS_FEATURE_TAG_fin2: *Flags |= KBTS_GLYPH_FLAG_FIN2; break;
|
|
case KBTS_FEATURE_TAG_fin3: *Flags |= KBTS_GLYPH_FLAG_FIN3; break;
|
|
case KBTS_FEATURE_TAG_medi: *Flags |= KBTS_GLYPH_FLAG_MEDI; break;
|
|
case KBTS_FEATURE_TAG_med2: *Flags |= KBTS_GLYPH_FLAG_MED2; break;
|
|
case KBTS_FEATURE_TAG_init: *Flags |= KBTS_GLYPH_FLAG_INIT; break;
|
|
case KBTS_FEATURE_TAG_ljmo: *Flags |= KBTS_GLYPH_FLAG_LJMO; break;
|
|
case KBTS_FEATURE_TAG_vjmo: *Flags |= KBTS_GLYPH_FLAG_VJMO; break;
|
|
case KBTS_FEATURE_TAG_tjmo: *Flags |= KBTS_GLYPH_FLAG_TJMO; break;
|
|
case KBTS_FEATURE_TAG_rphf: *Flags |= KBTS_GLYPH_FLAG_RPHF; break;
|
|
case KBTS_FEATURE_TAG_blwf: *Flags |= KBTS_GLYPH_FLAG_BLWF; break;
|
|
case KBTS_FEATURE_TAG_half: *Flags |= KBTS_GLYPH_FLAG_HALF; break;
|
|
case KBTS_FEATURE_TAG_pstf: *Flags |= KBTS_GLYPH_FLAG_PSTF; break;
|
|
case KBTS_FEATURE_TAG_abvf: *Flags |= KBTS_GLYPH_FLAG_ABVF; break;
|
|
case KBTS_FEATURE_TAG_pref: *Flags |= KBTS_GLYPH_FLAG_PREF; break;
|
|
case KBTS_FEATURE_TAG_numr: *Flags |= KBTS_GLYPH_FLAG_NUMR; break;
|
|
case KBTS_FEATURE_TAG_frac: *Flags |= KBTS_GLYPH_FLAG_FRAC; break;
|
|
case KBTS_FEATURE_TAG_dnom: *Flags |= KBTS_GLYPH_FLAG_DNOM; break;
|
|
case KBTS_FEATURE_TAG_cfar: *Flags |= KBTS_GLYPH_FLAG_CFAR; break;
|
|
}
|
|
}
|
|
|
|
KBTS__FOR(ShapingTable, 0, KBTS_SHAPING_TABLE_COUNT)
|
|
{
|
|
// @Duplication
|
|
kbts__gsub_gpos *GsubGpos = kbts__BlobTableDataType(ShapeConfig->Font->Blob, (ShapingTable == KBTS_SHAPING_TABLE_GSUB) ? KBTS_BLOB_TABLE_ID_GSUB : KBTS_BLOB_TABLE_ID_GPOS, kbts__gsub_gpos);
|
|
|
|
kbts_un FirstSequentialLookupIndex = 0;
|
|
kbts_un OnePastLastSequentialLookupIndex = kbts__GsubSequentialLookupCount(ShapeConfig);
|
|
if(ShapingTable == KBTS_SHAPING_TABLE_GPOS)
|
|
{
|
|
FirstSequentialLookupIndex = OnePastLastSequentialLookupIndex;
|
|
OnePastLastSequentialLookupIndex = kbts__SequentialLookupCount(ShapeConfig);
|
|
}
|
|
|
|
kbts__lookup_list *LookupList = kbts__GetLookupList(GsubGpos);
|
|
|
|
kbts__iterate_features IterateFeatures = kbts__IterateFeatures(ShapeConfig, (kbts_shaping_table)ShapingTable, OverriddenFeatures);
|
|
|
|
while(kbts__NextFeature(&IterateFeatures))
|
|
{
|
|
kbts_feature_override *FoundOverride = 0;
|
|
|
|
KBTS__FOR(OverrideIndex, 0, (kbts_un)OverrideCount)
|
|
{
|
|
kbts_feature_override *Override = &Overrides[OverrideIndex];
|
|
|
|
if(Override->Tag == IterateFeatures.CurrentFeatureTag)
|
|
{
|
|
FoundOverride = Override;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
// @Robustness: Why did we check for unregistered features here?
|
|
// if(!FoundOverride &&
|
|
// (kbts__FeatureTagToId(IterateFeatures.CurrentFeatureTag) == KBTS__FEATURE_ID_UNREGISTERED))
|
|
// {
|
|
// continue;
|
|
// }
|
|
if(FoundOverride)
|
|
{
|
|
kbts__iterate_lookups IterateLookups = kbts__IterateLookups(LookupList, IterateFeatures.Feature);
|
|
|
|
while(kbts__NextLookup(&IterateLookups))
|
|
{
|
|
if(IterateLookups.Lookup)
|
|
{
|
|
kbts_u16 LookupIndex = IterateLookups.LookupIndex;
|
|
kbts_un FoundSequentialLookupIndex = 0;
|
|
kbts_b32 Found = 0;
|
|
KBTS__FOR(SequentialLookupIndex, FirstSequentialLookupIndex, OnePastLastSequentialLookupIndex)
|
|
{
|
|
kbts__sequential_lookup *SequentialLookup = &kbts__shape_config_SequentialLookups(ShapeConfig)[SequentialLookupIndex];
|
|
|
|
if(SequentialLookup->LookupIndex == LookupIndex)
|
|
{
|
|
FoundSequentialLookupIndex = SequentialLookupIndex;
|
|
Found = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(Found)
|
|
{
|
|
kbts__matrix_index SequentialMatrixIndex = kbts__IdSequentialLookupMatrixIndex(FoundSequentialLookupIndex, 0, SequentialLookupCount);
|
|
if(FoundOverride->Value)
|
|
{
|
|
if(Memory)
|
|
{
|
|
EnabledLookupBits[SequentialMatrixIndex.WordIndex] |= 1u << SequentialMatrixIndex.BitIndex;
|
|
}
|
|
|
|
if((FoundOverride->Value > 1) &&
|
|
(NonBinaryEnabledLookupCount < KBTS_MAX_SIMULTANEOUS_FEATURES))
|
|
{
|
|
kbts__enabled_lookup *NewEnabled = &NonBinaryEnabledLookups[NonBinaryEnabledLookupCount++];
|
|
NewEnabled->SequentialLookupIndex = (kbts_u16)FoundSequentialLookupIndex;
|
|
NewEnabled->Value = (kbts_u16)FoundOverride->Value;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if(Memory)
|
|
{
|
|
DisabledLookupBits[SequentialMatrixIndex.WordIndex] |= 1u << SequentialMatrixIndex.BitIndex;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts__enabled_lookup *OutNonBinaryEnabledLookups = 0;
|
|
if(NonBinaryEnabledLookupCount)
|
|
{
|
|
OutNonBinaryEnabledLookups = kbts__PointerPushArray(&Bump, kbts__enabled_lookup, NonBinaryEnabledLookupCount);
|
|
if(Memory)
|
|
{
|
|
KBTS_MEMCPY(OutNonBinaryEnabledLookups, NonBinaryEnabledLookups, sizeof(*NonBinaryEnabledLookups) * NonBinaryEnabledLookupCount);
|
|
}
|
|
}
|
|
|
|
if(Memory)
|
|
{
|
|
Result->NonBinaryEnabledLookups = OutNonBinaryEnabledLookups;
|
|
Result->NonBinaryEnabledLookupCount = (kbts_u32)NonBinaryEnabledLookupCount;
|
|
Result->EnabledLookupBits = EnabledLookupBits;
|
|
Result->DisabledLookupBits = DisabledLookupBits;
|
|
Result->EnabledFilterFlags = EnabledFilterFlags;
|
|
Result->DisabledFilterFlags = DisabledFilterFlags;
|
|
}
|
|
}
|
|
|
|
if(!Memory)
|
|
{
|
|
// Pad to alignment to accept any memory address.
|
|
*Size_ = Bump.At - (kbts_uptr)Memory + KBTS_ALIGNOF(kbts_glyph_config) - 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_SizeOfGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount)
|
|
{
|
|
kbts_un Result;
|
|
kbts__PlaceGlyphConfig(ShapeConfig, Overrides, OverrideCount, 0, &Result);
|
|
return (int)Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_glyph_config *kbts_PlaceGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount, void *Memory)
|
|
{
|
|
kbts_un Size = 0;
|
|
kbts_glyph_config *Result = kbts__PlaceGlyphConfig(ShapeConfig, Overrides, OverrideCount, Memory, &Size);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_glyph_config *kbts_CreateGlyphConfig(kbts_shape_config *ShapeConfig, kbts_feature_override *Overrides, int OverrideCount, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
{
|
|
if(!Allocator)
|
|
{
|
|
Allocator = kbts__DefaultAllocator;
|
|
}
|
|
|
|
kbts_glyph_config *Result = kbts_PlaceGlyphConfig(ShapeConfig, Overrides, OverrideCount, kbts__AllocatorAllocate(Allocator, AllocatorData, (kbts_un)kbts_SizeOfGlyphConfig(ShapeConfig, Overrides, OverrideCount)));
|
|
|
|
if(Result)
|
|
{
|
|
Result->Allocator = Allocator;
|
|
Result->AllocatorData = AllocatorData;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_DestroyGlyphConfig(kbts_glyph_config *Config)
|
|
{
|
|
if(Config && Config->Allocator)
|
|
{
|
|
kbts__AllocatorFree(Config->Allocator, Config->AllocatorData, Config);
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_error kbts_ShapeError(kbts_shape_context *Context)
|
|
{
|
|
kbts_shape_error Result = Context->Error;
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeBegin(kbts_shape_context *Context, kbts_direction ParagraphDirection, kbts_language Language)
|
|
{
|
|
if(!Context->Error)
|
|
{
|
|
kbts__ClearArena(&Context->ScratchArena);
|
|
|
|
for(kbts__context_font_block_header *Header = Context->FontBlockSentinel.Next;
|
|
Header != &Context->FontBlockSentinel;
|
|
Header = Header->Next)
|
|
{
|
|
kbts__context_font_block *Block = (kbts__context_font_block *)Header;
|
|
|
|
KBTS__FOR(FontIndex, 0, KBTS__CONTEXT_FONTS_PER_BLOCK)
|
|
{
|
|
Block->Fonts[FontIndex].Info.Interned = 0;
|
|
}
|
|
}
|
|
|
|
kbts_ClearActiveGlyphs(&Context->GlyphStorage);
|
|
|
|
Context->BreakStartIndex = 0;
|
|
|
|
// Scratch features persist across frames. Don't reset ScratchFeatureOverrideCount.
|
|
Context->CurrentFeatureOverrides = 0;
|
|
Context->CurrentFeatureOverrideCount = 0;
|
|
Context->Flags |= KBTS__CONTEXT_FLAG_FEATURE_OVERRIDES_DIRTY;
|
|
|
|
Context->ParagraphDirection = ParagraphDirection;
|
|
Context->Language = Language;
|
|
|
|
Context->InputCodepointCount = 0;
|
|
Context->NextUserId = 0;
|
|
Context->LastGraphemeBreak = 0;
|
|
Context->LastLineBreakIndex = 0;
|
|
Context->RunFontInfo = 0;
|
|
Context->RunScript = 0;
|
|
Context->RunDirection = 0;
|
|
|
|
kbts_BreakBegin(&Context->BreakState, ParagraphDirection, KBTS_JAPANESE_LINE_BREAK_STYLE_NORMAL, 0);
|
|
}
|
|
}
|
|
|
|
typedef struct kbts__input_codepoint_index
|
|
{
|
|
kbts_u32 BlockIndex;
|
|
kbts_u32 CodepointIndex;
|
|
kbts_u32 BlockCodepointCount;
|
|
} kbts__input_codepoint_index;
|
|
|
|
static kbts__input_codepoint_index kbts__InputCodepointIndex(kbts_un FlatCodepointIndex)
|
|
{
|
|
kbts__input_codepoint_index Result = KBTS__ZERO;
|
|
|
|
kbts_un MsbPosition = kbts__MsbPositionOrZero32((kbts_u32)FlatCodepointIndex);
|
|
if(MsbPosition <= KBTS__INPUT_CODEPOINT_FIRST_BLOCK_MSB)
|
|
{
|
|
Result.BlockIndex = 0;
|
|
Result.CodepointIndex = (kbts_u32)FlatCodepointIndex;
|
|
Result.BlockCodepointCount = 1u << (KBTS__INPUT_CODEPOINT_FIRST_BLOCK_MSB + 1);
|
|
}
|
|
else
|
|
{
|
|
Result.BlockIndex = (kbts_u32)(MsbPosition - KBTS__INPUT_CODEPOINT_FIRST_BLOCK_MSB);
|
|
Result.CodepointIndex = (kbts_u32)(FlatCodepointIndex & ~(1ull << MsbPosition));
|
|
Result.BlockCodepointCount = (kbts_u32)(1u << MsbPosition);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__shape_codepoint *kbts__InputCodepoint(kbts_shape_context *Context, kbts_un Index, kbts_b32 AllocateIfNeeded)
|
|
{
|
|
kbts__shape_codepoint *Result = 0;
|
|
|
|
if(!Context->Error)
|
|
{
|
|
kbts__input_codepoint_index InputIndex = kbts__InputCodepointIndex(Index);
|
|
|
|
kbts__shape_codepoint *Block = Context->InputBlocks[InputIndex.BlockIndex];
|
|
if(!Block && AllocateIfNeeded)
|
|
{
|
|
Block = kbts__PushArray(&Context->PermanentArena, kbts__shape_codepoint, InputIndex.BlockCodepointCount);
|
|
if(!Block)
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
|
|
return Result;
|
|
}
|
|
|
|
Context->InputBlocks[InputIndex.BlockIndex] = Block;
|
|
}
|
|
|
|
Result = &Context->InputBlocks[InputIndex.BlockIndex][InputIndex.CodepointIndex];
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_shape_codepoint_iterator kbts__InputCodepointIterator(kbts_shape_context *Context, kbts_un StartCodepointIndex, kbts_un OnePastLastCodepointIndex)
|
|
{
|
|
kbts_shape_codepoint_iterator Result = KBTS__ZERO;
|
|
|
|
if(Context &&
|
|
!Context->Error &&
|
|
(OnePastLastCodepointIndex > StartCodepointIndex))
|
|
{
|
|
kbts__input_codepoint_index StartInputIndex = kbts__InputCodepointIndex(StartCodepointIndex);
|
|
kbts__input_codepoint_index OnePastLastInputIndex = kbts__InputCodepointIndex(OnePastLastCodepointIndex);
|
|
|
|
Result.Context = Context;
|
|
Result.BlockIndex = StartInputIndex.BlockIndex;
|
|
Result.CodepointIndex = StartInputIndex.CodepointIndex;
|
|
Result.EndBlockIndex = OnePastLastInputIndex.BlockIndex;
|
|
Result.OnePastLastCodepointIndex = OnePastLastInputIndex.CodepointIndex;
|
|
Result.CurrentBlockCodepointCount = (Result.BlockIndex == Result.EndBlockIndex) ? Result.OnePastLastCodepointIndex : StartInputIndex.BlockCodepointCount;
|
|
Result.FlatCodepointIndex = (kbts_u32)StartCodepointIndex;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_codepoint_iterator kbts_ShapeCurrentCodepointsIterator(kbts_shape_context *Context)
|
|
{
|
|
kbts_shape_codepoint_iterator Result = kbts__InputCodepointIterator(Context, 0, Context->InputCodepointCount);
|
|
|
|
return Result;
|
|
}
|
|
|
|
static int kbts__NextInputCodepoint(kbts_shape_codepoint_iterator *It, int *CodepointIndex)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(It->CodepointIndex >= It->CurrentBlockCodepointCount)
|
|
{
|
|
It->BlockIndex += 1;
|
|
It->CodepointIndex = 0;
|
|
It->CurrentBlockCodepointCount = (It->BlockIndex == It->EndBlockIndex) ? It->OnePastLastCodepointIndex : (1u << (It->BlockIndex + KBTS__INPUT_CODEPOINT_FIRST_BLOCK_MSB));
|
|
}
|
|
|
|
if((It->BlockIndex <= It->EndBlockIndex) &&
|
|
(It->CodepointIndex < It->CurrentBlockCodepointCount))
|
|
{
|
|
if(CodepointIndex)
|
|
{
|
|
*CodepointIndex = (int)It->FlatCodepointIndex;
|
|
}
|
|
|
|
It->Codepoint = &It->Context->InputBlocks[It->BlockIndex][It->CodepointIndex++];
|
|
It->FlatCodepointIndex += 1;
|
|
|
|
Result = 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeCodepointIteratorIsValid(kbts_shape_codepoint_iterator *It)
|
|
{
|
|
int Result = It->Context && (It->BlockIndex <= It->EndBlockIndex);
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__PublicShapeCodepointFromInternal(kbts_shape_codepoint *Public, kbts__shape_codepoint *Internal)
|
|
{
|
|
kbts__interned_context_font_info *FontInfo = Internal->FontInfo;
|
|
|
|
Public->Font = FontInfo ? FontInfo->Font : 0;
|
|
Public->FeatureOverrides = Internal->FeatureOverrides;
|
|
Public->FeatureOverrideCount = Internal->FeatureOverrideCount;
|
|
Public->Codepoint = Internal->Codepoint;
|
|
Public->UserId = Internal->UserId;
|
|
Public->BreakFlags = Internal->BreakFlags;
|
|
Public->Script = Internal->Script;
|
|
Public->Direction = Internal->Direction;
|
|
Public->ParagraphDirection = Internal->Direction;
|
|
}
|
|
|
|
static int kbts__PublicShapeCodepointFromInternal2(kbts_shape_codepoint2 *Public, kbts__shape_codepoint *Internal)
|
|
{
|
|
int Result = 1;
|
|
|
|
switch(Public->Size)
|
|
{
|
|
case sizeof(kbts_shape_codepoint2):
|
|
{
|
|
kbts__interned_context_font_info *FontInfo = Internal->FontInfo;
|
|
|
|
Public->Font = FontInfo ? FontInfo->Font : 0;
|
|
Public->VariationVector = FontInfo ? FontInfo->VariationVector : 0;
|
|
Public->FeatureOverrides = Internal->FeatureOverrides;
|
|
Public->FeatureOverrideCount = Internal->FeatureOverrideCount;
|
|
Public->Codepoint = Internal->Codepoint;
|
|
Public->UserId = Internal->UserId;
|
|
Public->BreakFlags = Internal->BreakFlags;
|
|
Public->Script = Internal->Script;
|
|
Public->Direction = Internal->Direction;
|
|
Public->ParagraphDirection = Internal->ParagraphDirection;
|
|
} break;
|
|
|
|
default: Result = 0; break;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeCodepointIteratorNext(kbts_shape_codepoint_iterator *It, kbts_shape_codepoint *Codepoint, int *CodepointIndex)
|
|
{
|
|
int Result = kbts__NextInputCodepoint(It, CodepointIndex);
|
|
|
|
if(Result)
|
|
{
|
|
kbts__PublicShapeCodepointFromInternal(Codepoint, It->Codepoint);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeCodepointIteratorNext2(kbts_shape_codepoint_iterator *It, kbts_shape_codepoint2 *Codepoint, int *CodepointIndex)
|
|
{
|
|
int Result = kbts__NextInputCodepoint(It, CodepointIndex);
|
|
|
|
if(Result)
|
|
{
|
|
Result = kbts__PublicShapeCodepointFromInternal2(Codepoint, It->Codepoint);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeGetShapeCodepoint(kbts_shape_context *Context, int CodepointIndex, kbts_shape_codepoint *Codepoint)
|
|
{
|
|
int Result = 0;
|
|
|
|
if((CodepointIndex >= 0) &&
|
|
((kbts_un)CodepointIndex < Context->InputCodepointCount))
|
|
{
|
|
kbts__shape_codepoint *Source = kbts__InputCodepoint(Context, (kbts_un)CodepointIndex, 0);
|
|
|
|
if(Source)
|
|
{
|
|
kbts__PublicShapeCodepointFromInternal(Codepoint, Source);
|
|
}
|
|
else
|
|
{
|
|
KBTS_MEMSET(Codepoint, 0, sizeof(*Codepoint));
|
|
}
|
|
|
|
Result = 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeGetShapeCodepoint2(kbts_shape_context *Context, int CodepointIndex, kbts_shape_codepoint2 *Codepoint)
|
|
{
|
|
int Result = 0;
|
|
|
|
if((CodepointIndex >= 0) &&
|
|
((kbts_un)CodepointIndex < Context->InputCodepointCount))
|
|
{
|
|
kbts__shape_codepoint *Source = kbts__InputCodepoint(Context, (kbts_un)CodepointIndex, 0);
|
|
|
|
if(Source)
|
|
{
|
|
Result = kbts__PublicShapeCodepointFromInternal2(Codepoint, Source);
|
|
}
|
|
else
|
|
{
|
|
KBTS_MEMSET(Codepoint, 0, sizeof(*Codepoint));
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__interned_context_font_info *kbts__InternContextFontInfo(kbts_shape_context *Context, kbts__context_font_info *FontInfo)
|
|
{
|
|
kbts__interned_context_font_info *Result = &Context->DummyFontInfo;
|
|
|
|
if(FontInfo)
|
|
{
|
|
Result = FontInfo->Interned;
|
|
|
|
if(!Result ||
|
|
(FontInfo->Flags & KBTS__CONTEXT_FONT_FLAG_VARIATIONS_DIRTY))
|
|
{
|
|
int AxisCount;
|
|
kbts_GetVariationInfo(FontInfo->Font, &AxisCount, 0);
|
|
|
|
kbts__interned_context_font_info *New = kbts__PushType(&Context->ScratchArena, kbts__interned_context_font_info);
|
|
|
|
if(New)
|
|
{
|
|
float *VariationVector;
|
|
|
|
if(Result &&
|
|
!(FontInfo->Flags & KBTS__CONTEXT_FONT_FLAG_VARIATIONS_DIRTY))
|
|
{
|
|
VariationVector = Result->VariationVector;
|
|
}
|
|
else
|
|
{
|
|
VariationVector = kbts__PushArray(&Context->ScratchArena, float, AxisCount);
|
|
|
|
if(VariationVector)
|
|
{
|
|
KBTS_MEMCPY(VariationVector, FontInfo->VariationVector, sizeof(*VariationVector) * AxisCount);
|
|
}
|
|
else
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
New->Font = FontInfo->Font;
|
|
New->VariationVector = VariationVector;
|
|
New->VariationVectorNormalized = 0;
|
|
|
|
kbts__murmur_state Murmur;
|
|
kbts__MurmurBegin(&Murmur, 0x97978573);
|
|
kbts__MurmurAbsorb(&Murmur, (kbts_u32)(kbts_un)FontInfo->Font);
|
|
kbts__MurmurAbsorb(&Murmur, (kbts_u32)((kbts_un)FontInfo->Font >> 32));
|
|
if(VariationVector)
|
|
{
|
|
for(int AxisIndex = 0;
|
|
AxisIndex < AxisCount;
|
|
++AxisIndex)
|
|
{
|
|
typedef union {kbts_u32 U; float F;} uf;
|
|
uf *Axis = (uf *)&VariationVector[AxisIndex];
|
|
|
|
kbts__MurmurAbsorb(&Murmur, Axis->U);
|
|
}
|
|
}
|
|
New->Hash = kbts__MurmurFinalize(&Murmur);
|
|
|
|
FontInfo->Interned = New;
|
|
FontInfo->Flags &= ~KBTS__CONTEXT_FONT_FLAG_VARIATIONS_DIRTY;
|
|
|
|
Result = New;
|
|
}
|
|
else
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__UpdateBreaks(kbts_shape_context *Context)
|
|
{
|
|
if(!Context->Error &&
|
|
!(Context->Flags & KBTS__CONTEXT_FLAG_MANUAL_SEGMENTATION))
|
|
{
|
|
kbts_break Break;
|
|
while(kbts_Break(&Context->BreakState, &Break))
|
|
{
|
|
// Strictly speaking, we do not need all of the flags, but we record them all anyway so we can expose them to the user.
|
|
kbts_un BreakPosition = (kbts_u32)Break.Position + Context->BreakStartIndex;
|
|
kbts__shape_codepoint *InputCodepoint = kbts__InputCodepoint(Context, BreakPosition, 1);
|
|
|
|
if(Break.Flags & KBTS_BREAK_FLAG_LINE_HARD)
|
|
{
|
|
Context->LastLineBreakIndex = (kbts_u32)BreakPosition;
|
|
}
|
|
|
|
if(Break.Flags & KBTS_BREAK_FLAG_GRAPHEME)
|
|
{
|
|
// Try fonts, potentially break run.
|
|
kbts__context_font_info *MatchFontInfo = 0;
|
|
kbts_shape_context_flags ShapeContextFlags = Context->PublicFlags;
|
|
|
|
kbts__context_font_block_header *Header;
|
|
kbts_un FontIndex;
|
|
kbts_un FontIndexInc;
|
|
if(!(ShapeContextFlags & KBTS_SHAPE_CONTEXT_FLAG_FONT_PRIORITY_BOTTOM_TO_TOP))
|
|
{
|
|
Header = Context->FontBlockSentinel.Prev;
|
|
FontIndex = Context->FontCount - 1;
|
|
FontIndexInc = ~(kbts_un)0;
|
|
}
|
|
else
|
|
{
|
|
Header = Context->FontBlockSentinel.Next;
|
|
FontIndex = 0;
|
|
FontIndexInc = 1;
|
|
}
|
|
|
|
KBTS__FOR(Iter, 0, Context->FontCount)
|
|
{
|
|
kbts__context_font_block *Block = (kbts__context_font_block *)Header;
|
|
kbts__context_font_info *FontInfo = &Block->Fonts[FontIndex & (KBTS__CONTEXT_FONTS_PER_BLOCK - 1)].Info;
|
|
|
|
kbts_font_coverage_test CoverageTest;
|
|
kbts_FontCoverageTestBegin(&CoverageTest, FontInfo->Font);
|
|
|
|
kbts_shape_codepoint_iterator It = kbts__InputCodepointIterator(Context, Context->LastGraphemeBreakIndex, BreakPosition);
|
|
|
|
while(kbts__NextInputCodepoint(&It, 0))
|
|
{
|
|
kbts_FontCoverageTestCodepoint(&CoverageTest, It.Codepoint->Codepoint);
|
|
}
|
|
|
|
kbts_FontCoverageTestEnd(&CoverageTest);
|
|
|
|
if(!CoverageTest.Error)
|
|
{
|
|
MatchFontInfo = FontInfo;
|
|
|
|
break;
|
|
}
|
|
else if(!MatchFontInfo)
|
|
{
|
|
// If we don't match any font, at least use the first one.
|
|
MatchFontInfo = FontInfo;
|
|
}
|
|
|
|
FontIndex += FontIndexInc;
|
|
}
|
|
|
|
// There are two cases in which LastGraphemeBreak can be 0:
|
|
// - Either we immediately run out of memory in __InputCodepoint(), in which case we never set the LastGraphemeBreak,
|
|
// (This case should be handled by the context error check above.)
|
|
// - Or the user tries to shape 0 codepoints, either because ShapeUtf8() found invalid codepoints or through normal use.
|
|
if(Context->LastGraphemeBreak)
|
|
{
|
|
Context->LastGraphemeBreak->FontInfo = kbts__InternContextFontInfo(Context, MatchFontInfo);
|
|
}
|
|
Context->LastGraphemeBreak = InputCodepoint;
|
|
Context->LastGraphemeBreakIndex = (kbts_u32)BreakPosition;
|
|
}
|
|
|
|
if(InputCodepoint)
|
|
{
|
|
InputCodepoint->BreakFlags |= Break.Flags;
|
|
if(Break.Flags & KBTS_BREAK_FLAG_SCRIPT)
|
|
{
|
|
InputCodepoint->Script = Break.Script;
|
|
}
|
|
if(Break.Flags & KBTS_BREAK_FLAG_DIRECTION)
|
|
{
|
|
InputCodepoint->Direction = Break.Direction;
|
|
}
|
|
if(Break.Flags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION)
|
|
{
|
|
InputCodepoint->ParagraphDirection = Break.ParagraphDirection;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeBeginManualRuns(kbts_shape_context *Context)
|
|
{
|
|
if(!Context->Error)
|
|
{
|
|
if(Context->InputCodepointCount > 0)
|
|
{
|
|
kbts_BreakEnd(&Context->BreakState);
|
|
kbts__UpdateBreaks(Context);
|
|
}
|
|
|
|
Context->Flags |= KBTS__CONTEXT_FLAG_MANUAL_SEGMENTATION;
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeNextManualRun(kbts_shape_context *Context, kbts_direction Direction, kbts_script Script)
|
|
{
|
|
if(!Context->Error &&
|
|
(Context->Flags & KBTS__CONTEXT_FLAG_MANUAL_SEGMENTATION))
|
|
{
|
|
Context->Flags |= KBTS__CONTEXT_FLAG_START_OF_MANUAL_RUN | KBTS__CONTEXT_FLAG_USE_MANUAL_BREAK_INFO;
|
|
|
|
Context->ManualRunDirection = Direction;
|
|
Context->ManualRunScript = Script;
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeEndManualRuns(kbts_shape_context *Context)
|
|
{
|
|
if(!Context->Error &&
|
|
(Context->Flags & KBTS__CONTEXT_FLAG_MANUAL_SEGMENTATION))
|
|
{
|
|
Context->Flags &= ~KBTS__CONTEXT_FLAG_MANUAL_SEGMENTATION;
|
|
|
|
if(Context->InputCodepointCount > 0)
|
|
{
|
|
kbts_BreakBegin(&Context->BreakState, Context->ParagraphDirection, KBTS_JAPANESE_LINE_BREAK_STYLE_NORMAL, 0);
|
|
Context->BreakStartIndex = (kbts_u32)Context->InputCodepointCount;
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeManualBreak(kbts_shape_context *Context)
|
|
{
|
|
kbts_ShapeBeginManualRuns(Context);
|
|
Context->Flags |= KBTS__CONTEXT_FLAG_START_OF_MANUAL_RUN;
|
|
kbts_ShapeEndManualRuns(Context);
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeCodepointWithUserId(kbts_shape_context *Context, int Codepoint, int UserId)
|
|
{
|
|
if(!Context->Error)
|
|
{
|
|
if(Context->Flags & KBTS__CONTEXT_FLAG_FEATURE_OVERRIDES_DIRTY)
|
|
{
|
|
kbts_un NewFeatureOverrideCount = Context->ScratchFeatureOverrideCount;
|
|
|
|
if(Context->ScratchFeatureOverrideCount)
|
|
{
|
|
kbts_feature_override UniqueFeatureOverrides[KBTS_MAX_SIMULTANEOUS_FEATURES];
|
|
kbts_un UniqueFeatureOverrideCount = 0;
|
|
|
|
for(kbts_un ScratchFeatureOverrideIndex = Context->ScratchFeatureOverrideCount;
|
|
ScratchFeatureOverrideIndex;
|
|
--ScratchFeatureOverrideIndex)
|
|
{
|
|
kbts_feature_override *ScratchOverride = &Context->ScratchFeatureOverrides[ScratchFeatureOverrideIndex - 1];
|
|
kbts_u32 ScratchTag = ScratchOverride->Tag;
|
|
|
|
kbts_b32 Dupe = 0;
|
|
KBTS__FOR(UniqueFeatureOverrideIndex, 0, UniqueFeatureOverrideCount)
|
|
{
|
|
kbts_feature_override *UniqueOverride = &UniqueFeatureOverrides[UniqueFeatureOverrideIndex];
|
|
|
|
if(UniqueOverride->Tag == ScratchTag)
|
|
{
|
|
Dupe = 1;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(!Dupe)
|
|
{
|
|
UniqueFeatureOverrides[UniqueFeatureOverrideCount++] = *ScratchOverride;
|
|
}
|
|
}
|
|
|
|
kbts_feature_override *Hoisted = kbts__PushArray(&Context->ScratchArena, kbts_feature_override, UniqueFeatureOverrideCount);
|
|
if(!Hoisted)
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
return;
|
|
}
|
|
KBTS_MEMCPY(Hoisted, Context->ScratchFeatureOverrides, sizeof(*Hoisted) * UniqueFeatureOverrideCount);
|
|
|
|
Context->CurrentFeatureOverrides = Hoisted;
|
|
NewFeatureOverrideCount = UniqueFeatureOverrideCount;
|
|
}
|
|
|
|
Context->CurrentFeatureOverrideCount = (kbts_u32)NewFeatureOverrideCount;
|
|
Context->Flags &= ~KBTS__CONTEXT_FLAG_FEATURE_OVERRIDES_DIRTY;
|
|
}
|
|
|
|
if(Context->Flags & KBTS__CONTEXT_FLAG_GLOBAL_VARIATIONS_DIRTY)
|
|
{
|
|
kbts_un NewGlobalVariationCount = 0;
|
|
|
|
if(Context->ScratchGlobalVariationCount)
|
|
{
|
|
kbts_variation UniqueVariations[KBTS__MAX_VARIATION_AXIS_COUNT];
|
|
kbts_un UniqueVariationCount = 0;
|
|
|
|
for(kbts_un ScratchGlobalVariationIndex = Context->ScratchGlobalVariationCount - 1;
|
|
ScratchGlobalVariationIndex < Context->ScratchGlobalVariationCount;
|
|
--ScratchGlobalVariationIndex)
|
|
{
|
|
kbts_variation *ScratchVariation = &Context->ScratchGlobalVariations[ScratchGlobalVariationIndex];
|
|
|
|
kbts_b32 Dupe = 0;
|
|
KBTS__FOR(UniqueVariationIndex, 0, UniqueVariationCount)
|
|
{
|
|
kbts_variation *UniqueVariation = &UniqueVariations[UniqueVariationIndex];
|
|
|
|
if(UniqueVariation->Tag == ScratchVariation->Tag)
|
|
{
|
|
Dupe = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(!Dupe)
|
|
{
|
|
UniqueVariations[UniqueVariationCount++] = *ScratchVariation;
|
|
|
|
if(UniqueVariationCount >= KBTS__ARRAY_LENGTH(UniqueVariations))
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts_variation *Hoisted = kbts__PushArray(&Context->ScratchArena, kbts_variation, UniqueVariationCount);
|
|
if(!Hoisted)
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
return;
|
|
}
|
|
KBTS_MEMCPY(Hoisted, UniqueVariations, sizeof(*UniqueVariations) * UniqueVariationCount);
|
|
|
|
Context->CurrentGlobalVariations = Hoisted;
|
|
NewGlobalVariationCount = UniqueVariationCount;
|
|
}
|
|
|
|
Context->CurrentGlobalVariationCount = (kbts_u32)NewGlobalVariationCount;
|
|
Context->Flags &= ~KBTS__CONTEXT_FLAG_GLOBAL_VARIATIONS_DIRTY;
|
|
}
|
|
|
|
{ // Add the codepoint.
|
|
kbts_un FlatCodepointIndex = Context->InputCodepointCount;
|
|
kbts__shape_codepoint InputCodepoint = KBTS__ZERO;
|
|
InputCodepoint.Codepoint = Codepoint;
|
|
InputCodepoint.UserId = UserId;
|
|
InputCodepoint.FeatureOverrides = Context->CurrentFeatureOverrides;
|
|
InputCodepoint.FeatureOverrideCount = Context->CurrentFeatureOverrideCount;
|
|
|
|
// @Robustness: There is probably a saner way of doing this.
|
|
// When we do a manual break, we may have line breaks go out-of-bounds, and we
|
|
// do not want to lose that information.
|
|
if(FlatCodepointIndex &&
|
|
(FlatCodepointIndex == Context->LastLineBreakIndex))
|
|
{
|
|
InputCodepoint.BreakFlags |= KBTS_BREAK_FLAG_LINE;
|
|
}
|
|
|
|
if(Context->Flags & KBTS__CONTEXT_FLAG_START_OF_MANUAL_RUN)
|
|
{
|
|
InputCodepoint.BreakFlags |= KBTS_BREAK_FLAG_MANUAL;
|
|
|
|
if(Context->Flags & KBTS__CONTEXT_FLAG_USE_MANUAL_BREAK_INFO)
|
|
{
|
|
InputCodepoint.Direction = Context->ManualRunDirection;
|
|
InputCodepoint.Script = Context->ManualRunScript;
|
|
}
|
|
|
|
Context->Flags &= ~KBTS__CONTEXT_FLAG_START_OF_MANUAL_RUN;
|
|
}
|
|
|
|
kbts__shape_codepoint *To = kbts__InputCodepoint(Context, FlatCodepointIndex, 1);
|
|
if(To)
|
|
{
|
|
*To = InputCodepoint;
|
|
}
|
|
|
|
if(!Context->LastGraphemeBreak)
|
|
{
|
|
Context->LastGraphemeBreak = To;
|
|
}
|
|
|
|
Context->InputCodepointCount += 1;
|
|
}
|
|
|
|
if(!(Context->Flags & KBTS__CONTEXT_FLAG_MANUAL_SEGMENTATION))
|
|
{
|
|
// Check for breaks.
|
|
kbts_BreakAddCodepoint(&Context->BreakState, Codepoint, 1, 0);
|
|
|
|
kbts__UpdateBreaks(Context);
|
|
}
|
|
}
|
|
}
|
|
static void kbts__ShapeCodepoint(kbts_shape_context *Context, int Codepoint, int UserIdIncrement)
|
|
{
|
|
int UserId = Context->NextUserId;
|
|
Context->NextUserId += UserIdIncrement;
|
|
kbts_ShapeCodepointWithUserId(Context, Codepoint, UserId);
|
|
}
|
|
KBTS_EXPORT void kbts_ShapeCodepoint(kbts_shape_context *Context, int Codepoint)
|
|
{
|
|
if(!Context->Error)
|
|
{
|
|
kbts__ShapeCodepoint(Context, Codepoint, 1);
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeUtf32WithUserId(kbts_shape_context *Context, int *Utf32, int Length, int BaseUserId, int UserIdIncrement)
|
|
{
|
|
if(!Context->Error && (Length > 0))
|
|
{
|
|
int UserId = BaseUserId;
|
|
|
|
KBTS__FOR(Utf32Index, 0, (kbts_un)Length)
|
|
{
|
|
int Codepoint = Utf32[Utf32Index];
|
|
kbts_ShapeCodepointWithUserId(Context, Codepoint, UserId);
|
|
|
|
UserId += UserIdIncrement;
|
|
}
|
|
}
|
|
}
|
|
KBTS_EXPORT void kbts_ShapeUtf32(kbts_shape_context *Context, int *Utf32, int Length)
|
|
{
|
|
if(!Context->Error && (Length > 0))
|
|
{
|
|
KBTS__FOR(Utf32Index, 0, (kbts_un)Length)
|
|
{
|
|
int Codepoint = Utf32[Utf32Index];
|
|
kbts_ShapeCodepoint(Context, Codepoint);
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeUtf8WithUserId(kbts_shape_context *Context, const char *Utf8, int Length, int BaseUserId, kbts_user_id_generation_mode UserIdGenerationMode)
|
|
{
|
|
if(!Context->Error && (Length > 0))
|
|
{
|
|
const char *At = Utf8;
|
|
const char *End = Utf8 + Length;
|
|
int UserId = BaseUserId;
|
|
|
|
int CodepointIncrement = (UserIdGenerationMode == KBTS_USER_ID_GENERATION_MODE_CODEPOINT_INDEX) ? 1 : 0;
|
|
int SourceCharacterMask = (UserIdGenerationMode == KBTS_USER_ID_GENERATION_MODE_SOURCE_INDEX) ? ~0 : 0;
|
|
|
|
while(At < End)
|
|
{
|
|
kbts_decode Decode = kbts_DecodeUtf8(At, (kbts_un)(End - At));
|
|
|
|
if(Decode.Valid)
|
|
{
|
|
kbts_ShapeCodepointWithUserId(Context, Decode.Codepoint, UserId);
|
|
|
|
UserId += CodepointIncrement;
|
|
}
|
|
|
|
At += Decode.SourceCharactersConsumed;
|
|
UserId += Decode.SourceCharactersConsumed & SourceCharacterMask;
|
|
}
|
|
}
|
|
}
|
|
KBTS_EXPORT void kbts_ShapeUtf8(kbts_shape_context *Context, const char *Utf8, int Length, kbts_user_id_generation_mode UserIdGenerationMode)
|
|
{
|
|
if(!Context->Error && (Length > 0))
|
|
{
|
|
const char *At = Utf8;
|
|
const char *End = Utf8 + Length;
|
|
while(At < End)
|
|
{
|
|
kbts_decode Decode = kbts_DecodeUtf8(At, (kbts_un)(End - At));
|
|
|
|
if(Decode.Valid)
|
|
{
|
|
int Increment = 0;
|
|
if(UserIdGenerationMode == KBTS_USER_ID_GENERATION_MODE_CODEPOINT_INDEX)
|
|
{
|
|
Increment = 1;
|
|
}
|
|
else if(UserIdGenerationMode == KBTS_USER_ID_GENERATION_MODE_SOURCE_INDEX)
|
|
{
|
|
Increment = Decode.SourceCharactersConsumed;
|
|
}
|
|
|
|
kbts__ShapeCodepoint(Context, Decode.Codepoint, Increment);
|
|
}
|
|
|
|
At += Decode.SourceCharactersConsumed;
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapePushFeature(kbts_shape_context *Context, kbts_u32 Tag, int Value)
|
|
{
|
|
if(!Context->Error)
|
|
{
|
|
if(Context->ScratchFeatureOverrideCount < KBTS__ARRAY_LENGTH(Context->ScratchFeatureOverrides))
|
|
{
|
|
kbts_feature_override *Override = &Context->ScratchFeatureOverrides[Context->ScratchFeatureOverrideCount++];
|
|
Override->Tag = Tag;
|
|
Override->Value = Value;
|
|
|
|
Context->Flags |= KBTS__CONTEXT_FLAG_FEATURE_OVERRIDES_DIRTY;
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapePopFeature(kbts_shape_context *Context, kbts_u32 Tag)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(!Context->Error)
|
|
{
|
|
for(kbts_un ScratchFeatureOverrideIndex = Context->ScratchFeatureOverrideCount;
|
|
ScratchFeatureOverrideIndex;
|
|
--ScratchFeatureOverrideIndex)
|
|
{
|
|
kbts_feature_override *Override = &Context->ScratchFeatureOverrides[ScratchFeatureOverrideIndex - 1];
|
|
|
|
if(Override->Tag == Tag)
|
|
{
|
|
KBTS__FOR(MoveIndex, ScratchFeatureOverrideIndex, Context->ScratchFeatureOverrideCount)
|
|
{
|
|
Context->ScratchFeatureOverrides[MoveIndex - 1] = Context->ScratchFeatureOverrides[MoveIndex];
|
|
}
|
|
|
|
Context->ScratchFeatureOverrideCount -= 1;
|
|
Result = 1;
|
|
Context->Flags |= KBTS__CONTEXT_FLAG_FEATURE_OVERRIDES_DIRTY;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__ShapeDirect(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage, kbts_direction RunDirection, kbts_s16 *VariationVectorNormalized)
|
|
{
|
|
KBTS_INSTRUMENT_FUNCTION_BEGIN;
|
|
|
|
Scratchpad->VariationVectorNormalized = VariationVectorNormalized;
|
|
kbts__EnsureGlyphStorageInitialized(Storage);
|
|
|
|
if(kbts__GlyphIsValid(Storage, Storage->GlyphSentinel.Next))
|
|
{
|
|
Scratchpad->Ip = 0;
|
|
Scratchpad->FeatureStagesRead = 0;
|
|
Scratchpad->OpKind = 0;
|
|
Scratchpad->RunDirection = RunDirection;
|
|
Scratchpad->NextGlyphUid = 0;
|
|
Scratchpad->SequentialLookupIndexIndex = 0;
|
|
|
|
{ // @Cleanup @Speed
|
|
kbts_un SequentialLookupCount = kbts__SequentialLookupCount(Scratchpad->Config);
|
|
KBTS__FOR(LookupIndex, 0, SequentialLookupCount)
|
|
{
|
|
kbts__FreeGlyphBucket(Scratchpad, LookupIndex);
|
|
}
|
|
}
|
|
|
|
if(Scratchpad->Config &&
|
|
(Scratchpad->Config->Shaper == KBTS_SHAPER_TIBETAN))
|
|
{
|
|
// Tibetan doesn't go through the normal NORMALIZE path, so we have to set ApproximateInputGlyphCount here.
|
|
kbts_un InputGlyphCount = 0;
|
|
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
InputGlyphCount += 1;
|
|
}
|
|
|
|
Scratchpad->ApproximateInputGlyphCount = Scratchpad->ApproximateOutputGlyphCount = (kbts_u32)InputGlyphCount;
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_BEGIN(ReadOpLoop0);
|
|
|
|
// For simple shapers, all of the shaping happens in this single loop.
|
|
// For complex shapers, this loop is preparing the text for clustering logic, which happens below.
|
|
while(kbts__ReadOp(Scratchpad, KBTS__OP_KIND_BEGIN_CLUSTER))
|
|
{
|
|
kbts__ExecuteOp(Scratchpad, Storage);
|
|
|
|
if(Scratchpad->Error)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_BLOCK_END(ReadOpLoop0);
|
|
|
|
if(Scratchpad->OpKind == KBTS__OP_KIND_BEGIN_CLUSTER)
|
|
{
|
|
kbts_u32 BeginClusterSequentialLookupIndexIndex = Scratchpad->SequentialLookupIndexIndex;
|
|
kbts_u32 BeginClusterIp = Scratchpad->Ip;
|
|
kbts_u32 BeginClusterFeatureStagesRead = Scratchpad->FeatureStagesRead;
|
|
kbts_glyph *TopLevelGlyph = Storage->GlyphSentinel.Next;
|
|
|
|
{ // @Cleanup @Speed
|
|
// We have been bucketing all glyphs into cluster lookups. That's no good!
|
|
// For now, we zero all the buckets here and bucket the glyphs again, one cluster at a time.
|
|
kbts_un SequentialLookupCount = kbts__SequentialLookupCount(Scratchpad->Config);
|
|
KBTS__FOR(LookupIndex, BeginClusterSequentialLookupIndexIndex, SequentialLookupCount)
|
|
{
|
|
kbts__FreeGlyphBucket(Scratchpad, LookupIndex);
|
|
}
|
|
}
|
|
|
|
Scratchpad->ClusterAtStartOfWord = 1;
|
|
|
|
while(kbts__GlyphIsValid(Storage, TopLevelGlyph))
|
|
{
|
|
kbts_b32 WordBreak = 0;
|
|
|
|
Scratchpad->Ip = BeginClusterIp;
|
|
Scratchpad->FeatureStagesRead = BeginClusterFeatureStagesRead;
|
|
Scratchpad->SequentialLookupIndexIndex = BeginClusterSequentialLookupIndexIndex;
|
|
|
|
{
|
|
// We need to store this in case TopLevelGlyph is reordered.
|
|
kbts_glyph *OneBeforeFirstClusterGlyph = TopLevelGlyph->Prev;
|
|
kbts_glyph *OnePastLastClusterGlyph = kbts__BeginCluster(Scratchpad, Storage, TopLevelGlyph);
|
|
|
|
if(Scratchpad->Error)
|
|
{
|
|
return;
|
|
}
|
|
|
|
WordBreak = !(OnePastLastClusterGlyph->Prev->UnicodeFlags & KBTS_UNICODE_FLAG_PART_OF_WORD);
|
|
Scratchpad->Cluster = kbts__PushGlyphList(Storage, OneBeforeFirstClusterGlyph->Next, OnePastLastClusterGlyph->Prev);
|
|
}
|
|
|
|
// Bucket cluster glyphs for the first cluster op (or later).
|
|
KBTS__FOR_GLYPH(Storage, Glyph)
|
|
{
|
|
if(!kbts__BucketGlyph(Scratchpad, Glyph, BeginClusterSequentialLookupIndexIndex, 0))
|
|
{
|
|
kbts__UnbucketGlyph(Scratchpad, Glyph);
|
|
}
|
|
}
|
|
|
|
while(kbts__ReadOp(Scratchpad, KBTS__OP_KIND_END_CLUSTER))
|
|
{
|
|
kbts__ExecuteOp(Scratchpad, Storage);
|
|
|
|
if(Scratchpad->Error)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
kbts__EndCluster(Scratchpad, Storage);
|
|
|
|
while(kbts__ReadOp(Scratchpad, KBTS__OP_KIND_END_SYLLABLE))
|
|
{
|
|
kbts__ExecuteOp(Scratchpad, Storage);
|
|
|
|
if(Scratchpad->Error)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Reattach the cluster to the main list.
|
|
Storage->GlyphSentinel.Next->Prev = Scratchpad->Cluster.OneBeforeFirst;
|
|
Storage->GlyphSentinel.Prev->Next = Scratchpad->Cluster.OnePastLast;
|
|
TopLevelGlyph = Scratchpad->Cluster.OnePastLast;
|
|
|
|
kbts__PopGlyphList(Storage, &Scratchpad->Cluster);
|
|
|
|
Scratchpad->ClusterAtStartOfWord = WordBreak;
|
|
}
|
|
|
|
// Post-clustering ops work across clusters.
|
|
// This is where Indic GPOS + post-passes happen.
|
|
while(kbts__ReadOp(Scratchpad, 0))
|
|
{
|
|
kbts__ExecuteOp(Scratchpad, Storage);
|
|
|
|
if(Scratchpad->Error)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_INSTRUMENT_FUNCTION_END;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_DestroyShapeScratchpad(kbts_shape_scratchpad *Scratchpad)
|
|
{
|
|
if(Scratchpad)
|
|
{
|
|
kbts_allocator_function *Allocator = Scratchpad->Allocator;
|
|
void *AllocatorData = Scratchpad->AllocatorData;
|
|
|
|
// We cannot just free the blocks inline, because freeing a start-of-allocation block will
|
|
// invalidate a bunch of other, unrelated blocks.
|
|
// We first store all of the start-of-allocation blocks in this list, and we then free them all at the end.
|
|
kbts__bucketed_glyph_block_header StartOfAllocationSentinel;
|
|
KBTS__DLLIST_SENTINEL_INIT(&StartOfAllocationSentinel);
|
|
|
|
kbts_un SequentialLookupCount = Scratchpad->SequentialLookupCount;
|
|
KBTS__FOR(LookupIndex, 0, SequentialLookupCount)
|
|
{
|
|
kbts__bucketed_glyph_block_header *Sentinel = &Scratchpad->LookupGlyphBuckets[LookupIndex];
|
|
for(kbts__bucketed_glyph_block_header *Header = Sentinel->Next;
|
|
Header != Sentinel;
|
|
)
|
|
{
|
|
kbts__bucketed_glyph_block_header *Next = Header->Next;
|
|
|
|
kbts__bucketed_glyph_block *Block = (kbts__bucketed_glyph_block *)Header;
|
|
if(Block->StartOfAllocation)
|
|
{
|
|
KBTS__DLLIST_REMOVE(&Block->Header);
|
|
KBTS__DLLIST_INSERT_BEFORE(&Block->Header, &StartOfAllocationSentinel);
|
|
}
|
|
|
|
Header = Next;
|
|
}
|
|
}
|
|
|
|
for(kbts__bucketed_glyph_block_header *Header = Scratchpad->FreeBucketedBlockSentinel.Next;
|
|
Header != &Scratchpad->FreeBucketedBlockSentinel;
|
|
)
|
|
{
|
|
kbts__bucketed_glyph_block_header *Next = Header->Next;
|
|
|
|
kbts__bucketed_glyph_block *Block = (kbts__bucketed_glyph_block *)Header;
|
|
if(Block->StartOfAllocation)
|
|
{
|
|
KBTS__DLLIST_REMOVE(&Block->Header);
|
|
KBTS__DLLIST_INSERT_BEFORE(&Block->Header, &StartOfAllocationSentinel);
|
|
}
|
|
|
|
Header = Next;
|
|
}
|
|
|
|
for(kbts__bucketed_glyph_block_header *Header = StartOfAllocationSentinel.Next;
|
|
Header != &StartOfAllocationSentinel;
|
|
)
|
|
{
|
|
kbts__bucketed_glyph_block_header *Next = Header->Next;
|
|
|
|
kbts__AllocatorFree(Allocator, AllocatorData, Header);
|
|
|
|
Header = Next;
|
|
}
|
|
|
|
if(Scratchpad->SelfAllocated)
|
|
{
|
|
kbts__AllocatorFree(Allocator, AllocatorData, Scratchpad);
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_error kbts_ShapeDirect2(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage, kbts_direction RunDirection, kbts_s16 *VariationVectorNormalized, kbts_glyph_iterator *Output)
|
|
{
|
|
kbts__ShapeDirect(Scratchpad, Storage, RunDirection, VariationVectorNormalized);
|
|
kbts_shape_error Result = Scratchpad->Error;
|
|
|
|
if(!Result)
|
|
{
|
|
*Output = kbts_ActiveGlyphIterator(Storage);
|
|
}
|
|
else
|
|
{
|
|
KBTS_MEMSET(Output, 0, sizeof(*Output));
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_shape_error kbts_ShapeDirect(kbts_shape_scratchpad *Scratchpad, kbts_glyph_storage *Storage, kbts_direction RunDirection, kbts_glyph_iterator *Output)
|
|
{
|
|
kbts_shape_error Result = kbts_ShapeDirect2(Scratchpad, Storage, RunDirection, 0, Output);
|
|
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__BeginParagraph(kbts_shape_context *Context)
|
|
{
|
|
kbts__context_font_info *FontInfo = 0;
|
|
|
|
if(Context->FontCount)
|
|
{
|
|
kbts_un BlockFontIndex;
|
|
kbts__context_font_block *Block;
|
|
if(!(Context->Flags & KBTS_SHAPE_CONTEXT_FLAG_FONT_PRIORITY_BOTTOM_TO_TOP))
|
|
{
|
|
Block = (kbts__context_font_block *)Context->FontBlockSentinel.Prev;
|
|
BlockFontIndex = (Context->FontCount - 1) & (KBTS__CONTEXT_FONTS_PER_BLOCK - 1);
|
|
}
|
|
else
|
|
{
|
|
Block = (kbts__context_font_block *)Context->FontBlockSentinel.Next;
|
|
BlockFontIndex = 0;
|
|
}
|
|
|
|
kbts__context_font *MainFont = &Block->Fonts[BlockFontIndex];
|
|
|
|
FontInfo = &MainFont->Info;
|
|
}
|
|
|
|
Context->RunFontInfo = kbts__InternContextFontInfo(Context, FontInfo);
|
|
Context->RunScript = 0;
|
|
Context->RunParagraphDirection = 0;
|
|
Context->RunDirection = 0;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_ShapeEnd(kbts_shape_context *Context)
|
|
{
|
|
if(!Context->Error)
|
|
{
|
|
// We check the break flags of the one-past-last codepoint, so reset it here.
|
|
kbts__shape_codepoint *OnePastLastCodepoint = kbts__InputCodepoint(Context, Context->InputCodepointCount, 1);
|
|
if(OnePastLastCodepoint)
|
|
{
|
|
KBTS_MEMSET(OnePastLastCodepoint, 0, sizeof(*OnePastLastCodepoint));
|
|
}
|
|
|
|
kbts_BreakEnd(&Context->BreakState);
|
|
kbts__UpdateBreaks(Context);
|
|
|
|
Context->RunCodepointIterator.Context = 0;
|
|
Context->DoneShapingRuns = 0;
|
|
|
|
kbts__BeginParagraph(Context);
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeSetFontVariationVector(kbts_shape_context *Context, kbts_u32 ContextFontHandle, float *VariationVector)
|
|
{
|
|
int Result = 0;
|
|
kbts__context_font *ContextFont = kbts__GetContextFont(Context, ContextFontHandle);
|
|
|
|
if(ContextFont)
|
|
{
|
|
int AxisCount;
|
|
kbts_GetVariationInfo(ContextFont->Info.Font, &AxisCount, 0);
|
|
|
|
if(AxisCount)
|
|
{
|
|
KBTS_MEMCPY(ContextFont->Info.VariationVector, VariationVector, sizeof(*VariationVector) * AxisCount);
|
|
|
|
ContextFont->Info.Flags |= KBTS__CONTEXT_FONT_FLAG_VARIATIONS_DIRTY;
|
|
}
|
|
|
|
Result = 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeSetFontVariation(kbts_shape_context *Context, kbts_u32 ContextFontHandle, kbts_u32 Tag, float Value)
|
|
{
|
|
kbts_variation Variation;
|
|
Variation.Tag = Tag;
|
|
Variation.Value = Value;
|
|
|
|
int Result = kbts_ShapeSetFontVariations(Context, ContextFontHandle, &Variation, 1);
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapePushGlobalVariation(kbts_shape_context *Context, kbts_u32 Tag, float Value)
|
|
{
|
|
int Result = 0;
|
|
|
|
// @Duplication with PushFeature.
|
|
if(!Context->Error)
|
|
{
|
|
if(Context->ScratchGlobalVariationCount < KBTS__ARRAY_LENGTH(Context->ScratchGlobalVariations))
|
|
{
|
|
kbts_variation *Variation = &Context->ScratchGlobalVariations[Context->ScratchGlobalVariationCount++];
|
|
Variation->Tag = Tag;
|
|
Variation->Value = Value;
|
|
|
|
Result = 1;
|
|
Context->Flags |= KBTS__CONTEXT_FLAG_GLOBAL_VARIATIONS_DIRTY;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapePopGlobalVariation(kbts_shape_context *Context, kbts_u32 Tag)
|
|
{
|
|
// @Duplication with PopFeature.
|
|
int Result = 0;
|
|
|
|
if(!Context->Error)
|
|
{
|
|
kbts_un ScratchGlobalVariationCount = Context->ScratchGlobalVariationCount;
|
|
|
|
for(kbts_un GlobalVariationIndex = ScratchGlobalVariationCount - 1;
|
|
GlobalVariationIndex < ScratchGlobalVariationCount;
|
|
--GlobalVariationIndex)
|
|
{
|
|
kbts_variation *Variation = &Context->ScratchGlobalVariations[GlobalVariationIndex];
|
|
|
|
if(Variation->Tag == Tag)
|
|
{
|
|
KBTS__FOR(MoveIndex, GlobalVariationIndex, ScratchGlobalVariationCount)
|
|
{
|
|
Context->ScratchGlobalVariations[MoveIndex - 1] = Context->ScratchGlobalVariations[MoveIndex];
|
|
}
|
|
|
|
Context->ScratchGlobalVariationCount -= 1;
|
|
Result = 1;
|
|
Context->Flags |= KBTS__CONTEXT_FLAG_GLOBAL_VARIATIONS_DIRTY;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_b32 kbts__UidEquals(kbts_uid A, kbts_uid B)
|
|
{
|
|
kbts_b32 Result = (A.Data[0] == B.Data[0]) &
|
|
(A.Data[1] == B.Data[1]) &
|
|
(A.Data[2] == B.Data[2]) &
|
|
(A.Data[3] == B.Data[3]);
|
|
return Result;
|
|
}
|
|
|
|
typedef struct kbts__fifo_bin_allocation
|
|
{
|
|
void *Pointer;
|
|
kbts_u32 WriteCursor;
|
|
} kbts__fifo_bin_allocation;
|
|
|
|
static kbts__fifo_bin_allocation kbts__FifoBinPush(kbts__fifo_bin *Bin, kbts_un BinSize, kbts_un Size, kbts_un Alignment)
|
|
{
|
|
// This assumes the bin is aligned at least to Alignment.
|
|
kbts_un WriteCursorWrapped = Bin->WriteCursor & (BinSize - 1);
|
|
kbts_un AlignmentWriteCursorIncrement = Alignment - (WriteCursorWrapped & (Alignment - 1));
|
|
kbts_un WriteCursorAligned = KBTS__ROUND_UP_POW2(WriteCursorWrapped, Alignment);
|
|
|
|
char *Pointer = Bin->Base + WriteCursorAligned;
|
|
char *OnePastLastBinByte = Bin->Base + BinSize;
|
|
if((Pointer + Size) > OnePastLastBinByte)
|
|
{
|
|
Bin->WriteCursor += BinSize - WriteCursorWrapped;
|
|
AlignmentWriteCursorIncrement = 0;
|
|
|
|
Pointer = Bin->Base;
|
|
}
|
|
|
|
kbts__fifo_bin_allocation Result = KBTS__ZERO;
|
|
Result.Pointer = (void *)Pointer;
|
|
Result.WriteCursor = Bin->WriteCursor;
|
|
|
|
Bin->WriteCursor += AlignmentWriteCursorIncrement + Size;
|
|
return Result;
|
|
}
|
|
|
|
KBTS_INLINE kbts_b32 kbts__U32WrappingNewer(kbts_u32 A, kbts_u32 B)
|
|
{
|
|
kbts_u32 D = A - B;
|
|
kbts_b32 Result = (kbts_s32)D > 0;
|
|
return Result;
|
|
}
|
|
|
|
static kbts_shape_config *kbts__FindOrCreateShapeConfig(kbts_shape_context *Context, kbts__interned_context_font_info *FontInfo, kbts_script Script, kbts_language Language)
|
|
{
|
|
kbts_shape_config *Result = 0;
|
|
|
|
if(FontInfo && FontInfo->Font)
|
|
{
|
|
if((Context->FindOrCreateShapeConfigTimestamp % 32) == 31)
|
|
{
|
|
for(kbts__existing_shape_config_block *ExistingBlock = (kbts__existing_shape_config_block *)Context->ExistingShapeConfigBlockSentinel.Next;
|
|
kbts__ExistingShapeConfigBlockIsValid(Context, ExistingBlock);
|
|
ExistingBlock = (kbts__existing_shape_config_block *)ExistingBlock->Header.Next)
|
|
{
|
|
kbts_u32 OccupiedBits = ExistingBlock->OccupiedBits;
|
|
kbts_u32 NewOccupiedBits = OccupiedBits;
|
|
|
|
while(OccupiedBits)
|
|
{
|
|
kbts_un ExistingIndex = kbts__LsbPositionOrBitWidth32(OccupiedBits);
|
|
kbts__existing_shape_config *Existing = &ExistingBlock->Items[ExistingIndex];
|
|
|
|
if(Existing->CacheBinIndex < KBTS__SHAPE_CONFIG_CACHE_BIN_COUNT)
|
|
{
|
|
kbts__fifo_bin *Bin = &Context->ShapeConfigCacheBins[Existing->CacheBinIndex];
|
|
kbts_u32 BinSize = kbts__ShapeConfigCacheBinSizes[Existing->CacheBinIndex + 1];
|
|
kbts_u32 WrappedDistance = (Existing->ConfigWriteCursor + BinSize) - Bin->WriteCursor;
|
|
|
|
if(WrappedDistance > 0x7FFFFFFFu)
|
|
{
|
|
NewOccupiedBits &= ~(1u << ExistingIndex);
|
|
}
|
|
}
|
|
|
|
OccupiedBits &= ~(1u << ExistingIndex);
|
|
}
|
|
|
|
ExistingBlock->OccupiedBits = NewOccupiedBits;
|
|
}
|
|
}
|
|
Context->FindOrCreateShapeConfigTimestamp += 1;
|
|
kbts_u32 CurrentTimestamp = Context->FindOrCreateShapeConfigTimestamp;
|
|
|
|
kbts_uid Uid;
|
|
kbts_PlaceShapeConfig2(FontInfo->Font, Script, Language, FontInfo->VariationVector, 0, &Uid);
|
|
|
|
kbts_u32 EmptyIndex = 0;
|
|
kbts__existing_shape_config_block *EmptyBlock = 0;
|
|
for(kbts__existing_shape_config_block *ExistingBlock = (kbts__existing_shape_config_block *)Context->ExistingShapeConfigBlockSentinel.Next;
|
|
kbts__ExistingShapeConfigBlockIsValid(Context, ExistingBlock);
|
|
ExistingBlock = (kbts__existing_shape_config_block *)ExistingBlock->Header.Next)
|
|
{
|
|
kbts_u32 OccupiedBits = ExistingBlock->OccupiedBits;
|
|
|
|
if(!EmptyBlock &&
|
|
(OccupiedBits != ~0u))
|
|
{
|
|
EmptyBlock = ExistingBlock;
|
|
EmptyIndex = kbts__LsbPositionOrBitWidth32(~OccupiedBits);
|
|
}
|
|
|
|
while(OccupiedBits)
|
|
{
|
|
kbts_un ExistingIndex = kbts__LsbPositionOrBitWidth32(OccupiedBits);
|
|
kbts__existing_shape_config *Existing = &ExistingBlock->Items[ExistingIndex];
|
|
|
|
if((Existing->FontHash == FontInfo->Hash) &&
|
|
kbts__UidEquals(Existing->Config->Uid, Uid))
|
|
{
|
|
kbts_un ExistingBinIndex = Existing->CacheBinIndex;
|
|
if(ExistingBinIndex < KBTS__SHAPE_CONFIG_CACHE_BIN_COUNT)
|
|
{
|
|
kbts__fifo_bin *ExistingBin = &Context->ShapeConfigCacheBins[ExistingBinIndex];
|
|
kbts_u32 ExistingBinSize = kbts__ShapeConfigCacheBinSizes[ExistingBinIndex + 1];
|
|
kbts_u32 BinWriteCursor = ExistingBin->WriteCursor;
|
|
kbts_u32 ConfigWriteCursor = Existing->ConfigWriteCursor;
|
|
|
|
kbts_u32 MaxValidWriteCursor = ConfigWriteCursor + ExistingBinSize;
|
|
kbts_u32 WrappedDistance = MaxValidWriteCursor - BinWriteCursor;
|
|
if(WrappedDistance > 0x7FFFFFFFu)
|
|
{
|
|
// We got overwritten. Invalidate.
|
|
ExistingBlock->OccupiedBits &= ~(1u << ExistingIndex);
|
|
|
|
EmptyBlock = ExistingBlock;
|
|
EmptyIndex = (kbts_u32)ExistingIndex;
|
|
}
|
|
else
|
|
{
|
|
if(WrappedDistance <= (ExistingBinSize / 4 + ExistingBinSize / 16))
|
|
{
|
|
// We are close to being invalidated. Copy ourselves to the front.
|
|
kbts_un ExistingConfigSize = Existing->Config->SizeNotCountingAlignment;
|
|
kbts__fifo_bin_allocation To = kbts__FifoBinPush(ExistingBin, ExistingBinSize, ExistingConfigSize, KBTS_ALIGNOF(kbts_shape_config));
|
|
|
|
KBTS_MEMMOVE(To.Pointer, Existing->Config, ExistingConfigSize);
|
|
|
|
Existing->Config = (kbts_shape_config *)To.Pointer;
|
|
Existing->ConfigWriteCursor = To.WriteCursor;
|
|
Existing->LastUsedTimestamp = CurrentTimestamp;
|
|
}
|
|
|
|
Result = Existing->Config;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result = Existing->Config;
|
|
}
|
|
|
|
goto DoneFindingShapeConfig;
|
|
}
|
|
|
|
OccupiedBits &= ~(1u << ExistingIndex);
|
|
}
|
|
}
|
|
DoneFindingShapeConfig:;
|
|
|
|
if(!Result)
|
|
{
|
|
if(!EmptyBlock)
|
|
{
|
|
EmptyBlock = kbts__PushType(&Context->ConfigArena, kbts__existing_shape_config_block);
|
|
if(!EmptyBlock)
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
|
|
return 0;
|
|
}
|
|
|
|
KBTS__DLLIST_INSERT_BEFORE(&EmptyBlock->Header, &Context->ExistingShapeConfigBlockSentinel);
|
|
EmptyBlock->OccupiedBits = 0;
|
|
EmptyIndex = 0;
|
|
}
|
|
|
|
kbts_un ResultSize = kbts_SizeOfShapeConfig2(FontInfo->Font, Script, Language, FontInfo->VariationVector);
|
|
|
|
kbts_un ResultBinMaxElementSize = 0;
|
|
kbts_un ResultBinSize = 0;
|
|
kbts_un ResultBinIndex = 0;
|
|
kbts_u32 ResultWriteCursor = 0;
|
|
for(;
|
|
ResultBinIndex < KBTS__SHAPE_CONFIG_CACHE_BIN_COUNT;
|
|
++ResultBinIndex)
|
|
{
|
|
ResultBinMaxElementSize = kbts__ShapeConfigCacheBinSizes[ResultBinIndex];
|
|
ResultBinSize = kbts__ShapeConfigCacheBinSizes[ResultBinIndex + 1];
|
|
|
|
if(ResultSize <= ResultBinMaxElementSize)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
kbts__existing_shape_config *NewExisting = &EmptyBlock->Items[EmptyIndex];
|
|
NewExisting->CacheBinIndex = (kbts_u32)ResultBinIndex;
|
|
NewExisting->LastUsedTimestamp = CurrentTimestamp;
|
|
NewExisting->FontHash = FontInfo->Hash;
|
|
|
|
if(ResultBinIndex < KBTS__SHAPE_CONFIG_CACHE_BIN_COUNT)
|
|
{
|
|
kbts__fifo_bin *Bin = &Context->ShapeConfigCacheBins[ResultBinIndex];
|
|
|
|
if(!Bin->Base)
|
|
{
|
|
Bin->Base = (char *)kbts__PushSize(&Context->PermanentArena, ResultBinSize, KBTS_ALIGNOF(kbts_shape_config));
|
|
|
|
if(!Bin->Base)
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
kbts__fifo_bin_allocation Allocation = kbts__FifoBinPush(Bin, ResultBinSize, ResultSize, KBTS_ALIGNOF(kbts_shape_config));
|
|
ResultWriteCursor = Allocation.WriteCursor;
|
|
|
|
Result = kbts_PlaceShapeConfig2(FontInfo->Font, Script, Language, FontInfo->VariationVector, Allocation.Pointer, 0);
|
|
}
|
|
else
|
|
{
|
|
if(Context->HugeShapeConfigCount >= KBTS__HUGE_SHAPE_CONFIG_CAPACITY)
|
|
{
|
|
kbts_u32 OldestHugeConfigTimestamp = CurrentTimestamp + 1;
|
|
kbts__existing_shape_config_block *OldestHugeConfigBlock = 0;
|
|
kbts_u32 OldestHugeConfigIndexWithinBlock = 0;
|
|
kbts_un OldestHugeConfigIndex = 0;
|
|
|
|
KBTS__FOR(HugeShapeConfigIndex, 0, Context->HugeShapeConfigCount)
|
|
{
|
|
kbts__huge_shape_config *Huge = &Context->HugeShapeConfigs[HugeShapeConfigIndex];
|
|
kbts__existing_shape_config_block *HugeBlock = Huge->Block;
|
|
kbts_u32 HugeTimestamp = HugeBlock->Items[Huge->IndexWithinBlock].LastUsedTimestamp;
|
|
|
|
if(!kbts__U32WrappingNewer(HugeTimestamp, OldestHugeConfigTimestamp))
|
|
{
|
|
OldestHugeConfigTimestamp = HugeTimestamp;
|
|
OldestHugeConfigBlock = HugeBlock;
|
|
OldestHugeConfigIndexWithinBlock = Huge->IndexWithinBlock;
|
|
OldestHugeConfigIndex = HugeShapeConfigIndex;
|
|
}
|
|
}
|
|
|
|
if(OldestHugeConfigBlock)
|
|
{
|
|
kbts__existing_shape_config *ToRemove = &OldestHugeConfigBlock->Items[OldestHugeConfigIndexWithinBlock];
|
|
kbts_DestroyShapeConfig(ToRemove->Config);
|
|
ToRemove->Config = 0;
|
|
OldestHugeConfigBlock->OccupiedBits &= ~(1u << OldestHugeConfigIndexWithinBlock);
|
|
|
|
Context->HugeShapeConfigs[OldestHugeConfigIndex] = Context->HugeShapeConfigs[--Context->HugeShapeConfigCount];
|
|
}
|
|
}
|
|
|
|
Result = kbts_CreateShapeConfig2(FontInfo->Font, Script, Language, FontInfo->VariationVector, Context->PermanentArena.Allocator, Context->PermanentArena.AllocatorData, 0);
|
|
|
|
kbts__huge_shape_config *NewHuge = &Context->HugeShapeConfigs[Context->HugeShapeConfigCount++];
|
|
NewHuge->Block = EmptyBlock;
|
|
NewHuge->IndexWithinBlock = (kbts_u32)EmptyIndex;
|
|
}
|
|
|
|
NewExisting->ConfigWriteCursor = ResultWriteCursor;
|
|
NewExisting->Config = Result;
|
|
NewExisting->LastUsedTimestamp = CurrentTimestamp;
|
|
|
|
EmptyBlock->OccupiedBits |= 1u << EmptyIndex;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts_glyph_config *kbts__FindOrCreateGlyphConfig(kbts_shape_context *Context, kbts_shape_config *ShapeConfig, kbts_feature_override *FeatureOverrides, int FeatureOverrideCount)
|
|
{
|
|
kbts_glyph_config *Result = 0;
|
|
|
|
if(ShapeConfig &&
|
|
(FeatureOverrideCount > 0))
|
|
{
|
|
if((Context->FindOrCreateGlyphConfigTimestamp % 32) == 31)
|
|
{
|
|
for(kbts__existing_glyph_config_block *ExistingBlock = (kbts__existing_glyph_config_block *)Context->ExistingGlyphConfigBlockSentinel.Next;
|
|
kbts__ExistingGlyphConfigBlockIsValid(Context, ExistingBlock);
|
|
ExistingBlock = (kbts__existing_glyph_config_block *)ExistingBlock->Header.Next)
|
|
{
|
|
kbts_u32 OccupiedBits = ExistingBlock->OccupiedBits;
|
|
kbts_u32 NewOccupiedBits = OccupiedBits;
|
|
|
|
while(OccupiedBits)
|
|
{
|
|
kbts_un ExistingIndex = kbts__LsbPositionOrBitWidth32(OccupiedBits);
|
|
kbts__existing_glyph_config *Existing = &ExistingBlock->Items[ExistingIndex];
|
|
|
|
kbts_u32 WrappedDistance = (Existing->ConfigWriteCursor + KBTS__GLYPH_CONFIG_CACHE_BIN_SIZE) - Context->GlyphConfigCacheBin.WriteCursor;
|
|
if(WrappedDistance > 0x7FFFFFFFu)
|
|
{
|
|
NewOccupiedBits &= ~(1u << ExistingIndex);
|
|
}
|
|
|
|
OccupiedBits &= ~(1u << ExistingIndex);
|
|
}
|
|
|
|
ExistingBlock->OccupiedBits = NewOccupiedBits;
|
|
}
|
|
}
|
|
Context->FindOrCreateGlyphConfigTimestamp += 1;
|
|
|
|
kbts_u32 Hash = kbts__GlyphConfigHash(ShapeConfig, FeatureOverrides, (kbts_un)FeatureOverrideCount);
|
|
|
|
kbts__existing_glyph_config_block *EmptyBlock = 0;
|
|
kbts_u32 EmptyIndex = 0;
|
|
|
|
for(kbts__existing_glyph_config_block *ExistingBlock = (kbts__existing_glyph_config_block *)Context->ExistingGlyphConfigBlockSentinel.Next;
|
|
kbts__ExistingGlyphConfigBlockIsValid(Context, ExistingBlock);
|
|
ExistingBlock = (kbts__existing_glyph_config_block *)ExistingBlock->Header.Next)
|
|
{
|
|
kbts_u32 OccupiedBits = ExistingBlock->OccupiedBits;
|
|
|
|
if(!EmptyBlock &&
|
|
(OccupiedBits != ~0u))
|
|
{
|
|
EmptyBlock = ExistingBlock;
|
|
EmptyIndex = kbts__LsbPositionOrBitWidth32(~OccupiedBits);
|
|
}
|
|
|
|
while(OccupiedBits)
|
|
{
|
|
kbts_un ExistingIndex = kbts__LsbPositionOrBitWidth32(OccupiedBits);
|
|
kbts__existing_glyph_config *Existing = &ExistingBlock->Items[ExistingIndex];
|
|
|
|
if(Hash == Existing->Hash)
|
|
{
|
|
kbts__fifo_bin *ExistingBin = &Context->GlyphConfigCacheBin;
|
|
|
|
kbts_u32 BinWriteCursor = ExistingBin->WriteCursor;
|
|
kbts_u32 ConfigWriteCursor = Existing->ConfigWriteCursor;
|
|
kbts_u32 MaxValidWriteCursor = ConfigWriteCursor + KBTS__GLYPH_CONFIG_CACHE_BIN_SIZE;
|
|
kbts_u32 WrappedDistance = MaxValidWriteCursor - BinWriteCursor;
|
|
if(WrappedDistance > 0x7FFFFFFFu)
|
|
{
|
|
// We got overwritten. Invalidate.
|
|
ExistingBlock->OccupiedBits &= ~(1u << ExistingIndex);
|
|
|
|
EmptyBlock = ExistingBlock;
|
|
EmptyIndex = (kbts_u32)ExistingIndex;
|
|
}
|
|
else
|
|
{
|
|
if(WrappedDistance <= (KBTS__GLYPH_CONFIG_CACHE_BIN_SIZE / 4 + KBTS__GLYPH_CONFIG_CACHE_BIN_SIZE / 16))
|
|
{
|
|
// We are close to being invalidated. Copy ourselves to the front.
|
|
kbts_un ExistingConfigSize = Existing->ConfigSize;
|
|
kbts__fifo_bin_allocation To = kbts__FifoBinPush(ExistingBin, KBTS__GLYPH_CONFIG_CACHE_BIN_SIZE, ExistingConfigSize, KBTS_ALIGNOF(kbts_shape_config));
|
|
|
|
KBTS_MEMMOVE(To.Pointer, Existing->GlyphConfig, ExistingConfigSize);
|
|
|
|
Existing->GlyphConfig = (kbts_glyph_config *)To.Pointer;
|
|
Existing->ConfigWriteCursor = To.WriteCursor;
|
|
}
|
|
|
|
Result = Existing->GlyphConfig;
|
|
}
|
|
|
|
goto DoneFindingGlyphConfig;
|
|
}
|
|
|
|
OccupiedBits &= ~(1u << ExistingIndex);
|
|
}
|
|
}
|
|
DoneFindingGlyphConfig:;
|
|
|
|
if(!Result)
|
|
{
|
|
if(!Context->GlyphConfigCacheBin.Base)
|
|
{
|
|
Context->GlyphConfigCacheBin.Base = (char *)kbts__PushSize(&Context->PermanentArena, KBTS__GLYPH_CONFIG_CACHE_BIN_SIZE, KBTS_ALIGNOF(kbts_glyph_config));
|
|
if(!Context->GlyphConfigCacheBin.Base)
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
if(!EmptyBlock)
|
|
{
|
|
EmptyBlock = kbts__PushType(&Context->ConfigArena, kbts__existing_glyph_config_block);
|
|
if(!EmptyBlock)
|
|
{
|
|
Context->Error = KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
|
|
return 0;
|
|
}
|
|
|
|
KBTS__DLLIST_INSERT_BEFORE(&EmptyBlock->Header, &Context->ExistingGlyphConfigBlockSentinel);
|
|
EmptyBlock->OccupiedBits = 0;
|
|
}
|
|
|
|
kbts_un Size = kbts_SizeOfGlyphConfig(ShapeConfig, FeatureOverrides, FeatureOverrideCount);
|
|
kbts__fifo_bin_allocation Allocation = kbts__FifoBinPush(&Context->GlyphConfigCacheBin, KBTS__GLYPH_CONFIG_CACHE_BIN_SIZE, Size, KBTS_ALIGNOF(kbts_glyph_config));
|
|
|
|
Result = kbts_PlaceGlyphConfig(ShapeConfig, FeatureOverrides, FeatureOverrideCount, Allocation.Pointer);
|
|
|
|
kbts__existing_glyph_config *Existing = &EmptyBlock->Items[EmptyIndex];
|
|
Existing->FeatureOverrides = FeatureOverrides;
|
|
Existing->FeatureOverrideCount = FeatureOverrideCount;
|
|
Existing->GlyphConfig = Result;
|
|
Existing->Hash = Hash;
|
|
Existing->ConfigWriteCursor = Allocation.WriteCursor;
|
|
Existing->ConfigSize = (kbts_u32)Size;
|
|
|
|
EmptyBlock->OccupiedBits |= 1u << EmptyIndex;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static int kbts__ShapeRun(kbts_shape_context *Context, kbts_run *Run, int Version)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(!Context->Error &&
|
|
!Context->DoneShapingRuns)
|
|
{
|
|
kbts__interned_context_font_info *RunFontInfo = Context->RunFontInfo;
|
|
kbts_script RunScript = Context->RunScript;
|
|
kbts_direction RunParagraphDirection = Context->RunParagraphDirection;
|
|
kbts_direction RunDirection = Context->RunDirection;
|
|
kbts_language Language = Context->Language;
|
|
kbts_shape_config *ShapeConfig = 0;
|
|
|
|
Run->Flags = 0;
|
|
|
|
kbts_ClearActiveGlyphs(&Context->GlyphStorage);
|
|
|
|
int Initialized = 1;
|
|
|
|
if(!Context->RunCodepointIterator.Context)
|
|
{
|
|
Context->RunCodepointIterator = kbts__InputCodepointIterator(Context, 0, Context->InputCodepointCount);
|
|
Initialized = 0;
|
|
}
|
|
|
|
kbts_shape_codepoint_iterator *It = &Context->RunCodepointIterator;
|
|
|
|
if(kbts_ShapeCodepointIteratorIsValid(It))
|
|
{
|
|
int InputCodepointIndex = 0;
|
|
while(kbts__NextInputCodepoint(It, &InputCodepointIndex))
|
|
{
|
|
kbts__shape_codepoint *InputCodepoint = It->Codepoint;
|
|
|
|
// Resolve neutral directions.
|
|
if((InputCodepoint->BreakFlags & KBTS_BREAK_FLAG_DIRECTION) &&
|
|
(InputCodepoint->Direction == KBTS_DIRECTION_DONT_KNOW))
|
|
{
|
|
InputCodepoint->Direction = RunParagraphDirection;
|
|
}
|
|
|
|
int First = !Result;
|
|
Result = 1;
|
|
|
|
kbts__interned_context_font_info *CodepointFontInfo = InputCodepoint->FontInfo;
|
|
kbts_script CodepointScript = InputCodepoint->Script;
|
|
kbts_direction CodepointDirection = InputCodepoint->Direction;
|
|
kbts_direction CodepointParagraphDirection = InputCodepoint->ParagraphDirection;
|
|
kbts_break_flags CodepointBreakFlags = InputCodepoint->BreakFlags;
|
|
|
|
int NewLine = !First && (CodepointBreakFlags & (KBTS_BREAK_FLAG_LINE_HARD | KBTS_BREAK_FLAG_MANUAL));
|
|
|
|
if(First)
|
|
{
|
|
Run->Flags = CodepointBreakFlags;
|
|
|
|
if(CodepointBreakFlags & KBTS_BREAK_FLAG_LINE_HARD)
|
|
{
|
|
kbts__BeginParagraph(Context);
|
|
RunFontInfo = Context->RunFontInfo;
|
|
RunScript = 0;
|
|
RunDirection = 0;
|
|
|
|
// If we see a bunch of whitespace at the beginning of a paragraph,
|
|
// we want to merge with the first actual text that shows up.
|
|
Initialized = 0;
|
|
}
|
|
}
|
|
|
|
if((CodepointFontInfo && (CodepointFontInfo != RunFontInfo)) ||
|
|
(CodepointScript && (CodepointScript != RunScript)) ||
|
|
(CodepointDirection && (CodepointDirection != RunDirection)) ||
|
|
(CodepointParagraphDirection && (CodepointParagraphDirection != RunParagraphDirection)) ||
|
|
NewLine)
|
|
{
|
|
if(CodepointFontInfo)
|
|
{
|
|
Context->RunFontInfo = CodepointFontInfo;
|
|
}
|
|
if(CodepointScript)
|
|
{
|
|
Context->RunScript = CodepointScript;
|
|
}
|
|
if(CodepointDirection)
|
|
{
|
|
Context->RunDirection = CodepointDirection;
|
|
}
|
|
if(CodepointParagraphDirection)
|
|
{
|
|
Context->RunParagraphDirection = CodepointParagraphDirection;
|
|
}
|
|
|
|
if(Initialized || NewLine)
|
|
{
|
|
// Rewind the current codepoint.
|
|
// We could also try to peek the codepoint before advancing, but this seems fine.
|
|
if(!It->CodepointIndex)
|
|
{
|
|
It->BlockIndex -= 1;
|
|
It->CodepointIndex = (1u << (It->BlockIndex + KBTS__INPUT_CODEPOINT_FIRST_BLOCK_MSB)) - 1;
|
|
}
|
|
else
|
|
{
|
|
It->CodepointIndex -= 1;
|
|
}
|
|
|
|
It->FlatCodepointIndex -= 1;
|
|
|
|
goto FoundBreak;
|
|
}
|
|
else
|
|
{
|
|
// Initialize and keep matching.
|
|
RunFontInfo = Context->RunFontInfo;
|
|
RunScript = Context->RunScript;
|
|
RunDirection = Context->RunDirection;
|
|
RunParagraphDirection = Context->RunParagraphDirection;
|
|
|
|
// Initialize the shape_config now, before pushing glyphs.
|
|
ShapeConfig = kbts__FindOrCreateShapeConfig(Context, RunFontInfo, RunScript, Language);
|
|
|
|
kbts_glyph_config *GlyphConfig = kbts__FindOrCreateGlyphConfig(Context, ShapeConfig, InputCodepoint->FeatureOverrides, InputCodepoint->FeatureOverrideCount);
|
|
kbts_PushGlyph(&Context->GlyphStorage, RunFontInfo->Font, InputCodepoint->Codepoint, GlyphConfig, InputCodepointIndex);
|
|
|
|
Initialized = 1;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if(!ShapeConfig)
|
|
{
|
|
// This is an exceptional case, but it can happen when we detect no script.
|
|
ShapeConfig = kbts__FindOrCreateShapeConfig(Context, RunFontInfo, RunScript, Language);
|
|
|
|
Initialized = 1;
|
|
}
|
|
|
|
kbts_glyph_config *GlyphConfig = kbts__FindOrCreateGlyphConfig(Context, ShapeConfig, InputCodepoint->FeatureOverrides, InputCodepoint->FeatureOverrideCount);
|
|
kbts_PushGlyph(&Context->GlyphStorage, RunFontInfo->Font, InputCodepoint->Codepoint, GlyphConfig, InputCodepointIndex);
|
|
}
|
|
}
|
|
|
|
FoundBreak:;
|
|
|
|
if(Result)
|
|
{
|
|
if(!RunDirection)
|
|
{
|
|
RunDirection = KBTS_DIRECTION_LTR;
|
|
|
|
kbts_shaper Shaper = ShapeConfig ? ShapeConfig->Shaper : KBTS_SHAPER_DEFAULT;
|
|
if((Shaper == KBTS_SHAPER_ARABIC) ||
|
|
(Shaper == KBTS_SHAPER_HEBREW))
|
|
{
|
|
RunDirection = KBTS_DIRECTION_RTL;
|
|
}
|
|
}
|
|
|
|
// @Memory: Store this alongside the shape_config!
|
|
kbts_un ScratchpadSize = kbts_SizeOfShapeScratchpad(ShapeConfig);
|
|
kbts_shape_scratchpad *Scratchpad = kbts_PlaceShapeScratchpad(ShapeConfig, kbts__PushSize(&Context->ScratchArena, ScratchpadSize, 8), kbts__ArenaAllocator, &Context->ScratchArena);
|
|
|
|
if(!RunFontInfo->VariationVectorNormalized)
|
|
{
|
|
int AxisCount;
|
|
kbts_GetVariationInfo(RunFontInfo->Font, &AxisCount, 0);
|
|
RunFontInfo->VariationVectorNormalized = kbts__PushArray(&Context->ScratchArena, kbts_s16, AxisCount);
|
|
if(!RunFontInfo->VariationVectorNormalized)
|
|
{
|
|
Context->Error |= KBTS_SHAPE_ERROR_OUT_OF_MEMORY;
|
|
|
|
return 0;
|
|
}
|
|
|
|
kbts_NormalizeVariationVector(RunFontInfo->Font, RunFontInfo->VariationVector, RunFontInfo->VariationVectorNormalized);
|
|
}
|
|
|
|
kbts__ShapeDirect(Scratchpad, &Context->GlyphStorage, RunDirection, RunFontInfo->VariationVectorNormalized);
|
|
|
|
if(Scratchpad->Error)
|
|
{
|
|
Context->Error = Scratchpad->Error;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
kbts__shape_codepoint *OnePastLast = kbts__InputCodepoint(Context, Context->InputCodepointCount, 1);
|
|
if(OnePastLast)
|
|
{
|
|
if(OnePastLast->BreakFlags & KBTS_BREAK_FLAG_LINE_HARD)
|
|
{
|
|
// Signal the terminating line break with a 0-sized run.
|
|
Run->Flags = OnePastLast->BreakFlags;
|
|
|
|
Result = 1;
|
|
}
|
|
}
|
|
|
|
Context->DoneShapingRuns = 1;
|
|
}
|
|
|
|
if(Result)
|
|
{
|
|
Run->Font = RunFontInfo->Font;
|
|
Run->Script = RunScript;
|
|
Run->ParagraphDirection = RunParagraphDirection;
|
|
Run->Direction = RunDirection;
|
|
Run->Glyphs = kbts_ActiveGlyphIterator(&Context->GlyphStorage);
|
|
|
|
if(Version >= 2)
|
|
{
|
|
kbts_run2 *Run2 = (kbts_run2 *)Run;
|
|
|
|
Run2->VariationVector = RunFontInfo->VariationVector;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeRun(kbts_shape_context *Context, kbts_run *Run)
|
|
{
|
|
return kbts__ShapeRun(Context, Run, 1);
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ShapeRun2(kbts_shape_context *Context, kbts_run2 *Run)
|
|
{
|
|
return kbts__ShapeRun(Context, (kbts_run *)Run, 2);
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_GlyphIteratorIsValid(kbts_glyph_iterator *It)
|
|
{
|
|
int Result = It->CurrentGlyph && kbts__GlyphIsValid(It->GlyphStorage, It->CurrentGlyph);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_GlyphIteratorNext(kbts_glyph_iterator *It, kbts_glyph **Glyph)
|
|
{
|
|
int Result = 0;
|
|
kbts_glyph *CurrentGlyph = It->CurrentGlyph;
|
|
|
|
if(kbts_GlyphIteratorIsValid(It))
|
|
{
|
|
*Glyph = CurrentGlyph;
|
|
|
|
Result = 1;
|
|
It->CurrentGlyph = CurrentGlyph->Next;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_FontCount(void *Data, int Size)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(Data && (Size >= 4))
|
|
{
|
|
kbts_u32 Magic = kbts__ReadU32Unaligned((kbts_u32 *)Data);
|
|
|
|
if(Magic == KBTS_FOURCC('t', 't', 'c', 'f'))
|
|
{
|
|
kbts__ttc_header *Header = (kbts__ttc_header *)Data;
|
|
|
|
if(kbts__ReadU32Unaligned(&Header->Magic) == KBTS_FOURCC('t', 't', 'c', 'f'))
|
|
{
|
|
Result = (int)kbts__ByteSwap32(kbts__ReadU32Unaligned(&Header->FontCount));
|
|
}
|
|
}
|
|
else if((Magic == KBTS_FOURCC('O', 'T', 'T', 'O')) ||
|
|
(Magic == KBTS__U32BE(0x10000)) ||
|
|
(Magic == KBTS_FOURCC('k', 'b', 't', 's')))
|
|
{
|
|
Result = 1;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__cmap_subtable_pointer kbts__SelectCmapSubtable(kbts__cmap *Cmap, kbts_b32 ByteSwap, char *TableEnd, kbts__cmap_14 **Cmap14, kbts_u16 *ResultFormat)
|
|
{
|
|
kbts__cmap_subtable_pointer Result = KBTS__ZERO;
|
|
|
|
kbts_u16 PreferredFormat = 1;
|
|
kbts_un Cmap_TableCount = kbts__ReadU16Unaligned(&Cmap->TableCount);
|
|
KBTS__FOR(It, 0, Cmap_TableCount)
|
|
{
|
|
kbts__cmap_subtable_pointer Subtable = kbts__GetCmapSubtable(Cmap, It);
|
|
if((char *)(Subtable.Subtable + 1) <= TableEnd)
|
|
{
|
|
kbts_u16 Format = kbts__ReadU16Unaligned(Subtable.Subtable);
|
|
|
|
if(ByteSwap)
|
|
{
|
|
Format = kbts__ByteSwap16(Format);
|
|
}
|
|
|
|
if(Format == 14)
|
|
{
|
|
if((char *)(Subtable.Subtable + sizeof(kbts__cmap_14)) <= TableEnd)
|
|
{
|
|
if(Cmap14)
|
|
{
|
|
*Cmap14 = (kbts__cmap_14 *)Subtable.Subtable;
|
|
}
|
|
}
|
|
}
|
|
else if(!Result.Subtable)
|
|
{
|
|
Result = Subtable;
|
|
}
|
|
else if(Format < KBTS__ARRAY_LENGTH(kbts__CmapFormatPrecedence))
|
|
{
|
|
kbts_u16 Precedence = kbts__CmapFormatPrecedence[Format];
|
|
kbts_u16 PreferredPrecedence = kbts__CmapFormatPrecedence[PreferredFormat];
|
|
|
|
if((Precedence > PreferredPrecedence) || ((Precedence == PreferredPrecedence) && (Subtable.PlatformId == 3)))
|
|
{
|
|
Result = Subtable;
|
|
if(ResultFormat)
|
|
{
|
|
*ResultFormat = Format;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
static kbts__cmap_subtable_pointer kbts__SelectCmapSubtableFromBlob(kbts_blob_header *Header, kbts_blob_table *CmapTable, kbts__cmap_14 **Cmap14, kbts_u16 *ResultFormat)
|
|
{
|
|
kbts__cmap_subtable_pointer Result = KBTS__ZERO;
|
|
|
|
if(CmapTable->Length >= sizeof(kbts__cmap))
|
|
{
|
|
char *TableEnd = KBTS__POINTER_OFFSET(char, Header, CmapTable->OffsetFromStartOfFile + CmapTable->Length);
|
|
kbts__cmap *Cmap = KBTS__POINTER_OFFSET(kbts__cmap, Header, CmapTable->OffsetFromStartOfFile);
|
|
|
|
Result = kbts__SelectCmapSubtable(Cmap, 0, TableEnd, Cmap14, ResultFormat);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_load_font_error kbts_LoadFont(kbts_font *Font, kbts_load_font_state *State, void *FontData, int FontDataSize, int FontIndex, int *ScratchSize_, int *OutputSize_)
|
|
{
|
|
kbts_load_font_error Result = 0;
|
|
|
|
if(FontDataSize >= 4)
|
|
{
|
|
char *FileEnd = (char *)FontData + FontDataSize;
|
|
kbts_u32 Magic = kbts__ReadU32Unaligned((kbts_u32 *)FontData);
|
|
kbts_un DirectoryOffset = 0;
|
|
|
|
if(Magic == KBTS_FOURCC('t', 't', 'c', 'f'))
|
|
{
|
|
Magic = 0;
|
|
|
|
if(FontDataSize >= (int)sizeof(kbts__ttc_header))
|
|
{
|
|
kbts__ttc_header *Header = (kbts__ttc_header *)FontData;
|
|
kbts_un FontCount = kbts__ByteSwap32(kbts__ReadU32Unaligned(&Header->FontCount));
|
|
|
|
if(((kbts_u32)FontIndex < FontCount) &&
|
|
((kbts_un)FontDataSize >= (sizeof(kbts__ttc_header) + sizeof(kbts_u32) * FontCount)))
|
|
{
|
|
kbts_u32 *TableDirectoryOffsets = KBTS__POINTER_AFTER(kbts_u32, Header);
|
|
DirectoryOffset = kbts__ByteSwap32(kbts__ReadU32Unaligned(&TableDirectoryOffsets[FontIndex]));
|
|
|
|
Magic = KBTS__U32BE(0x10000);
|
|
}
|
|
}
|
|
}
|
|
|
|
if((Magic == KBTS_FOURCC('O', 'T', 'T', 'O')) ||
|
|
(Magic == KBTS__U32BE(0x10000)))
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_NEED_TO_CREATE_BLOB;
|
|
|
|
State->FontData = FontData;
|
|
State->FontDataSize = (kbts_u32)FontDataSize;
|
|
|
|
kbts__table_directory *Directory = KBTS__POINTER_OFFSET(kbts__table_directory, FontData, DirectoryOffset);
|
|
if((char *)(Directory + 1) > FileEnd)
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
|
|
kbts_un DirectoryTableCount = kbts__ReadU16Be(&Directory->TableCount);
|
|
|
|
kbts__table_record *Tables = KBTS__POINTER_AFTER(kbts__table_record, Directory);
|
|
|
|
kbts_un DirectoryTableCapacity = (kbts_un)(FileEnd - (char *)Tables) / sizeof(kbts__table_record);
|
|
if(DirectoryTableCount <= DirectoryTableCapacity)
|
|
{
|
|
for(kbts_un TableIndex = 0; TableIndex < DirectoryTableCount; ++TableIndex)
|
|
{
|
|
kbts__table_record *Table = &Tables[TableIndex];
|
|
kbts_u32 TableOffset = kbts__ByteSwap32(kbts__ReadU32Unaligned(&Table->Offset));
|
|
kbts_u32 TableLength = kbts__ByteSwap32(kbts__ReadU32Unaligned(&Table->Length));
|
|
|
|
void *TableBase = KBTS__POINTER_OFFSET(void, FontData, TableOffset);
|
|
char *TableEnd = (char *)TableBase + TableLength;
|
|
if(((char *)TableBase >= (char *)(Tables + DirectoryTableCount)) && (TableEnd <= FileEnd))
|
|
{
|
|
kbts_blob_table_id TableId = 0;
|
|
|
|
switch(kbts__ReadU32Unaligned(&Table->Tag))
|
|
{
|
|
case KBTS_FOURCC('h', 'e', 'a', 'd'): TableId = KBTS_BLOB_TABLE_ID_HEAD; break;
|
|
case KBTS_FOURCC('c', 'm', 'a', 'p'): TableId = KBTS_BLOB_TABLE_ID_CMAP; break;
|
|
case KBTS_FOURCC('G', 'D', 'E', 'F'): TableId = KBTS_BLOB_TABLE_ID_GDEF; break;
|
|
case KBTS_FOURCC('G', 'S', 'U', 'B'): TableId = KBTS_BLOB_TABLE_ID_GSUB; break;
|
|
case KBTS_FOURCC('G', 'P', 'O', 'S'): TableId = KBTS_BLOB_TABLE_ID_GPOS; break;
|
|
case KBTS_FOURCC('h', 'h', 'e', 'a'): TableId = KBTS_BLOB_TABLE_ID_HHEA; break;
|
|
case KBTS_FOURCC('v', 'h', 'e', 'a'): TableId = KBTS_BLOB_TABLE_ID_VHEA; break;
|
|
case KBTS_FOURCC('h', 'm', 't', 'x'): TableId = KBTS_BLOB_TABLE_ID_HMTX; break;
|
|
case KBTS_FOURCC('v', 'm', 't', 'x'): TableId = KBTS_BLOB_TABLE_ID_VMTX; break;
|
|
case KBTS_FOURCC('m', 'a', 'x', 'p'): TableId = KBTS_BLOB_TABLE_ID_MAXP; break;
|
|
case KBTS_FOURCC('O', 'S', '/', '2'): TableId = KBTS_BLOB_TABLE_ID_OS2; break;
|
|
case KBTS_FOURCC('n', 'a', 'm', 'e'): TableId = KBTS_BLOB_TABLE_ID_NAME; break;
|
|
case KBTS_FOURCC('f', 'v', 'a', 'r'): TableId = KBTS_BLOB_TABLE_ID_FVAR; break;
|
|
case KBTS_FOURCC('a', 'v', 'a', 'r'): TableId = KBTS_BLOB_TABLE_ID_AVAR; break;
|
|
case KBTS_FOURCC('M', 'V', 'A', 'R'): TableId = KBTS_BLOB_TABLE_ID_MVAR; break;
|
|
case KBTS_FOURCC('H', 'V', 'A', 'R'): TableId = KBTS_BLOB_TABLE_ID_HVAR; break;
|
|
case KBTS_FOURCC('V', 'V', 'A', 'R'): TableId = KBTS_BLOB_TABLE_ID_VVAR; break;
|
|
}
|
|
|
|
if(TableId)
|
|
{
|
|
kbts_blob_table *ReadTable = &State->Tables[TableId];
|
|
ReadTable->OffsetFromStartOfFile = TableOffset;
|
|
ReadTable->Length = TableLength;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
kbts_un TotalLookupCount = 0;
|
|
kbts_un TotalSubtableCount = 0;
|
|
|
|
kbts_blob_table_id GsubGposTableIds[] = {KBTS_BLOB_TABLE_ID_GSUB, KBTS_BLOB_TABLE_ID_GPOS};
|
|
kbts_blob_table *GsubGposTables[] = {&State->Tables[KBTS_BLOB_TABLE_ID_GSUB], &State->Tables[KBTS_BLOB_TABLE_ID_GPOS]};
|
|
KBTS__FOR(GsubGposTableIndex, 0, KBTS__ARRAY_LENGTH(GsubGposTables))
|
|
{
|
|
kbts_blob_table *Table = GsubGposTables[GsubGposTableIndex];
|
|
|
|
if(Table->Length)
|
|
{
|
|
kbts__gsub_gpos *GsubGpos = KBTS__POINTER_OFFSET(kbts__gsub_gpos, FontData, Table->OffsetFromStartOfFile);
|
|
char *TableEnd = (char *)GsubGpos + Table->Length;
|
|
|
|
if(Table->Length >= 10)
|
|
{
|
|
if((kbts__ReadU16Be(&GsubGpos->Major) == 1) &&
|
|
(kbts__ReadU16Be(&GsubGpos->Minor) == 1) &&
|
|
(Table->Length < 14))
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
|
|
kbts_u16 ScriptListOffset = kbts__ReadU16Be(&GsubGpos->ScriptListOffset);
|
|
kbts_u16 FeatureListOffset = kbts__ReadU16Be(&GsubGpos->FeatureListOffset);
|
|
kbts_u16 LookupListOffset = kbts__ReadU16Be(&GsubGpos->LookupListOffset);
|
|
|
|
if(!ScriptListOffset ||
|
|
!FeatureListOffset ||
|
|
!LookupListOffset)
|
|
{
|
|
// Apparently, this is a valid way of specifying an empty table.
|
|
kbts_blob_table_id TableId = GsubGposTableIds[GsubGposTableIndex];
|
|
|
|
KBTS__ZERO_TYPE(&State->Tables[TableId]);
|
|
}
|
|
else if(((ScriptListOffset + sizeof(kbts__script_list)) > Table->Length) ||
|
|
((FeatureListOffset + sizeof(kbts__feature_list)) > Table->Length) ||
|
|
((LookupListOffset + sizeof(kbts__lookup_list)) > Table->Length))
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
else
|
|
{
|
|
kbts__lookup_list *LookupList = KBTS__POINTER_OFFSET(kbts__lookup_list, GsubGpos, kbts__ReadU16Be(&GsubGpos->LookupListOffset));
|
|
kbts_u16 *LookupOffsets = KBTS__POINTER_AFTER(kbts_u16, LookupList);
|
|
kbts_un LookupCount = kbts__ReadU16Be(&LookupList->Count);
|
|
|
|
if((char *)(LookupOffsets + LookupCount) <= TableEnd)
|
|
{
|
|
KBTS__FOR(LookupIndex, 0, LookupCount)
|
|
{
|
|
kbts_un LookupOffset = kbts__ReadU16Be(&LookupOffsets[LookupIndex]);
|
|
kbts__lookup *Lookup = KBTS__POINTER_OFFSET(kbts__lookup, LookupList, LookupOffset);
|
|
|
|
if((char *)(Lookup + 1) <= TableEnd)
|
|
{
|
|
TotalSubtableCount += kbts__ReadU16Be(&Lookup->SubtableCount);
|
|
}
|
|
else
|
|
{
|
|
return KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
}
|
|
|
|
TotalLookupCount += LookupCount;
|
|
}
|
|
else
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
State->LookupCount = (kbts_u32)TotalLookupCount;
|
|
State->LookupSubtableCount = (kbts_u32)TotalSubtableCount;
|
|
}
|
|
|
|
{
|
|
kbts_un GlyphCount = 0;
|
|
|
|
kbts_blob_table *MaxpTable = &State->Tables[KBTS_BLOB_TABLE_ID_MAXP];
|
|
if(MaxpTable->Length)
|
|
{
|
|
kbts__maxp *Maxp = KBTS__POINTER_OFFSET(kbts__maxp, FontData, MaxpTable->OffsetFromStartOfFile);
|
|
|
|
if((char *)(Maxp + 1) > FileEnd)
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
|
|
GlyphCount = kbts__ReadU16Be(&Maxp->GlyphCount);
|
|
}
|
|
|
|
State->GlyphCount = (kbts_u32)GlyphCount;
|
|
}
|
|
|
|
kbts_un GlyphLookupMatrixSizeInWords = 0;
|
|
if(State->LookupCount &&
|
|
State->GlyphCount)
|
|
{
|
|
kbts__matrix_index LastIndex = kbts__GlyphLookupMatrixIndex(State->LookupCount - 1, State->GlyphCount - 1, State->GlyphCount);
|
|
GlyphLookupMatrixSizeInWords = LastIndex.WordIndex + 1;
|
|
}
|
|
|
|
kbts_un GlyphLookupSubtableMatrixSizeInWords = 0;
|
|
if(State->LookupSubtableCount &&
|
|
State->GlyphCount)
|
|
{
|
|
kbts__matrix_index LastIndex = kbts__GlyphLookupSubtableMatrixIndex(State->LookupSubtableCount - 1, State->LookupSubtableCount, State->GlyphCount - 1, State->GlyphCount);
|
|
GlyphLookupSubtableMatrixSizeInWords = LastIndex.WordIndex + 1;
|
|
}
|
|
|
|
kbts__pointer_bump_allocator Bump = kbts__PointerBumpAllocator(0);
|
|
|
|
kbts__PointerPushType(&Bump, kbts_blob_header);
|
|
|
|
KBTS__FOR(TableId, 0, KBTS_BLOB_TABLE_ID_COUNT)
|
|
{
|
|
kbts__PointerPush(&Bump, State->Tables[TableId].Length, 4);
|
|
}
|
|
|
|
kbts__PointerPushArray(&Bump, kbts_u32, GlyphLookupMatrixSizeInWords);
|
|
kbts__PointerPushArray(&Bump, kbts_u32, GlyphLookupSubtableMatrixSizeInWords);
|
|
kbts__PointerPushArray(&Bump, kbts_u32, State->LookupCount);
|
|
|
|
// Add the align just to make sure we can accept any pointer.
|
|
kbts_un OutputSize = Bump.At + KBTS_ALIGNOF(kbts_blob_header);
|
|
|
|
kbts_un BlobSizeExcludingHeader = OutputSize - sizeof(kbts_blob_header);
|
|
kbts_un ScratchSize = (kbts_un)KBTS__IDIV_ROUND_UP(BlobSizeExcludingHeader, 32) * sizeof(kbts_u32);
|
|
|
|
if((ScratchSize > 0x7FFFFFFF) ||
|
|
(OutputSize > 0x7FFFFFFF))
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
|
|
*ScratchSize_ = (int)ScratchSize;
|
|
*OutputSize_ = (int)OutputSize;
|
|
|
|
State->ScratchSize = (kbts_u32)ScratchSize;
|
|
State->GlyphLookupMatrixSizeInBytes = (kbts_u32)(GlyphLookupMatrixSizeInWords * sizeof(kbts_u32));
|
|
State->GlyphLookupSubtableMatrixSizeInBytes = (kbts_u32)(GlyphLookupSubtableMatrixSizeInWords * sizeof(kbts_u32));
|
|
State->TotalSize = (kbts_u32)OutputSize;
|
|
}
|
|
else if(Magic == KBTS_FOURCC('k', 'b', 't', 's'))
|
|
{
|
|
if((kbts_un)FontDataSize >= sizeof(kbts_blob_header))
|
|
{
|
|
kbts_blob_header *Header = (kbts_blob_header *)FontData;
|
|
|
|
if(Header->Version != KBTS_BLOB_VERSION_CURRENT)
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
|
|
KBTS__FOR(BlobTableId, 0, KBTS_BLOB_TABLE_ID_COUNT)
|
|
{
|
|
kbts_blob_table *Table = &Header->Tables[BlobTableId];
|
|
|
|
if((Table->OffsetFromStartOfFile + Table->Length) > (kbts_un)FontDataSize)
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
}
|
|
|
|
Font->Blob = Header;
|
|
|
|
kbts__cmap_subtable_pointer PreferredSubtable = KBTS__ZERO;
|
|
{
|
|
char *TableEnd;
|
|
kbts__cmap *Cmap = kbts__BlobTableHeaderChecked(Header, KBTS_BLOB_TABLE_ID_CMAP, kbts__cmap, &TableEnd, &Result);
|
|
if(Cmap)
|
|
{
|
|
PreferredSubtable = kbts__SelectCmapSubtable(Cmap, 0, TableEnd, &Font->Cmap14, 0);
|
|
}
|
|
}
|
|
|
|
Font->Cmap = PreferredSubtable.Subtable;
|
|
}
|
|
else
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
InvalidFont:;
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
|
|
Font->Error = Result;
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_FontIsValid(kbts_font *Font)
|
|
{
|
|
int Result = Font && !Font->Error && Font->Blob;
|
|
return Result;
|
|
}
|
|
|
|
static void kbts__MarkMatrixCoverage(kbts_u32 *Matrix, kbts_un TableIndex, kbts_un TableCount, kbts_un GlyphCount, kbts__coverage *Coverage, int SubtableMatrix)
|
|
{
|
|
if(Coverage)
|
|
{
|
|
kbts_u16 Coverage_Format = kbts__ReadU16Unaligned(&Coverage->Format);
|
|
kbts_u16 Coverage_Count = kbts__ReadU16Unaligned(&Coverage->Count);
|
|
|
|
if(Coverage_Format == 1)
|
|
{
|
|
kbts_u16 *GlyphIds = KBTS__POINTER_AFTER(kbts_u16, Coverage);
|
|
|
|
KBTS__FOR(GlyphIndex, 0, Coverage_Count)
|
|
{
|
|
kbts_un GlyphId = kbts__ReadU16Unaligned(&GlyphIds[GlyphIndex]);
|
|
kbts__matrix_index MatrixIndex = SubtableMatrix ?
|
|
kbts__GlyphLookupSubtableMatrixIndex(TableIndex, TableCount, GlyphId, GlyphCount) :
|
|
kbts__GlyphLookupMatrixIndex(TableIndex, GlyphId, GlyphCount);
|
|
|
|
if(GlyphId < GlyphCount)
|
|
{
|
|
Matrix[MatrixIndex.WordIndex] |= 1u << MatrixIndex.BitIndex;
|
|
}
|
|
// We do not record a font error here, because some test fonts have a Maxp.GlyphCount fixed to 100.
|
|
}
|
|
}
|
|
else if(Coverage_Format == 2)
|
|
{
|
|
kbts__range_record *Ranges = KBTS__POINTER_AFTER(kbts__range_record, Coverage);
|
|
|
|
KBTS__FOR(RangeIndex, 0, Coverage_Count)
|
|
{
|
|
kbts__range_record *Range = &Ranges[RangeIndex];
|
|
kbts_un Range_StartGlyphId = kbts__ReadU16Unaligned(&Range->StartGlyphId);
|
|
kbts_un Range_EndGlyphId = kbts__ReadU16Unaligned(&Range->EndGlyphId);
|
|
|
|
KBTS__FOR(GlyphId, Range_StartGlyphId, Range_EndGlyphId + 1)
|
|
{
|
|
kbts__matrix_index MatrixIndex = SubtableMatrix ?
|
|
kbts__GlyphLookupSubtableMatrixIndex(TableIndex, TableCount, GlyphId, GlyphCount) :
|
|
kbts__GlyphLookupMatrixIndex(TableIndex, GlyphId, GlyphCount);
|
|
|
|
if(GlyphId < GlyphCount)
|
|
{
|
|
Matrix[MatrixIndex.WordIndex] |= 1u << MatrixIndex.BitIndex;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static void kbts__MarkMatrixClassDef(kbts_u32 *Matrix, kbts_un SubtableIndex, kbts_un SubtableCount, kbts_un GlyphCount, kbts_u16 *ClassDefBase, kbts_u64 *ClassesIncluded, kbts_un ClassesIncludedLength)
|
|
{
|
|
if(ClassDefBase)
|
|
{
|
|
kbts_u16 ClassDefFormat = kbts__ReadU16Unaligned(ClassDefBase);
|
|
|
|
if(ClassDefFormat == 1)
|
|
{
|
|
kbts__class_definition_1 *ClassDef = (kbts__class_definition_1 *)ClassDefBase;
|
|
kbts_un ClassDef_GlyphCount = kbts__ReadU16Unaligned(&ClassDef->GlyphCount);
|
|
kbts_un ClassDef_StartGlyphId = kbts__ReadU16Unaligned(&ClassDef->StartGlyphId);
|
|
kbts_u16 *GlyphClasses = KBTS__POINTER_AFTER(kbts_u16, ClassDef);
|
|
|
|
KBTS__FOR(GlyphIndex, 0, ClassDef_GlyphCount)
|
|
{
|
|
kbts_un GlyphId = ClassDef_StartGlyphId + GlyphIndex;
|
|
kbts_un GlyphClass = kbts__ReadU16Unaligned(&GlyphClasses[GlyphIndex]);
|
|
|
|
if((GlyphId >= (ClassesIncludedLength * 64)) ||
|
|
(ClassesIncluded[GlyphClass / 64] & (1ull << (GlyphClass % 64))))
|
|
{
|
|
if(GlyphId < GlyphCount)
|
|
{
|
|
kbts__matrix_index SubtableMatrixIndex = kbts__GlyphLookupSubtableMatrixIndex(SubtableIndex, SubtableCount, GlyphId, GlyphCount);
|
|
Matrix[SubtableMatrixIndex.WordIndex] |= 1u << SubtableMatrixIndex.BitIndex;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if(ClassDefFormat == 2)
|
|
{
|
|
kbts__class_definition_2 *ClassDef = (kbts__class_definition_2 *)ClassDefBase;
|
|
kbts_un ClassDef_Count = kbts__ReadU16Unaligned(&ClassDef->Count);
|
|
kbts__class_range_record *Ranges = KBTS__POINTER_AFTER(kbts__class_range_record, ClassDef);
|
|
|
|
KBTS__FOR(RangeIndex, 0, ClassDef_Count)
|
|
{
|
|
kbts__class_range_record *Range = &Ranges[RangeIndex];
|
|
kbts_un RangeClass = kbts__ReadU16Unaligned(&Range->Class);
|
|
|
|
if((RangeClass >= (ClassesIncludedLength * 64)) ||
|
|
(ClassesIncluded[RangeClass / 64] & (1ull << (RangeClass % 64))))
|
|
{
|
|
kbts_u16 Range_StartGlyphId = kbts__ReadU16Unaligned(&Range->StartGlyphId);
|
|
kbts_u16 Range_EndGlyphId = kbts__ReadU16Unaligned(&Range->EndGlyphId);
|
|
|
|
kbts_un OnePastLastGlyphId = Range_EndGlyphId + 1;
|
|
if(OnePastLastGlyphId > GlyphCount)
|
|
{
|
|
OnePastLastGlyphId = GlyphCount;
|
|
}
|
|
|
|
KBTS__FOR(GlyphId, Range_StartGlyphId, OnePastLastGlyphId)
|
|
{
|
|
if(GlyphId < GlyphCount)
|
|
{
|
|
kbts__matrix_index SubtableMatrixIndex = kbts__GlyphLookupSubtableMatrixIndex(SubtableIndex, SubtableCount, GlyphId, GlyphCount);
|
|
Matrix[SubtableMatrixIndex.WordIndex] |= 1u << SubtableMatrixIndex.BitIndex;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT kbts_load_font_error kbts_PlaceBlob(kbts_font *Font, kbts_load_font_state *State, void *ScratchMemory, void *OutputMemory)
|
|
{
|
|
kbts_load_font_error Result = 0;
|
|
|
|
if(!Font)
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
|
|
if((State->ScratchSize && !ScratchMemory) ||
|
|
(State->TotalSize && !OutputMemory))
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
|
|
if((Result == KBTS_LOAD_FONT_ERROR_NONE) &&
|
|
State->TotalSize)
|
|
{
|
|
kbts__pointer_bump_allocator Bump = kbts__PointerBumpAllocator(OutputMemory);
|
|
|
|
kbts_blob_header *Header = kbts__PointerPushType(&Bump, kbts_blob_header);
|
|
KBTS_MEMSET(Header, 0, sizeof(*Header));
|
|
Header->Magic = KBTS_FOURCC('k', 'b', 't', 's');
|
|
Header->Version = KBTS_BLOB_VERSION_CURRENT;
|
|
Header->LookupCount = State->LookupCount;
|
|
Header->LookupSubtableCount = State->LookupSubtableCount;
|
|
|
|
// Stamp packed font data.
|
|
KBTS__FOR(TableId, 0, KBTS_BLOB_TABLE_ID_COUNT)
|
|
{
|
|
kbts_blob_table InTable = State->Tables[TableId];
|
|
kbts_blob_table *OutTable = &Header->Tables[TableId];
|
|
|
|
char *TableBase = (char *)kbts__PointerPush(&Bump, InTable.Length, 4);
|
|
OutTable->OffsetFromStartOfFile = KBTS__POINTER_DIFF32(TableBase, Header);
|
|
OutTable->Length = InTable.Length;
|
|
|
|
void *InData = KBTS__POINTER_OFFSET(void, State->FontData, InTable.OffsetFromStartOfFile);
|
|
KBTS_MEMCPY(TableBase, InData, InTable.Length);
|
|
}
|
|
|
|
Font->Blob = Header;
|
|
|
|
// Byteswap it.
|
|
|
|
kbts__byteswap_context ByteSwapContext = KBTS__ZERO;
|
|
// We don't need to track our own header.
|
|
ByteSwapContext.FileBase = (char *)Header;
|
|
ByteSwapContext.FileEnd = (char *)Header + State->TotalSize;
|
|
|
|
kbts_un FileSizeExcludingHeader = (kbts_un)(ByteSwapContext.FileEnd - ByteSwapContext.FileBase) - sizeof(kbts_blob_header);
|
|
kbts_un MarkedBytesBitfieldSize = KBTS__IDIV_ROUND_UP(FileSizeExcludingHeader, 32) * sizeof(kbts_u32);
|
|
ByteSwapContext.MarkedBytesBitfield = (kbts_u32 *)ScratchMemory;
|
|
KBTS_MEMSET(ByteSwapContext.MarkedBytesBitfield, 0, MarkedBytesBitfieldSize);
|
|
|
|
{
|
|
char *TableEnd;
|
|
kbts__head *Head = kbts__BlobTableHeaderChecked(Header, KBTS_BLOB_TABLE_ID_HEAD, kbts__head, &TableEnd, &Result);
|
|
if(Head &&
|
|
((kbts_un)(TableEnd - (char *)Head) >= sizeof(kbts__head)))
|
|
{
|
|
kbts__ByteSwapArray16Unchecked(&Head->Major, 2);
|
|
kbts__ByteSwapArray32Unchecked(&Head->Revision, 2);
|
|
// We do not swap the magic number.
|
|
kbts__ByteSwapArray16Unchecked(&Head->Flags, 2);
|
|
// We do not swap file times.
|
|
kbts__ByteSwapArray16Unchecked((kbts_u16 *)&Head->XMin, 9);
|
|
}
|
|
}
|
|
|
|
{
|
|
char *TableEnd;
|
|
kbts__cmap *Cmap = kbts__BlobTableHeaderChecked(Header, KBTS_BLOB_TABLE_ID_CMAP, kbts__cmap, &TableEnd, &Result);
|
|
if(Cmap)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Cmap, TableEnd);
|
|
|
|
int TableValid = 0;
|
|
|
|
if(kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Cmap->Version, 0) &&
|
|
kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Cmap->TableCount, 0))
|
|
{
|
|
kbts__encoding_record *Records = KBTS__POINTER_AFTER(kbts__encoding_record, Cmap);
|
|
kbts_un Cmap_TableCount = kbts__ReadU16Unaligned(&Cmap->TableCount);
|
|
|
|
if((char *)(Records + Cmap_TableCount) <= TableEnd)
|
|
{
|
|
KBTS__FOR(It, 0, Cmap_TableCount)
|
|
{
|
|
kbts__encoding_record *Record = &Records[It];
|
|
kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Record->EncodingId, 0);
|
|
kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Record->PlatformId, 0);
|
|
kbts__ByteSwap32InPlaceContext(&ByteSwapContext, &Record->SubtableOffset, 0);
|
|
}
|
|
|
|
kbts_u16 PreferredFormat = 1;
|
|
|
|
kbts__cmap_subtable_pointer PreferredSubtable = kbts__SelectCmapSubtable(Cmap, 1, TableEnd, &Font->Cmap14, &PreferredFormat);
|
|
|
|
kbts__cmap_14 *Cmap14 = Font->Cmap14;
|
|
if(Cmap14)
|
|
{
|
|
kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Cmap14->Format, 0);
|
|
kbts__ByteSwap32InPlaceContext(&ByteSwapContext, &Cmap14->Length, 0);
|
|
kbts__ByteSwap32InPlaceContext(&ByteSwapContext, &Cmap14->SelectorCount, 0);
|
|
}
|
|
|
|
if(PreferredSubtable.Subtable)
|
|
{
|
|
kbts_un SubtableFormat;
|
|
if(kbts__ByteSwap16InPlaceContext(&ByteSwapContext, PreferredSubtable.Subtable, &SubtableFormat))
|
|
{
|
|
switch(SubtableFormat)
|
|
{
|
|
case 0:
|
|
{
|
|
kbts__cmap_0 *Cmap0 = (kbts__cmap_0 *)PreferredSubtable.Subtable;
|
|
if(kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Cmap0->Length, 0) &&
|
|
kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Cmap0->Language, 0))
|
|
{
|
|
TableValid = 1;
|
|
|
|
kbts__MarkOkToReadContext(&ByteSwapContext, Cmap0->GlyphIdArray, sizeof(Cmap0->GlyphIdArray));
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 2:
|
|
{
|
|
kbts__cmap_2 *Cmap2 = (kbts__cmap_2 *)PreferredSubtable.Subtable;
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &Cmap2->Length, 258))
|
|
{
|
|
kbts_un SubHeaderCount = 0;
|
|
KBTS__FOR(It, 0, 256)
|
|
{
|
|
kbts_un SubHeaderIndex = kbts__ReadU16Unaligned(&Cmap2->SubHeaderKeys[It]);
|
|
SubHeaderCount = KBTS__MAX(SubHeaderCount, SubHeaderIndex + 1);
|
|
}
|
|
|
|
kbts__sub_header *SubHeaders = KBTS__POINTER_AFTER(kbts__sub_header, Cmap2);
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &SubHeaders->FirstCode, 4 * SubHeaderCount))
|
|
{
|
|
kbts_u16 *GlyphIds = (kbts_u16 *)(SubHeaders + SubHeaderCount);
|
|
|
|
kbts_sn GlyphIdCount = 0;
|
|
KBTS__FOR(It, 0, SubHeaderCount)
|
|
{
|
|
kbts__sub_header *SubHeader = &SubHeaders[It];
|
|
kbts_u16 SubHeader_IdRangeOffset = kbts__ReadU16Unaligned(&SubHeader->IdRangeOffset);
|
|
kbts_u16 SubHeader_EntryCount = kbts__ReadU16Unaligned(&SubHeader->EntryCount);
|
|
|
|
kbts_u16 *OnePastLastGlyphId = &SubHeader->IdRangeOffset + SubHeader_IdRangeOffset / 2 + SubHeader_EntryCount;
|
|
GlyphIdCount = KBTS__MAX(GlyphIdCount, OnePastLastGlyphId - GlyphIds);
|
|
}
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, GlyphIds, (kbts_un)GlyphIdCount))
|
|
{
|
|
TableValid = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 4:
|
|
{
|
|
kbts__cmap_4 *Cmap4 = (kbts__cmap_4 *)PreferredSubtable.Subtable;
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &Cmap4->Length, 5))
|
|
{
|
|
kbts_u16 Cmap4_SegmentCountTimesTwo = kbts__ReadU16Unaligned(&Cmap4->SegmentCountTimesTwo);
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, KBTS__POINTER_AFTER(kbts_u16, Cmap4), Cmap4_SegmentCountTimesTwo * 2 + 1))
|
|
{
|
|
kbts_un SegmentCount = Cmap4_SegmentCountTimesTwo / 2;
|
|
kbts_u16 *EndCodes = KBTS__POINTER_AFTER(kbts_u16, Cmap4);
|
|
kbts_u16 *StartCodes = EndCodes + SegmentCount + 1;
|
|
kbts_s16 *IdDeltas = (kbts_s16 *)(StartCodes + SegmentCount);
|
|
kbts_u16 *IdRangeOffsets = (kbts_u16 *)(IdDeltas + SegmentCount);
|
|
kbts_u16 *GlyphIds = IdRangeOffsets + SegmentCount;
|
|
|
|
kbts_sn GlyphIdCount = 0;
|
|
|
|
KBTS__FOR(SegmentIndex, 0, SegmentCount)
|
|
{
|
|
kbts_u16 Offset = kbts__ReadU16Unaligned(&IdRangeOffsets[SegmentIndex]);
|
|
kbts_u16 StartCode = kbts__ReadU16Unaligned(&StartCodes[SegmentIndex]);
|
|
kbts_u16 EndCode = kbts__ReadU16Unaligned(&EndCodes[SegmentIndex]);
|
|
|
|
if((StartCode == 0xFFFF) && (EndCode == 0xFFFF))
|
|
{
|
|
kbts__OverwriteU16Unaligned(&IdRangeOffsets[SegmentIndex], 0);
|
|
|
|
Offset = 0;
|
|
}
|
|
|
|
if(Offset)
|
|
{
|
|
kbts_u16 *OnePastIdLookup = &IdRangeOffsets[SegmentIndex] + (EndCode - StartCode + 1) + Offset / 2;
|
|
|
|
GlyphIdCount = KBTS__MAX(GlyphIdCount, (kbts_sn)(OnePastIdLookup - GlyphIds));
|
|
}
|
|
}
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, GlyphIds, (kbts_un)GlyphIdCount))
|
|
{
|
|
TableValid = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 6:
|
|
{
|
|
kbts__cmap_6 *Cmap6 = (kbts__cmap_6 *)PreferredSubtable.Subtable;
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &Cmap6->Length, 4) &&
|
|
kbts__ByteSwapArray16Context(&ByteSwapContext, KBTS__POINTER_AFTER(kbts_u16, Cmap6), kbts__ReadU16Unaligned(&Cmap6->EntryCount)))
|
|
{
|
|
TableValid = 1;
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 12:
|
|
{
|
|
kbts__cmap_12_13 *Cmap12 = (kbts__cmap_12_13 *)PreferredSubtable.Subtable;
|
|
if(kbts__ByteSwapArray32Context(&ByteSwapContext, &Cmap12->Length, 3) &&
|
|
kbts__ByteSwapArray32Context(&ByteSwapContext, KBTS__POINTER_AFTER(kbts_u32, Cmap12), kbts__ReadU32Unaligned(&Cmap12->GroupCount) * 3))
|
|
{
|
|
TableValid = 1;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
Font->Cmap = PreferredSubtable.Subtable;
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts_b32 ContextError = kbts__EndBounds(&ByteSwapContext, &Bounds);
|
|
if(ContextError | !TableValid)
|
|
{
|
|
Font->Cmap = 0;
|
|
Font->Blob->Tables[KBTS_BLOB_TABLE_ID_CMAP].Length = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts__gdef *Gdef;
|
|
{ // @Cleanup: Merge this with the other GDEF pass.
|
|
char *TableEnd;
|
|
Gdef = (kbts__gdef *)kbts__BlobTableHeaderCheckedManualSize(Header, KBTS_BLOB_TABLE_ID_GDEF, 12, &TableEnd, &Result);
|
|
|
|
if(Gdef)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Gdef, TableEnd);
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &Gdef->Major, 6))
|
|
{
|
|
kbts_u16 Gdef_Minor = kbts__ReadU16Unaligned(&Gdef->Minor);
|
|
|
|
if(Gdef_Minor >= 2)
|
|
{
|
|
if(kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Gdef->MarkGlyphSetsDefinitionOffset, 0))
|
|
{
|
|
if(Gdef_Minor >= 3)
|
|
{
|
|
kbts__ByteSwap32InPlaceContext(&ByteSwapContext, &Gdef->ItemVariationStoreOffset, 0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
|
|
kbts_un Gdef_ClassDefinitionOffset = kbts__ReadU16Unaligned(&Gdef->ClassDefinitionOffset);
|
|
if(Gdef_ClassDefinitionOffset)
|
|
{
|
|
kbts_u16 *ClassDefBase = KBTS__POINTER_OFFSET(kbts_u16, Gdef, Gdef_ClassDefinitionOffset);
|
|
kbts__ByteSwapClassDefinition(&ByteSwapContext, ClassDefBase);
|
|
}
|
|
|
|
kbts_un Gdef_MarkAttachmentClassDefinitionOffset = kbts__ReadU16Unaligned(&Gdef->MarkAttachmentClassDefinitionOffset);
|
|
if(Gdef_MarkAttachmentClassDefinitionOffset)
|
|
{
|
|
kbts_u16 *ClassDefBase = KBTS__POINTER_OFFSET(kbts_u16, Gdef, Gdef_MarkAttachmentClassDefinitionOffset);
|
|
kbts__ByteSwapClassDefinition(&ByteSwapContext, ClassDefBase);
|
|
}
|
|
|
|
kbts_u16 Gdef_Minor = kbts__ReadU16Unaligned(&Gdef->Minor);
|
|
if(Gdef_Minor >= 2)
|
|
{
|
|
kbts_un Gdef_MarkGlyphSetsDefinitionOffset = kbts__ReadU16Unaligned(&Gdef->MarkGlyphSetsDefinitionOffset);
|
|
|
|
if(Gdef_MarkGlyphSetsDefinitionOffset)
|
|
{
|
|
kbts__mark_glyph_sets *MarkGlyphSets = KBTS__POINTER_OFFSET(kbts__mark_glyph_sets, Gdef, Gdef_MarkGlyphSetsDefinitionOffset);
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &MarkGlyphSets->Format, 2))
|
|
{
|
|
if(kbts__ReadU16Unaligned(&MarkGlyphSets->Format) == 1)
|
|
{
|
|
kbts_un MarkGlyphSets_MarkGlyphSetCount = kbts__ReadU16Unaligned(&MarkGlyphSets->MarkGlyphSetCount);
|
|
|
|
kbts_u32 *CoverageOffsets = KBTS__POINTER_AFTER(kbts_u32, MarkGlyphSets);
|
|
if(kbts__ByteSwapArray32Context(&ByteSwapContext, CoverageOffsets, MarkGlyphSets_MarkGlyphSetCount))
|
|
{
|
|
KBTS__FOR(MarkGlyphSetIndex, 0, MarkGlyphSets_MarkGlyphSetCount)
|
|
{
|
|
kbts_un CoverageOffset = kbts__ReadU32Unaligned(&CoverageOffsets[MarkGlyphSetIndex]);
|
|
kbts__coverage *Coverage = KBTS__POINTER_OFFSET(kbts__coverage, MarkGlyphSets, CoverageOffset);
|
|
kbts__ByteSwapCoverage(&ByteSwapContext, Coverage);
|
|
|
|
if(ByteSwapContext.ErrorInCurrentBounds)
|
|
{
|
|
goto InvalidFont;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(Gdef_Minor >= 3)
|
|
{
|
|
kbts_un Gdef_ItemVariationStoreOffset = kbts__ReadU32Unaligned(&Gdef->ItemVariationStoreOffset);
|
|
|
|
if(Gdef_ItemVariationStoreOffset)
|
|
{
|
|
kbts__ByteSwapItemVariationStore(&ByteSwapContext, KBTS__POINTER_OFFSET(kbts__item_variation_store, Gdef, Gdef_ItemVariationStoreOffset));
|
|
}
|
|
}
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[KBTS_BLOB_TABLE_ID_GDEF].Length = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
kbts_blob_table_id HeaTableIds[2] = {KBTS_BLOB_TABLE_ID_HHEA, KBTS_BLOB_TABLE_ID_VHEA};
|
|
KBTS__FOR(HeaTableIndex, 0, KBTS__ARRAY_LENGTH(HeaTableIds))
|
|
{
|
|
char *TableEnd;
|
|
kbts__hea *Hea = kbts__BlobTableHeaderChecked(Header, HeaTableIds[HeaTableIndex], kbts__hea, &TableEnd, &Result);
|
|
|
|
if(Hea)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Hea, TableEnd);
|
|
|
|
kbts__ByteSwapArray16Context(&ByteSwapContext, (kbts_u16 *)Hea, sizeof(kbts__hea) / sizeof(kbts_u16));
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[HeaTableIds[HeaTableIndex]].Length = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
kbts_blob_table_id MtxTableIds[2] = {KBTS_BLOB_TABLE_ID_HMTX, KBTS_BLOB_TABLE_ID_VMTX};
|
|
|
|
KBTS__FOR(MtxTableIndex, 0, KBTS__ARRAY_LENGTH(MtxTableIds))
|
|
{
|
|
char *TableEnd;
|
|
kbts_u16 *Mtx = kbts__BlobTableHeaderChecked(Header, MtxTableIds[MtxTableIndex], kbts_u16, &TableEnd, &Result);
|
|
|
|
if(Mtx)
|
|
{
|
|
kbts__ByteSwapArray16Unchecked(Mtx, (kbts_un)(TableEnd - (char *)Mtx) / sizeof(kbts_u16));
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
kbts_blob_table *MaxpTable = &Header->Tables[KBTS_BLOB_TABLE_ID_MAXP];
|
|
|
|
if(MaxpTable->Length)
|
|
{
|
|
if(MaxpTable->Length >= 6)
|
|
{
|
|
kbts__maxp *Maxp = KBTS__POINTER_OFFSET(kbts__maxp, Header, MaxpTable->OffsetFromStartOfFile);
|
|
char *TableEnd = KBTS__POINTER_OFFSET(char, Header, MaxpTable->OffsetFromStartOfFile + MaxpTable->Length);
|
|
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Maxp, TableEnd);
|
|
|
|
kbts_un Maxp_Major;
|
|
kbts_un Maxp_Minor;
|
|
if(kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Maxp->Major, &Maxp_Major) &&
|
|
kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Maxp->Minor, &Maxp_Minor))
|
|
{
|
|
kbts_un U16Count = 0;
|
|
if(!Maxp_Major && (Maxp_Minor == 0x5000))
|
|
{
|
|
U16Count = 1;
|
|
}
|
|
else if((Maxp_Major == 1) && !Maxp_Minor)
|
|
{
|
|
U16Count = 14;
|
|
}
|
|
|
|
if(U16Count)
|
|
{
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &Maxp->GlyphCount, U16Count))
|
|
{
|
|
Header->GlyphCount = kbts__ReadU16Unaligned(&Maxp->GlyphCount);
|
|
}
|
|
else
|
|
{
|
|
// We need a valid MAXP table.
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
}
|
|
}
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[KBTS_BLOB_TABLE_ID_MAXP].Length = 0;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
kbts_blob_table *Os2Table = &Header->Tables[KBTS_BLOB_TABLE_ID_OS2];
|
|
|
|
if(Os2Table->Length)
|
|
{
|
|
kbts__os2 *Os2 = KBTS__POINTER_OFFSET(kbts__os2, Header, Os2Table->OffsetFromStartOfFile);
|
|
kbts_un Length = Os2Table->Length;
|
|
|
|
if(Length >= 68)
|
|
{
|
|
kbts__ByteSwapArray16Unchecked(&Os2->Version, 16);
|
|
kbts__ByteSwapArray32Unchecked(Os2->UnicodeRange, 4);
|
|
kbts__ByteSwapArray16Unchecked(&Os2->Selection, 3);
|
|
|
|
kbts_un Version = kbts__ReadU16Unaligned(&Os2->Version);
|
|
|
|
if(Length >= 78)
|
|
{
|
|
kbts__ByteSwapArray16Unchecked((kbts_u16 *)&Os2->TypoAscender, 5);
|
|
|
|
if(Version >= 1)
|
|
{
|
|
if(Length >= 86)
|
|
{
|
|
kbts__ByteSwapArray32Unchecked(Os2->CodePageRange, 2);
|
|
|
|
if(Version >= 2)
|
|
{
|
|
if(Length >= 96)
|
|
{
|
|
kbts__ByteSwapArray16Unchecked((kbts_u16 *)&Os2->Height, 5);
|
|
|
|
if(Version >= 5)
|
|
{
|
|
if(Length >= 100)
|
|
{
|
|
kbts__ByteSwapArray16Unchecked(&Os2->LowerOpticalPointSize, 2);
|
|
}
|
|
else
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
}
|
|
// We should normally set Result to INVALID_FONT if there is no OS/2 table.
|
|
// However, one Harfbuzz test has a font with no OS/2 table.
|
|
}
|
|
|
|
{
|
|
char *TableEnd;
|
|
kbts__name *Name = kbts__BlobTableHeaderChecked(Header, KBTS_BLOB_TABLE_ID_NAME, kbts__name, &TableEnd, &Result);
|
|
if(Name)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Name, TableEnd);
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &Name->Version, 3))
|
|
{
|
|
kbts__name_record *NameRecords = KBTS__POINTER_AFTER(kbts__name_record, Name);
|
|
|
|
kbts_un Name_Count = kbts__ReadU16Unaligned(&Name->Count);
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &NameRecords->PlatformId, Name_Count * 6))
|
|
{
|
|
kbts__MarkOkToReadContext(&ByteSwapContext, NameRecords + Name_Count, TableEnd - (char *)(NameRecords + Name_Count));
|
|
}
|
|
}
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[KBTS_BLOB_TABLE_ID_NAME].Length = 0;
|
|
}
|
|
}
|
|
|
|
// We should normally set Result to INVALID_FONT if there is no name table.
|
|
// However, one Harfbuzz test has a font with no name table.
|
|
}
|
|
|
|
{
|
|
char *TableEnd;
|
|
kbts__fvar *Fvar = kbts__BlobTableHeaderChecked(Header, KBTS_BLOB_TABLE_ID_FVAR, kbts__fvar, &TableEnd, &Result);
|
|
if(Fvar)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Fvar, TableEnd);
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &Fvar->Major, 8))
|
|
{
|
|
kbts__variation_axis_record *Axes = KBTS__POINTER_OFFSET(kbts__variation_axis_record, Fvar, kbts__ReadU16Unaligned(&Fvar->AxesArrayOffset));
|
|
kbts_un AxisCount = kbts__ReadU16Unaligned(&Fvar->AxisCount);
|
|
|
|
kbts__instance_record *Instances = (kbts__instance_record *)(Axes + AxisCount);
|
|
kbts_un InstanceCount = kbts__ReadU16Unaligned(&Fvar->InstanceCount);
|
|
kbts_un InstanceSize = kbts__ReadU16Unaligned(&Fvar->InstanceSize);
|
|
|
|
if((char *)(Axes + AxisCount) <= TableEnd)
|
|
{
|
|
KBTS__FOR(AxisIndex, 0, AxisCount)
|
|
{
|
|
kbts__variation_axis_record *Axis = &Axes[AxisIndex];
|
|
|
|
kbts__MarkOkToReadContext(&ByteSwapContext, &Axis->Tag, sizeof(Axis->Tag));
|
|
kbts__ByteSwapArray32Context(&ByteSwapContext, (kbts_u32 *)&Axis->MinValue, 3);
|
|
kbts__ByteSwapArray16Context(&ByteSwapContext, &Axis->Flags, 2);
|
|
}
|
|
|
|
kbts_b32 InstancesContainPostscriptNameId = (InstanceSize >= (sizeof(kbts__instance_record) + sizeof(kbts__fixed16_16) * AxisCount + sizeof(kbts_u16)));
|
|
|
|
KBTS__FOR(InstanceIndex, 0, InstanceCount)
|
|
{
|
|
kbts__instance_record *Instance = KBTS__POINTER_OFFSET(kbts__instance_record, Instances, InstanceIndex * InstanceSize);
|
|
kbts__fixed16_16 *InstanceCoordinates = KBTS__POINTER_AFTER(kbts__fixed16_16, Instance);
|
|
|
|
kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &Instance->SubfamilyNameId, 0);
|
|
kbts__ByteSwapArray32Context(&ByteSwapContext, (kbts_u32 *)InstanceCoordinates, AxisCount);
|
|
|
|
if(InstancesContainPostscriptNameId)
|
|
{
|
|
kbts_u16 *InstancePostscriptNameId = (kbts_u16 *)(InstanceCoordinates + AxisCount);
|
|
kbts__ByteSwap16InPlaceContext(&ByteSwapContext, InstancePostscriptNameId, 0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[KBTS_BLOB_TABLE_ID_FVAR].Length = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
char *TableEnd;
|
|
kbts__avar *Avar = kbts__BlobTableHeaderChecked(Header, KBTS_BLOB_TABLE_ID_AVAR, kbts__avar, &TableEnd, &Result);
|
|
if(Avar)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Avar, TableEnd);
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &Avar->Major, 4))
|
|
{
|
|
char *At = KBTS__POINTER_AFTER(char, Avar);
|
|
kbts_un Avar_AxisCount = kbts__ReadU16Unaligned(&Avar->AxisCount);
|
|
|
|
KBTS__FOR(AxisIndex, 0, Avar_AxisCount)
|
|
{
|
|
kbts__segment_maps *SegmentMaps = (kbts__segment_maps *)At;
|
|
|
|
if((char *)(SegmentMaps + 1) <= TableEnd)
|
|
{
|
|
kbts_un SegmentMaps_PositionMapCount;
|
|
if(kbts__ByteSwap16InPlaceContext(&ByteSwapContext, &SegmentMaps->PositionMapCount, &SegmentMaps_PositionMapCount))
|
|
{
|
|
kbts__axis_value_map *AxisValueMaps = KBTS__POINTER_AFTER(kbts__axis_value_map, SegmentMaps);
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, (kbts_u16 *)&AxisValueMaps->FromCoordinate, 2 * SegmentMaps_PositionMapCount))
|
|
{
|
|
At = (char *)(AxisValueMaps + SegmentMaps_PositionMapCount);
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[KBTS_BLOB_TABLE_ID_AVAR].Length = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
kbts_blob_table_id TableIds[] = {KBTS_BLOB_TABLE_ID_HVAR, KBTS_BLOB_TABLE_ID_VVAR};
|
|
kbts_u32 HeaderSizes[] = {sizeof(kbts__hvar_vvar_common), sizeof(kbts__vvar)};
|
|
|
|
KBTS__FOR(TableIdIndex, 0, KBTS__ARRAY_LENGTH(TableIds))
|
|
{
|
|
kbts_u32 TableId = TableIds[TableIdIndex];
|
|
kbts_un HeaderSize = HeaderSizes[TableIdIndex];
|
|
|
|
char *TableEnd;
|
|
kbts__hvar_vvar_common *HvarVvar = (kbts__hvar_vvar_common *)kbts__BlobTableHeaderCheckedManualSize(Header, TableId, HeaderSize, &TableEnd, &Result);
|
|
|
|
if(HvarVvar)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, HvarVvar, TableEnd);
|
|
|
|
kbts__ByteSwapArray16Context(&ByteSwapContext, &HvarVvar->Major, 2);
|
|
kbts__ByteSwapArray32Context(&ByteSwapContext, &HvarVvar->ItemVariationStoreOffset, 4);
|
|
|
|
kbts__ByteSwapItemVariationStore(&ByteSwapContext, KBTS__POINTER_OFFSET(kbts__item_variation_store, HvarVvar, kbts__ReadU32Unaligned(&HvarVvar->ItemVariationStoreOffset)));
|
|
|
|
kbts_un HvarVvar_AdvanceWidthMappingOffset = kbts__ReadU32Unaligned(&HvarVvar->AdvanceWidthMappingOffset);
|
|
if(HvarVvar_AdvanceWidthMappingOffset)
|
|
{
|
|
kbts__ByteSwapDeltaSetIndexMap(&ByteSwapContext, KBTS__POINTER_OFFSET(kbts__delta_set_index_map, HvarVvar, HvarVvar_AdvanceWidthMappingOffset));
|
|
}
|
|
|
|
kbts_un HvarVvar_LsbMappingOffset = kbts__ReadU32Unaligned(&HvarVvar->LsbMappingOffset);
|
|
if(HvarVvar_LsbMappingOffset)
|
|
{
|
|
kbts__ByteSwapDeltaSetIndexMap(&ByteSwapContext, KBTS__POINTER_OFFSET(kbts__delta_set_index_map, HvarVvar, HvarVvar_LsbMappingOffset));
|
|
}
|
|
|
|
kbts_un HvarVvar_RsbMappingOffset = kbts__ReadU32Unaligned(&HvarVvar->RsbMappingOffset);
|
|
if(HvarVvar_RsbMappingOffset)
|
|
{
|
|
kbts__ByteSwapDeltaSetIndexMap(&ByteSwapContext, KBTS__POINTER_OFFSET(kbts__delta_set_index_map, HvarVvar, HvarVvar_RsbMappingOffset));
|
|
}
|
|
|
|
if(TableId == KBTS_BLOB_TABLE_ID_VVAR)
|
|
{
|
|
kbts__vvar *Vvar = (kbts__vvar *)(HvarVvar);
|
|
kbts_un Vvar_OriginMappingOffset;
|
|
if(kbts__ByteSwap32InPlaceContext(&ByteSwapContext, &Vvar->OriginMappingOffset, &Vvar_OriginMappingOffset) &&
|
|
Vvar_OriginMappingOffset)
|
|
{
|
|
kbts__ByteSwapDeltaSetIndexMap(&ByteSwapContext, KBTS__POINTER_OFFSET(kbts__delta_set_index_map, Vvar, Vvar_OriginMappingOffset));
|
|
}
|
|
}
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[TableId].Length = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
{
|
|
char *TableEnd;
|
|
kbts__mvar *Mvar = kbts__BlobTableHeaderChecked(Header, KBTS_BLOB_TABLE_ID_MVAR, kbts__mvar, &TableEnd, &Result);
|
|
|
|
if(Mvar)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Mvar, TableEnd);
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &Mvar->Major, 6))
|
|
{
|
|
kbts_un ValueRecordCount = kbts__ReadU16Unaligned(&Mvar->ValueRecordCount);
|
|
kbts_un ValueRecordSize = kbts__ReadU16Unaligned(&Mvar->ValueRecordSize);
|
|
|
|
char *ValueRecordAt = KBTS__POINTER_AFTER(char, Mvar);
|
|
if((ValueRecordSize >= sizeof(kbts__mvar_value_record)) &&
|
|
((ValueRecordAt + ValueRecordCount * ValueRecordSize) <= TableEnd))
|
|
{
|
|
KBTS__FOR(ValueRecordIndex, 0, ValueRecordCount)
|
|
{
|
|
kbts__mvar_value_record *ValueRecord = (kbts__mvar_value_record *)ValueRecordAt;
|
|
kbts__MarkOkToReadContext(&ByteSwapContext, &ValueRecord->Tag, sizeof(ValueRecord->Tag));
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, &ValueRecord->DeltaSetOuterIndex, 2))
|
|
{
|
|
ValueRecordAt += ValueRecordSize;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
kbts__ByteSwapItemVariationStore(&ByteSwapContext, KBTS__POINTER_OFFSET(kbts__item_variation_store, Mvar, kbts__ReadU16Unaligned(&Mvar->ItemVariationStoreOffset)));
|
|
}
|
|
else
|
|
{
|
|
ByteSwapContext.ErrorInCurrentBounds |= 1;
|
|
}
|
|
}
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[KBTS_BLOB_TABLE_ID_MVAR].Length = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
char *GsubTableEnd;
|
|
kbts__gsub_gpos *Gsub = (kbts__gsub_gpos *)kbts__BlobTableHeaderCheckedManualSize(Header, KBTS_BLOB_TABLE_ID_GSUB, 10, &GsubTableEnd, 0);
|
|
if(Gsub)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Gsub, GsubTableEnd);
|
|
|
|
kbts__ByteSwapGsubGposCommon(&ByteSwapContext, Gsub);
|
|
|
|
if(!ByteSwapContext.ErrorInCurrentBounds)
|
|
{
|
|
kbts_u16 LookupListOffset = kbts__ReadU16Unaligned(&Gsub->LookupListOffset);
|
|
kbts_u16 ScriptListOffset = kbts__ReadU16Unaligned(&Gsub->ScriptListOffset);
|
|
kbts_u16 FeatureListOffset = kbts__ReadU16Unaligned(&Gsub->FeatureListOffset);
|
|
|
|
// @Robustness: Is this enough?
|
|
if((LookupListOffset >= 10) &&
|
|
(LookupListOffset != ScriptListOffset) &&
|
|
(LookupListOffset != FeatureListOffset))
|
|
{
|
|
kbts__lookup_list *LookupList = kbts__GetLookupList(Gsub);
|
|
kbts_un LookupList_Count = kbts__ReadU16Unaligned(&LookupList->Count);
|
|
|
|
kbts_u16 *LookupList_Offsets = KBTS__POINTER_AFTER(kbts_u16, LookupList);
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, LookupList_Offsets, LookupList_Count))
|
|
{
|
|
KBTS__FOR(LookupIndex, 0, LookupList_Count)
|
|
{
|
|
kbts__lookup *PackedLookup = kbts__GetLookup(LookupList, LookupIndex);
|
|
|
|
KBTS_DUMPF("GSUB Lookup %llu:\n", LookupIndex);
|
|
|
|
if(kbts__ByteSwapLookup(&ByteSwapContext, PackedLookup) &&
|
|
!ByteSwapContext.ErrorInCurrentBounds)
|
|
{
|
|
kbts__unpacked_lookup Lookup = kbts__UnpackLookup(Gdef, PackedLookup);
|
|
KBTS_DUMPF(" Flags %u\n", Lookup.Flags);
|
|
|
|
KBTS__FOR(SubstitutionIndex, 0, Lookup.SubtableCount)
|
|
{
|
|
kbts_u16 *Base = KBTS__POINTER_OFFSET(kbts_u16, PackedLookup, kbts__ReadU16Unaligned(&Lookup.SubtableOffsets[SubstitutionIndex]));
|
|
|
|
KBTS_DUMPF(" Subtable %llu:\n", SubstitutionIndex);
|
|
|
|
kbts__ByteSwapGsubLookupSubtable(&ByteSwapContext, Lookup.Type, Base);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[KBTS_BLOB_TABLE_ID_GSUB].Length = 0;
|
|
}
|
|
}
|
|
|
|
{
|
|
char *TableEnd;
|
|
kbts__gsub_gpos *Gpos = (kbts__gsub_gpos *)kbts__BlobTableHeaderCheckedManualSize(Header, KBTS_BLOB_TABLE_ID_GPOS, 10, &TableEnd, 0);
|
|
|
|
if(Gpos)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, Gpos, TableEnd);
|
|
|
|
kbts__ByteSwapGsubGposCommon(&ByteSwapContext, Gpos);
|
|
if(!ByteSwapContext.ErrorInCurrentBounds)
|
|
{
|
|
kbts__lookup_list *LookupList = kbts__GetLookupList(Gpos);
|
|
kbts_un LookupList_Count = kbts__ReadU16Unaligned(&LookupList->Count);
|
|
|
|
if(kbts__ByteSwapArray16Context(&ByteSwapContext, KBTS__POINTER_AFTER(kbts_u16, LookupList), LookupList_Count))
|
|
{
|
|
KBTS__FOR(LookupIndex, 0, LookupList_Count)
|
|
{
|
|
kbts__lookup *PackedLookup = kbts__GetLookup(LookupList, LookupIndex);
|
|
|
|
KBTS_DUMPF("GPOS Lookup %llu:\n", LookupIndex);
|
|
|
|
if(kbts__ByteSwapLookup(&ByteSwapContext, PackedLookup) &&
|
|
!ByteSwapContext.ErrorInCurrentBounds)
|
|
{
|
|
kbts__unpacked_lookup Lookup = kbts__UnpackLookup(Gdef, PackedLookup);
|
|
|
|
KBTS_DUMPF(" Flags %x\n", Lookup.Flags);
|
|
|
|
KBTS__FOR(SubstitutionIndex, 0, Lookup.SubtableCount)
|
|
{
|
|
kbts_u16 *Base = KBTS__POINTER_OFFSET(kbts_u16, PackedLookup, kbts__ReadU16Unaligned(&Lookup.SubtableOffsets[SubstitutionIndex]));
|
|
|
|
KBTS_DUMPF(" Subtable %llu:\n", (kbts_un)SubstitutionIndex);
|
|
|
|
kbts__ByteSwapGposLookupSubtable(&ByteSwapContext, LookupList, Lookup.Type, Base);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(kbts__EndBounds(&ByteSwapContext, &Bounds))
|
|
{
|
|
Font->Blob->Tables[KBTS_BLOB_TABLE_ID_GPOS].Length = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
// At this point, we are done byteswapping the file, so we can start reusing scratch memory.
|
|
|
|
// Bake our own data.
|
|
|
|
if(!Result && Header->Tables[KBTS_BLOB_TABLE_ID_MAXP].Length)
|
|
{
|
|
kbts_un GlyphCount = Header->GlyphCount;
|
|
kbts_un LookupCount = Header->LookupCount;
|
|
kbts_un SubtableCount = Header->LookupSubtableCount;
|
|
|
|
kbts_u32 *GlyphLookupMatrix = kbts__PointerPushArray(&Bump, kbts_u32, State->GlyphLookupMatrixSizeInBytes / sizeof(kbts_u32));
|
|
kbts_u32 *GlyphLookupSubtableMatrix = kbts__PointerPushArray(&Bump, kbts_u32, State->GlyphLookupSubtableMatrixSizeInBytes / sizeof(kbts_u32));
|
|
kbts_u32 *LookupSubtableIndexOffsets = kbts__PointerPushArray(&Bump, kbts_u32, State->LookupCount);
|
|
|
|
KBTS_MEMSET(GlyphLookupMatrix, 0, State->GlyphLookupMatrixSizeInBytes);
|
|
KBTS_MEMSET(GlyphLookupSubtableMatrix, 0, State->GlyphLookupSubtableMatrixSizeInBytes);
|
|
KBTS_MEMSET(LookupSubtableIndexOffsets, 0, sizeof(kbts_u32) * State->LookupCount);
|
|
|
|
kbts_un GposLookupIndexOffset = 0;
|
|
kbts_un RunningLookupIndex = 0;
|
|
kbts_un RunningSubtableIndex = 0;
|
|
|
|
kbts_blob_table_id TableIds[2] = {KBTS_BLOB_TABLE_ID_GSUB, KBTS_BLOB_TABLE_ID_GPOS};
|
|
KBTS__FOR(TableIdIndex, 0, KBTS__ARRAY_LENGTH(TableIds))
|
|
{
|
|
kbts_blob_table_id TableId = TableIds[TableIdIndex];
|
|
kbts_blob_table *Table = &Header->Tables[TableId];
|
|
|
|
if(Table->Length)
|
|
{
|
|
kbts__gsub_gpos *ShapingTable = KBTS__POINTER_OFFSET(kbts__gsub_gpos, Header, Table->OffsetFromStartOfFile);
|
|
int InGpos = (TableId == KBTS_BLOB_TABLE_ID_GPOS);
|
|
kbts_shaping_table ShapingTableId = (kbts_shaping_table)(InGpos ? KBTS_SHAPING_TABLE_GPOS : KBTS_SHAPING_TABLE_GSUB);
|
|
|
|
if(ShapingTable)
|
|
{
|
|
kbts__bounds Bounds = kbts__BeginBounds(&ByteSwapContext, ShapingTable, (char *)ShapingTable + Table->Length);
|
|
|
|
kbts__lookup_list *LookupList = kbts__GetLookupList(ShapingTable);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, LookupList, LookupList + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un LookupList_Count = kbts__ReadU16Unaligned(&LookupList->Count);
|
|
|
|
KBTS__FOR(LookupIndex, 0, LookupList_Count)
|
|
{
|
|
kbts__lookup *PackedLookup = kbts__GetLookup(LookupList, LookupIndex);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, PackedLookup, PackedLookup + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_u16 Lookup_Type = kbts__ReadU16Unaligned(&PackedLookup->Type);
|
|
kbts_un Lookup_SubtableCount = kbts__ReadU16Unaligned(&PackedLookup->SubtableCount);
|
|
kbts_un OffsetCount = Lookup_SubtableCount;
|
|
if(kbts__ReadU16Unaligned(&PackedLookup->Flag) & KBTS__LOOKUP_FLAG_USE_MARK_FILTERING_SET)
|
|
{
|
|
OffsetCount += 1;
|
|
}
|
|
|
|
kbts_u16 *Lookup_SubtableOffsets = KBTS__POINTER_AFTER(kbts_u16, PackedLookup);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Lookup_SubtableOffsets, Lookup_SubtableOffsets + OffsetCount))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
LookupSubtableIndexOffsets[RunningLookupIndex] = (kbts_u32)RunningSubtableIndex;
|
|
|
|
KBTS__FOR(SubtableIndex, 0, Lookup_SubtableCount)
|
|
{
|
|
kbts_u16 LookupType = Lookup_Type;
|
|
kbts_u16 *Base = KBTS__POINTER_OFFSET(kbts_u16, PackedLookup, kbts__ReadU16Unaligned(&Lookup_SubtableOffsets[SubtableIndex]));
|
|
|
|
while((!InGpos && (LookupType == 7)) ||
|
|
(InGpos && (LookupType == 9)))
|
|
{
|
|
kbts__extension *Extension = (kbts__extension *)Base;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Extension, Extension + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
// CAREFUL: Here, we remap LookupType only.
|
|
// Do not use Lookup.Type beyond this point!
|
|
LookupType = kbts__ReadU16Unaligned(&Extension->LookupType);
|
|
Base = KBTS__POINTER_OFFSET(kbts_u16, Extension, kbts__ReadU32Unaligned(&Extension->Offset));
|
|
}
|
|
|
|
kbts__coverage *Coverage = 0;
|
|
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Base, Base + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
if(kbts__LookupBeginsWithCoverage(ShapingTableId, LookupType, kbts__ReadU16Unaligned(&Base[0])))
|
|
{
|
|
Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Base, kbts__ReadU16Unaligned(&Base[1]));
|
|
}
|
|
|
|
if(!InGpos && (LookupType == 4))
|
|
{
|
|
kbts__ligature_substitution *Subst = (kbts__ligature_substitution *)Base;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Subst, Subst + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un Subst_LigatureSetCount = kbts__ReadU16Unaligned(&Subst->LigatureSetCount);
|
|
|
|
KBTS__FOR(SetIndex, 0, Subst_LigatureSetCount)
|
|
{
|
|
kbts__ligature_set *Set = kbts__GetLigatureSet(Subst, SetIndex);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Set, Set + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
kbts_u16 *LigatureOffsets = KBTS__POINTER_AFTER(kbts_u16, Set);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, LigatureOffsets, LigatureOffsets + Set_Count))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(LigatureIndex, 0, Set_Count)
|
|
{
|
|
kbts__ligature *Ligature = kbts__GetLigature(Set, LigatureIndex);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Ligature, Ligature + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un Ligature_ComponentCount = kbts__ReadU16Unaligned(&Ligature->ComponentCount);
|
|
kbts_u16 *Ids = KBTS__POINTER_AFTER(kbts_u16, Ligature);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Ids, Ids + Ligature_ComponentCount - 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(IdIndex, 1, Ligature_ComponentCount)
|
|
{
|
|
kbts_un GlyphId = kbts__ReadU16Unaligned(&Ids[IdIndex - 1]);
|
|
|
|
kbts__matrix_index SubtableMatrixIndex = kbts__GlyphLookupSubtableMatrixIndex(RunningSubtableIndex, SubtableCount, GlyphId, GlyphCount);
|
|
if(SubtableMatrixIndex.Valid)
|
|
{
|
|
GlyphLookupSubtableMatrix[SubtableMatrixIndex.WordIndex] |= 1u << SubtableMatrixIndex.BitIndex;
|
|
}
|
|
else
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if((!InGpos && (LookupType == 5)) ||
|
|
(InGpos && (LookupType == 7)))
|
|
{
|
|
switch(kbts__ReadU16Unaligned(&Base[0]))
|
|
{
|
|
case 1:
|
|
{
|
|
kbts__sequence_context_1 *Subst = (kbts__sequence_context_1 *)Base;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Subst, Subst + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
kbts_un Subst_SeqRuleSetCount = kbts__ReadU16Unaligned(&Subst->SeqRuleSetCount);
|
|
|
|
kbts_u16 *SequenceRuleSetOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, SequenceRuleSetOffsets, SequenceRuleSetOffsets + Subst_SeqRuleSetCount))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(SetIndex, 0, Subst_SeqRuleSetCount)
|
|
{
|
|
kbts__sequence_rule_set *Set = kbts__GetSequenceRuleSet(Subst, SetIndex);
|
|
|
|
if(Set)
|
|
{
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Set, Set + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__sequence_rule *Rule = kbts__GetSequenceRule(Set, RuleIndex);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Rule, Rule + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
kbts_un Rule_GlyphCount = kbts__ReadU16Unaligned(&Rule->GlyphCount);
|
|
|
|
kbts_u16 *SequenceGlyphIds = KBTS__POINTER_AFTER(kbts_u16, Rule);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, SequenceGlyphIds, SequenceGlyphIds + Rule_GlyphCount))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(InputIndex, 1, Rule_GlyphCount)
|
|
{
|
|
kbts_un GlyphId = kbts__ReadU16Unaligned(&SequenceGlyphIds[InputIndex - 1]);
|
|
|
|
kbts__matrix_index SubtableMatrixIndex = kbts__GlyphLookupSubtableMatrixIndex(RunningSubtableIndex, SubtableCount, GlyphId, GlyphCount);
|
|
if(SubtableMatrixIndex.Valid)
|
|
{
|
|
GlyphLookupSubtableMatrix[SubtableMatrixIndex.WordIndex] |= 1u << SubtableMatrixIndex.BitIndex;
|
|
}
|
|
else
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 2:
|
|
{
|
|
kbts__sequence_context_2 *Subst = (kbts__sequence_context_2 *)Base;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Subst, Subst + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
kbts_un Subst_ClassSequenceRuleSetCount = kbts__ReadU16Unaligned(&Subst->ClassSequenceRuleSetCount);
|
|
|
|
kbts_u16 *ClassSequenceRuleSetOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, ClassSequenceRuleSetOffsets, ClassSequenceRuleSetOffsets + Subst_ClassSequenceRuleSetCount))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_u64 ClassesIncluded[16] = KBTS__ZERO;
|
|
|
|
KBTS__FOR(SetIndex, 0, Subst_ClassSequenceRuleSetCount)
|
|
{
|
|
kbts__class_sequence_rule_set *Set = kbts__GetClassSequenceRuleSet(Subst, SetIndex);
|
|
if(Set)
|
|
{
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Set, Set + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__class_sequence_rule *Rule = kbts__GetClassSequenceRule(Set, RuleIndex);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Rule, Rule + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
kbts_un Rule_GlyphCount = kbts__ReadU16Unaligned(&Rule->GlyphCount);
|
|
|
|
kbts_u16 *SequenceClasses = KBTS__POINTER_AFTER(kbts_u16, Rule);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, SequenceClasses, SequenceClasses + Rule_GlyphCount - 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(SequenceIndex, 1, Rule_GlyphCount)
|
|
{
|
|
kbts_un Class = kbts__ReadU16Unaligned(&SequenceClasses[SequenceIndex - 1]);
|
|
|
|
if(Class < (KBTS__ARRAY_LENGTH(ClassesIncluded) * 64))
|
|
{
|
|
ClassesIncluded[Class / 64] |= 1ull << (Class % 64);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts_u16 *ClassDefBase = KBTS__POINTER_OFFSET(kbts_u16, Subst, kbts__ReadU16Unaligned(&Subst->ClassDefOffset));
|
|
kbts__MarkMatrixClassDef(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, ClassDefBase, ClassesIncluded, KBTS__ARRAY_LENGTH(ClassesIncluded));
|
|
} break;
|
|
|
|
case 3:
|
|
{
|
|
kbts__sequence_context_3 *Subst = (kbts__sequence_context_3 *)Base;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Subst, Subst + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
kbts_un Subst_GlyphCount = kbts__ReadU16Unaligned(&Subst->GlyphCount);
|
|
|
|
kbts_u16 *CoverageOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, CoverageOffsets, CoverageOffsets + Subst_GlyphCount))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(CoverageIndex, 1, Subst_GlyphCount)
|
|
{
|
|
kbts__coverage *SubstCoverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&CoverageOffsets[CoverageIndex]));
|
|
|
|
kbts__MarkMatrixCoverage(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, SubstCoverage, 1);
|
|
}
|
|
|
|
Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&CoverageOffsets[0]));
|
|
} break;
|
|
}
|
|
}
|
|
else if((!InGpos && (LookupType == 6)) ||
|
|
(InGpos && (LookupType == 8)))
|
|
{
|
|
switch(kbts__ReadU16Unaligned(&Base[0]))
|
|
{
|
|
case 1:
|
|
{
|
|
kbts__chained_sequence_context_1 *Subst = (kbts__chained_sequence_context_1 *)Base;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Subst, Subst + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
kbts_un Subst_ChainedSequenceRuleSetCount = kbts__ReadU16Unaligned(&Subst->ChainedSequenceRuleSetCount);
|
|
|
|
kbts_u16 *ChainedSequenceRuleSetOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, ChainedSequenceRuleSetOffsets, ChainedSequenceRuleSetOffsets + Subst_ChainedSequenceRuleSetCount))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(SetIndex, 0, Subst_ChainedSequenceRuleSetCount)
|
|
{
|
|
kbts__chained_sequence_rule_set *Set = KBTS__POINTER_OFFSET(kbts__chained_sequence_rule_set, Subst, kbts__ReadU16Unaligned(&ChainedSequenceRuleSetOffsets[SetIndex]));
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Set, Set + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
kbts_u16 *ChainedClassSequenceRuleOffsets = KBTS__POINTER_AFTER(kbts_u16, Set);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, ChainedClassSequenceRuleOffsets, ChainedClassSequenceRuleOffsets + Set_Count))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__chained_sequence_rule *Rule = kbts__GetChainedClassSequenceRule(Set, RuleIndex);
|
|
|
|
kbts__unpacked_chained_sequence_rule Unpacked;
|
|
if(!kbts__UnpackChainedSequenceRuleChecked(&ByteSwapContext, Rule, &Unpacked))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(BacktrackIndex, 0, Unpacked.BacktrackCount)
|
|
{
|
|
kbts_un GlyphId = kbts__ReadU16Unaligned(&Unpacked.Backtrack[BacktrackIndex]);
|
|
kbts__matrix_index SubtableMatrixIndex = kbts__GlyphLookupSubtableMatrixIndex(RunningSubtableIndex, SubtableCount, GlyphId, GlyphCount);
|
|
if(SubtableMatrixIndex.Valid)
|
|
{
|
|
GlyphLookupSubtableMatrix[SubtableMatrixIndex.WordIndex] |= 1u << SubtableMatrixIndex.BitIndex;
|
|
}
|
|
}
|
|
|
|
KBTS__FOR(InputIndex, 1, Unpacked.InputCount)
|
|
{
|
|
kbts_un GlyphId = kbts__ReadU16Unaligned(&Unpacked.Input[InputIndex - 1]);
|
|
kbts__matrix_index SubtableMatrixIndex = kbts__GlyphLookupSubtableMatrixIndex(RunningSubtableIndex, SubtableCount, GlyphId, GlyphCount);
|
|
if(SubtableMatrixIndex.Valid)
|
|
{
|
|
GlyphLookupSubtableMatrix[SubtableMatrixIndex.WordIndex] |= 1u << SubtableMatrixIndex.BitIndex;
|
|
}
|
|
}
|
|
|
|
KBTS__FOR(LookaheadIndex, 0, Unpacked.LookaheadCount)
|
|
{
|
|
kbts_un GlyphId = kbts__ReadU16Unaligned(&Unpacked.Lookahead[LookaheadIndex]);
|
|
kbts__matrix_index SubtableMatrixIndex = kbts__GlyphLookupSubtableMatrixIndex(RunningSubtableIndex, SubtableCount, GlyphId, GlyphCount);
|
|
if(SubtableMatrixIndex.Valid)
|
|
{
|
|
GlyphLookupSubtableMatrix[SubtableMatrixIndex.WordIndex] |= 1u << SubtableMatrixIndex.BitIndex;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} break;
|
|
|
|
case 2:
|
|
{
|
|
kbts__chained_sequence_context_2 *Subst = (kbts__chained_sequence_context_2 *)Base;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Subst, Subst + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un BacktrackClassDefOffset = kbts__ReadU16Unaligned(&Subst->BacktrackClassDefOffset);
|
|
kbts_un InputClassDefOffset = kbts__ReadU16Unaligned(&Subst->InputClassDefOffset);
|
|
kbts_un LookaheadClassDefOffset = kbts__ReadU16Unaligned(&Subst->LookaheadClassDefOffset);
|
|
|
|
kbts_u16 *BacktrackClassDefinition = 0;
|
|
if(BacktrackClassDefOffset)
|
|
{
|
|
BacktrackClassDefinition = KBTS__POINTER_OFFSET(kbts_u16, Subst, BacktrackClassDefOffset);
|
|
}
|
|
|
|
kbts_u16 *InputClassDefinition = 0;
|
|
if(InputClassDefOffset)
|
|
{
|
|
InputClassDefinition = KBTS__POINTER_OFFSET(kbts_u16, Subst, InputClassDefOffset);
|
|
}
|
|
|
|
kbts_u16 *LookaheadClassDefinition = 0;
|
|
if(LookaheadClassDefOffset)
|
|
{
|
|
LookaheadClassDefinition = KBTS__POINTER_OFFSET(kbts_u16, Subst, LookaheadClassDefOffset);
|
|
}
|
|
|
|
kbts_u64 BacktrackClassesIncluded[16] = KBTS__ZERO;
|
|
kbts_u64 InputClassesIncluded[16] = KBTS__ZERO;
|
|
kbts_u64 LookaheadClassesIncluded[16] = KBTS__ZERO;
|
|
|
|
kbts_un Subst_ChainedClassSequenceRuleSetCount = kbts__ReadU16Unaligned(&Subst->ChainedClassSequenceRuleSetCount);
|
|
kbts_u16 *ChainedClassSequenceRuleSetOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, ChainedClassSequenceRuleSetOffsets, ChainedClassSequenceRuleSetOffsets + Subst_ChainedClassSequenceRuleSetCount))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(SetIndex, 0, Subst_ChainedClassSequenceRuleSetCount)
|
|
{
|
|
kbts__chained_sequence_rule_set *Set = kbts__GetChainedClassSequenceRuleSet(Subst, SetIndex);
|
|
if(Set)
|
|
{
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Set, Set + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un Set_Count = kbts__ReadU16Unaligned(&Set->Count);
|
|
|
|
kbts_u16 *ChainedSequenceRuleOffsets = KBTS__POINTER_AFTER(kbts_u16, Set);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, ChainedSequenceRuleOffsets, ChainedSequenceRuleOffsets + Set_Count))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(RuleIndex, 0, Set_Count)
|
|
{
|
|
kbts__chained_sequence_rule *Rule = kbts__GetChainedSequenceRule(Set, RuleIndex);
|
|
|
|
kbts__unpacked_chained_sequence_rule Unpacked;
|
|
if(!kbts__UnpackChainedSequenceRuleChecked(&ByteSwapContext, Rule, &Unpacked))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(BacktrackIndex, 0, Unpacked.BacktrackCount)
|
|
{
|
|
kbts_un Class = kbts__ReadU16Unaligned(&Unpacked.Backtrack[BacktrackIndex]);
|
|
if(Class < (KBTS__ARRAY_LENGTH(BacktrackClassesIncluded) * 64))
|
|
{
|
|
BacktrackClassesIncluded[Class / 64] |= 1ull << (Class % 64);
|
|
}
|
|
}
|
|
|
|
KBTS__FOR(InputIndex, 1, Unpacked.InputCount)
|
|
{
|
|
kbts_un Class = kbts__ReadU16Unaligned(&Unpacked.Input[InputIndex - 1]);
|
|
if(Class < (KBTS__ARRAY_LENGTH(InputClassesIncluded) * 64))
|
|
{
|
|
InputClassesIncluded[Class / 64] |= 1ull << (Class % 64);
|
|
}
|
|
}
|
|
|
|
KBTS__FOR(LookaheadIndex, 0, Unpacked.LookaheadCount)
|
|
{
|
|
kbts_un Class = kbts__ReadU16Unaligned(&Unpacked.Lookahead[LookaheadIndex]);
|
|
if(Class < (KBTS__ARRAY_LENGTH(LookaheadClassesIncluded) * 64))
|
|
{
|
|
LookaheadClassesIncluded[Class / 64] |= 1ull << (Class % 64);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts__MarkMatrixClassDef(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, BacktrackClassDefinition, BacktrackClassesIncluded, KBTS__ARRAY_LENGTH(BacktrackClassesIncluded));
|
|
kbts__MarkMatrixClassDef(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, InputClassDefinition, InputClassesIncluded, KBTS__ARRAY_LENGTH(InputClassesIncluded));
|
|
kbts__MarkMatrixClassDef(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, LookaheadClassDefinition, LookaheadClassesIncluded, KBTS__ARRAY_LENGTH(LookaheadClassesIncluded));
|
|
} break;
|
|
|
|
case 3:
|
|
{
|
|
kbts__chained_sequence_context_3 *Subst = (kbts__chained_sequence_context_3 *)Base;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Subst, Subst + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un BacktrackCount = kbts__ReadU16Unaligned(&Subst->BacktrackGlyphCount);
|
|
kbts_u16 *BacktrackCoverageOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, BacktrackCoverageOffsets, BacktrackCoverageOffsets + BacktrackCount + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un InputCount = kbts__ReadU16Unaligned(&BacktrackCoverageOffsets[BacktrackCount]);
|
|
kbts_u16 *InputCoverageOffsets = BacktrackCoverageOffsets + BacktrackCount + 1;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, InputCoverageOffsets, InputCoverageOffsets + InputCount + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un LookaheadCount = kbts__ReadU16Unaligned(&InputCoverageOffsets[InputCount]);
|
|
kbts_u16 *LookaheadCoverageOffsets = InputCoverageOffsets + InputCount + 1;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, LookaheadCoverageOffsets, LookaheadCoverageOffsets + LookaheadCount + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un RecordCount = kbts__ReadU16Unaligned(&LookaheadCoverageOffsets[LookaheadCount]);
|
|
kbts__sequence_lookup_record *Records = (kbts__sequence_lookup_record *)(LookaheadCoverageOffsets + LookaheadCount + 1);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Records, Records + RecordCount))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
Coverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&InputCoverageOffsets[0]));
|
|
|
|
KBTS__FOR(BacktrackCoverageIndex, 0, BacktrackCount)
|
|
{
|
|
kbts__coverage *SubCoverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&BacktrackCoverageOffsets[BacktrackCoverageIndex]));
|
|
kbts__MarkMatrixCoverage(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, SubCoverage, 1);
|
|
}
|
|
|
|
KBTS__FOR(InputCoverageIndex, 1, InputCount)
|
|
{
|
|
kbts__coverage *SubCoverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&InputCoverageOffsets[InputCoverageIndex]));
|
|
kbts__MarkMatrixCoverage(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, SubCoverage, 1);
|
|
}
|
|
|
|
KBTS__FOR(LookaheadCoverageIndex, 0, LookaheadCount)
|
|
{
|
|
kbts__coverage *SubCoverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&LookaheadCoverageOffsets[LookaheadCoverageIndex]));
|
|
kbts__MarkMatrixCoverage(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, SubCoverage, 1);
|
|
}
|
|
} break;
|
|
}
|
|
}
|
|
else if(!InGpos && (LookupType == 8))
|
|
{
|
|
kbts__reverse_chain_substitution *Subst = (kbts__reverse_chain_substitution *)Base;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, Subst, Subst + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un BacktrackCount = kbts__ReadU16Unaligned(&Subst->BacktrackGlyphCount);
|
|
kbts_u16 *BacktrackCoverageOffsets = KBTS__POINTER_AFTER(kbts_u16, Subst);
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, BacktrackCoverageOffsets, BacktrackCoverageOffsets + BacktrackCount + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un LookaheadCount = kbts__ReadU16Unaligned(&BacktrackCoverageOffsets[BacktrackCount]);
|
|
kbts_u16 *LookaheadCoverageOffsets = BacktrackCoverageOffsets + BacktrackCount + 1;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, LookaheadCoverageOffsets, LookaheadCoverageOffsets + LookaheadCount + 1))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
kbts_un SubstituteGlyphCount = kbts__ReadU16Unaligned(&LookaheadCoverageOffsets[LookaheadCount]);
|
|
kbts_u16 *SubstituteGlyphIds = LookaheadCoverageOffsets + LookaheadCount + 1;
|
|
if(!kbts__SpanIsInBounds(&ByteSwapContext, SubstituteGlyphIds, SubstituteGlyphIds + SubstituteGlyphCount))
|
|
{
|
|
goto InvalidTable;
|
|
}
|
|
|
|
KBTS__FOR(BacktrackIndex, 0, BacktrackCount)
|
|
{
|
|
kbts__coverage *SubCoverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&BacktrackCoverageOffsets[BacktrackIndex]));
|
|
kbts__MarkMatrixCoverage(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, SubCoverage, 1);
|
|
}
|
|
|
|
KBTS__FOR(LookaheadIndex, 0, LookaheadCount)
|
|
{
|
|
kbts__coverage *SubCoverage = KBTS__POINTER_OFFSET(kbts__coverage, Subst, kbts__ReadU16Unaligned(&LookaheadCoverageOffsets[LookaheadIndex]));
|
|
kbts__MarkMatrixCoverage(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, SubCoverage, 1);
|
|
}
|
|
}
|
|
|
|
kbts__MarkMatrixCoverage(GlyphLookupMatrix, RunningLookupIndex, LookupCount, GlyphCount, Coverage, 0);
|
|
kbts__MarkMatrixCoverage(GlyphLookupSubtableMatrix, RunningSubtableIndex, SubtableCount, GlyphCount, Coverage, 1);
|
|
|
|
RunningSubtableIndex += 1;
|
|
}
|
|
|
|
RunningLookupIndex += 1;
|
|
}
|
|
|
|
kbts__EndBounds(&ByteSwapContext, &Bounds);
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
InvalidTable:;
|
|
Font->Blob->Tables[TableId].Length = 0;
|
|
|
|
RunningLookupIndex = (InGpos) ? GposLookupIndexOffset : 0;
|
|
}
|
|
|
|
if(!InGpos)
|
|
{
|
|
GposLookupIndexOffset = RunningLookupIndex;
|
|
}
|
|
}
|
|
}
|
|
|
|
Header->GposLookupIndexOffset = (kbts_u32)GposLookupIndexOffset;
|
|
Header->GlyphLookupMatrixOffsetFromStartOfFile = KBTS__POINTER_DIFF32(GlyphLookupMatrix, Header);
|
|
Header->GlyphLookupSubtableMatrixOffsetFromStartOfFile = KBTS__POINTER_DIFF32(GlyphLookupSubtableMatrix, Header);
|
|
Header->LookupSubtableIndexOffsetsOffsetFromStartOfFile = KBTS__POINTER_DIFF32(LookupSubtableIndexOffsets, Header);
|
|
}
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
InvalidFont:;
|
|
Result = KBTS_LOAD_FONT_ERROR_INVALID_FONT;
|
|
}
|
|
|
|
if(Result != KBTS_LOAD_FONT_ERROR_NONE)
|
|
{
|
|
Font->Blob = 0;
|
|
}
|
|
Font->Error = Result;
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_GetFontInfo2(kbts_font *Font, kbts_font_info2 *Info)
|
|
{
|
|
if(Info && Info->Size)
|
|
{
|
|
kbts_un InfoSize = Info->Size;
|
|
KBTS_MEMSET(Info, 0, InfoSize);
|
|
Info->Size = (kbts_u32)InfoSize;
|
|
|
|
kbts_blob_header *Blob = Font->Blob;
|
|
|
|
if(Font && kbts_FontIsValid(Font) && Blob)
|
|
{
|
|
kbts__name *Name = kbts__BlobTableDataType(Blob, KBTS_BLOB_TABLE_ID_NAME, kbts__name);
|
|
kbts__os2 *Os2 = kbts__BlobTableDataType(Blob, KBTS_BLOB_TABLE_ID_OS2, kbts__os2);
|
|
// @Incomplete: Support vhea, too.
|
|
kbts__hea *Hhea = kbts__BlobTableDataType(Blob, KBTS_BLOB_TABLE_ID_HHEA, kbts__hea);
|
|
kbts__head *Head = kbts__BlobTableDataType(Blob, KBTS_BLOB_TABLE_ID_HEAD, kbts__head);
|
|
|
|
switch(InfoSize)
|
|
{
|
|
case sizeof(kbts_font_info2_2):
|
|
{
|
|
kbts_font_info2_2 *Info2_2 = (kbts_font_info2_2 *)Info;
|
|
|
|
if(Os2)
|
|
{
|
|
Info2_2->CapitalHeight = kbts__ReadS16Unaligned(&Os2->CapHeight);
|
|
}
|
|
}
|
|
KBTS__FALLTHROUGH;
|
|
|
|
case sizeof(kbts_font_info2_1):
|
|
{
|
|
kbts_font_info2_1 *Info2_1 = (kbts_font_info2_1 *)Info;
|
|
|
|
if(Os2)
|
|
{
|
|
Info2_1->Ascent = kbts__ReadS16Unaligned(&Os2->TypoAscender);
|
|
Info2_1->Descent = kbts__ReadS16Unaligned(&Os2->TypoDescender);
|
|
Info2_1->LineGap = kbts__ReadS16Unaligned(&Os2->TypoLineGap);
|
|
}
|
|
else if(Hhea)
|
|
{
|
|
Info2_1->Ascent = kbts__ReadS16Unaligned(&Hhea->Ascent);
|
|
Info2_1->Descent = kbts__ReadS16Unaligned(&Hhea->Descent);
|
|
Info2_1->LineGap = kbts__ReadS16Unaligned(&Hhea->LineGap);
|
|
}
|
|
|
|
if(Head)
|
|
{
|
|
Info2_1->UnitsPerEm = kbts__ReadU16Unaligned(&Head->UnitsPerEm);
|
|
|
|
Info2_1->XMin = kbts__ReadS16Unaligned(&Head->XMin);
|
|
Info2_1->YMin = kbts__ReadS16Unaligned(&Head->YMin);
|
|
Info2_1->XMax = kbts__ReadS16Unaligned(&Head->XMax);
|
|
Info2_1->YMax = kbts__ReadS16Unaligned(&Head->YMax);
|
|
}
|
|
}
|
|
KBTS__FALLTHROUGH;
|
|
|
|
case sizeof(kbts_font_info2):
|
|
{
|
|
if(Name)
|
|
{
|
|
kbts__name_record *Records = KBTS__POINTER_AFTER(kbts__name_record, Name);
|
|
char *StringBase = KBTS__POINTER_OFFSET(char, Name, kbts__ReadU16Unaligned(&Name->StringStorageOffset));
|
|
kbts_un Name_Count = kbts__ReadU16Unaligned(&Name->Count);
|
|
|
|
KBTS__FOR(RecordIndex, 0, Name_Count)
|
|
{
|
|
kbts__name_record *Record = &Records[RecordIndex];
|
|
|
|
if(!kbts__ReadU16Unaligned(&Record->LanguageId))
|
|
{
|
|
kbts_font_info_string_id Id = KBTS_FONT_INFO_STRING_ID_NONE;
|
|
|
|
switch(kbts__ReadU16Unaligned(&Record->NameId))
|
|
{
|
|
case 0: Id = KBTS_FONT_INFO_STRING_ID_COPYRIGHT; break;
|
|
case 1: Id = KBTS_FONT_INFO_STRING_ID_FAMILY; break;
|
|
case 2: Id = KBTS_FONT_INFO_STRING_ID_SUBFAMILY; break;
|
|
case 3: Id = KBTS_FONT_INFO_STRING_ID_UID; break;
|
|
case 4: Id = KBTS_FONT_INFO_STRING_ID_FULL_NAME; break;
|
|
case 5: Id = KBTS_FONT_INFO_STRING_ID_VERSION; break;
|
|
case 6: Id = KBTS_FONT_INFO_STRING_ID_POSTSCRIPT_NAME; break;
|
|
case 7: Id = KBTS_FONT_INFO_STRING_ID_TRADEMARK; break;
|
|
case 8: Id = KBTS_FONT_INFO_STRING_ID_MANUFACTURER; break;
|
|
case 9: Id = KBTS_FONT_INFO_STRING_ID_DESIGNER; break;
|
|
case 10: Id = KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_FAMILY; break;
|
|
case 11: Id = KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_SUBFAMILY; break;
|
|
}
|
|
|
|
if(Id)
|
|
{
|
|
Info->Strings[Id] = KBTS__POINTER_OFFSET(char, StringBase, kbts__ReadU16Unaligned(&Record->StringOffset));
|
|
Info->StringLengths[Id] = kbts__ReadU16Unaligned(&Record->Length);
|
|
}
|
|
}
|
|
}
|
|
|
|
if(!Info->Strings[KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_FAMILY])
|
|
{
|
|
Info->Strings[KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_FAMILY] = Info->Strings[KBTS_FONT_INFO_STRING_ID_FAMILY];
|
|
Info->StringLengths[KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_FAMILY] = Info->StringLengths[KBTS_FONT_INFO_STRING_ID_FAMILY];
|
|
}
|
|
|
|
if(!Info->Strings[KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_SUBFAMILY])
|
|
{
|
|
Info->Strings[KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_SUBFAMILY] = Info->Strings[KBTS_FONT_INFO_STRING_ID_SUBFAMILY];
|
|
Info->StringLengths[KBTS_FONT_INFO_STRING_ID_TYPOGRAPHIC_SUBFAMILY] = Info->StringLengths[KBTS_FONT_INFO_STRING_ID_SUBFAMILY];
|
|
}
|
|
}
|
|
|
|
if(Os2)
|
|
{
|
|
kbts_font_weight Weight = KBTS_FONT_WEIGHT_UNKNOWN;
|
|
kbts_font_width Width = KBTS_FONT_WIDTH_UNKNOWN;
|
|
kbts_font_style_flags StyleFlags = KBTS_FONT_STYLE_FLAG_NONE;
|
|
|
|
switch(kbts__ReadU16Unaligned(&Os2->WeightClass))
|
|
{
|
|
case 100: Weight = KBTS_FONT_WEIGHT_THIN; break;
|
|
case 200: Weight = KBTS_FONT_WEIGHT_EXTRA_LIGHT; break;
|
|
case 300: Weight = KBTS_FONT_WEIGHT_LIGHT; break;
|
|
case 400: Weight = KBTS_FONT_WEIGHT_NORMAL; break;
|
|
case 500: Weight = KBTS_FONT_WEIGHT_MEDIUM; break;
|
|
case 600: Weight = KBTS_FONT_WEIGHT_SEMI_BOLD; break;
|
|
case 700: Weight = KBTS_FONT_WEIGHT_BOLD; break;
|
|
case 800: Weight = KBTS_FONT_WEIGHT_EXTRA_BOLD; break;
|
|
case 900: Weight = KBTS_FONT_WEIGHT_BLACK; break;
|
|
}
|
|
|
|
switch(kbts__ReadU16Unaligned(&Os2->WidthClass))
|
|
{
|
|
case 1: Width = KBTS_FONT_WIDTH_ULTRA_CONDENSED; break;
|
|
case 2: Width = KBTS_FONT_WIDTH_EXTRA_CONDENSED; break;
|
|
case 3: Width = KBTS_FONT_WIDTH_CONDENSED; break;
|
|
case 4: Width = KBTS_FONT_WIDTH_SEMI_CONDENSED; break;
|
|
case 5: Width = KBTS_FONT_WIDTH_NORMAL; break;
|
|
case 6: Width = KBTS_FONT_WIDTH_SEMI_EXPANDED; break;
|
|
case 7: Width = KBTS_FONT_WIDTH_EXPANDED; break;
|
|
case 8: Width = KBTS_FONT_WIDTH_EXTRA_EXPANDED; break;
|
|
case 9: Width = KBTS_FONT_WIDTH_ULTRA_EXPANDED; break;
|
|
}
|
|
|
|
kbts_u16 Os2_Selection = kbts__ReadU16Unaligned(&Os2->Selection);
|
|
if(Os2_Selection & (KBTS__OS2_SELECTION_FLAG_ITALIC | KBTS__OS2_SELECTION_FLAG_OBLIQUE))
|
|
{
|
|
StyleFlags |= KBTS_FONT_STYLE_FLAG_ITALIC;
|
|
}
|
|
if(Os2_Selection & KBTS__OS2_SELECTION_FLAG_BOLD)
|
|
{
|
|
StyleFlags |= KBTS_FONT_STYLE_FLAG_BOLD;
|
|
}
|
|
if(Os2_Selection & KBTS__OS2_SELECTION_FLAG_REGULAR)
|
|
{
|
|
StyleFlags |= KBTS_FONT_STYLE_FLAG_REGULAR;
|
|
}
|
|
|
|
Info->Weight = Weight;
|
|
Info->Width = Width;
|
|
Info->StyleFlags = StyleFlags;
|
|
}
|
|
} break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_GetFontInfo(kbts_font *Font, kbts_font_info *Info)
|
|
{
|
|
kbts_font_info2 Info2;
|
|
Info2.Size = sizeof(Info2);
|
|
|
|
kbts_GetFontInfo2(Font, &Info2);
|
|
|
|
KBTS_MEMCPY(Info, Info2.Strings, sizeof(*Info));
|
|
}
|
|
|
|
KBTS_EXPORT kbts_font kbts_FontFromMemory(void *FileData, int FileSize, int FontIndex, kbts_allocator_function *Allocator, void *AllocatorData)
|
|
{
|
|
kbts_font Result = KBTS__ZERO;
|
|
|
|
if(!Allocator)
|
|
{
|
|
Allocator = kbts__DefaultAllocator;
|
|
}
|
|
|
|
if(FileData && (FileSize > 0))
|
|
{
|
|
kbts_load_font_state LoadFontState = KBTS__ZERO;
|
|
int ScratchSize, OutputSize;
|
|
kbts_load_font_error Error = kbts_LoadFont(&Result, &LoadFontState, FileData, (int)FileSize, FontIndex, &ScratchSize, &OutputSize);
|
|
|
|
if(Error == KBTS_LOAD_FONT_ERROR_NEED_TO_CREATE_BLOB)
|
|
{
|
|
void *ScratchMemory = kbts__AllocatorAllocate(Allocator, AllocatorData, (kbts_un)ScratchSize);
|
|
void *OutputMemory = kbts__AllocatorAllocate(Allocator, AllocatorData, (kbts_un)OutputSize);
|
|
|
|
kbts_PlaceBlob(&Result, &LoadFontState, ScratchMemory, OutputMemory);
|
|
|
|
if(Result.Error)
|
|
{
|
|
kbts__AllocatorFree(Allocator, AllocatorData, OutputMemory);
|
|
}
|
|
kbts__AllocatorFree(Allocator, AllocatorData, ScratchMemory);
|
|
|
|
Result.Allocator = Allocator;
|
|
Result.AllocatorData = AllocatorData;
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
#ifndef KB_TEXT_SHAPE_NO_CRT
|
|
|
|
KBTS_EXPORT kbts_font kbts_FontFromFile(const char *FileName, int FontIndex, kbts_allocator_function *Allocator, void *AllocatorData, void **FileData, int *FileSize_)
|
|
{
|
|
kbts_font Result = KBTS__ZERO;
|
|
|
|
if(!Allocator)
|
|
{
|
|
Allocator = kbts__DefaultAllocator;
|
|
}
|
|
|
|
FILE *File;
|
|
# ifndef _MSC_VER
|
|
File = fopen(FileName, "rb");
|
|
# else
|
|
fopen_s(&File, FileName, "rb");
|
|
# endif
|
|
|
|
if(File)
|
|
{
|
|
fseek(File, 0, SEEK_END);
|
|
long FileSize = ftell(File);
|
|
fseek(File, 0, SEEK_SET);
|
|
|
|
if(FileSize > 0)
|
|
{
|
|
void *Data = kbts__AllocatorAllocate(Allocator, AllocatorData, (kbts_un)FileSize);
|
|
|
|
if(Data)
|
|
{
|
|
kbts_un Ok = fread(Data, (kbts_un)FileSize, 1, File);
|
|
|
|
if(Ok)
|
|
{
|
|
Result = kbts_FontFromMemory(Data, (int)FileSize, FontIndex, Allocator, AllocatorData);
|
|
|
|
if(!Result.Error)
|
|
{
|
|
if(FileData)
|
|
{
|
|
*FileData = Data;
|
|
}
|
|
else
|
|
{
|
|
kbts__AllocatorFree(Allocator, AllocatorData, Data);
|
|
}
|
|
|
|
if(FileSize_)
|
|
{
|
|
*FileSize_ = (int)FileSize;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result.Error = KBTS_LOAD_FONT_ERROR_READ_ERROR;
|
|
}
|
|
|
|
if(Result.Error)
|
|
{
|
|
kbts__AllocatorFree(Allocator, AllocatorData, Data);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result.Error = KBTS_LOAD_FONT_ERROR_OUT_OF_MEMORY;
|
|
}
|
|
}
|
|
|
|
fclose(File);
|
|
}
|
|
else
|
|
{
|
|
Result.Error = KBTS_LOAD_FONT_ERROR_COULD_NOT_OPEN_FILE;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
#endif
|
|
|
|
KBTS_EXPORT void kbts_FreeFont(kbts_font *Font)
|
|
{
|
|
if(Font->Blob && Font->Allocator)
|
|
{
|
|
kbts__AllocatorFree(Font->Allocator, Font->AllocatorData, Font->Blob);
|
|
}
|
|
}
|
|
|
|
static void kbts__DoBreak(kbts_break_state *State, kbts_s32 Position, kbts_u8 Flags, kbts_direction Direction, kbts_direction ParagraphDirection, kbts_script Script)
|
|
{
|
|
kbts_u32 BreakPosition = State->CurrentPosition + (kbts_u32)Position;
|
|
if(Flags &&
|
|
(BreakPosition <= State->CurrentPosition))
|
|
{
|
|
kbts_break Break = KBTS__ZERO;
|
|
Break.Position = (int)BreakPosition;
|
|
Break.Flags = Flags;
|
|
Break.Direction = Direction;
|
|
Break.ParagraphDirection = ParagraphDirection;
|
|
Break.Script = Script;
|
|
|
|
if((Flags & KBTS_BREAK_FLAG_SCRIPT) &&
|
|
(State->LastScriptBreakScript))
|
|
{
|
|
kbts_un LastScriptBreakPosition = State->LastScriptBreakPosition;
|
|
kbts_u8 LastScriptBreakScript = State->LastScriptBreakScript;
|
|
|
|
// Resolve bracket scripts here.
|
|
// The only span we can fully resolve is the _previous_ script, but we don't
|
|
// know when it starts, so we might as well tag all of the brackets we have stored so far.
|
|
for(kbts_un BracketIndex = State->BracketCount;
|
|
BracketIndex;
|
|
--BracketIndex)
|
|
{
|
|
kbts_bracket *Bracket = &State->Brackets[BracketIndex - 1];
|
|
|
|
if(Bracket->Position >= BreakPosition)
|
|
{
|
|
Bracket->Script = (kbts_u8)Script;
|
|
}
|
|
else if(Bracket->Position >= LastScriptBreakPosition)
|
|
{
|
|
Bracket->Script = LastScriptBreakScript;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
State->LastScriptBreakPosition = BreakPosition;
|
|
State->LastScriptBreakScript = (kbts_u8)Script;
|
|
}
|
|
|
|
if((Flags & KBTS_BREAK_FLAG_DIRECTION) &&
|
|
(State->LastDirectionBreakDirection))
|
|
{
|
|
kbts_un LastDirectionBreakPosition = State->LastDirectionBreakPosition;
|
|
kbts_u8 LastDirectionBreakDirection = State->LastDirectionBreakDirection;
|
|
|
|
for(kbts_un BracketIndex = State->BracketCount;
|
|
BracketIndex;
|
|
--BracketIndex)
|
|
{
|
|
kbts_bracket *Bracket = &State->Brackets[BracketIndex - 1];
|
|
|
|
if(Bracket->Position >= BreakPosition)
|
|
{
|
|
Bracket->Direction = (kbts_u8)Direction;
|
|
}
|
|
else if(Bracket->Position >= LastDirectionBreakPosition)
|
|
{
|
|
Bracket->Direction = LastDirectionBreakDirection;
|
|
}
|
|
else
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
State->LastDirectionBreakPosition = BreakPosition;
|
|
State->LastDirectionBreakDirection = (kbts_u8)Direction;
|
|
}
|
|
|
|
int Matched = 0;
|
|
KBTS__FOR(BreakIndex, 0, State->BreakCount)
|
|
{
|
|
kbts_break *Existing = &State->Breaks[BreakIndex];
|
|
|
|
if(Existing->Position == Break.Position)
|
|
{
|
|
Existing->Flags |= Break.Flags;
|
|
|
|
if(Break.Flags & KBTS_BREAK_FLAG_DIRECTION)
|
|
{
|
|
Existing->Direction = Break.Direction;
|
|
}
|
|
|
|
if(Break.Flags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION)
|
|
{
|
|
Existing->ParagraphDirection = Break.ParagraphDirection;
|
|
}
|
|
|
|
if(Break.Flags & KBTS_BREAK_FLAG_SCRIPT)
|
|
{
|
|
Existing->Script = Break.Script;
|
|
}
|
|
|
|
Matched = 1;
|
|
|
|
break;
|
|
}
|
|
else if(Existing->Position < Break.Position)
|
|
{
|
|
// We order breaks in backwards order here, because we want to simply pop them off the top in Break().
|
|
kbts_break Swap = *Existing;
|
|
*Existing = Break;
|
|
Break = Swap;
|
|
}
|
|
else if((Break.Flags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION) &&
|
|
(Existing->Flags & KBTS_BREAK_FLAG_DIRECTION) &&
|
|
!Existing->Direction)
|
|
{
|
|
// Short-circuit coerce neutral blocks to the paragraph direction.
|
|
Existing->Direction = Break.ParagraphDirection;
|
|
}
|
|
}
|
|
|
|
State->Breaks[State->BreakCount] = Break;
|
|
State->BreakCount += !Matched;
|
|
}
|
|
}
|
|
|
|
// The line break state is a 4-character history. Each character is a bags of 12 bits (padded to 16 bits).
|
|
// Each character specifies allowed and required breaks on 6 levels of priority.
|
|
// A required break implies an allowed break.
|
|
// A priority N break implies priority 0..N-1 breaks.
|
|
enum {
|
|
KBTS__LINE_BREAK_ALLOWED0 = 1,
|
|
KBTS__LINE_BREAK_ALLOWED1 = 3,
|
|
KBTS__LINE_BREAK_ALLOWED2 = 7,
|
|
KBTS__LINE_BREAK_ALLOWED3 = 0xF,
|
|
KBTS__LINE_BREAK_ALLOWED4 = 0x1F,
|
|
KBTS__LINE_BREAK_ALLOWED5 = 0x3F,
|
|
KBTS__LINE_BREAK_REQUIRED0 = (1 << 6) | KBTS__LINE_BREAK_ALLOWED0,
|
|
KBTS__LINE_BREAK_REQUIRED1 = (3 << 6) | KBTS__LINE_BREAK_ALLOWED1,
|
|
KBTS__LINE_BREAK_REQUIRED2 = (7 << 6) | KBTS__LINE_BREAK_ALLOWED2,
|
|
KBTS__LINE_BREAK_REQUIRED3 = (0xF << 6) | KBTS__LINE_BREAK_ALLOWED3,
|
|
KBTS__LINE_BREAK_REQUIRED4 = (0x1F << 6) | KBTS__LINE_BREAK_ALLOWED4,
|
|
KBTS__LINE_BREAK_REQUIRED5 = (0x3F << 6) | KBTS__LINE_BREAK_ALLOWED5,
|
|
KBTS__LINE_BREAK_REQUIRED_MASK = 0x3F << 6,
|
|
KBTS__LINE_BREAK_ALLOWED_MASK = 0x3F,
|
|
KBTS__LINE_BREAK_MASK = KBTS__LINE_BREAK_REQUIRED_MASK | KBTS__LINE_BREAK_ALLOWED_MASK,
|
|
};
|
|
|
|
static void kbts__DoLineBreak(kbts_break_state *State, int Position, kbts_u64 EffectiveLineBreaks)
|
|
{
|
|
if(EffectiveLineBreaks & KBTS__LINE_BREAK_MASK)
|
|
{
|
|
kbts_u8 Flags = 0;
|
|
|
|
if(EffectiveLineBreaks & KBTS__LINE_BREAK_ALLOWED_MASK)
|
|
{
|
|
Flags |= KBTS_BREAK_FLAG_LINE_SOFT;
|
|
}
|
|
|
|
if(EffectiveLineBreaks & KBTS__LINE_BREAK_REQUIRED_MASK)
|
|
{
|
|
Flags |= KBTS_BREAK_FLAG_LINE_HARD;
|
|
}
|
|
|
|
kbts__DoBreak(State, Position, Flags, 0, 0, 0);
|
|
}
|
|
}
|
|
|
|
static void kbts__BreakStateStartParagraph(kbts_break_state *State)
|
|
{
|
|
kbts_direction ParagraphDirection = State->UserParagraphDirection;
|
|
// At the beginning of a paragraph, we want to pretend like start-of-text is an actual character
|
|
// with bidirectional data that depends on its direction.
|
|
kbts_u32 StartOfTextBidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_NI;
|
|
kbts_u32 Flags = 0;
|
|
|
|
if(ParagraphDirection == KBTS_DIRECTION_LTR)
|
|
{
|
|
StartOfTextBidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_L;
|
|
}
|
|
else if(ParagraphDirection == KBTS_DIRECTION_RTL)
|
|
{
|
|
Flags = KBTS_BREAK_STATE_FLAG_SAW_R_AFTER_L;
|
|
StartOfTextBidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_R;
|
|
}
|
|
|
|
State->ParagraphDirection = (kbts_u8)ParagraphDirection;
|
|
State->BidirectionalClass1 = (kbts_u8)StartOfTextBidirectionalClass;
|
|
State->Flags = Flags;
|
|
}
|
|
|
|
typedef kbts_u32 kbts__break_flush_flags;
|
|
enum kbts__break_flush_flags_enum
|
|
{
|
|
KBTS__BREAK_FLUSH_FLAG_NONE,
|
|
KBTS__BREAK_FLUSH_FLAG_SCRIPT = (1 << 0),
|
|
KBTS__BREAK_FLUSH_FLAG_DIRECTION_2 = (1 << 1),
|
|
KBTS__BREAK_FLUSH_FLAG_DIRECTION_1 = (1 << 2),
|
|
KBTS__BREAK_FLUSH_FLAG_DIRECTION_PARAGRAPH = (1 << 3),
|
|
};
|
|
|
|
static void kbts__FlushDirection(kbts_break_state *State, kbts_direction *LastDirection, kbts_unicode_bidirectional_class BidirectionalClass, kbts_s16 PositionOffset)
|
|
{
|
|
// @Incomplete: ET+ EN -> EN+ EN
|
|
kbts_break_flags BreakFlags = 0;
|
|
kbts_direction Direction = KBTS_DIRECTION_DONT_KNOW;
|
|
|
|
switch(BidirectionalClass)
|
|
{
|
|
// @Incomplete: Surely, there are other edge cases we could handle here.
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_L:
|
|
BreakFlags = KBTS_BREAK_FLAG_DIRECTION | KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION;
|
|
Direction = KBTS_DIRECTION_LTR;
|
|
break;
|
|
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_R:
|
|
BreakFlags = KBTS_BREAK_FLAG_DIRECTION | KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION;
|
|
Direction = KBTS_DIRECTION_RTL;
|
|
break;
|
|
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_AN:
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_EN:
|
|
// Digits are weak LTR, i.e. they do not influence the paragraph direction.
|
|
BreakFlags = KBTS_BREAK_FLAG_DIRECTION;
|
|
Direction = KBTS_DIRECTION_LTR;
|
|
break;
|
|
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_NI:
|
|
// We've already checked the ParagraphDirection earlier, when coercing neutrals to L or R.
|
|
// If a neutral shows up here, it means that we did not find any way to resolve it to either direction.
|
|
// In this case, neutrals get the unresolved embedding direction.
|
|
BreakFlags = KBTS_BREAK_FLAG_DIRECTION;
|
|
break;
|
|
}
|
|
|
|
if((BreakFlags & KBTS_BREAK_FLAG_DIRECTION) &&
|
|
(Direction != *LastDirection))
|
|
{
|
|
*LastDirection = Direction;
|
|
kbts__DoBreak(State, PositionOffset, KBTS_BREAK_FLAG_DIRECTION, Direction, 0, 0);
|
|
}
|
|
|
|
if((BreakFlags & KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION) &&
|
|
!State->ParagraphDirection)
|
|
{
|
|
kbts_s32 StartOfParagraphOffset = (kbts_s16)(State->ParagraphStartPosition - State->CurrentPosition);
|
|
kbts__DoBreak(State, StartOfParagraphOffset, KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION, 0, Direction, 0);
|
|
State->ParagraphDirection = (kbts_u8)Direction;
|
|
}
|
|
}
|
|
|
|
static void kbts__BreakAddCodepoint(kbts_break_state *State, kbts_u32 Codepoint, kbts_u32 PositionIncrement, int MaybeEndOfText)
|
|
{
|
|
// In these macros, and in FlagState, and in the way we buffer our state in general,
|
|
// index 0 means _after_ the codepoint currently being added,
|
|
// index 1 means _before_ the codepoint currently being added.
|
|
#define KBTS_BREAK(Flags, Position) do {FlagState |= ((Flags) << (8 * (Position)));} while(0)
|
|
#define KBTS_BREAK2(Flags, Position0, Position1) do {FlagState |= ((Flags) << (8 * (Position0))) | ((Flags) << (8 * (Position1)));} while(0)
|
|
|
|
kbts_unicode_bidirectional_class BidirectionalClass = kbts__GetUnicodeBidirectionalClass(Codepoint);
|
|
kbts_u8 UnicodeFlags = kbts__GetUnicodeFlags(Codepoint);
|
|
kbts_u32 MatchingBracket = kbts__GetUnicodeMirrorCodepoint(Codepoint);
|
|
kbts_u8 GraphemeBreakClass = kbts__GetUnicodeGraphemeBreakClass(Codepoint);
|
|
kbts_u8 LineBreakClass = kbts__GetUnicodeLineBreakClass(Codepoint);
|
|
kbts_u8 WordBreakClass = kbts__GetUnicodeWordBreakClass(Codepoint);
|
|
kbts_u16 CodepointScriptExtension = kbts__GetUnicodeScriptExtension(Codepoint);
|
|
kbts_u32 CodepointScriptCount = (kbts_u32)kbts__ScriptExtensionCount(CodepointScriptExtension);
|
|
kbts_u32 CodepointScriptOffset = (kbts_u32)kbts__ScriptExtensionOffset(CodepointScriptExtension);
|
|
kbts_u8 *CodepointScripts = &kbts__ScriptExtensions[CodepointScriptOffset];
|
|
kbts_u32 FlagState = State->FlagState << 8;
|
|
kbts_u8 LastLineBreakClass = State->LastLineBreakClass;
|
|
// Super secret cheat code for signaling end-of-text
|
|
int EndOfText = (Codepoint == 3) && MaybeEndOfText;
|
|
int StartOfText = !(State->Flags & KBTS_BREAK_STATE_FLAG_STARTED);
|
|
kbts_u32 LineBreakHistory = State->LineBreakHistory;
|
|
kbts_u32 WordBreakHistory = State->WordBreakHistory;
|
|
kbts_u8 LastWordBreakClass = State->LastWordBreakClass;
|
|
kbts_s16 WordBreak2PositionOffset = State->WordBreak2PositionOffset;
|
|
kbts_u8 LastWordBreakClassIncludingIgnored = State->LastWordBreakClassIncludingIgnored;
|
|
kbts_s16 PositionOffset2 = State->PositionOffset2;
|
|
kbts_s16 PositionOffset3 = State->PositionOffset3;
|
|
kbts_u32 Flags = State->Flags;
|
|
kbts_direction LastDirection = State->LastDirection;
|
|
kbts_u8 *ScriptSet = State->ScriptSet;
|
|
kbts_s16 ScriptPositionOffset = State->ScriptPositionOffset;
|
|
kbts_u32 ScriptCount = State->ScriptCount;
|
|
kbts_u32 ScriptCountAtBeginningOfUpdate = ScriptCount;
|
|
kbts_u8 BreakScript = ScriptSet[0];
|
|
kbts__break_flush_flags FlushFlags = 0;
|
|
kbts_s16 Bidirectional1PositionOffset = State->Bidirectional1PositionOffset;
|
|
kbts_u8 Bidirectional2 = State->BidirectionalClass2;
|
|
kbts_u8 Bidirectional1 = State->BidirectionalClass1;
|
|
|
|
if(StartOfText)
|
|
{
|
|
LineBreakHistory = LastLineBreakClass = KBTS_LINE_BREAK_CLASS_SOT;
|
|
WordBreakHistory = LastWordBreakClass = KBTS_WORD_BREAK_CLASS_SOT;
|
|
}
|
|
|
|
// Bracket pairing overrides default directions/scripts.
|
|
if((UnicodeFlags & KBTS_UNICODE_FLAG_MIRRORED) == KBTS_UNICODE_FLAG_OPEN_BRACKET)
|
|
{
|
|
if(State->BracketCount < KBTS__ARRAY_LENGTH(State->Brackets))
|
|
{
|
|
kbts_bracket *Bracket = &State->Brackets[State->BracketCount++];
|
|
|
|
// @Incomplete: Canonicalize the bracket.
|
|
Bracket->Codepoint = Codepoint;
|
|
Bracket->Position = State->CurrentPosition;
|
|
|
|
// Unfortunately, because our script/direction breaks are arbitrary lookback now,
|
|
// we have to wait until DoBreak() to resolve these.
|
|
Bracket->Direction = KBTS_DIRECTION_DONT_KNOW;
|
|
Bracket->Script = KBTS_SCRIPT_DONT_KNOW;
|
|
|
|
State->Flags |= KBTS_BREAK_STATE_FLAG_LAST_WAS_BRACKET;
|
|
}
|
|
}
|
|
else if((UnicodeFlags & KBTS_UNICODE_FLAG_MIRRORED) == KBTS_UNICODE_FLAG_CLOSE_BRACKET)
|
|
{
|
|
if(State->BracketCount)
|
|
{
|
|
kbts_un FoundBracketIndex = 0;
|
|
kbts_bracket *FoundBracket = 0;
|
|
|
|
// @Incomplete: Canonicalize the bracket.
|
|
KBTS__FOR(BracketIndex, 0, State->BracketCount)
|
|
{
|
|
kbts_bracket *Bracket = &State->Brackets[State->BracketCount - 1 - BracketIndex];
|
|
|
|
if(Bracket->Codepoint == MatchingBracket)
|
|
{
|
|
FoundBracket = Bracket;
|
|
FoundBracketIndex = State->BracketCount - 1 - BracketIndex;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(FoundBracket)
|
|
{
|
|
// In case the bracket hasn't been resolved yet, take the current values.
|
|
kbts_u8 BracketScript = FoundBracket->Script;
|
|
kbts_u8 BracketDirection = FoundBracket->Direction;
|
|
|
|
if(!BracketScript && ScriptCount)
|
|
{
|
|
BracketScript = ScriptSet[0];
|
|
}
|
|
|
|
if(!BracketDirection)
|
|
{
|
|
BracketDirection = (kbts_u8)LastDirection;
|
|
}
|
|
|
|
if(BracketDirection == KBTS_DIRECTION_LTR)
|
|
{
|
|
BidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_L;
|
|
}
|
|
else if(BracketDirection == KBTS_DIRECTION_RTL)
|
|
{
|
|
BidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_R;
|
|
}
|
|
|
|
BidirectionalClass = FoundBracket->Direction;
|
|
CodepointScriptCount = 1;
|
|
CodepointScriptOffset = BracketScript;
|
|
|
|
State->BracketCount = (kbts_u32)FoundBracketIndex;
|
|
}
|
|
}
|
|
}
|
|
|
|
kbts_s16 LineBreak3PositionOffset = State->LineBreak3PositionOffset;
|
|
kbts_s16 LineBreak2PositionOffset = State->LineBreak2PositionOffset;
|
|
int HardLineBreak = 0;
|
|
{ // Line breaking.
|
|
kbts_u64 LineBreaks = State->LineBreaks << 16;
|
|
kbts_u64 LineUnbreaks = State->LineUnbreaks << 16;
|
|
kbts_u64 LineUnbreaksAsync = State->LineUnbreaksAsync << 16;
|
|
|
|
#define KBTS_C1(A) case KBTS_LINE_BREAK_CLASS_##A
|
|
#define KBTS_C2(A, B) case (KBTS_LINE_BREAK_CLASS_##A << 8) | (KBTS_LINE_BREAK_CLASS_##B)
|
|
#define KBTS_C3(A, B, C) case (KBTS_LINE_BREAK_CLASS_##A << 16) | (KBTS_LINE_BREAK_CLASS_##B << 8) | KBTS_LINE_BREAK_CLASS_##C
|
|
#define KBTS_C4(A, B, C, D) case (KBTS_LINE_BREAK_CLASS_##A << 24) | (KBTS_LINE_BREAK_CLASS_##B << 16) | (KBTS_LINE_BREAK_CLASS_##C << 8) | KBTS_LINE_BREAK_CLASS_##D
|
|
#define KBTS_REQUIRED_LINE_BREAK(Priority, Position) do {LineBreaks |= (kbts_u64)KBTS__LINE_BREAK_REQUIRED##Priority << ((Position) * 16);} while(0)
|
|
#define KBTS_LINE_BREAK(Priority, Position) do {LineBreaks |= (kbts_u64)KBTS__LINE_BREAK_ALLOWED##Priority << ((Position) * 16);} while(0)
|
|
#define KBTS_LINE_UNBREAK(Priority, Position) do {LineUnbreaks |= (kbts_u64)KBTS__LINE_BREAK_REQUIRED##Priority << ((Position) * 16);} while(0)
|
|
#define KBTS_LINE_UNBREAK_ASYNC(Priority, Position) do {LineUnbreaksAsync |= (kbts_u64)KBTS__LINE_BREAK_REQUIRED##Priority << ((Position) * 16);} while(0)
|
|
|
|
if(EndOfText)
|
|
{
|
|
// Depending on the current line break state, we might need very different breaks.
|
|
// For now, we copy the transitions from the first row of the transition table, but
|
|
// we might want to special-case these.
|
|
LineBreakClass = KBTS_LINE_BREAK_CLASS_Onea;
|
|
}
|
|
else if(LineBreakClass > KBTS_LINE_BREAK_CLASS_COUNT)
|
|
{
|
|
// These guys have special rules.
|
|
if((LineBreakClass == KBTS_LINE_BREAK_CLASS_CM) || (LineBreakClass == KBTS_LINE_BREAK_CLASS_ZWJ))
|
|
{
|
|
if(LineBreakClass == KBTS_LINE_BREAK_CLASS_ZWJ)
|
|
{
|
|
KBTS_LINE_UNBREAK_ASYNC(3, 0);
|
|
}
|
|
|
|
switch(LastLineBreakClass)
|
|
{
|
|
case KBTS_LINE_BREAK_CLASS_SOT:
|
|
case KBTS_LINE_BREAK_CLASS_BK:
|
|
case KBTS_LINE_BREAK_CLASS_CR:
|
|
case KBTS_LINE_BREAK_CLASS_LF:
|
|
case KBTS_LINE_BREAK_CLASS_NL:
|
|
case KBTS_LINE_BREAK_CLASS_SP:
|
|
case KBTS_LINE_BREAK_CLASS_ZW:
|
|
LineBreakClass = KBTS_LINE_BREAK_CLASS_ALnea;
|
|
break;
|
|
|
|
default:
|
|
// The standard says to treat X [CM ZWJ]* as X.
|
|
// This means that we need to hoist [CM ZWJ] completely out of the line breaking logic.
|
|
// However, we give our results in index offsets relative to the current glyph, so we
|
|
// do have to acknowledge that we are skipping glyphs.
|
|
goto LineBreakAbsorbCharacter;
|
|
}
|
|
}
|
|
else if(LineBreakClass == KBTS_LINE_BREAK_CLASS_CJ)
|
|
{
|
|
LineBreakClass = (kbts_u8)((State->JapaneseLineBreakStyle == KBTS_JAPANESE_LINE_BREAK_STYLE_STRICT) ? KBTS_LINE_BREAK_CLASS_NSea : KBTS_LINE_BREAK_CLASS_IDea);
|
|
}
|
|
}
|
|
|
|
if(LastLineBreakClass == LineBreakClass)
|
|
{
|
|
// @Incomplete: Handle repeats that aren't SP*.
|
|
if(LineBreakClass == KBTS_LINE_BREAK_CLASS_SP)
|
|
{
|
|
goto LineBreakAbsorbCharacter;
|
|
}
|
|
}
|
|
|
|
LineBreakHistory = (LineBreakHistory << 8) | LineBreakClass;
|
|
|
|
if(EndOfText && (State->ConfigFlags & KBTS_BREAK_CONFIG_FLAG_END_OF_TEXT_GENERATES_HARD_LINE_BREAK))
|
|
{
|
|
// Always break at the end of text.
|
|
KBTS_REQUIRED_LINE_BREAK(5, 1);
|
|
|
|
// x QUPf _eot_
|
|
if((LineBreakHistory & 0xFF00) == (KBTS_LINE_BREAK_CLASS_QUPf << 8))
|
|
{
|
|
KBTS_LINE_UNBREAK(3, 2);
|
|
}
|
|
}
|
|
|
|
KBTS_LINE_BREAK(0, 0);
|
|
KBTS_LINE_BREAK(0, 1);
|
|
|
|
switch(LineBreakClass)
|
|
{
|
|
KBTS_C1(BK):
|
|
KBTS_C1(CR):
|
|
KBTS_C1(LF):
|
|
KBTS_C1(NL):
|
|
{
|
|
KBTS_LINE_UNBREAK(4, 1);
|
|
|
|
// This is the only place that's not the end of text where we generate hard line breaks.
|
|
// When we see a hard line break, we want to reset the direction/script state, so that
|
|
// we generate new direction/script breaks for the new paragraph.
|
|
FlushFlags |= (KBTS__BREAK_FLUSH_FLAG_SCRIPT |
|
|
KBTS__BREAK_FLUSH_FLAG_DIRECTION_2 |
|
|
KBTS__BREAK_FLUSH_FLAG_DIRECTION_1 |
|
|
KBTS__BREAK_FLUSH_FLAG_DIRECTION_PARAGRAPH);
|
|
ScriptCount = 0;
|
|
HardLineBreak = 1;
|
|
|
|
KBTS_REQUIRED_LINE_BREAK(5, 0);
|
|
} break;
|
|
|
|
KBTS_C1(ZW): KBTS_LINE_BREAK(4, 0); KBTS_LINE_UNBREAK(4, 1); break;
|
|
KBTS_C1(BB): KBTS_LINE_UNBREAK(0, 0); break;
|
|
|
|
KBTS_C1(GLea):
|
|
KBTS_C1(GLnea):
|
|
KBTS_C1(OPea):
|
|
KBTS_C1(OPnea): KBTS_LINE_UNBREAK(3, 0); break;
|
|
|
|
KBTS_C1(WJ): KBTS_LINE_UNBREAK(3, 0); KBTS_LINE_UNBREAK(3, 1); break;
|
|
|
|
KBTS_C1(CLea):
|
|
KBTS_C1(CLnea):
|
|
KBTS_C1(CPea):
|
|
KBTS_C1(CPnea):
|
|
KBTS_C1(EXea):
|
|
KBTS_C1(EXnea):
|
|
KBTS_C1(SY): KBTS_LINE_UNBREAK(3, 1); break;
|
|
|
|
KBTS_C1(IS): KBTS_LINE_UNBREAK(2, 1); break;
|
|
|
|
KBTS_C1(SP): KBTS_LINE_UNBREAK(4, 1); KBTS_LINE_BREAK(2, 0); break;
|
|
|
|
KBTS_C1(QU): KBTS_LINE_UNBREAK(1, 1); KBTS_LINE_UNBREAK(1, 0); break;
|
|
KBTS_C1(QUPi): KBTS_LINE_UNBREAK(1, 0); break;
|
|
KBTS_C1(QUPf): KBTS_LINE_UNBREAK(1, 1); break;
|
|
KBTS_C1(CB): KBTS_LINE_BREAK(1, 0); KBTS_LINE_BREAK(1, 1); break;
|
|
|
|
KBTS_C1(BAnea):
|
|
KBTS_C1(BAea):
|
|
KBTS_C1(HYPHEN):
|
|
KBTS_C1(HY):
|
|
KBTS_C1(NSnea):
|
|
KBTS_C1(NSea):
|
|
KBTS_C1(INnea):
|
|
KBTS_C1(INea):
|
|
KBTS_LINE_UNBREAK(0, 1); break;
|
|
}
|
|
|
|
switch(LineBreakHistory & 0xFFFF)
|
|
{
|
|
KBTS_C2(CR, LF): KBTS_LINE_UNBREAK(5, 1); break;
|
|
KBTS_C2(ZW, SP): KBTS_LINE_BREAK(4, 0); break;
|
|
|
|
|
|
KBTS_C2(OPea, QUPi):
|
|
KBTS_C2(GLea, QUPi):
|
|
KBTS_C2(OPea, SP):
|
|
KBTS_C2(OPnea,SP):
|
|
KBTS_LINE_UNBREAK(3, 0);
|
|
break;
|
|
|
|
KBTS_C2(SOT, QUPi):
|
|
KBTS_C2(BK, QUPi):
|
|
KBTS_C2(CR, QUPi):
|
|
KBTS_C2(LF, QUPi):
|
|
KBTS_C2(NL, QUPi):
|
|
KBTS_C2(SP, QUPi):
|
|
KBTS_C2(ZW, QUPi):
|
|
KBTS_C2(GLnea, QUPi):
|
|
KBTS_C2(QU, QUPi):
|
|
KBTS_C2(OPnea, QUPi):
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
KBTS_LINE_UNBREAK(1, 0);
|
|
KBTS_LINE_UNBREAK(3, 0);
|
|
break;
|
|
|
|
KBTS_C2(QUPi, QUPi):
|
|
KBTS_LINE_UNBREAK(3, 0);
|
|
KBTS_LINE_UNBREAK(1, 2);
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
KBTS_LINE_UNBREAK(1, 0);
|
|
break;
|
|
|
|
KBTS_C2(QUPf, QUPi):
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
KBTS_LINE_UNBREAK(1, 0);
|
|
KBTS_LINE_UNBREAK(3, 0);
|
|
KBTS_LINE_UNBREAK(3, 2);
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
break;
|
|
|
|
KBTS_C2(QUPf, GLnea):
|
|
KBTS_LINE_UNBREAK(3, 2);
|
|
KBTS_LINE_UNBREAK(3, 1);
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
break;
|
|
|
|
KBTS_C2(QUPf, BK):
|
|
KBTS_C2(QUPf, CR):
|
|
KBTS_C2(QUPf, LF):
|
|
KBTS_C2(QUPf, NL):
|
|
KBTS_C2(QUPf, ZW):
|
|
KBTS_C2(QUPf, WJ):
|
|
KBTS_C2(QUPf, CLnea):
|
|
KBTS_C2(QUPf, CPnea):
|
|
KBTS_C2(QUPf, EXnea):
|
|
KBTS_C2(QUPf, SY):
|
|
KBTS_C2(QUPf, IS):
|
|
KBTS_C2(QUPf, SP):
|
|
KBTS_LINE_UNBREAK(3, 2);
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
break;
|
|
|
|
KBTS_C2(QUPf, QUPf):
|
|
KBTS_LINE_UNBREAK(3, 2);
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
KBTS_LINE_UNBREAK(1, 0);
|
|
break;
|
|
|
|
KBTS_C2(QUPf, QU):
|
|
KBTS_LINE_UNBREAK(3, 2);
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
KBTS_LINE_UNBREAK(1, 0);
|
|
break;
|
|
|
|
KBTS_C2(QUPf, GLea):
|
|
KBTS_LINE_UNBREAK(3, 2);
|
|
KBTS_LINE_UNBREAK(3, 1);
|
|
break;
|
|
|
|
KBTS_C2(QUPf, CPea):
|
|
KBTS_C2(QUPf, CLea):
|
|
KBTS_C2(QUPf, EXea):
|
|
KBTS_LINE_UNBREAK(3, 2);
|
|
break;
|
|
|
|
KBTS_C2(QUPi, QU):
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
KBTS_LINE_UNBREAK(1, 0);
|
|
KBTS_LINE_UNBREAK(1, 2);
|
|
break;
|
|
|
|
KBTS_C2(QUPi, QUPf):
|
|
KBTS_LINE_UNBREAK(1, 1);
|
|
KBTS_LINE_UNBREAK(1, 0);
|
|
KBTS_LINE_UNBREAK(1, 2);
|
|
break;
|
|
|
|
KBTS_C2(QUPi, GLnea):
|
|
KBTS_LINE_UNBREAK(1, 2);
|
|
KBTS_LINE_UNBREAK(3, 1);
|
|
break;
|
|
|
|
KBTS_C2(QUPi, Onea): KBTS_C2(QUPi, Ope): KBTS_C2(QUPi, BK): KBTS_C2(QUPi, CR): KBTS_C2(QUPi, LF): KBTS_C2(QUPi, NL): KBTS_C2(QUPi, SP): KBTS_C2(QUPi, ZW):
|
|
KBTS_C2(QUPi, WJ): KBTS_C2(QUPi, CLnea): KBTS_C2(QUPi, CPnea): KBTS_C2(QUPi, EXnea): KBTS_C2(QUPi, SY): KBTS_C2(QUPi, BAnea):
|
|
KBTS_C2(QUPi, OPnea): KBTS_C2(QUPi, IS): KBTS_C2(QUPi, NSnea): KBTS_C2(QUPi, B2): KBTS_C2(QUPi, CB):
|
|
KBTS_C2(QUPi, HY): KBTS_C2(QUPi, HYPHEN): KBTS_C2(QUPi, INnea): KBTS_C2(QUPi, BB): KBTS_C2(QUPi, HL): KBTS_C2(QUPi, ALnea): KBTS_C2(QUPi, NU): KBTS_C2(QUPi, PRnea):
|
|
KBTS_C2(QUPi, IDnea): KBTS_C2(QUPi, IDpe): KBTS_C2(QUPi, EBnea): KBTS_C2(QUPi, POnea): KBTS_C2(QUPi, JV): KBTS_C2(QUPi, JT): KBTS_C2(QUPi, AP): KBTS_C2(QUPi, AK):
|
|
KBTS_C2(QUPi, DOTTED_CIRCLE): KBTS_C2(QUPi, AS): KBTS_C2(QUPi, VF): KBTS_C2(QUPi, VI): KBTS_C2(QUPi, RI):
|
|
KBTS_LINE_UNBREAK(1, 2); break;
|
|
|
|
|
|
KBTS_C2(QUPf, Onea): KBTS_C2(QUPf, Ope):
|
|
KBTS_C2(QUPf, BAnea):
|
|
KBTS_C2(QUPf, OPnea): KBTS_C2(QUPf, NSnea): KBTS_C2(QUPf, B2): KBTS_C2(QUPf, CB):
|
|
KBTS_C2(QUPf, HY): KBTS_C2(QUPf, HYPHEN): KBTS_C2(QUPf, INnea): KBTS_C2(QUPf, BB): KBTS_C2(QUPf, HL): KBTS_C2(QUPf, ALnea): KBTS_C2(QUPf, NU): KBTS_C2(QUPf, PRnea):
|
|
KBTS_C2(QUPf, IDnea): KBTS_C2(QUPf, IDpe): KBTS_C2(QUPf, EBnea): KBTS_C2(QUPf, POnea): KBTS_C2(QUPf, JV): KBTS_C2(QUPf, JT): KBTS_C2(QUPf, AP): KBTS_C2(QUPf, AK):
|
|
KBTS_C2(QUPf, DOTTED_CIRCLE): KBTS_C2(QUPf, AS): KBTS_C2(QUPf, VF): KBTS_C2(QUPf, VI): KBTS_C2(QUPf, RI):
|
|
KBTS_LINE_UNBREAK(1, 1); break;
|
|
|
|
KBTS_C2(SOT, QU): KBTS_C2(SOT, QUPf):
|
|
KBTS_C2(Onea, QU): KBTS_C2(Ope, QU): KBTS_C2(BK, QU): KBTS_C2(CR, QU): KBTS_C2(LF, QU): KBTS_C2(NL, QU): KBTS_C2(SP, QU): KBTS_C2(ZW, QU):
|
|
KBTS_C2(WJ, QU): KBTS_C2(GLnea, QU): KBTS_C2(CLnea, QU): KBTS_C2(CPnea, QU): KBTS_C2(EXnea, QU): KBTS_C2(SY, QU): KBTS_C2(BAnea, QU):
|
|
KBTS_C2(OPnea, QU): KBTS_C2(QU, QU): KBTS_C2(IS, QU): KBTS_C2(NSnea, QU): KBTS_C2(B2, QU): KBTS_C2(CB, QU):
|
|
KBTS_C2(HY, QU): KBTS_C2(HYPHEN, QU): KBTS_C2(INnea, QU): KBTS_C2(BB, QU): KBTS_C2(HL, QU): KBTS_C2(ALnea, QU): KBTS_C2(NU, QU): KBTS_C2(PRnea, QU):
|
|
KBTS_C2(IDnea, QU): KBTS_C2(IDpe, QU): KBTS_C2(EBnea, QU): KBTS_C2(POnea, QU): KBTS_C2(JV, QU): KBTS_C2(JT, QU): KBTS_C2(AP, QU): KBTS_C2(AK, QU):
|
|
KBTS_C2(DOTTED_CIRCLE, QU): KBTS_C2(AS, QU): KBTS_C2(VF, QU): KBTS_C2(VI, QU): KBTS_C2(RI, QU):
|
|
KBTS_C2(Onea, QUPi): KBTS_C2(Ope, QUPi):
|
|
KBTS_C2(WJ, QUPi): KBTS_C2(CLnea, QUPi): KBTS_C2(CPnea, QUPi): KBTS_C2(EXnea, QUPi): KBTS_C2(SY, QUPi): KBTS_C2(BAnea, QUPi):
|
|
KBTS_C2(IS, QUPi):
|
|
KBTS_C2(NSnea, QUPi):
|
|
KBTS_C2(B2, QUPi):
|
|
KBTS_C2(CB, QUPi):
|
|
KBTS_C2(HY, QUPi): KBTS_C2(HYPHEN, QUPi): KBTS_C2(INnea, QUPi): KBTS_C2(BB, QUPi): KBTS_C2(HL, QUPi): KBTS_C2(ALnea, QUPi): KBTS_C2(NU, QUPi): KBTS_C2(PRnea, QUPi):
|
|
KBTS_C2(IDnea, QUPi): KBTS_C2(IDpe, QUPi): KBTS_C2(EBnea, QUPi): KBTS_C2(POnea, QUPi): KBTS_C2(JV, QUPi): KBTS_C2(JT, QUPi): KBTS_C2(AP, QUPi): KBTS_C2(AK, QUPi):
|
|
KBTS_C2(DOTTED_CIRCLE, QUPi): KBTS_C2(AS, QUPi): KBTS_C2(VF, QUPi): KBTS_C2(VI, QUPi): KBTS_C2(RI, QUPi):
|
|
KBTS_C2(Onea, QUPf): KBTS_C2(Ope, QUPf): KBTS_C2(BK, QUPf): KBTS_C2(CR, QUPf): KBTS_C2(LF, QUPf): KBTS_C2(NL, QUPf): KBTS_C2(SP, QUPf): KBTS_C2(ZW, QUPf):
|
|
KBTS_C2(WJ, QUPf): KBTS_C2(GLnea, QUPf): KBTS_C2(CLnea, QUPf): KBTS_C2(CPnea, QUPf): KBTS_C2(EXnea, QUPf): KBTS_C2(SY, QUPf): KBTS_C2(BAnea, QUPf):
|
|
KBTS_C2(OPnea, QUPf): KBTS_C2(QU, QUPf): KBTS_C2(IS, QUPf): KBTS_C2(NSnea, QUPf): KBTS_C2(B2, QUPf): KBTS_C2(CB, QUPf):
|
|
KBTS_C2(HY, QUPf): KBTS_C2(HYPHEN, QUPf): KBTS_C2(INnea, QUPf): KBTS_C2(BB, QUPf): KBTS_C2(HL, QUPf): KBTS_C2(ALnea, QUPf): KBTS_C2(NU, QUPf): KBTS_C2(PRnea, QUPf):
|
|
KBTS_C2(IDnea, QUPf): KBTS_C2(IDpe, QUPf): KBTS_C2(EBnea, QUPf): KBTS_C2(POnea, QUPf): KBTS_C2(JV, QUPf): KBTS_C2(JT, QUPf): KBTS_C2(AP, QUPf): KBTS_C2(AK, QUPf):
|
|
KBTS_C2(DOTTED_CIRCLE, QUPf): KBTS_C2(AS, QUPf): KBTS_C2(VF, QUPf): KBTS_C2(VI, QUPf): KBTS_C2(RI, QUPf):
|
|
KBTS_LINE_UNBREAK(1, 1); KBTS_LINE_UNBREAK(1, 0); break;
|
|
|
|
KBTS_C2(HL, NU): KBTS_C2(ALnea, NU): KBTS_C2(ALea, NU): KBTS_C2(DOTTED_CIRCLE, NU):
|
|
KBTS_C2(NU, ALnea): KBTS_C2(NU, ALea): KBTS_C2(NU, DOTTED_CIRCLE): KBTS_C2(NU, HL):
|
|
KBTS_C2(PRnea, IDnea): KBTS_C2(PRnea, IDea): KBTS_C2(PRnea, IDpe): KBTS_C2(PRnea, EBea): KBTS_C2(PRnea, EBnea): KBTS_C2(PRnea, EM):
|
|
KBTS_C2(PRea, IDnea): KBTS_C2(PRea, IDea): KBTS_C2(PRea, IDpe): KBTS_C2(PRea, EBea): KBTS_C2(PRea, EBnea): KBTS_C2(PRea, EM):
|
|
KBTS_C2(IDnea, POea): KBTS_C2(IDnea, POnea): KBTS_C2(IDea, POea): KBTS_C2(IDea, POnea): KBTS_C2(IDpe, POea): KBTS_C2(IDpe, POnea):
|
|
KBTS_C2(EBnea, POea): KBTS_C2(EBnea, POnea): KBTS_C2(EBea, POea): KBTS_C2(EBea, POnea): KBTS_C2(EM, POea): KBTS_C2(EM, POnea):
|
|
KBTS_C2(PRea, ALea): KBTS_C2(PRea, ALnea): KBTS_C2(PRea, DOTTED_CIRCLE): KBTS_C2(PRea, HL):
|
|
KBTS_C2(PRnea, ALea): KBTS_C2(PRnea, ALnea): KBTS_C2(PRnea, DOTTED_CIRCLE): KBTS_C2(PRnea, HL):
|
|
KBTS_C2(POea, ALea): KBTS_C2(POea, ALnea): KBTS_C2(POea, DOTTED_CIRCLE): KBTS_C2(POea, HL):
|
|
KBTS_C2(POnea, ALea): KBTS_C2(POnea, ALnea): KBTS_C2(POnea, DOTTED_CIRCLE): KBTS_C2(POnea, HL):
|
|
KBTS_C2(ALea, PRea): KBTS_C2(ALea, PRnea): KBTS_C2(ALea, POea): KBTS_C2(ALea, POnea):
|
|
KBTS_C2(ALnea, PRea): KBTS_C2(ALnea, PRnea): KBTS_C2(ALnea, POea): KBTS_C2(ALnea, POnea):
|
|
KBTS_C2(DOTTED_CIRCLE, PRea): KBTS_C2(DOTTED_CIRCLE, PRnea): KBTS_C2(DOTTED_CIRCLE, POea): KBTS_C2(DOTTED_CIRCLE, POnea):
|
|
KBTS_C2(HL, PRea): KBTS_C2(HL, PRnea): KBTS_C2(HL, POea): KBTS_C2(HL, POnea):
|
|
KBTS_C2(NU, POea): KBTS_C2(NU, POnea): KBTS_C2(NU, PRea): KBTS_C2(NU, PRnea): KBTS_C2(NU, NU):
|
|
KBTS_C2(POea, NU): KBTS_C2(POnea, NU): KBTS_C2(PRea, NU): KBTS_C2(PRnea, NU):
|
|
KBTS_C2(SY, HL):
|
|
KBTS_C2(JL, JL): KBTS_C2(JL, JV): KBTS_C2(JL, H2): KBTS_C2(JL, H3):
|
|
KBTS_C2(JV, JV): KBTS_C2(JV, JT): KBTS_C2(H2, JV): KBTS_C2(H2, JT):
|
|
KBTS_C2(JT, JT): KBTS_C2(H3, JT):
|
|
KBTS_C2(JL, POea): KBTS_C2(JL, POnea): KBTS_C2(JV, POea): KBTS_C2(JV, POnea): KBTS_C2(JT, POea): KBTS_C2(JT, POnea):
|
|
KBTS_C2(H2, POea): KBTS_C2(H2, POnea): KBTS_C2(H3, POea): KBTS_C2(H3, POnea):
|
|
KBTS_C2(PRea, JL): KBTS_C2(PRea, JV): KBTS_C2(PRea, JT): KBTS_C2(PRea, H2): KBTS_C2(PRea, H3):
|
|
KBTS_C2(PRnea, JL): KBTS_C2(PRnea, JV): KBTS_C2(PRnea, JT): KBTS_C2(PRnea, H2): KBTS_C2(PRnea, H3):
|
|
KBTS_C2(ALea, ALea): KBTS_C2(ALea, ALnea): KBTS_C2(ALea, DOTTED_CIRCLE): KBTS_C2(ALea, HL):
|
|
KBTS_C2(ALnea, ALea): KBTS_C2(ALnea, ALnea): KBTS_C2(ALnea, DOTTED_CIRCLE): KBTS_C2(ALnea, HL):
|
|
KBTS_C2(DOTTED_CIRCLE, ALea): KBTS_C2(DOTTED_CIRCLE, ALnea): KBTS_C2(DOTTED_CIRCLE, DOTTED_CIRCLE): KBTS_C2(DOTTED_CIRCLE, HL):
|
|
KBTS_C2(HL, ALea): KBTS_C2(HL, ALnea): KBTS_C2(HL, DOTTED_CIRCLE): KBTS_C2(HL, HL):
|
|
KBTS_C2(AP, AK): KBTS_C2(AP, DOTTED_CIRCLE): KBTS_C2(AP, AS):
|
|
KBTS_C2(AK, VF): KBTS_C2(AK, VI): KBTS_C2(DOTTED_CIRCLE, VF): KBTS_C2(DOTTED_CIRCLE, VI): KBTS_C2(AS, VF): KBTS_C2(AS, VI):
|
|
KBTS_C2(IS, ALea): KBTS_C2(IS, ALnea): KBTS_C2(IS, DOTTED_CIRCLE): KBTS_C2(IS, HL):
|
|
KBTS_C2(ALea, OPnea): KBTS_C2(ALnea, OPnea): KBTS_C2(DOTTED_CIRCLE, OPnea): KBTS_C2(HL, OPnea): KBTS_C2(NU, OPnea):
|
|
KBTS_C2(CPnea, ALea): KBTS_C2(CPnea, ALnea): KBTS_C2(CPnea, DOTTED_CIRCLE): KBTS_C2(CPnea, HL): KBTS_C2(CPnea, NU):
|
|
KBTS_C2(EBea, EM): KBTS_C2(EBnea, EM): KBTS_C2(Ope, EM): KBTS_C2(IDpe, EM):
|
|
KBTS_C2(HY, NU): KBTS_C2(IS, NU):
|
|
KBTS_LINE_UNBREAK(0, 1); break;
|
|
|
|
KBTS_C2(Oea, GLea):KBTS_C2(Oea, GLnea):
|
|
KBTS_C2(Onea, GLea):KBTS_C2(Onea, GLnea):
|
|
KBTS_C2(Ope, GLea):KBTS_C2(Ope, GLnea):
|
|
KBTS_C2(BK, GLea):KBTS_C2(BK, GLnea):
|
|
KBTS_C2(CR, GLea):KBTS_C2(CR, GLnea):
|
|
KBTS_C2(LF, GLea):KBTS_C2(LF, GLnea):
|
|
KBTS_C2(NL, GLea):KBTS_C2(NL, GLnea):
|
|
KBTS_C2(ZW, GLea):KBTS_C2(ZW, GLnea):
|
|
KBTS_C2(WJ, GLea):KBTS_C2(WJ, GLnea):
|
|
KBTS_C2(GLea, GLea):KBTS_C2(GLea, GLnea):
|
|
KBTS_C2(GLnea, GLea):KBTS_C2(GLnea, GLnea):
|
|
KBTS_C2(CLea, GLea):KBTS_C2(CLea, GLnea):
|
|
KBTS_C2(CLnea, GLea):KBTS_C2(CLnea, GLnea):
|
|
KBTS_C2(CPea, GLea):KBTS_C2(CPea, GLnea):
|
|
KBTS_C2(CPnea, GLea):KBTS_C2(CPnea, GLnea):
|
|
KBTS_C2(EXea, GLea):KBTS_C2(EXea, GLnea):
|
|
KBTS_C2(EXnea, GLea):KBTS_C2(EXnea, GLnea):
|
|
KBTS_C2(SY, GLea):KBTS_C2(SY, GLnea):
|
|
KBTS_C2(OPea, GLea):KBTS_C2(OPea, GLnea):
|
|
KBTS_C2(OPnea, GLea):KBTS_C2(OPnea, GLnea):
|
|
KBTS_C2(QU, GLea):KBTS_C2(QU, GLnea):
|
|
KBTS_C2(QUPi, GLea):
|
|
KBTS_C2(IS, GLea):KBTS_C2(IS, GLnea):
|
|
KBTS_C2(NSea, GLea):KBTS_C2(NSea, GLnea):
|
|
KBTS_C2(NSnea, GLea):KBTS_C2(NSnea, GLnea):
|
|
KBTS_C2(B2, GLea):KBTS_C2(B2, GLnea):
|
|
KBTS_C2(CB, GLea):KBTS_C2(CB, GLnea):
|
|
KBTS_C2(INea, GLea):KBTS_C2(INea, GLnea):
|
|
KBTS_C2(INnea, GLea):KBTS_C2(INnea, GLnea):
|
|
KBTS_C2(BB, GLea):KBTS_C2(BB, GLnea):
|
|
KBTS_C2(HL, GLea):KBTS_C2(HL, GLnea):
|
|
KBTS_C2(ALea, GLea):KBTS_C2(ALea, GLnea):
|
|
KBTS_C2(ALnea, GLea):KBTS_C2(ALnea, GLnea):
|
|
KBTS_C2(NU, GLea):KBTS_C2(NU, GLnea):
|
|
KBTS_C2(PRea, GLea):KBTS_C2(PRea, GLnea):
|
|
KBTS_C2(PRnea, GLea):KBTS_C2(PRnea, GLnea):
|
|
KBTS_C2(IDea, GLea):KBTS_C2(IDea, GLnea):
|
|
KBTS_C2(IDnea, GLea):KBTS_C2(IDnea, GLnea):
|
|
KBTS_C2(IDpe, GLea):KBTS_C2(IDpe, GLnea):
|
|
KBTS_C2(EBea, GLea):KBTS_C2(EBea, GLnea):
|
|
KBTS_C2(EBnea, GLea):KBTS_C2(EBnea, GLnea):
|
|
KBTS_C2(EM, GLea):KBTS_C2(EM, GLnea):
|
|
KBTS_C2(POea, GLea):KBTS_C2(POea, GLnea):
|
|
KBTS_C2(POnea, GLea):KBTS_C2(POnea, GLnea):
|
|
KBTS_C2(JL, GLea):KBTS_C2(JL, GLnea):
|
|
KBTS_C2(JV, GLea):KBTS_C2(JV, GLnea):
|
|
KBTS_C2(JT, GLea):KBTS_C2(JT, GLnea):
|
|
KBTS_C2(H2, GLea):KBTS_C2(H2, GLnea):
|
|
KBTS_C2(H3, GLea):KBTS_C2(H3, GLnea):
|
|
KBTS_C2(AP, GLea):KBTS_C2(AP, GLnea):
|
|
KBTS_C2(AK, GLea):KBTS_C2(AK, GLnea):
|
|
KBTS_C2(DOTTED_CIRCLE, GLea):KBTS_C2(DOTTED_CIRCLE, GLnea):
|
|
KBTS_C2(AS, GLea):KBTS_C2(AS, GLnea):
|
|
KBTS_C2(VF, GLea):KBTS_C2(VF, GLnea):
|
|
KBTS_C2(VI, GLea):KBTS_C2(VI, GLnea):
|
|
KBTS_C2(RI, GLea):KBTS_C2(RI, GLnea):
|
|
KBTS_LINE_UNBREAK(3, 1); break;
|
|
|
|
|
|
KBTS_C2(CLea, NSnea): KBTS_C2(CLea, NSea): KBTS_C2(CLnea, NSnea): KBTS_C2(CLnea, NSea):
|
|
KBTS_C2(CPea, NSnea): KBTS_C2(CPea, NSea): KBTS_C2(CPnea, NSnea): KBTS_C2(CPnea, NSea):
|
|
KBTS_C2(B2, B2):
|
|
KBTS_LINE_UNBREAK(2, 1); break;
|
|
|
|
KBTS_C2(RI, RI): // (RI RI)* RI x RI
|
|
KBTS_LINE_UNBREAK(0, 1);
|
|
LineBreakHistory = 0;
|
|
break;
|
|
}
|
|
|
|
switch(LineBreakHistory & 0xFFFFFF)
|
|
{
|
|
KBTS_C3(SOT, QUPi, SP): KBTS_C3(BK, QUPi, SP): KBTS_C3(CR, QUPi, SP): KBTS_C3(LF, QUPi, SP): KBTS_C3(NL, QUPi, SP): KBTS_C3(OPea, QUPi, SP): KBTS_C3(OPnea, QUPi, SP):
|
|
KBTS_C3(SP, QUPi, SP): KBTS_C3(ZW, QUPi, SP): KBTS_C3(QU, QUPi, SP): KBTS_C3(QUPi, QUPi, SP): KBTS_C3(QUPf, QUPi, SP): KBTS_C3(GLea, QUPi, SP): KBTS_C3(GLnea, QUPi, SP):
|
|
KBTS_LINE_UNBREAK(3, 0); break;
|
|
|
|
KBTS_C3(SP, IS, NU):
|
|
KBTS_LINE_BREAK(3, 2); break;
|
|
|
|
KBTS_C3(CLea, SP, NSnea): KBTS_C3(CLea, SP, NSea): KBTS_C3(CLnea, SP, NSnea): KBTS_C3(CLnea, SP, NSea):
|
|
KBTS_C3(CPea, SP, NSnea): KBTS_C3(CPea, SP, NSea): KBTS_C3(CPnea, SP, NSnea): KBTS_C3(CPnea, SP, NSea):
|
|
KBTS_C3(B2, SP, B2):
|
|
KBTS_LINE_UNBREAK(2, 1); break;
|
|
|
|
KBTS_C3(SOT, HY, ALnea): KBTS_C3(SOT, HY, ALea): KBTS_C3(SOT, HY, DOTTED_CIRCLE): KBTS_C3(SOT, HYPHEN, ALnea): KBTS_C3(SOT, HYPHEN, ALea): KBTS_C3(SOT, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(BK, HY, ALnea): KBTS_C3(BK, HY, ALea): KBTS_C3(BK, HY, DOTTED_CIRCLE): KBTS_C3(BK, HYPHEN, ALnea): KBTS_C3(BK, HYPHEN, ALea): KBTS_C3(BK, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(LF, HY, ALnea): KBTS_C3(LF, HY, ALea): KBTS_C3(LF, HY, DOTTED_CIRCLE): KBTS_C3(LF, HYPHEN, ALnea): KBTS_C3(LF, HYPHEN, ALea): KBTS_C3(LF, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(NL, HY, ALnea): KBTS_C3(NL, HY, ALea): KBTS_C3(NL, HY, DOTTED_CIRCLE): KBTS_C3(NL, HYPHEN, ALnea): KBTS_C3(NL, HYPHEN, ALea): KBTS_C3(NL, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(CR, HY, ALnea): KBTS_C3(CR, HY, ALea): KBTS_C3(CR, HY, DOTTED_CIRCLE): KBTS_C3(CR, HYPHEN, ALnea): KBTS_C3(CR, HYPHEN, ALea): KBTS_C3(CR, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(SP, HY, ALnea): KBTS_C3(SP, HY, ALea): KBTS_C3(SP, HY, DOTTED_CIRCLE): KBTS_C3(SP, HYPHEN, ALnea): KBTS_C3(SP, HYPHEN, ALea): KBTS_C3(SP, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(ZW, HY, ALnea): KBTS_C3(ZW, HY, ALea): KBTS_C3(ZW, HY, DOTTED_CIRCLE): KBTS_C3(ZW, HYPHEN, ALnea): KBTS_C3(ZW, HYPHEN, ALea): KBTS_C3(ZW, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(CB, HY, ALnea): KBTS_C3(CB, HY, ALea): KBTS_C3(CB, HY, DOTTED_CIRCLE): KBTS_C3(CB, HYPHEN, ALnea): KBTS_C3(CB, HYPHEN, ALea): KBTS_C3(CB, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(GLnea, HY, ALnea): KBTS_C3(GLnea, HY, ALea): KBTS_C3(GLnea, HY, DOTTED_CIRCLE): KBTS_C3(GLnea, HYPHEN, ALnea): KBTS_C3(GLnea, HYPHEN, ALea): KBTS_C3(GLnea, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(GLea, HY, ALnea): KBTS_C3(GLea, HY, ALea): KBTS_C3(GLea, HY, DOTTED_CIRCLE): KBTS_C3(GLea, HYPHEN, ALnea): KBTS_C3(GLea, HYPHEN, ALea): KBTS_C3(GLea, HYPHEN, DOTTED_CIRCLE):
|
|
KBTS_C3(NU, SY, POea): KBTS_C3(NU, SY, POnea): KBTS_C3(NU, SY, PRea): KBTS_C3(NU, SY, PRnea): KBTS_C3(NU, SY, NU):
|
|
KBTS_C3(NU, IS, POea): KBTS_C3(NU, IS, POnea): KBTS_C3(NU, IS, PRea): KBTS_C3(NU, IS, PRnea): KBTS_C3(NU, IS, NU):
|
|
KBTS_C3(NU, CLea, POea): KBTS_C3(NU, CLea, POnea): KBTS_C3(NU, CLea, PRea): KBTS_C3(NU, CLea, PRnea):
|
|
KBTS_C3(NU, CLnea, POea): KBTS_C3(NU, CLnea, POnea): KBTS_C3(NU, CLnea, PRea): KBTS_C3(NU, CLnea, PRnea):
|
|
KBTS_C3(NU, CPea, POea): KBTS_C3(NU, CPea, POnea): KBTS_C3(NU, CPea, PRea): KBTS_C3(NU, CPea, PRnea):
|
|
KBTS_C3(NU, CPnea, POea): KBTS_C3(NU, CPnea, POnea): KBTS_C3(NU, CPnea, PRea): KBTS_C3(NU, CPnea, PRnea):
|
|
KBTS_C3(AK, VI, AK): KBTS_C3(AK, VI, DOTTED_CIRCLE): KBTS_C3(DOTTED_CIRCLE, VI, AK): KBTS_C3(DOTTED_CIRCLE, VI, DOTTED_CIRCLE): KBTS_C3(AS, VI, AK): KBTS_C3(AS, VI, DOTTED_CIRCLE):
|
|
KBTS_LINE_UNBREAK(0, 1); break;
|
|
|
|
KBTS_C3(POea, OPea, NU): KBTS_C3(POea, OPnea, NU): KBTS_C3(POnea, OPea, NU): KBTS_C3(POnea, OPnea, NU):
|
|
KBTS_C3(PRea, OPea, NU): KBTS_C3(PRea, OPnea, NU): KBTS_C3(PRnea, OPea, NU): KBTS_C3(PRnea, OPnea, NU):
|
|
KBTS_LINE_UNBREAK(0, 2); break;
|
|
|
|
KBTS_C3(AK, AK, VF): KBTS_C3(AK, DOTTED_CIRCLE, VF): KBTS_C3(AK, AS, VF):
|
|
KBTS_C3(DOTTED_CIRCLE, AK, VF): KBTS_C3(DOTTED_CIRCLE, DOTTED_CIRCLE, VF): KBTS_C3(DOTTED_CIRCLE, AS, VF):
|
|
KBTS_C3(AS, AK, VF): KBTS_C3(AS, DOTTED_CIRCLE, VF): KBTS_C3(AS, AS, VF):
|
|
KBTS_LINE_UNBREAK(0, 2); break;
|
|
|
|
KBTS_C3(HL, BAnea, Oea): KBTS_C3(HL, BAnea, Onea): KBTS_C3(HL, BAnea, Ope): KBTS_C3(HL, BAnea, BK): KBTS_C3(HL, BAnea, CR): KBTS_C3(HL, BAnea, LF):
|
|
KBTS_C3(HL, BAnea, NL): KBTS_C3(HL, BAnea, SP): KBTS_C3(HL, BAnea, ZW): KBTS_C3(HL, BAnea, WJ): KBTS_C3(HL, BAnea, GLea): KBTS_C3(HL, BAnea, GLnea):
|
|
KBTS_C3(HL, BAnea, CLea): KBTS_C3(HL, BAnea, CLnea): KBTS_C3(HL, BAnea, CPea): KBTS_C3(HL, BAnea, CPnea): KBTS_C3(HL, BAnea, EXea): KBTS_C3(HL, BAnea, EXnea):
|
|
KBTS_C3(HL, BAnea, SY): KBTS_C3(HL, BAnea, BAea): KBTS_C3(HL, BAnea, BAnea): KBTS_C3(HL, BAnea, OPea): KBTS_C3(HL, BAnea, OPnea): KBTS_C3(HL, BAnea, QU):
|
|
KBTS_C3(HL, BAnea, QUPi): KBTS_C3(HL, BAnea, QUPf): KBTS_C3(HL, BAnea, IS): KBTS_C3(HL, BAnea, NSea): KBTS_C3(HL, BAnea, NSnea): KBTS_C3(HL, BAnea, B2):
|
|
KBTS_C3(HL, BAnea, CB): KBTS_C3(HL, BAnea, HY): KBTS_C3(HL, BAnea, HYPHEN): KBTS_C3(HL, BAnea, INea): KBTS_C3(HL, BAnea, INnea): KBTS_C3(HL, BAnea, BB):
|
|
KBTS_C3(HL, BAnea, ALea): KBTS_C3(HL, BAnea, ALnea): KBTS_C3(HL, BAnea, NU): KBTS_C3(HL, BAnea, PRea): KBTS_C3(HL, BAnea, PRnea): KBTS_C3(HL, BAnea, IDea):
|
|
KBTS_C3(HL, BAnea, IDnea): KBTS_C3(HL, BAnea, IDpe): KBTS_C3(HL, BAnea, EBea): KBTS_C3(HL, BAnea, EBnea): KBTS_C3(HL, BAnea, EM): KBTS_C3(HL, BAnea, POea):
|
|
KBTS_C3(HL, BAnea, POnea): KBTS_C3(HL, BAnea, JL): KBTS_C3(HL, BAnea, JV): KBTS_C3(HL, BAnea, JT): KBTS_C3(HL, BAnea, H2): KBTS_C3(HL, BAnea, H3):
|
|
KBTS_C3(HL, BAnea, AP): KBTS_C3(HL, BAnea, AK): KBTS_C3(HL, BAnea, DOTTED_CIRCLE): KBTS_C3(HL, BAnea, AS): KBTS_C3(HL, BAnea, VF): KBTS_C3(HL, BAnea, VI): KBTS_C3(HL, BAnea, RI):
|
|
KBTS_C3(HL, HYPHEN, Oea): KBTS_C3(HL, HYPHEN, Onea): KBTS_C3(HL, HYPHEN, Ope): KBTS_C3(HL, HYPHEN, BK): KBTS_C3(HL, HYPHEN, CR): KBTS_C3(HL, HYPHEN, LF):
|
|
KBTS_C3(HL, HYPHEN, NL): KBTS_C3(HL, HYPHEN, SP): KBTS_C3(HL, HYPHEN, ZW): KBTS_C3(HL, HYPHEN, WJ): KBTS_C3(HL, HYPHEN, GLea): KBTS_C3(HL, HYPHEN, GLnea):
|
|
KBTS_C3(HL, HYPHEN, CLea): KBTS_C3(HL, HYPHEN, CLnea): KBTS_C3(HL, HYPHEN, CPea): KBTS_C3(HL, HYPHEN, CPnea): KBTS_C3(HL, HYPHEN, EXea): KBTS_C3(HL, HYPHEN, EXnea):
|
|
KBTS_C3(HL, HYPHEN, SY): KBTS_C3(HL, HYPHEN, BAea): KBTS_C3(HL, HYPHEN, BAnea): KBTS_C3(HL, HYPHEN, OPea): KBTS_C3(HL, HYPHEN, OPnea): KBTS_C3(HL, HYPHEN, QU):
|
|
KBTS_C3(HL, HYPHEN, QUPi): KBTS_C3(HL, HYPHEN, QUPf): KBTS_C3(HL, HYPHEN, IS): KBTS_C3(HL, HYPHEN, NSea): KBTS_C3(HL, HYPHEN, NSnea): KBTS_C3(HL, HYPHEN, B2):
|
|
KBTS_C3(HL, HYPHEN, CB): KBTS_C3(HL, HYPHEN, HY): KBTS_C3(HL, HYPHEN, HYPHEN): KBTS_C3(HL, HYPHEN, INea): KBTS_C3(HL, HYPHEN, INnea): KBTS_C3(HL, HYPHEN, BB):
|
|
KBTS_C3(HL, HYPHEN, ALea): KBTS_C3(HL, HYPHEN, ALnea): KBTS_C3(HL, HYPHEN, NU): KBTS_C3(HL, HYPHEN, PRea): KBTS_C3(HL, HYPHEN, PRnea): KBTS_C3(HL, HYPHEN, IDea):
|
|
KBTS_C3(HL, HYPHEN, IDnea): KBTS_C3(HL, HYPHEN, IDpe): KBTS_C3(HL, HYPHEN, EBea): KBTS_C3(HL, HYPHEN, EBnea): KBTS_C3(HL, HYPHEN, EM): KBTS_C3(HL, HYPHEN, POea):
|
|
KBTS_C3(HL, HYPHEN, POnea): KBTS_C3(HL, HYPHEN, JL): KBTS_C3(HL, HYPHEN, JV): KBTS_C3(HL, HYPHEN, JT): KBTS_C3(HL, HYPHEN, H2): KBTS_C3(HL, HYPHEN, H3):
|
|
KBTS_C3(HL, HYPHEN, AP): KBTS_C3(HL, HYPHEN, AK): KBTS_C3(HL, HYPHEN, DOTTED_CIRCLE): KBTS_C3(HL, HYPHEN, AS): KBTS_C3(HL, HYPHEN, VF): KBTS_C3(HL, HYPHEN, VI): KBTS_C3(HL, HYPHEN, RI):
|
|
KBTS_C3(HL, HY, Oea): KBTS_C3(HL, HY, Onea): KBTS_C3(HL, HY, Ope): KBTS_C3(HL, HY, BK): KBTS_C3(HL, HY, CR): KBTS_C3(HL, HY, LF):
|
|
KBTS_C3(HL, HY, NL): KBTS_C3(HL, HY, SP): KBTS_C3(HL, HY, ZW): KBTS_C3(HL, HY, WJ): KBTS_C3(HL, HY, GLea): KBTS_C3(HL, HY, GLnea):
|
|
KBTS_C3(HL, HY, CLea): KBTS_C3(HL, HY, CLnea): KBTS_C3(HL, HY, CPea): KBTS_C3(HL, HY, CPnea): KBTS_C3(HL, HY, EXea): KBTS_C3(HL, HY, EXnea):
|
|
KBTS_C3(HL, HY, SY): KBTS_C3(HL, HY, BAea): KBTS_C3(HL, HY, BAnea): KBTS_C3(HL, HY, OPea): KBTS_C3(HL, HY, OPnea): KBTS_C3(HL, HY, QU):
|
|
KBTS_C3(HL, HY, QUPi): KBTS_C3(HL, HY, QUPf): KBTS_C3(HL, HY, IS): KBTS_C3(HL, HY, NSea): KBTS_C3(HL, HY, NSnea): KBTS_C3(HL, HY, B2):
|
|
KBTS_C3(HL, HY, CB): KBTS_C3(HL, HY, HY): KBTS_C3(HL, HY, HYPHEN): KBTS_C3(HL, HY, INea): KBTS_C3(HL, HY, INnea): KBTS_C3(HL, HY, BB):
|
|
KBTS_C3(HL, HY, ALea): KBTS_C3(HL, HY, ALnea): KBTS_C3(HL, HY, NU): KBTS_C3(HL, HY, PRea): KBTS_C3(HL, HY, PRnea): KBTS_C3(HL, HY, IDea):
|
|
KBTS_C3(HL, HY, IDnea): KBTS_C3(HL, HY, IDpe): KBTS_C3(HL, HY, EBea): KBTS_C3(HL, HY, EBnea): KBTS_C3(HL, HY, EM): KBTS_C3(HL, HY, POea):
|
|
KBTS_C3(HL, HY, POnea): KBTS_C3(HL, HY, JL): KBTS_C3(HL, HY, JV): KBTS_C3(HL, HY, JT): KBTS_C3(HL, HY, H2): KBTS_C3(HL, HY, H3):
|
|
KBTS_C3(HL, HY, AP): KBTS_C3(HL, HY, AK): KBTS_C3(HL, HY, DOTTED_CIRCLE): KBTS_C3(HL, HY, AS): KBTS_C3(HL, HY, VF): KBTS_C3(HL, HY, VI): KBTS_C3(HL, HY, RI):
|
|
KBTS_LINE_UNBREAK(0, 1); break;
|
|
}
|
|
|
|
switch(LineBreakHistory)
|
|
{
|
|
KBTS_C4(NU, SY, CLnea, POnea): KBTS_C4(NU, SY, CLnea, POea): KBTS_C4(NU, SY, CLnea, PRnea): KBTS_C4(NU, SY, CLnea, PRea):
|
|
KBTS_C4(NU, SY, CLea, POnea): KBTS_C4(NU, SY, CLea, POea): KBTS_C4(NU, SY, CLea, PRnea): KBTS_C4(NU, SY, CLea, PRea):
|
|
KBTS_C4(NU, SY, CPnea, POnea): KBTS_C4(NU, SY, CPnea, POea): KBTS_C4(NU, SY, CPnea, PRnea): KBTS_C4(NU, SY, CPnea, PRea):
|
|
KBTS_C4(NU, SY, CPea, POnea): KBTS_C4(NU, SY, CPea, POea): KBTS_C4(NU, SY, CPea, PRnea): KBTS_C4(NU, SY, CPea, PRea):
|
|
KBTS_C4(NU, IS, CLnea, POnea): KBTS_C4(NU, IS, CLnea, POea): KBTS_C4(NU, IS, CLnea, PRnea): KBTS_C4(NU, IS, CLnea, PRea):
|
|
KBTS_C4(NU, IS, CLea, POnea): KBTS_C4(NU, IS, CLea, POea): KBTS_C4(NU, IS, CLea, PRnea): KBTS_C4(NU, IS, CLea, PRea):
|
|
KBTS_C4(NU, IS, CPnea, POnea): KBTS_C4(NU, IS, CPnea, POea): KBTS_C4(NU, IS, CPnea, PRnea): KBTS_C4(NU, IS, CPnea, PRea):
|
|
KBTS_C4(NU, IS, CPea, POnea): KBTS_C4(NU, IS, CPea, POea): KBTS_C4(NU, IS, CPea, PRnea): KBTS_C4(NU, IS, CPea, PRea):
|
|
KBTS_LINE_UNBREAK(0, 1); break;
|
|
|
|
KBTS_C4(POea, OPea, IS, NU): KBTS_C4(POea, OPnea, IS, NU): KBTS_C4(POnea, OPea, IS, NU): KBTS_C4(POnea, OPnea, IS, NU):
|
|
KBTS_C4(PRea, OPea, IS, NU): KBTS_C4(PRea, OPnea, IS, NU): KBTS_C4(PRnea, OPea, IS, NU): KBTS_C4(PRnea, OPnea, IS, NU):
|
|
KBTS_LINE_UNBREAK(0, 3); break;
|
|
}
|
|
|
|
if(StartOfText)
|
|
{
|
|
// Never break lines.
|
|
KBTS_LINE_UNBREAK(5, 1);
|
|
// Always break graphemes.
|
|
KBTS_BREAK(KBTS_BREAK_FLAG_GRAPHEME, 1);
|
|
}
|
|
|
|
#undef KBTS_C1
|
|
#undef KBTS_C2
|
|
#undef KBTS_C3
|
|
#undef KBTS_C4
|
|
#undef KBTS_REQUIRED_LINE_BREAK
|
|
#undef KBTS_LINE_BREAK
|
|
#undef KBTS_LINE_UNBREAK
|
|
|
|
{
|
|
kbts_u64 EffectiveLineBreaks = LineBreaks & ~(LineUnbreaks | LineUnbreaksAsync);
|
|
|
|
kbts__DoLineBreak(State, PositionOffset3 + LineBreak3PositionOffset, EffectiveLineBreaks >> 48);
|
|
if(EndOfText)
|
|
{
|
|
kbts__DoLineBreak(State, PositionOffset2 + LineBreak2PositionOffset, EffectiveLineBreaks >> 32);
|
|
{ // @Cleanup: This is the same flag code as DoLineBreak, but we want to use FlagState buffering for this.
|
|
// The only places where we want to manually call DoBreak is for asynchronous/buffered guys.
|
|
kbts_u8 FlushedLineFlags = 0;
|
|
if((EffectiveLineBreaks >> 16) & KBTS__LINE_BREAK_ALLOWED_MASK) FlushedLineFlags |= KBTS_BREAK_FLAG_LINE_SOFT;
|
|
if((EffectiveLineBreaks >> 16) & KBTS__LINE_BREAK_REQUIRED_MASK) FlushedLineFlags |= KBTS_BREAK_FLAG_LINE_HARD;
|
|
|
|
KBTS_BREAK(FlushedLineFlags, 1);
|
|
}
|
|
// Lines are never broken after the end of text.
|
|
}
|
|
}
|
|
|
|
State->LineBreaks = LineBreaks;
|
|
State->LineUnbreaks = LineUnbreaks;
|
|
State->LineBreak2PositionOffset = 0;
|
|
State->LineBreak3PositionOffset = LineBreak2PositionOffset;
|
|
State->LastLineBreakClass = LineBreakClass;
|
|
State->LineBreakHistory = LineBreakHistory;
|
|
|
|
if(0)
|
|
{
|
|
LineBreakAbsorbCharacter:;
|
|
// The buffered positions lag behind the current codepoint, so we have to step them
|
|
// by the increments of the codepoints they lag by, not by PositionIncrement.
|
|
// Increments do not have to be uniform, so these can differ.
|
|
State->LineBreak2PositionOffset += PositionOffset2;
|
|
State->LineBreak3PositionOffset += (kbts_s16)(PositionOffset3 - PositionOffset2);
|
|
}
|
|
|
|
// This always gets updated.
|
|
State->LineUnbreaksAsync = LineUnbreaksAsync;
|
|
}
|
|
|
|
// Script breaking.
|
|
if(EndOfText)
|
|
{
|
|
FlushFlags |= KBTS__BREAK_FLUSH_FLAG_SCRIPT;
|
|
}
|
|
|
|
if(CodepointScriptCount < 2)
|
|
{
|
|
// We special case this entire path because, supposedly, this is the common case.
|
|
kbts_u8 CodepointScript = (kbts_u8)CodepointScriptOffset;
|
|
|
|
if((CodepointScript == KBTS_SCRIPT_DONT_KNOW) ||
|
|
(CodepointScript == KBTS_SCRIPT_DEFAULT) ||
|
|
(CodepointScript == KBTS_SCRIPT_DEFAULT2))
|
|
{
|
|
// Nothing to do.
|
|
}
|
|
else
|
|
{
|
|
kbts_u32 ScriptSetMatch = 0;
|
|
KBTS__FOR(ScriptIndex, 0, ScriptCount)
|
|
{
|
|
ScriptSetMatch |= (ScriptSet[ScriptIndex] == CodepointScript);
|
|
}
|
|
|
|
if(!ScriptSetMatch)
|
|
{
|
|
FlushFlags |= KBTS__BREAK_FLUSH_FLAG_SCRIPT;
|
|
}
|
|
|
|
ScriptCount = 1;
|
|
ScriptSet[0] = CodepointScript;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Refine the script set.
|
|
kbts_un NewScriptCount = 0;
|
|
|
|
{
|
|
kbts_un CodepointScriptIndex = 0;
|
|
kbts_un ScriptIndex = 0;
|
|
|
|
while((ScriptIndex < ScriptCount) &&
|
|
(CodepointScriptIndex < CodepointScriptCount))
|
|
{
|
|
kbts_u8 CodepointScript = CodepointScripts[CodepointScriptIndex];
|
|
kbts_u8 Script = ScriptSet[ScriptIndex];
|
|
|
|
if(CodepointScript < Script)
|
|
{
|
|
CodepointScriptIndex += 1;
|
|
}
|
|
else if(Script < CodepointScript)
|
|
{
|
|
ScriptIndex += 1;
|
|
}
|
|
else
|
|
{
|
|
ScriptSet[NewScriptCount++] = Script;
|
|
|
|
CodepointScriptIndex += 1;
|
|
ScriptIndex += 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
if(!NewScriptCount)
|
|
{
|
|
FlushFlags |= KBTS__BREAK_FLUSH_FLAG_SCRIPT;
|
|
|
|
KBTS__FOR(CodepointScriptIndex, 0, CodepointScriptCount)
|
|
{
|
|
ScriptSet[CodepointScriptIndex] = CodepointScripts[CodepointScriptIndex];
|
|
}
|
|
ScriptCount = (kbts_u32)CodepointScriptCount;
|
|
}
|
|
else
|
|
{
|
|
ScriptCount = (kbts_u32)NewScriptCount;
|
|
}
|
|
}
|
|
|
|
// Direction breaking.
|
|
if(EndOfText)
|
|
{
|
|
BidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_NI;
|
|
}
|
|
|
|
if(BidirectionalClass != KBTS_UNICODE_BIDIRECTIONAL_CLASS_BN) // Formatting characters should be ignored.
|
|
{
|
|
switch(BidirectionalClass)
|
|
{
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_NSM: BidirectionalClass = Bidirectional1; break;
|
|
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_L:
|
|
Flags &= ~(KBTS_BREAK_STATE_FLAG_SAW_R_AFTER_L | KBTS_BREAK_STATE_FLAG_SAW_AL_AFTER_LR);
|
|
break;
|
|
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_R:
|
|
Flags |= KBTS_BREAK_STATE_FLAG_SAW_R_AFTER_L;
|
|
Flags &= ~KBTS_BREAK_STATE_FLAG_SAW_AL_AFTER_LR;
|
|
break;
|
|
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_AL:
|
|
// Rule W3 occurs before W7, so we treat AL as R for the purposes of rule W7.
|
|
Flags |= (KBTS_BREAK_STATE_FLAG_SAW_AL_AFTER_LR | KBTS_BREAK_STATE_FLAG_SAW_R_AFTER_L);
|
|
BidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_R;
|
|
break;
|
|
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_EN:
|
|
if(Flags & KBTS_BREAK_STATE_FLAG_SAW_AL_AFTER_LR)
|
|
{
|
|
BidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_AN;
|
|
goto CaseAn;
|
|
}
|
|
if((Bidirectional2 == KBTS_UNICODE_BIDIRECTIONAL_CLASS_EN) &&
|
|
((Bidirectional1 == KBTS_UNICODE_BIDIRECTIONAL_CLASS_ES) ||
|
|
(Bidirectional1 == KBTS_UNICODE_BIDIRECTIONAL_CLASS_CS)))
|
|
{
|
|
Bidirectional1 = KBTS_UNICODE_BIDIRECTIONAL_CLASS_EN;
|
|
}
|
|
|
|
// We test State->ParagraphDirection here because we do not want
|
|
// digits to coerce to L when the paragrpah direction is unknown.
|
|
// It might be cleaner to explicitly store the last strong direction seen,
|
|
// with DONT_KNOW as an option.
|
|
// @Cleanup
|
|
if(State->ParagraphDirection &&
|
|
!(Flags & KBTS_BREAK_STATE_FLAG_SAW_R_AFTER_L))
|
|
{
|
|
BidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_L;
|
|
}
|
|
break;
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_AN:
|
|
CaseAn:;
|
|
if((Bidirectional2 == KBTS_UNICODE_BIDIRECTIONAL_CLASS_AN) &&
|
|
(Bidirectional1 == KBTS_UNICODE_BIDIRECTIONAL_CLASS_CS))
|
|
{
|
|
Bidirectional1 = KBTS_UNICODE_BIDIRECTIONAL_CLASS_AN;
|
|
}
|
|
break;
|
|
case KBTS_UNICODE_BIDIRECTIONAL_CLASS_ET:
|
|
if(Bidirectional1 == KBTS_UNICODE_BIDIRECTIONAL_CLASS_EN)
|
|
{
|
|
BidirectionalClass = KBTS_UNICODE_BIDIRECTIONAL_CLASS_EN;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// This rule has a lower priority than AN CS AN -> AN AN AN, so we have to wait until slot 1 to apply it.
|
|
if(KBTS__IN_SET(Bidirectional1, KBTS__SET32((KBTS_UNICODE_BIDIRECTIONAL_CLASS_ET)
|
|
(KBTS_UNICODE_BIDIRECTIONAL_CLASS_ES)
|
|
(KBTS_UNICODE_BIDIRECTIONAL_CLASS_CS))))
|
|
{
|
|
Bidirectional1 = KBTS_UNICODE_BIDIRECTIONAL_CLASS_NI;
|
|
}
|
|
|
|
if(Bidirectional1 == KBTS_UNICODE_BIDIRECTIONAL_CLASS_NI)
|
|
{
|
|
if(!HardLineBreak &&
|
|
KBTS__IN_SET(BidirectionalClass, KBTS__SET32((KBTS_UNICODE_BIDIRECTIONAL_CLASS_NI)
|
|
(KBTS_UNICODE_BIDIRECTIONAL_CLASS_ET)
|
|
(KBTS_UNICODE_BIDIRECTIONAL_CLASS_ES)
|
|
(KBTS_UNICODE_BIDIRECTIONAL_CLASS_CS))))
|
|
{
|
|
// All of these input classes end up resolving to NI later on anyway if they are preceded by NI.
|
|
// We are in a situation where:
|
|
// - We have an NI in slot 1
|
|
// - The direction in slot 0 will eventually resolve to NI due to the NI in slot 1
|
|
// - Storing multiple NIs in our shift buffer is redundant, because no rule necessitates multiple NIs
|
|
// - NIs don't interact with anything, except that they resolve when surrounded by strong characters
|
|
// - NIs are resolved in groups. As per the Unicode specification:
|
|
// N1. A sequence of NIs takes the direction of the surrounding strong text if the text on both
|
|
// sides has the same direction.
|
|
// This means we can merge the current bidirectional class with the preceding NI, bump the offset,
|
|
// and it just works.
|
|
goto SkipDirectionBreak;
|
|
}
|
|
else if(((Bidirectional2 == KBTS_UNICODE_BIDIRECTIONAL_CLASS_R) ||
|
|
(BidirectionalClass == KBTS_UNICODE_BIDIRECTIONAL_CLASS_R)) &&
|
|
KBTS__IN_SET(Bidirectional2, KBTS__SET32((KBTS_UNICODE_BIDIRECTIONAL_CLASS_R)
|
|
(KBTS_UNICODE_BIDIRECTIONAL_CLASS_AN)
|
|
(KBTS_UNICODE_BIDIRECTIONAL_CLASS_EN))) &&
|
|
KBTS__IN_SET(BidirectionalClass, KBTS__SET32((KBTS_UNICODE_BIDIRECTIONAL_CLASS_R)
|
|
(KBTS_UNICODE_BIDIRECTIONAL_CLASS_AN)
|
|
(KBTS_UNICODE_BIDIRECTIONAL_CLASS_EN))))
|
|
{
|
|
// From the Unicode Bidirectional Algorithm:
|
|
// European and Arabic numbers act as if they were R in terms of their influence on NIs.
|
|
//
|
|
// Note that the way we resolve digits is different from the way the Unicode standard specifies it.
|
|
// This is because the standard assumes the paragraph direction is always known, whereas in our case it isn't.
|
|
// We want neutral surrounded by uncoerced digits to resolve to the paragraph direction, which may be DONT_KNOW.
|
|
Bidirectional1 = KBTS_UNICODE_BIDIRECTIONAL_CLASS_R;
|
|
}
|
|
else if((Bidirectional2 == KBTS_UNICODE_BIDIRECTIONAL_CLASS_L) &&
|
|
(BidirectionalClass == KBTS_UNICODE_BIDIRECTIONAL_CLASS_L))
|
|
{
|
|
Bidirectional1 = KBTS_UNICODE_BIDIRECTIONAL_CLASS_L;
|
|
}
|
|
else
|
|
{
|
|
if (State->ParagraphDirection == KBTS_DIRECTION_LTR) Bidirectional1 = KBTS_UNICODE_BIDIRECTIONAL_CLASS_L;
|
|
else if(State->ParagraphDirection == KBTS_DIRECTION_RTL) Bidirectional1 = KBTS_UNICODE_BIDIRECTIONAL_CLASS_R;
|
|
// Otherwise, don't coerce to anything.
|
|
}
|
|
}
|
|
|
|
FlushFlags |= KBTS__BREAK_FLUSH_FLAG_DIRECTION_2 |
|
|
KBTS__BREAK_FLUSH_FLAG_DIRECTION_1;
|
|
if(EndOfText)
|
|
{
|
|
FlushFlags |= KBTS__BREAK_FLUSH_FLAG_DIRECTION_1;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
SkipDirectionBreak:;
|
|
State->Bidirectional1PositionOffset -= (kbts_s16)PositionIncrement;
|
|
}
|
|
|
|
{ // Grapheme breaking.
|
|
if(EndOfText && !StartOfText)
|
|
{
|
|
KBTS_BREAK(KBTS_BREAK_FLAG_GRAPHEME, 1);
|
|
State->GraphemeBreakState = KBTS_GRAPHEME_BREAK_STATE_START;
|
|
}
|
|
else
|
|
{
|
|
kbts_u8 GraphemeBreakState = kbts_GraphemeBreakTransition[GraphemeBreakClass][State->GraphemeBreakState];
|
|
switch(GraphemeBreakState)
|
|
{
|
|
case KBTS_GRAPHEME_BREAK_STATE_b01: KBTS_BREAK2(KBTS_BREAK_FLAG_GRAPHEME, 1, 0); GraphemeBreakState = KBTS_GRAPHEME_BREAK_STATE_START; break;
|
|
case KBTS_GRAPHEME_BREAK_STATE_b0: KBTS_BREAK(KBTS_BREAK_FLAG_GRAPHEME, 0); GraphemeBreakState = KBTS_GRAPHEME_BREAK_STATE_START; break;
|
|
|
|
case KBTS_GRAPHEME_BREAK_STATE_b1:
|
|
case KBTS_GRAPHEME_BREAK_STATE_b1toCR:
|
|
case KBTS_GRAPHEME_BREAK_STATE_b1toL:
|
|
case KBTS_GRAPHEME_BREAK_STATE_b1toLVxV:
|
|
case KBTS_GRAPHEME_BREAK_STATE_b1toLVTxT:
|
|
case KBTS_GRAPHEME_BREAK_STATE_b1toIndicConsonantxIndicLinker:
|
|
case KBTS_GRAPHEME_BREAK_STATE_PADDING0: // Padding values are just here to help the compiler.
|
|
case KBTS_GRAPHEME_BREAK_STATE_PADDING1:
|
|
case KBTS_GRAPHEME_BREAK_STATE_b1toExtendedPictographic:
|
|
case KBTS_GRAPHEME_BREAK_STATE_PADDING2:
|
|
case KBTS_GRAPHEME_BREAK_STATE_PADDING3:
|
|
case KBTS_GRAPHEME_BREAK_STATE_b1toRI:
|
|
case KBTS_GRAPHEME_BREAK_STATE_b1toSKIP:
|
|
KBTS_BREAK(KBTS_BREAK_FLAG_GRAPHEME, 1);
|
|
GraphemeBreakState -= KBTS_GRAPHEME_BREAK_STATE_b1;
|
|
}
|
|
|
|
State->GraphemeBreakState = GraphemeBreakState;
|
|
}
|
|
}
|
|
|
|
// Word breaks.
|
|
// We buffer 3 characters for word breaks.
|
|
// Each character gets 3 bits (padded to 4) representing 3 levels of priority.
|
|
#define KBTS_WORD_BREAK_BITS(Priority, Position) (((1u << ((Priority) + 1)) - 1) << ((Position) * 4))
|
|
#define KBTS_C2(A, B) case (KBTS_WORD_BREAK_CLASS_##A << 8) | (KBTS_WORD_BREAK_CLASS_##B)
|
|
#define KBTS_C3(A, B, C) case (KBTS_WORD_BREAK_CLASS_##A << 16) | (KBTS_WORD_BREAK_CLASS_##B << 8) | (KBTS_WORD_BREAK_CLASS_##C)
|
|
|
|
// Ignore [EX FO ZWJ] after ^[_sot_ CR LF NL].
|
|
// @Cleanup: This is the only time we explicitly use EX and FO. They can be merged.
|
|
if(KBTS__IN_SET(WordBreakClass, KBTS__SET32((KBTS_WORD_BREAK_CLASS_EX)(KBTS_WORD_BREAK_CLASS_FO)(KBTS_WORD_BREAK_CLASS_ZWJ))) &&
|
|
!KBTS__IN_SET(LastWordBreakClass, KBTS__SET32((KBTS_WORD_BREAK_CLASS_SOT)(KBTS_WORD_BREAK_CLASS_CR)(KBTS_WORD_BREAK_CLASS_LF)(KBTS_WORD_BREAK_CLASS_NL))))
|
|
{
|
|
// The buffered position lags behind the current codepoint, so we have to step it
|
|
// by the increment of the codepoint it lags by, not by PositionIncrement.
|
|
// Increments do not have to be uniform, so these can differ.
|
|
WordBreak2PositionOffset += PositionOffset2;
|
|
State->WordBreak2PositionOffset = WordBreak2PositionOffset;
|
|
}
|
|
else
|
|
{
|
|
kbts_u32 WordBreaks = State->WordBreaks << 4;
|
|
kbts_u32 WordUnbreaks = State->WordUnbreaks << 4;
|
|
WordBreakHistory = (WordBreakHistory << 8) | WordBreakClass;
|
|
|
|
WordBreaks |= KBTS_WORD_BREAK_BITS(0, 1) | KBTS_WORD_BREAK_BITS(0, 0);
|
|
if(StartOfText)
|
|
{
|
|
WordBreaks |= KBTS_WORD_BREAK_BITS(2, 1);
|
|
}
|
|
|
|
if(KBTS__IN_SET(WordBreakClass, KBTS__SET32((KBTS_WORD_BREAK_CLASS_CR)(KBTS_WORD_BREAK_CLASS_LF)(KBTS_WORD_BREAK_CLASS_NL))))
|
|
{
|
|
WordBreaks |= KBTS_WORD_BREAK_BITS(1, 1) | KBTS_WORD_BREAK_BITS(1, 0);
|
|
}
|
|
else if(KBTS__IN_SET(WordBreakClass, KBTS__SET32((KBTS_WORD_BREAK_CLASS_Oep)(KBTS_WORD_BREAK_CLASS_ALep))))
|
|
{
|
|
// ZWJ x {Extended_Pictographic}
|
|
if(LastWordBreakClassIncludingIgnored == KBTS_WORD_BREAK_CLASS_ZWJ)
|
|
{
|
|
WordUnbreaks |= KBTS_WORD_BREAK_BITS(0, 1);
|
|
}
|
|
}
|
|
|
|
switch(WordBreakHistory & 0xFFFF)
|
|
{
|
|
KBTS_C2(CR, LF): WordUnbreaks |= KBTS_WORD_BREAK_BITS(1, 1); break;
|
|
|
|
KBTS_C2(WSS, WSS):
|
|
// WSS x WSS is a special rule, because it is supposed to happen _before_ ignores.
|
|
if(WordBreak2PositionOffset >= 0) WordUnbreaks |= KBTS_WORD_BREAK_BITS(0, 1);
|
|
break;
|
|
|
|
// (RI RI)* RI x RI
|
|
KBTS_C2(RI, RI):
|
|
WordBreakHistory = 0;
|
|
KBTS__FALLTHROUGH;
|
|
KBTS_C2(HL, SQ):
|
|
KBTS_C2(ALnep, ALnep): KBTS_C2(ALnep, ALep): KBTS_C2(ALnep, HL): KBTS_C2(ALnep, NM): KBTS_C2(ALnep, ENL):
|
|
KBTS_C2(ALep, ALnep): KBTS_C2(ALep, ALep): KBTS_C2(ALep, HL): KBTS_C2(ALep, NM): KBTS_C2(ALep, ENL):
|
|
KBTS_C2(HL, ALnep): KBTS_C2(HL, ALep): KBTS_C2(HL, HL): KBTS_C2(HL, NM): KBTS_C2(HL, ENL):
|
|
KBTS_C2(NM, ALnep): KBTS_C2(NM, ALep): KBTS_C2(NM, HL): KBTS_C2(NM, NM): KBTS_C2(NM, ENL):
|
|
KBTS_C2(KA, KA): KBTS_C2(KA, ENL):
|
|
KBTS_C2(ENL, ALnep): KBTS_C2(ENL, ALep): KBTS_C2(ENL, HL): KBTS_C2(ENL, NM): KBTS_C2(ENL, KA): KBTS_C2(ENL, ENL):
|
|
WordUnbreaks |= KBTS_WORD_BREAK_BITS(0, 1); break;
|
|
}
|
|
|
|
switch(WordBreakHistory & 0xFFFFFF)
|
|
{
|
|
KBTS_C3(ALnep, ML, ALnep): KBTS_C3(ALnep, ML, ALep): KBTS_C3(ALnep, ML, HL):
|
|
KBTS_C3(ALnep, MNL, ALnep): KBTS_C3(ALnep, MNL, ALep): KBTS_C3(ALnep, MNL, HL):
|
|
KBTS_C3(ALnep, SQ, ALnep): KBTS_C3(ALnep, SQ, ALep): KBTS_C3(ALnep, SQ, HL):
|
|
KBTS_C3(ALep, ML, ALnep): KBTS_C3(ALep, ML, ALep): KBTS_C3(ALep, ML, HL):
|
|
KBTS_C3(ALep, MNL, ALnep): KBTS_C3(ALep, MNL, ALep): KBTS_C3(ALep, MNL, HL):
|
|
KBTS_C3(ALep, SQ, ALnep): KBTS_C3(ALep, SQ, ALep): KBTS_C3(ALep, SQ, HL):
|
|
KBTS_C3(HL, ML, ALnep): KBTS_C3(HL, ML, ALep): KBTS_C3(HL, ML, HL):
|
|
KBTS_C3(HL, MNL, ALnep): KBTS_C3(HL, MNL, ALep): KBTS_C3(HL, MNL, HL):
|
|
KBTS_C3(HL, SQ, ALnep): KBTS_C3(HL, SQ, ALep): KBTS_C3(HL, SQ, HL):
|
|
KBTS_C3(HL, DQ, HL):
|
|
KBTS_C3(NM, MN, NM): KBTS_C3(NM, MNL, NM): KBTS_C3(NM, SQ, NM):
|
|
WordUnbreaks |= KBTS_WORD_BREAK_BITS(0, 1) | KBTS_WORD_BREAK_BITS(0, 2); break;
|
|
}
|
|
|
|
kbts_u32 EffectiveWordBreaks = WordBreaks & ~WordUnbreaks;
|
|
if(EffectiveWordBreaks & KBTS_WORD_BREAK_BITS(2, 2))
|
|
{
|
|
kbts__DoBreak(State, PositionOffset2 + WordBreak2PositionOffset, KBTS_BREAK_FLAG_WORD, 0, 0, 0);
|
|
}
|
|
if(EndOfText)
|
|
{
|
|
// Always break at the end of the text.
|
|
KBTS_BREAK(KBTS_BREAK_FLAG_WORD, 1);
|
|
// Do not break after the end of the text.
|
|
}
|
|
|
|
State->WordBreaks = (kbts_u16)WordBreaks;
|
|
State->WordUnbreaks = (kbts_u16)WordUnbreaks;
|
|
State->LastWordBreakClass = WordBreakClass;
|
|
State->WordBreak2PositionOffset = 0;
|
|
State->WordBreakHistory = WordBreakHistory;
|
|
}
|
|
State->LastWordBreakClassIncludingIgnored = WordBreakClass;
|
|
#undef KBTS_WORD_BREAK_BITS
|
|
#undef KBTS_C2
|
|
#undef KBTS_C3
|
|
|
|
// We flush scripts late because hard line breaks also want to flush scripts.
|
|
//
|
|
// If we have no active script at all, then either we are at the very beginning of the text,
|
|
// or we have only seen common/inherited scripts so far.
|
|
// Either way, we want everything before us to coerce to our type, so don't actually break,
|
|
// and do not update the script break position.
|
|
if(FlushFlags & KBTS__BREAK_FLUSH_FLAG_SCRIPT)
|
|
{
|
|
if(ScriptCountAtBeginningOfUpdate)
|
|
{
|
|
kbts__DoBreak(State, ScriptPositionOffset, KBTS_BREAK_FLAG_SCRIPT, 0, 0, BreakScript);
|
|
ScriptPositionOffset = 0;
|
|
}
|
|
|
|
if(HardLineBreak)
|
|
{
|
|
// Put the next script break after the newline.
|
|
ScriptPositionOffset = (kbts_s16)PositionIncrement;
|
|
}
|
|
}
|
|
|
|
if(FlushFlags & KBTS__BREAK_FLUSH_FLAG_DIRECTION_1)
|
|
{
|
|
kbts__FlushDirection(State, &LastDirection, Bidirectional1, Bidirectional1PositionOffset);
|
|
}
|
|
|
|
if(FlushFlags & KBTS__BREAK_FLUSH_FLAG_DIRECTION_PARAGRAPH)
|
|
{
|
|
// Reset direction state for the new paragraph.
|
|
Bidirectional1 = 0;
|
|
|
|
// Clear direction history.
|
|
// This is necessary to uphold the invariant that the first direction break is always
|
|
// on the first character of a paragraph.
|
|
LastDirection = 0;
|
|
|
|
// CAUTION: This needs to be updated _after_ calling kbts__FlushDirection!
|
|
// Alternatively, we could load ParagraphStartPosition into a variable at the start of this function.
|
|
State->ParagraphStartPosition = State->CurrentPosition + 1;
|
|
|
|
kbts__BreakStateStartParagraph(State);
|
|
|
|
if(State->UserParagraphDirection == KBTS_DIRECTION_DONT_KNOW)
|
|
{
|
|
kbts__DoBreak(State, 1, KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION, 0, KBTS_DIRECTION_DONT_KNOW, 0);
|
|
}
|
|
}
|
|
|
|
ScriptPositionOffset -= (kbts_s16)PositionIncrement;
|
|
|
|
// This is where we flush the normal breaks that don't need any special position adjustment.
|
|
kbts__DoBreak(State, PositionOffset3, (FlagState >> 24) & 0xFF, 0, 0, 0);
|
|
if(EndOfText)
|
|
{
|
|
kbts__DoBreak(State, PositionOffset2, (FlagState >> 16) & 0xFF, 0, 0, 0);
|
|
kbts__DoBreak(State, 0, (FlagState >> 8) & 0xFF, 0, 0, 0);
|
|
kbts__DoBreak(State, (int)PositionIncrement, FlagState & 0xFF, 0, 0, 0);
|
|
}
|
|
|
|
State->FlagState = FlagState;
|
|
Flags |= KBTS_BREAK_STATE_FLAG_STARTED;
|
|
if(EndOfText) Flags |= KBTS_BREAK_STATE_FLAG_END;
|
|
State->Flags = Flags;
|
|
State->PositionOffset2 = (kbts_s16)-(int)PositionIncrement;
|
|
State->PositionOffset3 = (kbts_s16)(PositionOffset2 - (int)PositionIncrement);
|
|
State->CurrentPosition += PositionIncrement;
|
|
|
|
if(FlushFlags & KBTS__BREAK_FLUSH_FLAG_DIRECTION_2)
|
|
{
|
|
// Only update the buffer if we've actually flushed something.
|
|
State->BidirectionalClass2 = Bidirectional1;
|
|
State->BidirectionalClass1 = BidirectionalClass;
|
|
State->Bidirectional1PositionOffset = (kbts_s16)-(int)PositionIncrement;
|
|
}
|
|
State->LastDirection = (kbts_u8)LastDirection;
|
|
|
|
State->ScriptPositionOffset = ScriptPositionOffset;
|
|
State->ScriptCount = ScriptCount;
|
|
#undef KBTS_BREAK
|
|
#undef KBTS_BREAK2
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_BreakEnd(kbts_break_state *State)
|
|
{
|
|
// We pass 3, aka. ASCII end-of-text, at the end of text.
|
|
kbts__BreakAddCodepoint(State, 3, 0, 1);
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_BreakAddCodepoint(kbts_break_state *State, int Codepoint, int PositionIncrement, int EndOfText)
|
|
{
|
|
kbts__BreakAddCodepoint(State, Codepoint, (kbts_u32)PositionIncrement, 0);
|
|
|
|
if(EndOfText)
|
|
{
|
|
kbts_BreakEnd(State);
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_Break(kbts_break_state *State, kbts_break *Break)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(State->BreakCount)
|
|
{
|
|
kbts_break *ToFlush = &State->Breaks[--State->BreakCount];
|
|
|
|
*Break = *ToFlush;
|
|
Result = 1;
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_GuessTextProperties(void *Text, int TextSizeInBytes, kbts_text_format Format, kbts_direction *Direction_, kbts_script *Script_)
|
|
{
|
|
kbts_script Script = KBTS_SCRIPT_DONT_KNOW;
|
|
kbts_direction Direction = KBTS_DIRECTION_DONT_KNOW;
|
|
|
|
if(Text && (TextSizeInBytes > 0) && Format)
|
|
{
|
|
const char *At = (const char *)Text;
|
|
const char *End = (const char *)Text + TextSizeInBytes;
|
|
|
|
kbts_break_state BreakState;
|
|
kbts_BreakBegin(&BreakState, KBTS_DIRECTION_DONT_KNOW, KBTS_JAPANESE_LINE_BREAK_STYLE_NORMAL, 0);
|
|
|
|
while(((Script == KBTS_SCRIPT_DONT_KNOW) ||
|
|
(Direction == KBTS_DIRECTION_DONT_KNOW)) &&
|
|
(At < End))
|
|
{
|
|
kbts_u32 Codepoint = 0;
|
|
kbts_u32 PositionIncrement = 1;
|
|
|
|
switch(Format)
|
|
{
|
|
case KBTS_TEXT_FORMAT_UTF32:
|
|
{
|
|
Codepoint = *(kbts_u32 *)At;
|
|
PositionIncrement = 4;
|
|
|
|
} break;
|
|
|
|
case KBTS_TEXT_FORMAT_UTF8:
|
|
{
|
|
kbts_decode Decode = kbts_DecodeUtf8(At, End - At);
|
|
|
|
PositionIncrement = Decode.SourceCharactersConsumed;
|
|
|
|
if(Decode.Valid)
|
|
{
|
|
Codepoint = Decode.Codepoint;
|
|
}
|
|
} break;
|
|
}
|
|
|
|
kbts_BreakAddCodepoint(&BreakState, Codepoint, PositionIncrement, (At + PositionIncrement) == End);
|
|
kbts_break Break;
|
|
while(kbts_Break(&BreakState, &Break))
|
|
{
|
|
if((Script == KBTS_SCRIPT_DONT_KNOW) && (Break.Flags & KBTS_BREAK_FLAG_SCRIPT))
|
|
{
|
|
Script = Break.Script;
|
|
}
|
|
|
|
if((Direction == KBTS_DIRECTION_DONT_KNOW) && (Break.Flags & KBTS_BREAK_FLAG_DIRECTION))
|
|
{
|
|
Direction = Break.Direction;
|
|
}
|
|
}
|
|
|
|
At += PositionIncrement;
|
|
}
|
|
}
|
|
|
|
if(Script_)
|
|
{
|
|
*Script_ = Script;
|
|
}
|
|
|
|
if(Direction_)
|
|
{
|
|
*Direction_ = Direction;
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_GuessTextPropertiesUtf32(const int *Utf32, int Utf32Count, kbts_direction *Direction, kbts_script *Script)
|
|
{
|
|
kbts_GuessTextProperties((void *)Utf32, sizeof(int) * Utf32Count, KBTS_TEXT_FORMAT_UTF32, Direction, Script);
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_GuessTextPropertiesUtf8(const char *Utf8, int Utf8Length, kbts_direction *Direction, kbts_script *Script)
|
|
{
|
|
kbts_GuessTextProperties((void *)Utf8, Utf8Length, KBTS_TEXT_FORMAT_UTF8, Direction, Script);
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_BreakBegin(kbts_break_state *State, kbts_direction ParagraphDirection, kbts_japanese_line_break_style JapaneseLineBreakStyle, kbts_break_config_flags ConfigFlags)
|
|
{
|
|
if(State)
|
|
{
|
|
// @Speed: Clearing all the brackets isn't great.
|
|
KBTS_MEMSET(State, 0, sizeof(*State));
|
|
State->UserParagraphDirection = (kbts_u8)ParagraphDirection;
|
|
State->ParagraphDirection = (kbts_u8)ParagraphDirection;
|
|
State->JapaneseLineBreakStyle = JapaneseLineBreakStyle;
|
|
State->ConfigFlags = ConfigFlags;
|
|
|
|
// Force a direction break at the start of the text.
|
|
State->LastDirection = KBTS_DIRECTION_COUNT;
|
|
|
|
// These should be out-of-bounds while the buffers haven't filled up.
|
|
State->PositionOffset2 = -100;
|
|
State->PositionOffset3 = -100;
|
|
State->WordBreak2PositionOffset = -100;
|
|
State->LineBreak2PositionOffset = -100;
|
|
State->LineBreak3PositionOffset = -100;
|
|
State->Bidirectional1PositionOffset = -100;
|
|
|
|
kbts__BreakStateStartParagraph(State);
|
|
|
|
if(ParagraphDirection)
|
|
{
|
|
kbts__DoBreak(State, 0, KBTS_BREAK_FLAG_PARAGRAPH_DIRECTION, 0, ParagraphDirection, 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_BreakEntireString(kbts_direction Direction, kbts_japanese_line_break_style JapaneseLineBreakStyle, kbts_break_config_flags ConfigFlags,
|
|
const void *Input, int InputSizeInBytes, kbts_text_format InputFormat,
|
|
kbts_break *Breaks, int IBreakCapacity, int *BreakCount,
|
|
kbts_break_flags *BreakFlags, int IBreakFlagCapacity, int *BreakFlagCount)
|
|
{
|
|
kbts_break_state BreakState = KBTS__ZERO;
|
|
kbts_BreakBegin(&BreakState, Direction, JapaneseLineBreakStyle, ConfigFlags);
|
|
|
|
char *InputElement = (char *)Input;
|
|
char *End = (char *)Input + InputSizeInBytes;
|
|
kbts_un BreaksWritten = 0;
|
|
kbts_un BreakCapacityNeeded = 0;
|
|
kbts_un MaxBreakPosition = 0;
|
|
kbts_un BreakCapacity = (kbts_un)IBreakCapacity;
|
|
kbts_un BreakFlagCapacity = (kbts_un)IBreakFlagCapacity;
|
|
|
|
if(BreakFlags && BreakFlagCapacity)
|
|
{
|
|
KBTS_MEMSET(BreakFlags, 0, sizeof(kbts_break_flags) * BreakFlagCapacity);
|
|
}
|
|
|
|
while(InputElement < End)
|
|
{
|
|
kbts_u32 Codepoint = 0;
|
|
kbts_un InputElementSize = 1;
|
|
kbts_un SourceCharacterCount = 1;
|
|
|
|
switch(InputFormat)
|
|
{
|
|
case KBTS_TEXT_FORMAT_UTF32:
|
|
{
|
|
Codepoint = *(kbts_u32 *)InputElement;
|
|
|
|
InputElementSize = sizeof(kbts_u32);
|
|
} break;
|
|
|
|
case KBTS_TEXT_FORMAT_UTF8:
|
|
{
|
|
kbts_decode Decode = kbts_DecodeUtf8(InputElement, End - InputElement);
|
|
|
|
if(Decode.Valid)
|
|
{
|
|
Codepoint = Decode.Codepoint;
|
|
|
|
InputElementSize = Decode.SourceCharactersConsumed;
|
|
SourceCharacterCount = Decode.SourceCharactersConsumed;
|
|
}
|
|
} break;
|
|
}
|
|
|
|
InputElement += InputElementSize;
|
|
|
|
kbts_BreakAddCodepoint(&BreakState, Codepoint, (kbts_u32)SourceCharacterCount, InputElement >= End);
|
|
kbts_break Break;
|
|
while(kbts_Break(&BreakState, &Break))
|
|
{
|
|
int Found = 0;
|
|
|
|
// @Speed: Binary search!
|
|
for(kbts_un ExistingBreakIndex = BreaksWritten - 1;
|
|
ExistingBreakIndex < BreaksWritten;
|
|
--ExistingBreakIndex)
|
|
{
|
|
kbts_break *Existing = &Breaks[ExistingBreakIndex];
|
|
|
|
if(Existing->Position == Break.Position)
|
|
{
|
|
Existing->Flags |= Break.Flags;
|
|
|
|
if(Break.Flags & KBTS_BREAK_FLAG_SCRIPT)
|
|
{
|
|
Existing->Script = Break.Script;
|
|
}
|
|
|
|
if(Break.Flags & KBTS_BREAK_FLAG_DIRECTION)
|
|
{
|
|
Existing->Direction = Break.Direction;
|
|
}
|
|
|
|
Found = 1;
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(!Found)
|
|
{
|
|
if(Breaks &&
|
|
(BreaksWritten < BreakCapacity))
|
|
{
|
|
Breaks[BreaksWritten++] = Break;
|
|
}
|
|
|
|
BreakCapacityNeeded += 1;
|
|
}
|
|
|
|
if(BreakFlags && ((kbts_u32)Break.Position < BreakFlagCapacity))
|
|
{
|
|
BreakFlags[Break.Position] |= Break.Flags;
|
|
}
|
|
|
|
MaxBreakPosition = KBTS__MAX(MaxBreakPosition, (kbts_u32)Break.Position);
|
|
}
|
|
}
|
|
|
|
if(BreakCount)
|
|
{
|
|
*BreakCount = (int)BreakCapacityNeeded;
|
|
}
|
|
if(BreakFlagCount)
|
|
{
|
|
*BreakFlagCount = (int)(MaxBreakPosition + 1);
|
|
}
|
|
}
|
|
|
|
KBTS_EXPORT void kbts_BreakEntireStringUtf32(kbts_direction Direction, kbts_japanese_line_break_style JapaneseLineBreakStyle, kbts_break_config_flags ConfigFlags,
|
|
const int *Utf32, int Utf32Count,
|
|
kbts_break *Breaks, int BreakCapacity, int *BreakCount,
|
|
kbts_break_flags *BreakFlags, int BreakFlagCapacity, int *BreakFlagCount)
|
|
{
|
|
kbts_BreakEntireString(Direction, JapaneseLineBreakStyle, ConfigFlags, Utf32, sizeof(int) * Utf32Count, KBTS_TEXT_FORMAT_UTF32, Breaks, BreakCapacity, BreakCount, BreakFlags, BreakFlagCapacity, BreakFlagCount);
|
|
}
|
|
KBTS_EXPORT void kbts_BreakEntireStringUtf8(kbts_direction Direction, kbts_japanese_line_break_style JapaneseLineBreakStyle, kbts_break_config_flags ConfigFlags,
|
|
const char *Utf8, int Utf8Length,
|
|
kbts_break *Breaks, int BreakCapacity, int *BreakCount,
|
|
kbts_break_flags *BreakFlags, int BreakFlagCapacity, int *BreakFlagCount)
|
|
{
|
|
kbts_BreakEntireString(Direction, JapaneseLineBreakStyle, ConfigFlags, Utf8, Utf8Length, KBTS_TEXT_FORMAT_UTF8, Breaks, BreakCapacity, BreakCount, BreakFlags, BreakFlagCapacity, BreakFlagCount);
|
|
}
|
|
|
|
KBTS_EXPORT kbts_decode kbts_DecodeUtf8(const char *Utf8, kbts_un Length)
|
|
{
|
|
kbts_decode Result = KBTS__ZERO;
|
|
const char *Utf8Start = Utf8;
|
|
|
|
if(Length)
|
|
{
|
|
kbts_u8 First = (kbts_u8)*Utf8++;
|
|
kbts_un FollowupCharacterCount = 0;
|
|
|
|
switch((First & 0xF0) >> 4)
|
|
{
|
|
case 0:
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
case 5:
|
|
case 6:
|
|
case 7:
|
|
{
|
|
Result.Codepoint = First & 0x7F;
|
|
Result.Valid = 1;
|
|
}
|
|
break;
|
|
|
|
case 0xC:
|
|
case 0xD:
|
|
{
|
|
FollowupCharacterCount = 1;
|
|
Result.Codepoint = First & 0x1F;
|
|
Result.Valid = 1;
|
|
}
|
|
break;
|
|
|
|
case 0xE:
|
|
{
|
|
FollowupCharacterCount = 2;
|
|
Result.Codepoint = First & 0xF;
|
|
Result.Valid = 1;
|
|
}
|
|
break;
|
|
|
|
case 0xF:
|
|
{
|
|
FollowupCharacterCount = 3;
|
|
Result.Codepoint = First & 7;
|
|
Result.Valid = 1;
|
|
}
|
|
break;
|
|
}
|
|
|
|
if(Length > FollowupCharacterCount)
|
|
{
|
|
KBTS__FOR(FollowupCharacterIndex, 0, FollowupCharacterCount)
|
|
{
|
|
kbts_u8 C = (kbts_u8)*Utf8++;
|
|
|
|
if((C & 0xC0) == 0x80)
|
|
{
|
|
Result.Codepoint = (Result.Codepoint << 6) | (C & 0x3F);
|
|
}
|
|
else
|
|
{
|
|
Result.Valid = 0;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Result.Valid = 0;
|
|
}
|
|
}
|
|
|
|
Result.SourceCharactersConsumed = (kbts_u32)(Utf8 - Utf8Start);
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_encode_utf8 kbts_EncodeUtf8(int Codepoint)
|
|
{
|
|
kbts_encode_utf8 Result = KBTS__ZERO;
|
|
|
|
if(Codepoint <= 0x7F)
|
|
{
|
|
Result.Encoded[0] = (char)Codepoint;
|
|
Result.EncodedLength = 1;
|
|
}
|
|
else if(Codepoint <= 0x7FF)
|
|
{
|
|
Result.Encoded[1] = (char)((Codepoint & 0x3F) | 0x80);
|
|
Result.Encoded[0] = (char)(((Codepoint >> 6) & 0x1F) | 0xC0);
|
|
Result.EncodedLength = 2;
|
|
}
|
|
else if(Codepoint <= 0xFFFF)
|
|
{
|
|
Result.Encoded[2] = (char)((Codepoint & 0x3F) | 0x80);
|
|
Result.Encoded[1] = (char)(((Codepoint >> 6) & 0x3F) | 0x80);
|
|
Result.Encoded[0] = (char)(((Codepoint >> 12) & 0xF) | 0xE0);
|
|
Result.EncodedLength = 3;
|
|
}
|
|
else if(Codepoint <= 0x10FFFF)
|
|
{
|
|
Result.Encoded[3] = (char)((Codepoint & 0x3F) | 0x80);
|
|
Result.Encoded[2] = (char)(((Codepoint >> 6) & 0x3F) | 0x80);
|
|
Result.Encoded[1] = (char)(((Codepoint >> 12) & 0x3F) | 0x80);
|
|
Result.Encoded[0] = (char)(((Codepoint >> 18) & 0x7) | 0xF0);
|
|
Result.EncodedLength = 4;
|
|
}
|
|
|
|
Result.Valid = Result.EncodedLength > 0;
|
|
return Result;
|
|
}
|
|
|
|
static int kbts__ShaperIsComplex(kbts_shaper Shaper)
|
|
{
|
|
int Result = Shaper != KBTS_SHAPER_DEFAULT; // @Incomplete?
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_ScriptIsComplex(kbts_script Script)
|
|
{
|
|
if(Script >= KBTS_SCRIPT_COUNT)
|
|
{
|
|
Script = KBTS_SCRIPT_DONT_KNOW;
|
|
}
|
|
|
|
kbts__script_properties *Properties = &kbts__ScriptProperties[Script];
|
|
int Result = kbts__ShaperIsComplex(Properties->Shaper);
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_WindowsIdsForLanguage(kbts_language Language, kbts_windows_language_id *Ids, int IdCapacity)
|
|
{
|
|
int Result = 0;
|
|
kbts_windows_language_id Id0, Id1, Id2, Id3, Id4;
|
|
|
|
#define KBTS__CASE1(KbtsLanguage, Id0_) case KBTS_LANGUAGE_##KbtsLanguage: Id0 = KBTS_WINDOWS_LANGUAGE_ID_##Id0_; goto Case1;
|
|
#define KBTS__CASE2(KbtsLanguage, Id0_, Id1_) case KBTS_LANGUAGE_##KbtsLanguage: Id0 = KBTS_WINDOWS_LANGUAGE_ID_##Id0_; Id1 = KBTS_WINDOWS_LANGUAGE_ID_##Id1_; goto Case2;
|
|
#define KBTS__CASE3(KbtsLanguage, Id0_, Id1_, Id2_) case KBTS_LANGUAGE_##KbtsLanguage: Id0 = KBTS_WINDOWS_LANGUAGE_ID_##Id0_; Id1 = KBTS_WINDOWS_LANGUAGE_ID_##Id1_; Id2 = KBTS_WINDOWS_LANGUAGE_ID_##Id2_; goto Case3;
|
|
#define KBTS__CASE4(KbtsLanguage, Id0_, Id1_, Id2_, Id3_) case KBTS_LANGUAGE_##KbtsLanguage: Id0 = KBTS_WINDOWS_LANGUAGE_ID_##Id0_; Id1 = KBTS_WINDOWS_LANGUAGE_ID_##Id1_; Id2 = KBTS_WINDOWS_LANGUAGE_ID_##Id2_; Id3 = KBTS_WINDOWS_LANGUAGE_ID_##Id3_; goto Case4;
|
|
#define KBTS__CASE5(KbtsLanguage, Id0_, Id1_, Id2_, Id3_, Id4_) case KBTS_LANGUAGE_##KbtsLanguage: Id0 = KBTS_WINDOWS_LANGUAGE_ID_##Id0_; Id1 = KBTS_WINDOWS_LANGUAGE_ID_##Id1_; Id2 = KBTS_WINDOWS_LANGUAGE_ID_##Id2_; Id3 = KBTS_WINDOWS_LANGUAGE_ID_##Id3_; Id4 = KBTS_WINDOWS_LANGUAGE_ID_##Id4_; goto Case5;
|
|
|
|
switch(Language)
|
|
{
|
|
KBTS__CASE2(AFRIKAANS, AFRIKAANS_SOUTH_AFRICA, AFRIKAANS);
|
|
KBTS__CASE2(ALBANIAN, ALBANIAN_ALBANIA, ALBANIAN);
|
|
KBTS__CASE2(ALSATIAN, ALSATIAN_FRANCE, ALSATIAN);
|
|
KBTS__CASE2(AMHARIC, AMHARIC_ETHIOPIA, AMHARIC);
|
|
|
|
case KBTS_LANGUAGE_ARABIC:
|
|
case KBTS_LANGUAGE_CYPRIOT_ARABIC:
|
|
{
|
|
Result = 17;
|
|
if(IdCapacity >= 17)
|
|
{
|
|
Ids[0] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_EGYPT;
|
|
Ids[1] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_SAUDI_ARABIA;
|
|
Ids[2] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_SYRIA;
|
|
Ids[3] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_UAE;
|
|
Ids[4] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_IRAQ;
|
|
Ids[5] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_QATAR;
|
|
Ids[6] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_YEMEN;
|
|
Ids[7] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_OMAN;
|
|
Ids[8] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_JORDAN;
|
|
Ids[9] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_MOROCCO;
|
|
Ids[10] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_ALGERIA;
|
|
Ids[11] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_TUNISIA;
|
|
Ids[12] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_BAHRAIN;
|
|
Ids[13] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_LEBANON;
|
|
Ids[14] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_LIBYA;
|
|
Ids[15] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC_KUWAIT;
|
|
Ids[16] = KBTS_WINDOWS_LANGUAGE_ID_ARABIC;
|
|
}
|
|
} break;
|
|
|
|
KBTS__CASE2(ARMENIAN, ARMENIAN_ARMENIA, ARMENIAN);
|
|
KBTS__CASE2(ASSAMESE, ASSAMESE_INDIA, ASSAMESE);
|
|
KBTS__CASE5(AZERBAIJANI, AZERBAIJANI_CYRILLIC_AZERBAIJAN, AZERBAIJANI_LATIN_AZERBAIJAN, AZERBAIJANI_CYRILLIC, AZERBAIJANI_LATIN_2, AZERBAIJANI_LATIN);
|
|
KBTS__CASE3(BANGLA, BANGLA_BANGLADESH, BANGLA_INDIA, BANGLA);
|
|
KBTS__CASE2(BASHKIR, BASHKIR_RUSSIA, BASHKIR);
|
|
KBTS__CASE2(BASQUE, BASQUE_SPAIN, BASQUE);
|
|
KBTS__CASE2(BELARUSIAN, BELARUSIAN_BELARUS, BELARUSIAN);
|
|
KBTS__CASE5(BOSNIAN, BOSNIAN_CYRILLIC_BOSNIA_HERZEGOVINA, BOSNIAN_CYRILLIC, BOSNIAN_LATIN_BOSNIA_HERZEGOVINA, BOSNIAN_LATIN_2, BOSNIAN_LATIN);
|
|
KBTS__CASE2(BRETON, BRETON_FRANCE, BRETON);
|
|
KBTS__CASE2(BULGARIAN, BULGARIAN_BULGARIA, BULGARIAN);
|
|
KBTS__CASE2(BURMESE, BURMESE_MYANMAR, BURMESE);
|
|
KBTS__CASE2(CATALAN, CATALAN_SPAIN, CATALAN);
|
|
KBTS__CASE3(CHEROKEE, CHEROKEE_UNITED_STATES, CHEROKEE_2, CHEROKEE);
|
|
KBTS__CASE4(CHINESE_SIMPLIFIED, CHINESE_SIMPLIFIED_PRC, CHINESE_SIMPLIFIED_SINGAPORE, CHINESE_SIMPLIFIED_2, CHINESE_SIMPLIFIED);
|
|
KBTS__CASE4(CHINESE_TRADITIONAL, CHINESE_TRADITIONAL_TAIWAN, CHINESE_TRADITIONAL_MACAO, CHINESE_TRADITIONAL_HONG_KONG, CHINESE_TRADITIONAL);
|
|
KBTS__CASE2(CHINESE_TRADITIONAL_HONG_KONG, CHINESE_TRADITIONAL_HONG_KONG, CHINESE_TRADITIONAL);
|
|
KBTS__CASE2(CHINESE_TRADITIONAL_MACAO, CHINESE_TRADITIONAL_MACAO, CHINESE_TRADITIONAL);
|
|
KBTS__CASE2(CORSICAN, CORSICAN_FRANCE, CORSICAN);
|
|
KBTS__CASE3(CROATIAN, CROATIAN_CROATIA, CROATIAN_LATIN_BOSNIA_HERZEGOVINA, CROATIAN);
|
|
KBTS__CASE2(CZECH, CZECH_CZECHIA, CZECH);
|
|
KBTS__CASE2(DANISH, DANISH_DENMARK, DANISH);
|
|
KBTS__CASE2(DARI, DARI_AFGHANISTAN, DARI);
|
|
KBTS__CASE2(DIVEHI, DIVEHI_MALDIVES, DIVEHI);
|
|
KBTS__CASE3(DUTCH, DUTCH_NETHERLANDS, DUTCH_BELGIUM, DUTCH);
|
|
KBTS__CASE1(DZONGKHA, DZONGKHA_BHUTAN);
|
|
|
|
case KBTS_LANGUAGE_ENGLISH:
|
|
{
|
|
Result = 19;
|
|
if(IdCapacity >= 19)
|
|
{
|
|
Ids[0] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_UNITED_STATES;
|
|
Ids[1] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_UNITED_KINGDOM;
|
|
Ids[2] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_IRELAND;
|
|
Ids[3] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_AUSTRALIA;
|
|
Ids[4] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_CANADA;
|
|
Ids[5] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_NEW_ZEALAND;
|
|
Ids[6] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_SINGAPORE;
|
|
Ids[7] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_HONG_KONG;
|
|
Ids[8] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_MALAYSIA;
|
|
Ids[9] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_INDIA;
|
|
Ids[10] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_JAMAICA;
|
|
Ids[11] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_CARIBBEAN;
|
|
Ids[12] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_PHILIPPINES;
|
|
Ids[13] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_SOUTH_AFRICA;
|
|
Ids[14] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_TRINIDAD_TOBAGO;
|
|
Ids[15] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_BELIZE;
|
|
Ids[16] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_UNITED_ARAB_EMIRATES;
|
|
Ids[17] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH_ZIMBABWE;
|
|
Ids[18] = KBTS_WINDOWS_LANGUAGE_ID_ENGLISH;
|
|
}
|
|
} break;
|
|
|
|
KBTS__CASE2(ESTONIAN, ESTONIAN_ESTONIA, ESTONIAN);
|
|
KBTS__CASE2(FAROESE, FAROESE_FAROE_ISLANDS, FAROESE);
|
|
KBTS__CASE2(FILIPINO, FILIPINO_PHILIPPINES, FILIPINO);
|
|
KBTS__CASE2(FINNISH, FINNISH_FINLAND, FINNISH);
|
|
|
|
case KBTS_LANGUAGE_FRENCH:
|
|
case KBTS_LANGUAGE_FRENCH_ANTILLEAN:
|
|
{
|
|
Result = 16;
|
|
if(IdCapacity >= 16)
|
|
{
|
|
Ids[0] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_FRANCE;
|
|
Ids[1] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_BELGIUM;
|
|
Ids[2] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_SWITZERLAND;
|
|
Ids[3] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_LUXEMBOURG;
|
|
Ids[4] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_MONACO;
|
|
Ids[5] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_CANADA;
|
|
Ids[6] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_REUNION;
|
|
Ids[7] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_COTE_D_IVOIRE;
|
|
Ids[8] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_MOROCCO;
|
|
Ids[9] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_SENEGAL;
|
|
Ids[10] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_MALI;
|
|
Ids[11] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_HAITI;
|
|
Ids[12] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_DRC;
|
|
Ids[13] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_CARIBBEAN;
|
|
Ids[14] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH_CAMEROON;
|
|
Ids[15] = KBTS_WINDOWS_LANGUAGE_ID_FRENCH;
|
|
}
|
|
} break;
|
|
|
|
KBTS__CASE2(FRISIAN, FRISIAN_NETHERLANDS, FRISIAN);
|
|
KBTS__CASE4(FULAH, FULAH_NIGERIA, FULAH_SENEGAL, FULAH_LATIN, FULAH);
|
|
KBTS__CASE2(GALICIAN, GALICIAN_SPAIN, GALICIAN);
|
|
KBTS__CASE2(GEORGIAN, GEORGIAN_GEORGIA, GEORGIAN);
|
|
|
|
case KBTS_LANGUAGE_GERMAN:
|
|
{
|
|
Result = 6;
|
|
if(IdCapacity >= 6)
|
|
{
|
|
Ids[0] = KBTS_WINDOWS_LANGUAGE_ID_GERMAN_GERMANY;
|
|
Ids[1] = KBTS_WINDOWS_LANGUAGE_ID_GERMAN_AUSTRIA;
|
|
Ids[2] = KBTS_WINDOWS_LANGUAGE_ID_GERMAN_SWITZERLAND;
|
|
Ids[3] = KBTS_WINDOWS_LANGUAGE_ID_GERMAN_LIECHTENSTEIN;
|
|
Ids[4] = KBTS_WINDOWS_LANGUAGE_ID_GERMAN_LUXEMBOURG;
|
|
Ids[5] = KBTS_WINDOWS_LANGUAGE_ID_GERMAN;
|
|
}
|
|
} break;
|
|
|
|
KBTS__CASE2(GREEK, GREEK_GREECE, GREEK);
|
|
KBTS__CASE2(GREENLANDIC, GREENLANDIC_GREENLAND, GREENLANDIC);
|
|
KBTS__CASE2(GUARANI, GUARANI_PARAGUAY, GUARANI);
|
|
KBTS__CASE2(GUJARATI, GUJARATI_INDIA, GUJARATI);
|
|
KBTS__CASE3(HAUSA, HAUSA_NIGERIA, HAUSA_LATIN, HAUSA);
|
|
KBTS__CASE2(HAWAIIAN, HAWAIIAN_UNITED_STATES, HAWAIIAN);
|
|
KBTS__CASE2(HEBREW, HEBREW_ISRAEL, HEBREW);
|
|
KBTS__CASE2(HINDI, HINDI_INDIA, HINDI);
|
|
KBTS__CASE2(HUNGARIAN, HUNGARIAN_HUNGARY, HUNGARIAN);
|
|
KBTS__CASE2(ICELANDIC, ICELANDIC_ICELAND, ICELANDIC);
|
|
KBTS__CASE2(IGBO, IGBO_NIGERIA, IGBO);
|
|
KBTS__CASE2(INDONESIAN, INDONESIAN_INDONESIA, INDONESIAN);
|
|
KBTS__CASE5(INUKTITUT, INUKTITUT_LATIN_CANADA, INUKTITUT_LATIN, INUKTITUT_SYLLABICS_CANADA, INUKTITUT_SYLLABICS, INUKTITUT);
|
|
|
|
case KBTS_LANGUAGE_IRISH_TRADITIONAL:
|
|
KBTS__CASE2(IRISH, IRISH_IRELAND, IRISH);
|
|
|
|
KBTS__CASE3(ITALIAN, ITALIAN_ITALY, ITALIAN_SWITZERLAND, ITALIAN);
|
|
KBTS__CASE2(JAPANESE, JAPANESE_JAPAN, JAPANESE);
|
|
KBTS__CASE2(KANNADA, KANNADA_INDIA, KANNADA);
|
|
KBTS__CASE1(KANURI, KANURI_LATIN_NIGERIA);
|
|
KBTS__CASE3(KASHMIRI, KASHMIRI_PERSO_ARABIC, KASHMIRI_DEVANAGARI_INDIA, KASHMIRI);
|
|
KBTS__CASE2(KAZAKH, KAZAKH_KAZAKHSTAN, KAZAKH);
|
|
KBTS__CASE2(KHMER, KHMER_CAMBODIA, KHMER);
|
|
KBTS__CASE2(KICHE, KICHE_GUATEMALA, KICHE);
|
|
KBTS__CASE2(KINYARWANDA, KINYARWANDA_RWANDA, KINYARWANDA);
|
|
KBTS__CASE2(KONKANI, KONKANI_INDIA, KONKANI);
|
|
|
|
case KBTS_LANGUAGE_KOREAN_OLD_HANGUL:
|
|
KBTS__CASE2(KOREAN, KOREAN_KOREA, KOREAN);
|
|
KBTS__CASE2(KYRGYZ, KYRGYZ_KYRGYZSTAN, KYRGYZ);
|
|
KBTS__CASE2(LAO, LAO_PDR, LAO);
|
|
KBTS__CASE1(LATIN, LATIN_VATICAN);
|
|
KBTS__CASE2(LATVIAN, LATVIAN_LATVIA, LATVIAN);
|
|
KBTS__CASE2(LITHUANIAN, LITHUANIAN_LITHUANIA, LITHUANIAN);
|
|
KBTS__CASE2(LOWER_SORBIAN, LOWER_SORBIAN_GERMANY, LOWER_SORBIAN);
|
|
KBTS__CASE2(LUXEMBOURGISH, LUXEMBOURGISH_LUXEMBOURG, LUXEMBOURGISH);
|
|
KBTS__CASE2(MACEDONIAN, MACEDONIAN_NORTH_MACEDONIA, MACEDONIAN);
|
|
KBTS__CASE3(MALAY, MALAY_MALAYSIA, MALAY_BRUNEI, MALAY);
|
|
KBTS__CASE2(MALAYALAM, MALAYALAM_INDIA, MALAYALAM);
|
|
KBTS__CASE2(MALTESE, MALTESE_MALTA, MALTESE);
|
|
KBTS__CASE2(MAORI, MAORI_NEW_ZEALAND, MAORI);
|
|
KBTS__CASE2(MAPUDUNGUN, MAPUDUNGUN_CHILE, MAPUDUNGUN);
|
|
KBTS__CASE2(MARATHI, MARATHI_INDIA, MARATHI);
|
|
KBTS__CASE2(MOHAWK, MOHAWK_CANADA, MOHAWK);
|
|
|
|
case KBTS_LANGUAGE_MONGOLIAN:
|
|
{
|
|
Result = 6;
|
|
if(IdCapacity >= 6)
|
|
{
|
|
Ids[0] = KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_TRADITIONAL_MONGOLIA;
|
|
Ids[1] = KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_CYRILLIC_MONGOLIA;
|
|
Ids[2] = KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_TRADITIONAL_PRC;
|
|
Ids[3] = KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_TRADITIONAL;
|
|
Ids[4] = KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN_CYRILLIC;
|
|
Ids[5] = KBTS_WINDOWS_LANGUAGE_ID_MONGOLIAN;
|
|
}
|
|
} break;
|
|
|
|
KBTS__CASE3(NEPALI, NEPALI_NEPAL, NEPALI_INDIA, NEPALI);
|
|
KBTS__CASE5(NORWEGIAN, NORWEGIAN_NYNORSK_NORWAY, NORWEGIAN_NYNORSK, NORWEGIAN_BOKMAL_NORWAY, NORWEGIAN_BOKMAL, NORWEGIAN);
|
|
KBTS__CASE2(OCCITAN, OCCITAN_FRANCE, OCCITAN);
|
|
KBTS__CASE2(ODIA, ODIA_INDIA, ODIA);
|
|
KBTS__CASE2(OROMO, OROMO_ETHIOPIA, OROMO);
|
|
KBTS__CASE2(PASHTO, PASHTO_AFGHANISTAN, PASHTO);
|
|
KBTS__CASE2(PERSIAN, PERSIAN_IRAN, PERSIAN);
|
|
KBTS__CASE2(POLISH, POLISH_POLAND, POLISH);
|
|
KBTS__CASE3(PORTUGUESE, PORTUGUESE_PORTUGAL, PORTUGUESE_BRAZIL, PORTUGUESE);
|
|
KBTS__CASE4(PUNJABI, PUNJABI_INDIA, PUNJABI_PAKISTAN, PUNJABI_ARABIC, PUNJABI);
|
|
KBTS__CASE4(QUECHUA, QUECHUA_PERU, QUECHUA_ECUADOR, QUECHUA_BOLIVIA, QUECHUA);
|
|
KBTS__CASE3(ROMANIAN, ROMANIAN_ROMANIA, ROMANIAN_MOLDOVA, ROMANIAN);
|
|
KBTS__CASE2(ROMANSH, ROMANSH_SWITZERLAND, ROMANSH);
|
|
|
|
case KBTS_LANGUAGE_RUSSIAN_BURIAT:
|
|
KBTS__CASE3(RUSSIAN, RUSSIAN_RUSSIA, RUSSIAN_MOLDOVA, RUSSIAN);
|
|
|
|
KBTS__CASE2(SAKHA, SAKHA_RUSSIA, SAKHA);
|
|
KBTS__CASE2(SANSKRIT, SANSKRIT_INDIA, SANSKRIT);
|
|
KBTS__CASE2(SCOTTISH_GAELIC, SCOTTISH_GAELIC_UNITED_KINGDOM, SCOTTISH_GAELIC);
|
|
|
|
case KBTS_LANGUAGE_SERBIAN:
|
|
{
|
|
Result = 11;
|
|
if(IdCapacity >= 11)
|
|
{
|
|
Ids[0] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC_SERBIA;
|
|
Ids[1] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN_SERBIA;
|
|
Ids[2] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC_SERBIA_MONTENEGRO;
|
|
Ids[3] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN_SERBIA_MONTENEGRO;
|
|
Ids[4] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA;
|
|
Ids[5] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN_BOSNIA_HERZEGOVINA;
|
|
Ids[6] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC_MONTENEGRO;
|
|
Ids[7] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN_MONTENEGRO;
|
|
Ids[8] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_CYRILLIC;
|
|
Ids[9] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN_LATIN;
|
|
Ids[10] = KBTS_WINDOWS_LANGUAGE_ID_SERBIAN;
|
|
}
|
|
} break;
|
|
|
|
KBTS__CASE3(SINDHI, SINDHI_PAKISTAN, SINDHI_ARABIC, SINDHI);
|
|
KBTS__CASE2(SINHALA, SINHALA_SRI_LANKA, SINHALA);
|
|
KBTS__CASE2(SLOVAK, SLOVAK_SLOVAKIA, SLOVAK);
|
|
KBTS__CASE2(SLOVENIAN, SLOVENIAN_SLOVENIA, SLOVENIAN);
|
|
KBTS__CASE2(SOMALI, SOMALI_SOMALIA, SOMALI);
|
|
|
|
case KBTS_LANGUAGE_SPANISH:
|
|
{
|
|
Result = 24;
|
|
if(IdCapacity >= 24)
|
|
{
|
|
Ids[0] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_SPAIN;
|
|
Ids[1] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_SPAIN_TRADITIONAL_SORT;
|
|
Ids[2] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_MEXICO;
|
|
Ids[3] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_UNITED_STATES;
|
|
Ids[4] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_ARGENTINA;
|
|
Ids[5] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_CHILE;
|
|
Ids[6] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_VENEZUELA;
|
|
Ids[7] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_COSTA_RICA;
|
|
Ids[8] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_CUBA;
|
|
Ids[9] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_COLOMBIA;
|
|
Ids[10] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_PARAGUAY;
|
|
Ids[11] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_URUGUAY;
|
|
Ids[12] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_BOLIVIA;
|
|
Ids[13] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_ECUADOR;
|
|
Ids[14] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_PERU;
|
|
Ids[15] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_PANAMA;
|
|
Ids[16] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_DOMINICAN_REPUBLIC;
|
|
Ids[17] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_EL_SALVADOR;
|
|
Ids[18] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_GUATEMALA;
|
|
Ids[19] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_HONDURAS;
|
|
Ids[20] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_NICARAGUA;
|
|
Ids[21] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_LATIN_AMERICA;
|
|
Ids[22] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH_PUERTO_RICO;
|
|
Ids[23] = KBTS_WINDOWS_LANGUAGE_ID_SPANISH;
|
|
}
|
|
} break;
|
|
|
|
KBTS__CASE1(STANDARD_MOROCCAN_TAMAZIGHT, CENTRAL_ATLAS_TAMAZIGHT_ARABIC);
|
|
KBTS__CASE3(SWEDISH, SWEDISH_SWEDEN, SWEDISH_FINLAND, SWEDISH);
|
|
|
|
case KBTS_LANGUAGE_SYRIAC_EASTERN:
|
|
case KBTS_LANGUAGE_SYRIAC_ESTRANGELA:
|
|
case KBTS_LANGUAGE_SYRIAC_WESTERN:
|
|
KBTS__CASE2(SYRIAC, SYRIAC_SYRIA, SYRIAC);
|
|
|
|
KBTS__CASE3(TAJIKI, TAJIKI_CYRILLIC_TAJIKISTAN, TAJIKI_CYRILLIC, TAJIKI);
|
|
KBTS__CASE3(TAMAZIGHT, TAMAZIGHT_LATIN_ALGERIA, TAMAZIGHT_LATIN, TAMAZIGHT);
|
|
KBTS__CASE3(TAMIL, TAMIL_SRI_LANKA, TAMIL_INDIA, TAMIL);
|
|
KBTS__CASE2(TATAR, TATAR_RUSSIA, TATAR);
|
|
KBTS__CASE2(TELUGU, TELUGU_INDIA, TELUGU);
|
|
|
|
case KBTS_LANGUAGE_THAILAND_MON:
|
|
KBTS__CASE2(THAI, THAI_THAILAND, THAI);
|
|
|
|
KBTS__CASE2(TIBETAN, TIBETAN_PRC, TIBETAN);
|
|
KBTS__CASE3(TIGRINYA, TIGRINYA_ERITREA, TIGRINYA_ETHIOPIA, TIGRINYA);
|
|
KBTS__CASE2(TSONGA, TSONGA_SOUTH_AFRICA, TSONGA);
|
|
KBTS__CASE2(TURKISH, TURKISH_TURKEY, TURKISH);
|
|
KBTS__CASE2(TURKMEN, TURKMEN_TURKMENISTAN, TURKMEN);
|
|
KBTS__CASE2(UKRAINIAN, UKRAINIAN_UKRAINE, UKRAINIAN);
|
|
KBTS__CASE2(UPPER_SORBIAN, UPPER_SORBIAN_GERMANY, UPPER_SORBIAN);
|
|
KBTS__CASE3(URDU, URDU_INDIA, URDU_PAKISTAN, URDU);
|
|
KBTS__CASE2(UYGHUR, UYGHUR_PRC, UYGHUR);
|
|
KBTS__CASE5(UZBEK, UZBEK_CYRILLIC_UZBEKISTAN, UZBEK_CYRILLIC, UZBEK_LATIN_UZBEKISTAN, UZBEK_LATIN, UZBEK);
|
|
KBTS__CASE2(VENDA, VENDA_SOUTH_AFRICA, VENDA);
|
|
KBTS__CASE2(VIETNAMESE, VIETNAMESE_VIETNAM, VIETNAMESE);
|
|
KBTS__CASE2(WELSH, WELSH_UNITED_KINGDOM, WELSH);
|
|
KBTS__CASE2(WOLOF, WOLOF_SENEGAL, WOLOF);
|
|
KBTS__CASE2(XHOSA, XHOSA_SOUTH_AFRICA, XHOSA);
|
|
|
|
case KBTS_LANGUAGE_YI_CLASSIC:
|
|
KBTS__CASE2(YI_MODERN, YI_PRC, YI);
|
|
|
|
KBTS__CASE1(YIDDISH, YIDDISH);
|
|
KBTS__CASE2(YORUBA, YORUBA_NIGERIA, YORUBA);
|
|
KBTS__CASE2(ZULU, ZULU_SOUTH_AFRICA, ZULU);
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
Case5:
|
|
Result = 5;
|
|
if(IdCapacity >= 5)
|
|
{
|
|
Ids[0] = Id0;
|
|
Ids[1] = Id1;
|
|
Ids[2] = Id2;
|
|
Ids[3] = Id3;
|
|
Ids[4] = Id4;
|
|
}
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
Case4:
|
|
Result = 4;
|
|
if(IdCapacity >= 4)
|
|
{
|
|
Ids[0] = Id0;
|
|
Ids[1] = Id1;
|
|
Ids[2] = Id2;
|
|
Ids[3] = Id3;
|
|
}
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
Case3:
|
|
Result = 3;
|
|
if(IdCapacity >= 3)
|
|
{
|
|
Ids[0] = Id0;
|
|
Ids[1] = Id1;
|
|
Ids[2] = Id2;
|
|
}
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
Case2:
|
|
Result = 2;
|
|
if(IdCapacity >= 2)
|
|
{
|
|
Ids[0] = Id0;
|
|
Ids[1] = Id1;
|
|
}
|
|
}
|
|
|
|
if(0)
|
|
{
|
|
Case1:
|
|
Result = 1;
|
|
if(IdCapacity >= 1)
|
|
{
|
|
Ids[0] = Id0;
|
|
}
|
|
}
|
|
|
|
#undef KBTS__CASE1
|
|
#undef KBTS__CASE2
|
|
#undef KBTS__CASE3
|
|
#undef KBTS__CASE4
|
|
#undef KBTS__CASE5
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT int kbts_LookupFontString(kbts_font *Font, kbts_font_info_string_id StringId, kbts_windows_language_id LanguageId, char *String, int StringCapacity)
|
|
{
|
|
int Result = 0;
|
|
|
|
if(Font && Font->Blob)
|
|
{
|
|
kbts_un StringCapacityU = (kbts_un)StringCapacity;
|
|
kbts__name *Name = kbts__BlobTableDataType(Font->Blob, KBTS_BLOB_TABLE_ID_NAME, kbts__name);
|
|
|
|
if(Name)
|
|
{
|
|
kbts_u16 OpenTypeStringId = (kbts_u16)StringId;
|
|
|
|
if(StringId < KBTS_FONT_INFO_STRING_ID_COUNT1)
|
|
{
|
|
static const kbts_u16 KbtsStringIdToOpenType[KBTS_FONT_INFO_STRING_ID_COUNT1] = {
|
|
/* NONE */ 0xFFFFu,
|
|
/* COPYRIGHT */ 0,
|
|
/* FAMILY */ 1,
|
|
/* SUBFAMILY */ 2,
|
|
/* UID */ 3,
|
|
/* FULL_NAME */ 4,
|
|
/* VERSION */ 5,
|
|
/* POSTSCRIPT_NAME */ 6,
|
|
/* TRADEMARK */ 7,
|
|
/* MANUFACTURER */ 8,
|
|
/* DESIGNER */ 9,
|
|
/* TYPOGRAPHIC_FAMILY */ 16,
|
|
/* TYPOGRAPHIC_SUBFAMILY */ 17,
|
|
/* DESCRIPTION */ 10,
|
|
/* VENDOR_URL */ 11,
|
|
/* DESIGNER_URL */ 12,
|
|
/* LICENSE */ 13,
|
|
/* LICENSE_URL */ 14,
|
|
/* COMPATIBLE_FULL_NAME */ 18,
|
|
/* SAMPLE_TEXT */ 19,
|
|
/* POSTSCRIPT_CID_FINDFONT_NAME */ 20,
|
|
/* WWS_FAMILY_NAME */ 21,
|
|
/* WWS_SUBFAMILY_NAME */ 22,
|
|
/* LIGHT_BACKGROUND_PALETTE */ 23,
|
|
/* DARK_BACKGROUND_PALETTE */ 24,
|
|
/* VARIATIONS_POSTSCRIPT_NAME_PREFIX */ 25,
|
|
/* RESERVED */ 15,
|
|
};
|
|
|
|
OpenTypeStringId = KbtsStringIdToOpenType[StringId];
|
|
}
|
|
|
|
if(OpenTypeStringId != 0xFFFF)
|
|
{
|
|
kbts__name_record *Records = KBTS__POINTER_AFTER(kbts__name_record, Name);
|
|
char *StringBase = KBTS__POINTER_OFFSET(char, Name, kbts__ReadU16Unaligned(&Name->StringStorageOffset));
|
|
|
|
// @Speed: Binary search?
|
|
// From the Microsoft docs:
|
|
// As with encoding records in the 'cmap' table, name records must be sorted first by platform ID,
|
|
// then by platform-specific encoding ID, then by language ID, and then by name ID.
|
|
kbts_un Name_Count = kbts__ReadU16Unaligned(&Name->Count);
|
|
KBTS__FOR(RecordIndex, 0, Name_Count)
|
|
{
|
|
kbts__name_record *Record = &Records[RecordIndex];
|
|
kbts_u16 Record_EncodingId = kbts__ReadU16Unaligned(&Record->EncodingId);
|
|
|
|
if((kbts__ReadU16Unaligned(&Record->PlatformId) == 3) && // Windows platform
|
|
((Record_EncodingId < 3) || (Record_EncodingId > 5)) && // We don't support code pages for now.
|
|
(kbts__ReadU16Unaligned(&Record->LanguageId) == LanguageId) &&
|
|
(kbts__ReadU16Unaligned(&Record->NameId) == OpenTypeStringId))
|
|
{
|
|
kbts_u16 *Utf16 = KBTS__POINTER_OFFSET(kbts_u16, StringBase, kbts__ReadU16Unaligned(&Record->StringOffset));
|
|
kbts_un Utf16Length = kbts__ReadU16Unaligned(&Record->Length) / 2;
|
|
|
|
kbts_un WriteCursor = 0;
|
|
kbts_un At = 0;
|
|
while(At < Utf16Length)
|
|
{
|
|
kbts_decode Decode = kbts_DecodeUtf16(Utf16 + At, Utf16Length - At, KBTS_DECODE_UTF16_FLAG_BIG_ENDIAN);
|
|
|
|
if(Decode.Valid)
|
|
{
|
|
kbts_encode_utf8 Encode = kbts_EncodeUtf8(Decode.Codepoint);
|
|
kbts_un EncodeLengthU = (kbts_un)Encode.EncodedLength;
|
|
|
|
if((WriteCursor + EncodeLengthU) <= StringCapacityU)
|
|
{
|
|
KBTS__FOR(ByteIndex, 0, EncodeLengthU)
|
|
{
|
|
String[WriteCursor + ByteIndex] = Encode.Encoded[ByteIndex];
|
|
}
|
|
}
|
|
|
|
WriteCursor += EncodeLengthU;
|
|
}
|
|
|
|
At += Decode.SourceCharactersConsumed;
|
|
}
|
|
|
|
Result = (int)WriteCursor;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
KBTS_EXPORT kbts_decode kbts_DecodeUtf16(const kbts_u16 *Utf16, kbts_un Length, kbts_decode_utf16_flags Flags)
|
|
{
|
|
kbts_decode Result = KBTS__ZERO;
|
|
|
|
if(Length)
|
|
{
|
|
kbts_u16 High = kbts__ReadU16Unaligned(Utf16);
|
|
if(Flags & KBTS_DECODE_UTF16_FLAG_BIG_ENDIAN)
|
|
{
|
|
High = kbts__ByteSwap16(High);
|
|
}
|
|
|
|
if((High < 0xD800) || (High > 0xDBFF))
|
|
{
|
|
Result.Codepoint = High;
|
|
Result.SourceCharactersConsumed = 1;
|
|
Result.Valid = 1;
|
|
}
|
|
else
|
|
{
|
|
// Surrogate pair.
|
|
if(Length > 1)
|
|
{
|
|
kbts_u16 Low = kbts__ReadU16Unaligned(&Utf16[1]);
|
|
if(Flags & KBTS_DECODE_UTF16_FLAG_BIG_ENDIAN)
|
|
{
|
|
Low = kbts__ByteSwap16(Low);
|
|
}
|
|
|
|
Result.Codepoint = (int)(0x010000 + (kbts_un)High * 0x400 + (kbts_un)Low);
|
|
Result.SourceCharactersConsumed = 2;
|
|
Result.Valid = 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
#endif
|
|
#undef KBTS_X_FEATURES
|