Skip to content

Commit

Permalink
Merge pull request uniconproject#358 from Don-Ward/monospace-font
Browse files Browse the repository at this point in the history
runtime: Make "mono" select a monospaced font.
  • Loading branch information
Jafaral authored Feb 12, 2024
2 parents 5f71aa6 + d9560c1 commit e9ed0cf
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 e9ed0cf

Please sign in to comment.