Skip to content

feat: add configurable Vietnamese font sync plugin - #1

Merged
zeldrisho merged 5 commits into
mainfrom
feat/initial-plugin
Oct 15, 2026
Merged

zeldrisho merged 5 commits into
mainfrom
feat/initial-plugin

Conversation

@zeldrisho

Copy link
Copy Markdown
Owner

Introduces the initial BepInEx 5 plugin for Unity Mono games using TextMeshPro. Users can configure named font profiles with ordered coverage files and explicit asset-matching rules, either appending missing-glyph fallbacks or opting into synchronization for a consistent replacement style. The default configuration makes no font changes, and unmatched fonts and existing fallback chains are preserved.

Runtime compatibility is capability-based rather than tied to game names or TMP versions. Profiles require complete glyph coverage before use, and failed per-font mutations attempt rollback. Start review with the configuration contract in docs/configuration.md, then the TMP adapter and mutation lifecycle; synchronization intentionally clears matched character tables in memory, so narrow rules and restart-based recovery matter.

Includes end-user installation/configuration guidance, separate developer documentation, configuration and adapter tests, and locked-build CI. The 1.0.0 changelog and allowlisted four-file ZIP packaging prepare the first release without bundling fonts or game assemblies. Pushing a matching version tag publishes automatically after CI; merging this PR alone does not publish a release.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 57882b41-1a50-4f05-b619-1fea42fd060b
📥 Commits

Reviewing files that changed from the base of the PR and between 463a404 and 215896f.

📒 Files selected for processing: 13
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .gitignore
  • docs/development.md
  • scripts/package.py
  • scripts/requirements.txt
  • scripts/test_package.py
  • src/FontRules.cs
  • src/PluginSettings.cs
  • src/TmpRuntime.cs
  • src/UnityVietnameseFontSyncPlugin.cs
  • tests/ConfigurationTests.cs
  • tests/TmpRuntimeTests.cs
🚧 Files skipped from review as they are similar to previous changes: 7
  • .gitignore
  • src/PluginSettings.cs
  • src/TmpRuntime.cs
  • tests/ConfigurationTests.cs
  • src/UnityVietnameseFontSyncPlugin.cs
  • src/FontRules.cs
  • tests/TmpRuntimeTests.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Adds a Unity plugin that builds Vietnamese glyph coverage from configured fonts and applies it to matching TextMesh Pro assets. The change also adds configuration, automated tests, CI validation, and tag-based release packaging.

Changes: Font sync plugin

Layer / File(s) Summary
Project and toolchain setup
.editorconfig, .gitignore, AGENTS.md, NuGet.Config, UnityVietnameseFontSync.slnx, global.json, src/UnityVietnameseFontSync.csproj, src/packages.lock.json, tests/UnityVietnameseFontSync.Tests.csproj, tests/packages.lock.json, LICENSE, docs/development.md
Adds repository conventions, .NET SDK and package configuration, solution and project definitions, and development guidance.
Configuration and font rules
src/FontRules.cs, src/PluginSettings.cs, tests/ConfigurationTests.cs, docs/configuration.md
Adds profile and rule validation, font matching and path resolution, character generation, and glyph-coverage checks. Tests cover these helpers and settings.
TextMesh Pro runtime adapter
src/TmpRuntime.cs, tests/TmpRuntimeTests.cs
Adds runtime discovery and validation of TextMesh Pro APIs, font and text operations, and tests for adapter behavior and compatibility checks.
Font profile and patch lifecycle
src/UnityVietnameseFontSyncPlugin.cs, README.md, CHANGELOG.md
Adds profile creation, asset scanning, fallback and synchronize patch modes, rollback and retry handling, text refresh, and shutdown restoration. Documentation describes plugin behavior and supported environments.
CI and release packaging
.github/workflows/ci.yml, .github/workflows/release.yml, scripts/package.py, scripts/requirements.txt, scripts/test_package.py
Adds CI build and test checks, tag-triggered publishing, release metadata validation, deterministic archive creation, and package tests.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Plugin as UnityVietnameseFontSyncPlugin
  participant Runtime as TmpRuntime
  participant Font as TMP_FontAsset
  participant Text as TMP_Text
  Plugin->>Runtime: Discover loaded TextMesh Pro types
  Runtime-->>Plugin: Return validated adapter
  Plugin->>Runtime: Create profile assets and add required characters
  Runtime->>Font: Create and populate generated font assets
  Plugin->>Runtime: Apply matching font patches
  Plugin->>Runtime: Refresh text components using changed fonts
  Runtime->>Text: Mark text dirty and update mesh
Loading
Merge Risk: ⚪ Minimal · up to 21589

No unresolved issue identified here blocks merging after normal checks.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description check Passed The description clearly explains the configurable Vietnamese font sync plugin, its runtime behavior, tests, documentation, CI, and release packaging.
Title check Passed The title clearly and concisely identifies the main change: adding a configurable Vietnamese font synchronization plugin.
Docstring Coverage Passed Docstring coverage is 98.51% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 67 functions across 8 files. (5 skipped: 5 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zeldrisho
zeldrisho marked this pull request as ready for review October 14, 2026 19:32
Comment thread scripts/package.py Outdated
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Completed: Fix pre-merge checks in PR #1 — View commit e534d71

@zeldrisho
zeldrisho merged commit 59e5ac1 into main Oct 15, 2026
3 checks passed
@zeldrisho
zeldrisho deleted the feat/initial-plugin branch October 15, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant