MCPcopy Create free account
hub / github.com/NetHack/NetHack / fontname_boldify

Function fontname_boldify

win/X11/winX.c:669–693  ·  view source on GitHub ↗

Change the full font name string so the weight is "bold" */

Source from the content-addressed store, hash-verified

667
668/* Change the full font name string so the weight is "bold" */
669char *
670fontname_boldify(const char *fontname)
671{
672 static char buf[BUFSZ];
673 char *bufp = buf;
674 int idx = 0;
675
676 while (*fontname) {
677 if (*fontname == '-')
678 idx++;
679 *bufp = *fontname;
680 if (idx == 3) {
681 strcat(buf, "bold");
682 bufp += 5;
683 do {
684 fontname++;
685 } while (*fontname && *fontname != '-');
686 } else {
687 bufp++;
688 fontname++;
689 }
690 }
691 *bufp = '\0';
692 return buf;
693}
694
695void
696load_boldfont(struct xwindow *wp, Widget w)

Callers 1

load_boldfontFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected