[PR #6206] [MERGED] Skip glyph shaping analysis when the entire text is simple #26593

Open
opened 2026-01-31 09:17:02 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/6206
Author: @skyline75489
Created: 5/26/2020
Status: ✅ Merged
Merged: 6/1/2020
Merged by: @undefined

Base: master ← Head: feature/simple-text-analysis


📝 Commits (7)

📊 Changes

2 files changed (+89 additions, -9 deletions)

View changed files

📝 src/renderer/dx/CustomTextLayout.cpp (+82 -9)
📝 src/renderer/dx/CustomTextLayout.h (+7 -0)

📄 Description

Summary of the Pull Request

As the title suggests, this PR will make CustomTextLayout skip glyph shaping analysis when the entire text is detected as simple.

References

My main reference is DirectX Factor - Who’s Afraid of Glyph Runs?

And also #2959

PR Checklist

  • Closes @skyline75489's continuous drive for perf gainz.
  • CLA signed.
  • Manual tests.
  • Nah on docs.
  • Discussed with core contributors in this PR.

Detailed Description of the Pull Request / Additional comments

This can be seen as a followup of #2959. The idea is the same: make use of simple text (which makes up I think 95% of all terminal text) as much as possible.

The performance boost is huge. Cacafire is actually on fire this time (and remember I'm using 4K!). The frame rate is also boosted since more CPU time can be used for actual drawing.

Before:

图片

After:

图片

Validation Steps Performed

Manually validated.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/6206 **Author:** [@skyline75489](https://github.com/skyline75489) **Created:** 5/26/2020 **Status:** ✅ Merged **Merged:** 6/1/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `feature/simple-text-analysis` --- ### 📝 Commits (7) - [`1ca454f`](https://github.com/microsoft/terminal/commit/1ca454f0d2c58d4bc431c4f2e48a18d0deaae840) Skip glyph shaping analysis when the entire text is simple - [`fa789b3`](https://github.com/microsoft/terminal/commit/fa789b34f3952bb93fc7b76f59e7fffc1d3f71b1) Resolve comments - [`4443652`](https://github.com/microsoft/terminal/commit/44436527de4e3f9e2c0ee31e47e89876e0fd10bd) Oh Mr.Static - [`73ac330`](https://github.com/microsoft/terminal/commit/73ac3300f78caa9eaad1403a177b15bf3c1966d5) Merge branch 'master' of https://github.com/microsoft/terminal into feature/simple-text-analysis - [`5b2d4cb`](https://github.com/microsoft/terminal/commit/5b2d4cb1ab0a817fd5593100663af8de4c1af98d) Resolve comments - [`b450173`](https://github.com/microsoft/terminal/commit/b450173786271edcb924337b7b2a1a42f0a09fae) Static - [`5046746`](https://github.com/microsoft/terminal/commit/5046746d656d5eba7fbd576d9020cd160f65d949) Format ### 📊 Changes **2 files changed** (+89 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/dx/CustomTextLayout.cpp` (+82 -9) 📝 `src/renderer/dx/CustomTextLayout.h` (+7 -0) </details> ### 📄 Description ## Summary of the Pull Request As the title suggests, this PR will make CustomTextLayout skip glyph shaping analysis when the entire text is detected as simple. ## References My main reference is [DirectX Factor - Who’s Afraid of Glyph Runs?](https://docs.microsoft.com/en-us/archive/msdn-magazine/2013/november/directx-factor-who%e2%80%99s-afraid-of-glyph-runs) And also #2959 ## PR Checklist * [x] Closes @skyline75489's continuous drive for perf gainz. * [x] CLA signed. * [x] Manual tests. * [x] Nah on docs. * [x] Discussed with core contributors in this PR. ## Detailed Description of the Pull Request / Additional comments This can be seen as a followup of #2959. The idea is the same: make use of simple text (which makes up I think 95% of all terminal text) as much as possible. The performance boost is huge. Cacafire is actually on fire this time (and remember I'm using 4K!). The frame rate is also boosted since more CPU time can be used for actual drawing. Before: ![图片](https://user-images.githubusercontent.com/4710575/82913277-b21c3c00-9fa0-11ea-8785-a14b347bbcbd.png) After: ![图片](https://user-images.githubusercontent.com/4710575/82912969-4afe8780-9fa0-11ea-8795-92617dde822f.png) ## Validation Steps Performed Manually validated. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:17:02 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26593