Skip to content

Commit

Permalink
runtime: Make "mono" select a monospaced font.
Browse files Browse the repository at this point in the history
Previously, "mono" and "fixed" were treated as the same thing and
asked for Lucida Sans, which is a proportionally spaced font.
Now, "mono" asks for Lucida Console, which is monospaced, and
"fixed" selects Lucida Sans (with the correct flags).
  • Loading branch information
Don-Ward committed Feb 10, 2024
1 parent 97f2113 commit b448f78
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/runtime/rmswin.ri
Original file line number Diff line number Diff line change
Expand Up @@ -1674,10 +1674,14 @@ HFONT mkfont(char *s, char is_3D)
* This is a legal Icon font spec.
* Check first for special "standard" family names.
*/
if (!strcmp(family, "mono") || !strcmp(family, "fixed")) {
stdfam = "Lucida Sans"; /* Lucida Console? */
if (!strcmp(family, "mono")) {
stdfam = "Lucida Console";
flags |= FONTFLAG_MONO + FONTFLAG_SANS;
}
else if ( !strcmp(family, "fixed")) {
stdfam = "Lucida Sans";
flags |= FONTFLAG_PROPORTIONAL + FONTFLAG_SANS;
}
else if (!strcmp(family, "typewriter")) {
stdfam = "Courier New"; /* was "courier" */
flags |= FONTFLAG_MONO + FONTFLAG_SERIF;
Expand Down
8 changes: 6 additions & 2 deletions src/runtime/rxwin.ri
Original file line number Diff line number Diff line change
Expand Up @@ -5698,10 +5698,14 @@ void mkfont(char *s, char is_3D)
* This is a legal Icon font spec.
* Check first for special "standard" family names.
*/
if (!strcmp(family, "mono") || !strcmp(family, "fixed")) {
stdfam = "Lucida Sans"; /* Lucida Console? */
if (!strcmp(family, "mono")) {
stdfam = "Lucida Console";
flags |= FONTFLAG_MONO + FONTFLAG_SANS;
}
else if ( !strcmp(family, "fixed")) {
stdfam = "Lucida Sans";
flags |= FONTFLAG_PROPORTIONAL + FONTFLAG_SANS;
}
else if (!strcmp(family, "typewriter")) {
stdfam = "Courier New"; /* was "courier" */
flags |= FONTFLAG_MONO + FONTFLAG_SERIF;
Expand Down

0 comments on commit b448f78

Please sign in to comment.