{"id":25623435,"url":"https://github.com/yu2924/testd2dtextrender","last_synced_at":"2026-01-30T17:31:49.388Z","repository":{"id":165887091,"uuid":"637033518","full_name":"yu2924/TestD2DTextRender","owner":"yu2924","description":"D2D/DirectWrite experiment","archived":false,"fork":false,"pushed_at":"2024-12-04T05:23:39.000Z","size":297,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T06:52:22.619Z","etag":null,"topics":["direct2d","directwrite","experiment","wtl"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yu2924.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-06T09:51:04.000Z","updated_at":"2024-12-04T05:23:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4ec2520-a553-465c-a7ba-f1b32cb4bf72","html_url":"https://github.com/yu2924/TestD2DTextRender","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yu2924/TestD2DTextRender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yu2924%2FTestD2DTextRender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yu2924%2FTestD2DTextRender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yu2924%2FTestD2DTextRender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yu2924%2FTestD2DTextRender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yu2924","download_url":"https://codeload.github.com/yu2924/TestD2DTextRender/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yu2924%2FTestD2DTextRender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28916080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["direct2d","directwrite","experiment","wtl"],"created_at":"2025-02-22T11:38:06.275Z","updated_at":"2026-01-30T17:31:49.368Z","avatar_url":"https://github.com/yu2924.png","language":"C++","readme":"# TestD2DTextRender\n\n\u003cimg src=\"media/screenshot.png\" width=\"80%\"\u003e\n\nWindows 11において、Notepad.exeのテキストレンダリング品質に疑問を覚えた。特に日本語の漢字かな文字で顕著なジャギーを認めた。そこで、Direct2D/DirectWrite環境におけるテキストレンダリングの方法について調査した。これは実験であり、実用的な実装ではない。  \n\nOn Windows 11, the text rendering quality of Notepad.exe was questionable. In particular, I observed significant jaggies in Japanese Kanji/kana characters. Therefore, I investigated the text rendering method in the Direct2D/DirectWrite environment. This is an experiment, not a practical implementation.\n\n## Results and Discussion\n\n2種類のアプリを試作し、テキストレンダリングの状態を観察した。  \nI made two prototypes of the application and made comparative observations of the text rendering quality.  \n\n- using Direct2D/DirectWrite API\n  - text antialias mode = `D2D1_TEXT_ANTIALIAS_MODE_DEFAULT`\n  - text antialias mode = `D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE`\n  - text antialias mode = `D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE`\n  - text antialias mode = `D2D1_TEXT_ANTIALIAS_MODE_ALIASED`\n- using RichEditD2D control\n  - default GDI\n  - switch to `EM_SWITCHTOD2D`\n\n以下にそれぞれのレンダリング結果のキャプチャを示す:  \nHere is a capture of each rendering result:  \n\n|Condition|Capture|Quality|\n|-|-|-|\n|Direct2D/DirectWrite (Default)|\u003cimg src=\"result/TestDirectWrite-Default.png\" Height=\"64\"\u003e|😊|\n|Direct2D/DirectWrite (ClearType)|\u003cimg src=\"result/TestDirectWrite-ClearType.png\" Height=\"64\"\u003e|😊|\n|Direct2D/DirectWrite (GrayScale)|\u003cimg src=\"result/TestDirectWrite-GrayScale.png\" Height=\"64\"\u003e|😊|\n|Direct2D/DirectWrite (Aliased)|\u003cimg src=\"result/TestDirectWrite-Aliased.png\" Height=\"64\"\u003e|😡|\n|RichEditD2D (GDI)|\u003cimg src=\"result/TestRichEditD2D-GDI.png\" Height=\"64\"\u003e|😊|\n|RichEditD2D (D2D)|\u003cimg src=\"result/TestRichEditD2D-D2D.png\" Height=\"64\"\u003e|🤔|\n\n- **DirectWrite (Aliased)** では顕著なエイリアスが認められ、予想通りの結果である。\n- **RichEditD2D (D2D)** では少々のエイリアスが認められ、RichEditD2Dコントロールの不備であると考える。\n- その他のケースではアンチエイリアス処理は良好に見える。\n\n総合して、Direct2D/DirectWrite APIの動作に問題は無く、RichEditD2DコントロールのD2Dモードに問題があるようだ。\n\n- **DirectWrite (Aliased)** shows significant aliasing, which is to be expected.\n- **RichEditD2D (D2D)** shows a small amount of aliasing, which I believe is a fault of the RichEditD2D control.\n- In other cases, anti-aliasing appears to be good.\n\nOverall, there is no problem with the Direct2D/DirectWrite API behavior, and there seems to be a problem with the D2D mode of the RichEditD2D control.\n\n## Requirement to Build\n\n* Visual Studio 2019\n* Windows Template Library (WTL) 10\n\n## References\n\n* [RichEditD2D Window Controls](https://devblogs.microsoft.com/math-in-office/richeditd2d-window-controls/)\n\n## Written by\n\n[yu2924](https://twitter.com/yu2924)\n\n## License\n\nCC0 1.0 Universal\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyu2924%2Ftestd2dtextrender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyu2924%2Ftestd2dtextrender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyu2924%2Ftestd2dtextrender/lists"}