… | |
… | |
273 | set_name ("built-in pseudofont"); |
273 | set_name ("built-in pseudofont"); |
274 | |
274 | |
275 | return true; |
275 | return true; |
276 | } |
276 | } |
277 | |
277 | |
278 | bool has_codepoint (uint32_t unicode) |
278 | bool has_codepoint (unicode_t unicode) |
279 | { |
279 | { |
280 | if (unicode <= 0x001f) |
280 | if (unicode <= 0x001f) |
281 | return true; |
281 | return true; |
282 | |
282 | |
283 | if (unicode >= 0x0080 && unicode <= 0x009f) |
283 | if (unicode >= 0x0080 && unicode <= 0x009f) |
… | |
… | |
404 | |
404 | |
405 | rxvt_fontprop properties (); |
405 | rxvt_fontprop properties (); |
406 | |
406 | |
407 | bool load (const rxvt_fontprop &prop); |
407 | bool load (const rxvt_fontprop &prop); |
408 | |
408 | |
409 | bool has_codepoint (uint32_t unicode); |
409 | bool has_codepoint (unicode_t unicode); |
410 | |
410 | |
411 | void draw (rxvt_drawable &d, int x, int y, |
411 | void draw (rxvt_drawable &d, int x, int y, |
412 | const text_t *text, int len, |
412 | const text_t *text, int len, |
413 | int fg, int bg); |
413 | int fg, int bg); |
414 | |
414 | |
… | |
… | |
661 | f = 0; |
661 | f = 0; |
662 | } |
662 | } |
663 | } |
663 | } |
664 | |
664 | |
665 | bool |
665 | bool |
666 | rxvt_font_x11::has_codepoint (uint32_t unicode) |
666 | rxvt_font_x11::has_codepoint (unicode_t unicode) |
667 | { |
667 | { |
668 | uint32_t ch = FROM_UNICODE (cs, unicode); |
668 | uint32_t ch = FROM_UNICODE (cs, unicode); |
669 | |
669 | |
670 | if (ch == NOCHAR) |
670 | if (ch == NOCHAR) |
671 | return false; |
671 | return false; |
… | |
… | |
813 | |
813 | |
814 | void draw (rxvt_drawable &d, int x, int y, |
814 | void draw (rxvt_drawable &d, int x, int y, |
815 | const text_t *text, int len, |
815 | const text_t *text, int len, |
816 | int fg, int bg); |
816 | int fg, int bg); |
817 | |
817 | |
818 | bool has_codepoint (uint32_t unicode); |
818 | bool has_codepoint (unicode_t unicode); |
819 | |
819 | |
820 | protected: |
820 | protected: |
821 | XftFont *f; |
821 | XftFont *f; |
822 | }; |
822 | }; |
823 | |
823 | |
… | |
… | |
936 | |
936 | |
937 | return true; |
937 | return true; |
938 | } |
938 | } |
939 | |
939 | |
940 | bool |
940 | bool |
941 | rxvt_font_xft::has_codepoint (uint32_t unicode) |
941 | rxvt_font_xft::has_codepoint (unicode_t unicode) |
942 | { |
942 | { |
943 | return XftCharExists (DISPLAY, f, unicode); |
943 | return XftCharExists (DISPLAY, f, unicode); |
944 | } |
944 | } |
945 | |
945 | |
946 | void |
946 | void |
… | |
… | |
1149 | |
1149 | |
1150 | return true; |
1150 | return true; |
1151 | } |
1151 | } |
1152 | |
1152 | |
1153 | int |
1153 | int |
1154 | rxvt_fontset::find_font (uint32_t unicode) |
1154 | rxvt_fontset::find_font (unicode_t unicode) |
1155 | { |
1155 | { |
1156 | for (unsigned int i = 0; i < fonts.size (); i++) |
1156 | for (unsigned int i = 0; i < fonts.size (); i++) |
1157 | { |
1157 | { |
1158 | rxvt_font *f = fonts[i]; |
1158 | rxvt_font *f = fonts[i]; |
1159 | |
1159 | |