… | |
… | |
876 | FT_Set_Pixel_Sizes (face, 0, ftheight = prop.height); |
876 | FT_Set_Pixel_Sizes (face, 0, ftheight = prop.height); |
877 | } |
877 | } |
878 | |
878 | |
879 | XftUnlockFace (f); |
879 | XftUnlockFace (f); |
880 | |
880 | |
881 | d = XftDrawCreate (DISPLAY, DRAWABLE, r->display->visual, r->display->cmap); |
|
|
882 | if (!d) |
|
|
883 | return false; |
|
|
884 | |
|
|
885 | return true; |
881 | return true; |
886 | } |
882 | } |
887 | |
883 | |
888 | bool |
884 | bool |
889 | rxvt_font_xft::has_codepoint (uint32_t unicode) |
885 | rxvt_font_xft::has_codepoint (uint32_t unicode) |
… | |
… | |
894 | void |
890 | void |
895 | rxvt_font_xft::draw (int x, int y, |
891 | rxvt_font_xft::draw (int x, int y, |
896 | const text_t *text, int len, |
892 | const text_t *text, int len, |
897 | int fg, int bg) |
893 | int fg, int bg) |
898 | { |
894 | { |
|
|
895 | d = XftDrawCreate (DISPLAY, DRAWABLE, r->display->visual, r->display->cmap); |
|
|
896 | |
899 | if (bg >= 0 && bg != Color_bg) |
897 | if (bg >= 0 && bg != Color_bg) |
900 | XftDrawRect (d, &r->PixColors[bg].c, x, y, r->TermWin.fwidth * len, r->TermWin.fheight); |
898 | XftDrawRect (d, &r->PixColors[bg].c, x, y, r->TermWin.fwidth * len, r->TermWin.fheight); |
901 | else |
899 | else |
902 | clear_rect (x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
900 | clear_rect (x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
903 | |
901 | |