Files
BluTac10-Xbox_Neo/Minecraft.World/ArabicShaping.h
Revela e786604228 Add Arabic text shaping support for chat functionality
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.
2026-03-17 17:08:58 -05:00

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);