Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ add_subdirectory(Dependencies/Precompiled)
add_subdirectory(Dependencies/Utility)
add_subdirectory(Dependencies/Bink)
add_subdirectory(Dependencies/Miles)
add_subdirectory(Dependencies/UnicodeBidi)
if (WIN32)
add_subdirectory(Dependencies/DbgHelp)
add_subdirectory(Dependencies/Usp10)
Expand Down
1 change: 1 addition & 0 deletions Core/Libraries/Source/WWVegas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ target_link_libraries(core_wwcommon INTERFACE
d3d8lib
deps_dbghelp
deps_miles
deps_unicodebidi
deps_usp10
stlport
)
Expand Down
17 changes: 17 additions & 0 deletions Dependencies/UnicodeBidi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
set(UNICODEBIDI_SRC
unicodebidi.cpp
unicodebidi.h
bididirection.inl
)

add_library(deps_unicodebidi STATIC)

target_sources(deps_unicodebidi PRIVATE ${UNICODEBIDI_SRC})

target_include_directories(deps_unicodebidi PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

target_link_libraries(deps_unicodebidi PRIVATE
deps_precompiled # Gives force included headers. Link early.
)
32 changes: 32 additions & 0 deletions Dependencies/UnicodeBidi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Unicode paragraph direction

`Get_Paragraph_Base_Level` provides the initial paragraph level for complex text
layout, such as Uniscribe itemization. It implements the first-strong
decision in [UAX #9 P2/P3](https://www.unicode.org/reports/tr9/tr9-51.html#P2),
with scanning bounded to the first paragraph. Shaping and visual reordering are
left to the renderer.

The scan skips nested directional-isolate contents, decodes UTF-16 surrogate
pairs, and ignores lone surrogates. It also accepts direct supplementary scalar
values when `wchar_t` is 32 bits. The first L character selects level 0; the first
R or AL character selects level 1. A paragraph without a strong character
defaults to level 0.

Both BMP and supplementary classification use the same Unicode 17.0.0 data,
independent of the operating system. The compact table merges R and AL and
treats every other non-L class as neutral for this decision. Omitted ranges
default to L, including the source's `@missing` defaults.

## Data and license

Download [DerivedBidiClass.txt](https://www.unicode.org/Public/17.0.0/ucd/extracted/DerivedBidiClass.txt)
and regenerate or check the table from the repository root:

```
python Dependencies/UnicodeBidi/generate_bidi.py DerivedBidiClass.txt
python Dependencies/UnicodeBidi/generate_bidi.py DerivedBidiClass.txt --check
```

The generator validates the source version and SHA-256 before extracting ranges.
The generated data retains Unicode's copyright notice; `unicode-license.txt`
contains the full Unicode License v3.
Loading
Loading