[PR #10478] [MERGED] Replace PolyTextOutW with ExtTextOutW #28067

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10478
Author: @alabuzhev
Created: 6/22/2021
Status: Merged
Merged: 6/22/2021
Merged by: @undefined

Base: mainHead: 10472_missing_glyph_substitution


📝 Commits (1)

  • 7def395 Replace PolyTextOutW with ExtTextOutW

📊 Changes

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

View changed files

📝 src/renderer/gdi/paint.cpp (+7 -2)

📄 Description

Replace PolyTextOutW with ExtTextOutW to allow substitution of missing
glyphs from other fonts.

Why not let Windows substitute the glyphs that are missing in the
current font? Currently the GDI renderer of conhost/OpenConsole uses
PolyTextOutW for drawing. PolyTextOutW doesn't try to substitute
any missing glyphs, so the only way to see, say, Hiragana is to change
the whole font to something like MS Gothic (which is eye-bleeding, to
be honest).

A trivial replace PolyTextOutW -> ExtTextOutW does the trick.

Switch to PolyTextOutW happened in Windows 7 along with introduction
of conhost.exe. Substitution worked in previous Windows versions, where
internal NT interfaces were used.

Before the change:

image

After the change:

image

Closes #10472


🔄 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/10478 **Author:** [@alabuzhev](https://github.com/alabuzhev) **Created:** 6/22/2021 **Status:** ✅ Merged **Merged:** 6/22/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `10472_missing_glyph_substitution` --- ### 📝 Commits (1) - [`7def395`](https://github.com/microsoft/terminal/commit/7def3956c87f4209ff0705d9ac7d6f2825896cf4) Replace PolyTextOutW with ExtTextOutW ### 📊 Changes **1 file changed** (+7 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/gdi/paint.cpp` (+7 -2) </details> ### 📄 Description Replace PolyTextOutW with ExtTextOutW to allow substitution of missing glyphs from other fonts. Why not let Windows substitute the glyphs that are missing in the current font? Currently the GDI renderer of conhost/OpenConsole uses `PolyTextOutW` for drawing. `PolyTextOutW` doesn't try to substitute any missing glyphs, so the only way to see, say, Hiragana is to change the _whole font_ to something like MS Gothic (which is eye-bleeding, to be honest). A trivial replace `PolyTextOutW` -> `ExtTextOutW` does the trick. Switch to `PolyTextOutW` happened in Windows 7 along with introduction of conhost.exe. Substitution worked in previous Windows versions, where internal NT interfaces were used. # Before the change: ![image](https://user-images.githubusercontent.com/11453922/122759189-93ff3900-d291-11eb-89a9-b1d47aa22ed9.png) # After the change: ![image](https://user-images.githubusercontent.com/11453922/122759316-b4c78e80-d291-11eb-87aa-7cdc2979ae28.png) Closes #10472 --- <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:26:07 +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#28067