Skip to content

Commit

Permalink
Stop using fonts smaller than 5px in height
Browse files Browse the repository at this point in the history
The console must decide whether characters are half-vs-full width, and it
seems to make poorer decisions with fonts that are atypically small.  The
console properties dialog doesn't allow fonts smaller than 5px.

For example, (U+2026 HORIZONTAL ELLIPSIS) is half-width in Lucida Console
and Consolas, but with Lucida Console, 2px or 4px height, the console
thinks it's full-width.

Disallowing smaller fonts will force winpty to use larger windows, which
makes it more likely to hit the maximum window size constraint.

See microsoft/vscode#19665.
  • Loading branch information
rprichard committed Apr 24, 2017
1 parent af4bc8b commit b4db322
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/agent/ConsoleFont.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ struct Font {
// - misc/Utf16Echo.cc, misc/FontSurvey.cc, misc/SetFont.cc, misc/GetFont.cc

const FontSize kLucidaFontSizes[] = {
{ 2, 1 },
{ 4, 2 },
{ 5, 3 },
{ 6, 4 },
{ 8, 5 },
Expand All @@ -132,8 +130,6 @@ const FontSize kLucidaFontSizes[] = {

// Japanese. Used on Vista and Windows 7.
const FontSize k932GothicVista[] = {
{ 2, 1 },
{ 4, 2 },
{ 6, 3 },
{ 8, 4 },
{ 10, 5 },
Expand All @@ -150,7 +146,6 @@ const FontSize k932GothicVista[] = {
const FontSize k932GothicWin8[] = {
// All of these characters are broken w.r.t. full-size East Asian
// characters, but they're equally broken.
{ 3, 2 },
{ 5, 3 },
{ 7, 4 },
{ 9, 5 },
Expand All @@ -170,8 +165,6 @@ const FontSize k932GothicWin8[] = {

// Japanese. Used on the new Windows 10 console.
const FontSize k932GothicWin10[] = {
{ 2, 1 },
{ 4, 2 },
{ 6, 3 },
{ 8, 4 },
{ 10, 5 },
Expand All @@ -191,8 +184,6 @@ const FontSize k932GothicWin10[] = {

// Chinese Simplified.
const FontSize k936SimSun[] = {
{ 2, 1 },
{ 4, 2 },
{ 6, 3 },
{ 8, 4 },
{ 10, 5 },
Expand All @@ -212,8 +203,6 @@ const FontSize k936SimSun[] = {

// Korean.
const FontSize k949GulimChe[] = {
{ 2, 1 },
{ 4, 2 },
{ 6, 3 },
{ 8, 4 },
{ 10, 5 },
Expand All @@ -233,8 +222,6 @@ const FontSize k949GulimChe[] = {

// Chinese Traditional.
const FontSize k950MingLight[] = {
{ 2, 1 },
{ 4, 2 },
{ 6, 3 },
{ 8, 4 },
{ 10, 5 },
Expand Down

0 comments on commit b4db322

Please sign in to comment.