Windows OCR の CJK 文字枠の過剰補正を修正 - #604
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/Freeesia/WindowTranslator/sessions/3b923edd-4d46-425a-b346-5e5e81f7a59a Co-authored-by: Freeesia <9002657+Freeesia@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix translation text font size to match original
Fix over-inflated font size for CJK source text and font size averaging in OCR buffer
Mar 28, 2026
Owner
|
@copilot |
Contributor
Author
PRのタイトルと説明を日本語に更新しました。 タイトル案: 説明:
|
Copilot
AI
changed the title
Fix over-inflated font size for CJK source text and font size averaging in OCR buffer
CJKソーステキストのフォントサイズ過剰拡大およびOCRバッファのフォントサイズ平均化を修正
Mar 28, 2026
削除済みの OCR バッファとの競合を解消し、CJK を含む単語だけで ラテン文字向けの位置・高さ補正を省く。
Freeesia
marked this pull request as ready for review
September 23, 2026 06:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Windows OCR の
CorrectWordには、ラテン文字の字形を前提に単語の位置と高さを補正する処理があります。CJK 文字にも適用されると、高さが過大になります。この高さはCalcRectで表示用のFontSizeに使われます。最新コードへの適用範囲
masterを取り込みました。追加された変更は依存パッケージの更新で、Windows OCR の補正経路は変わっていません。rなどのラテン文字まで変えてしまうため採用しません。OcrBufferFilterは現行コードに存在せず、OcrTextTrackerが観測結果の小さな揺れを時系列で安定化しています。旧フィルターの2値平均と同一の処理ではありませんが、それを共通トラッカーへ移すと他の OCR にも影響します。今回の過大補正は Windows OCR の入力側で解消します。検証
PluginValidationSettingsTests.cs:108が存在しない非ジェネリックConfigurePluginParamを参照しておりコンパイルできません。上記 13 件は、このファイルだけをビルド引数で除外して実行しました。