mirror of
https://github.com/BluTac10/Xbox-Neo.git
synced 2026-06-07 10:44:38 +00:00
This commit introduces Arabic text shaping in the chat application by adding `ArabicShaping.cpp` and `ArabicShaping.h` for handling contextual forms and visual reordering. The rendering logic in `ChatScreen.cpp` is updated to utilize this new functionality, adjusting cursor positions accordingly. Other UI components, including `UIControl_Base.cpp`, `UIControl_Label.cpp`, and `UIControl_SaveList.cpp`, are modified to ensure proper display of Arabic text. Additionally, `Font.cpp` is enhanced with methods for efficient rendering of pre-shaped text.
11 lines
505 B
C++
11 lines
505 B
C++
#pragma once
|
|
#include <string>
|
|
|
|
// Shape Arabic text for visual display. Returns the visually-ordered string.
|
|
std::wstring shapeArabicText(const std::wstring& input);
|
|
|
|
// Same as above, but also maps a logical cursor position to its visual position
|
|
// in the returned string. Pass the logical cursor index; visualCursorPos receives
|
|
// the index into the returned string where the cursor should be drawn.
|
|
std::wstring shapeArabicText(const std::wstring& input, int logicalCursorPos, int* visualCursorPos);
|