[PR #10478] Replace PolyTextOutW with ExtTextOutW #28072

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

Original Pull Request: https://github.com/microsoft/terminal/pull/10478

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/microsoft/terminal/pull/10478 **State:** closed **Merged:** Yes --- 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
claunia added the pull-request label 2026-01-31 09:26:08 +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#28072