Change the full font name string so the weight is "bold" */
| 667 | |
| 668 | /* Change the full font name string so the weight is "bold" */ |
| 669 | char * |
| 670 | fontname_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 | |
| 695 | void |
| 696 | load_boldfont(struct xwindow *wp, Widget w) |