chore(lib): Implement Usp10Loader class - #3241
Conversation
PR Summary by QodoLoad required Uniscribe APIs dynamically on Windows
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR |
|
| Filename | Overview |
|---|---|
| Core/Libraries/Source/WWVegas/WWLib/CMakeLists.txt | Adds the loader implementation and header to core_wwlib only for Windows builds. |
| Core/Libraries/Source/WWVegas/WWLib/Usp10Loader.cpp | Implements synchronized lazy loading, entry-point forwarding, failure handling, and unloading for usp10.dll. |
| Core/Libraries/Source/WWVegas/WWLib/Usp10Loader.h | Declares the local Uniscribe-compatible types, constants, wrappers, and static loader state. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Caller[Renderer caller] --> Wrapper[Usp10Loader wrapper]
Wrapper --> Lock[Acquire critical section]
Lock --> Attempt{Load attempted?}
Attempt -->|No| SystemDir[Resolve system directory]
SystemDir --> DLL[Load usp10.dll]
DLL --> Exports[Resolve Uniscribe exports]
Attempt -->|Yes| Ready{Module available?}
Exports --> Ready
Ready -->|Yes| Invoke[Invoke resolved entry point]
Ready -->|No| Fallback[Return failure for renderer fallback]
Shutdown[Engine shutdown] --> Unload[Unload and clear pointers]
Unload --> Lock
Reviews (6): Last reviewed commit: "feat(system): Load Uniscribe at runtime" | Re-trigger Greptile
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
68a4beb to
370c8ed
Compare
370c8ed to
9115581
Compare
There was a problem hiding this comment.
Meaning of USP10
USP10 stands for Uniscribe Script Processor version 1.0. This name reflects its primary function within the Windows operating system.
Functionality
- Uniscribe: This component is responsible for handling the proper formatting of Unicode text, especially for complex scripts.
- Script Processor: It processes text layout and rendering, ensuring that text appears correctly on the screen.
Versioning
- The "10" in USP10 indicates that it is the first version of the Uniscribe Script Processor, which is integral to the Windows operating system's ability to manage various languages and scripts.
There was a problem hiding this comment.
If microsoft bumps the version number... 😆 Looks like they did not in 28 years.
There was a problem hiding this comment.
well, that's true, this is very old tech from win 98SE era, i suppose it now got replaced with direct write, this is adding support for Arabic or rtl language and bidi without rewriting the backend, see https://learn.microsoft.com/en-us/windows/win32/intl/uniscribe
also, it has serval minor versions, see https://scripts.sil.org/cms/scripts/page.php?id=uniscribeversions&site_id=nrsi
b49c7f7 to
61fa2cc
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61fa2ccf19
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
61fa2cc to
8f4faa9
Compare
|
i think i fixed most of the issues, maybe we need a second opinion, as i cant see any new issues! |
Adds a small Windows-only runtime loader for the Uniscribe entry points required by the complex-text renderer.
The loader resolves the functions from the system
usp10.dllat runtime and reports failure to callers when Uniscribe is unavailable. This allows #3231 to retain the existing per-character renderer as its fallback while removing the compile-time dependency onusp10.handusp10.lib, which are missing from the VC6 SDK.The loader also provides synchronized shutdown cleanup; #3231 calls it from
WW3D::Shutdown().Cross-platform text shaping remains outside this focused compatibility change.
The stacked result was validated with:
usp10.dllgit diff --checkThe change was developed with AI assistance, then manually reviewed against the nearby runtime-loader pattern and the official Windows SDK function declarations.