Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: Make "mono" select a monospaced font. #358

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading