… | |
… | |
715 | * init = 1 - initialize |
715 | * init = 1 - initialize |
716 | * |
716 | * |
717 | * fontname == FONT_UP - switch to bigger font |
717 | * fontname == FONT_UP - switch to bigger font |
718 | * fontname == FONT_DN - switch to smaller font |
718 | * fontname == FONT_DN - switch to smaller font |
719 | */ |
719 | */ |
720 | void |
720 | bool |
721 | rxvt_term::change_font (int init, const char *fontname) |
721 | rxvt_term::change_font (const char *fontname) |
722 | {} |
722 | { |
|
|
723 | if (fontname == FONT_UP) |
|
|
724 | { |
|
|
725 | // TODO |
|
|
726 | } |
|
|
727 | else if (fontname == FONT_DN) |
|
|
728 | { |
|
|
729 | // TODO |
|
|
730 | } |
|
|
731 | else |
|
|
732 | { |
|
|
733 | rxvt_fontset *fs = new rxvt_fontset (this); |
723 | |
734 | |
724 | void |
735 | if (fs && fs->populate (fontname)) |
|
|
736 | { |
|
|
737 | delete TermWin.fontset; |
|
|
738 | TermWin.fontset = fs; |
|
|
739 | TermWin.fwidth = fs->base_font ()->width; |
|
|
740 | TermWin.fheight = fs->base_font ()->height; |
|
|
741 | TermWin.fbase = fs->base_font ()->ascent; |
|
|
742 | |
|
|
743 | // TODO: screen needs to be told about new fonts |
|
|
744 | |
|
|
745 | return true; |
|
|
746 | } |
|
|
747 | } |
|
|
748 | |
|
|
749 | return false; |
|
|
750 | } |
|
|
751 | |
|
|
752 | bool |
725 | rxvt_term::font_up_down (int n, int direction) |
753 | rxvt_term::font_up_down (int n, int direction) |
726 | {} |
754 | { |
|
|
755 | return false; |
|
|
756 | } |
727 | |
757 | |
728 | /*----------------------------------------------------------------------*/ |
758 | /*----------------------------------------------------------------------*/ |
729 | /*----------------------------------------------------------------------*/ |
759 | /*----------------------------------------------------------------------*/ |
730 | /* xterm sequences - title, iconName, color (exptl) */ |
760 | /* xterm sequences - title, iconName, color (exptl) */ |
731 | void |
761 | void |