[PR #4861] [MERGED] Suppress run breaking for abs. differences < 0.001 in advance #25994

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4861
Author: @DHowett-MSFT
Created: 3/10/2020
Status: Merged
Merged: 3/10/2020
Merged by: @DHowett-MSFT

Base: masterHead: dev/duhowett/suboptimal_my_eye


📝 Commits (1)

  • a0a593f Suppress run breaking for abs. differences < 0.001 in advance

📊 Changes

1 file changed (+6 additions, -2 deletions)

View changed files

📝 src/renderer/dx/CustomTextLayout.cpp (+6 -2)

📄 Description

With certain font faces at certain sizes, the advances seem to be
slightly more than the pixel grid; Cascadia Code at 13pt (though, 200%
scale) had an advance of 10.000001.

This commit makes it so that anything sub-1/100 of a cell won't make us
break up runs, because doing so results in suboptimal rendering.

Fixes #4806.


I wrote a renderer hack that colors text runs by their origin x (blue+) and y (red+).

This shows that at font size 12, we were only doing one run per line.

image

This shows that at font size 13, we were doing one run per cell.

image


🔄 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/4861 **Author:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Created:** 3/10/2020 **Status:** ✅ Merged **Merged:** 3/10/2020 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `dev/duhowett/suboptimal_my_eye` --- ### 📝 Commits (1) - [`a0a593f`](https://github.com/microsoft/terminal/commit/a0a593ff12041084fb6898d10d9c2b04586671a2) Suppress run breaking for abs. differences < 0.001 in advance ### 📊 Changes **1 file changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/dx/CustomTextLayout.cpp` (+6 -2) </details> ### 📄 Description With certain font faces at certain sizes, the advances seem to be slightly more than the pixel grid; Cascadia Code at 13pt (though, 200% scale) had an advance of 10.000001. This commit makes it so that anything sub-1/100 of a cell won't make us break up runs, because doing so results in suboptimal rendering. Fixes #4806. --- I wrote a renderer hack that colors text runs by their origin x (blue+) and y (red+). This shows that at font size 12, we were only doing one run per line. ![image](https://user-images.githubusercontent.com/14316954/76268446-696ba700-622b-11ea-9af1-d454217c9742.png) This shows that at font size _13_, we were doing one run _per cell_. ![image](https://user-images.githubusercontent.com/14316954/76268466-72f50f00-622b-11ea-8e9e-4322ac48942c.png) --- <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:13:11 +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#25994