1 | /*--------------------------------*-C-*---------------------------------*; |
1 | /*--------------------------------*-C-*---------------------------------*; |
2 | * File: defaultfont.C |
2 | * File: defaultfont.C |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * Copyright (c) 2003 Marc Lehmann rxvt@plan9.de> |
4 | * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com> |
5 | * - original version. |
5 | * - original version. |
6 | * |
6 | * |
7 | * This program is free software; you can redistribute it and/or modify |
7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by |
8 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2 of the License, or |
9 | * the Free Software Foundation; either version 2 of the License, or |
… | |
… | |
24 | #include "defaultfont.h" |
24 | #include "defaultfont.h" |
25 | |
25 | |
26 | #include <cstdlib> |
26 | #include <cstdlib> |
27 | |
27 | |
28 | #define DISPLAY r->display->display |
28 | #define DISPLAY r->display->display |
29 | #define DRAWABLE r->TermWin.vt |
|
|
30 | #define GC r->TermWin.gc |
29 | #define GC r->TermWin.gc |
31 | |
30 | |
32 | const struct rxvt_fallback_font { |
31 | const struct rxvt_fallback_font { |
33 | codeset cs; |
32 | codeset cs; |
34 | const char *name; |
33 | const char *name; |
… | |
… | |
99 | { CS_UNKNOWN, 0 } |
98 | { CS_UNKNOWN, 0 } |
100 | }; |
99 | }; |
101 | |
100 | |
102 | ///////////////////////////////////////////////////////////////////////////// |
101 | ///////////////////////////////////////////////////////////////////////////// |
103 | |
102 | |
|
|
103 | rxvt_drawable::~rxvt_drawable () |
|
|
104 | { |
|
|
105 | if (xftdrawable) |
|
|
106 | XftDrawDestroy (xftdrawable); |
|
|
107 | } |
|
|
108 | |
|
|
109 | rxvt_drawable::operator XftDraw *() |
|
|
110 | { |
|
|
111 | if (!xftdrawable) |
|
|
112 | xftdrawable = XftDrawCreate (display->display, drawable, display->visual, display->cmap); |
|
|
113 | |
|
|
114 | return xftdrawable; |
|
|
115 | } |
|
|
116 | |
|
|
117 | ///////////////////////////////////////////////////////////////////////////// |
|
|
118 | |
104 | static void *enc_buf; |
119 | static void *enc_buf; |
105 | static uint32_t enc_len; |
120 | static uint32_t enc_len; |
106 | |
121 | |
107 | static inline void * |
122 | static inline void * |
108 | get_enc_buf (uint32_t len) |
123 | get_enc_buf (uint32_t len) |
… | |
… | |
161 | } |
176 | } |
162 | |
177 | |
163 | ///////////////////////////////////////////////////////////////////////////// |
178 | ///////////////////////////////////////////////////////////////////////////// |
164 | |
179 | |
165 | void |
180 | void |
166 | rxvt_font::clear_rect (int x, int y, int w, int h, int color) |
181 | rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color) |
167 | { |
182 | { |
168 | if (color == Color_bg) |
183 | if (color == Color_bg) |
169 | XClearArea (DISPLAY, DRAWABLE, x, y, w, h, FALSE); |
184 | XClearArea (d.display->display, d, x, y, w, h, FALSE); |
170 | else if (color >= 0) |
185 | else if (color >= 0) |
171 | { |
186 | { |
|
|
187 | #if XFT |
|
|
188 | XftDrawRect (d, &r->PixColors[color].c, x, y, w, h); |
|
|
189 | #else |
172 | XSetForeground (DISPLAY, GC, r->PixColors[color]); |
190 | XSetForeground (d.display->display, GC, r->PixColors[color]); |
173 | XFillRectangle (DISPLAY, DRAWABLE, GC, x, y, w, h); |
191 | XFillRectangle (d.display->display, d, GC, x, y, w, h); |
|
|
192 | #endif |
174 | } |
193 | } |
175 | } |
194 | } |
176 | |
195 | |
177 | static const char *linedraw_cmds[128] = { |
196 | static const char *linedraw_cmds[128] = { |
178 | "1hH", "2hH", "1vV", "2vV", |
197 | "1hH", "2hH", "1vV", "2vV", |
… | |
… | |
263 | } |
282 | } |
264 | |
283 | |
265 | return false; |
284 | return false; |
266 | } |
285 | } |
267 | |
286 | |
268 | void draw (int x, int y, |
287 | void draw (rxvt_drawable &d, int x, int y, |
269 | const text_t *text, int len, |
288 | const text_t *text, int len, |
270 | int fg, int bg); |
289 | int fg, int bg); |
271 | }; |
290 | }; |
272 | |
291 | |
273 | void |
292 | void |
274 | rxvt_font_default::draw (int x, int y, |
293 | rxvt_font_default::draw (rxvt_drawable &d, int x, int y, |
275 | const text_t *text, int len, |
294 | const text_t *text, int len, |
276 | int fg, int bg) |
295 | int fg, int bg) |
277 | { |
296 | { |
278 | clear_rect (x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
297 | clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
279 | |
298 | |
280 | XSetForeground (DISPLAY, GC, r->PixColors[fg]); |
299 | XSetForeground (d.display->display, GC, r->PixColors[fg]); |
281 | |
300 | |
282 | while (len--) |
301 | while (len--) |
283 | { |
302 | { |
284 | text_t t = *text++; |
303 | text_t t = *text++; |
285 | |
304 | |
286 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
305 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
287 | { |
306 | { |
288 | const char *p = linedraw_cmds[t - 0x2500]; |
307 | const char *p = linedraw_cmds[t - 0x2500]; |
289 | |
308 | |
290 | int x0 = x, x1 = x + r->TermWin.fwidth / 2, x2 = x + r->TermWin.fwidth ; |
309 | int x0 = x, x1 = x + r->TermWin.fwidth / 2, x2 = x + r->TermWin.fwidth - 1; |
291 | int y0 = y, y1 = y + r->TermWin.fheight / 2, y2 = y + r->TermWin.fheight; |
310 | int y0 = y, y1 = y + r->TermWin.fheight / 2, y2 = y + r->TermWin.fheight - 1; |
292 | |
311 | |
293 | XGCValues gcv; |
312 | XGCValues gcv; |
294 | |
313 | |
295 | while (*p) |
314 | while (*p) |
296 | { |
315 | { |
297 | switch (*p++) |
316 | switch (*p++) |
298 | { |
317 | { |
299 | case '1': |
318 | case '1': |
300 | gcv.line_width = 0; |
319 | gcv.line_width = 0; |
301 | XChangeGC (DISPLAY, GC, GCLineWidth, &gcv); |
320 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
302 | break; |
321 | break; |
303 | |
322 | |
304 | case '2': |
323 | case '2': |
305 | gcv.line_width = 2; |
324 | gcv.line_width = 2; |
306 | XChangeGC (DISPLAY, GC, GCLineWidth, &gcv); |
325 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
307 | break; |
326 | break; |
308 | |
327 | |
309 | case 'h': XDrawLine (DISPLAY, DRAWABLE, GC, x0, y1, x1, y1); break; |
328 | case 'h': XDrawLine (d.display->display, d, GC, x0, y1, x1, y1); break; |
310 | case 'H': XDrawLine (DISPLAY, DRAWABLE, GC, x1, y1, x2, y1); break; |
329 | case 'H': XDrawLine (d.display->display, d, GC, x1, y1, x2, y1); break; |
311 | case 'v': XDrawLine (DISPLAY, DRAWABLE, GC, x1, y0, x1, y1); break; |
330 | case 'v': XDrawLine (d.display->display, d, GC, x1, y0, x1, y1); break; |
312 | case 'V': XDrawLine (DISPLAY, DRAWABLE, GC, x1, y1, x1, y2); break; |
331 | case 'V': XDrawLine (d.display->display, d, GC, x1, y1, x1, y2); break; |
313 | case 'a': XDrawLine (DISPLAY, DRAWABLE, GC, x0, y2, x2, y0); break; |
332 | case 'a': XDrawLine (d.display->display, d, GC, x0, y2, x2, y0); break; |
314 | case 'b': XDrawLine (DISPLAY, DRAWABLE, GC, x0, y0, x2, y2); break; |
333 | case 'b': XDrawLine (d.display->display, d, GC, x0, y0, x2, y2); break; |
315 | } |
334 | } |
316 | } |
335 | } |
317 | |
336 | |
318 | gcv.line_width = 0; |
337 | gcv.line_width = 0; |
319 | XChangeGC (DISPLAY, GC, GCLineWidth, &gcv); |
338 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
320 | } |
339 | } |
321 | else |
340 | else |
322 | switch (*text++) |
341 | switch (*text++) |
323 | { |
342 | { |
324 | case NOCHAR: |
343 | case NOCHAR: |
325 | case ZERO_WIDTH_CHAR: |
344 | case ZERO_WIDTH_CHAR: |
326 | break; |
345 | break; |
327 | default: |
346 | default: |
328 | XDrawRectangle (DISPLAY, DRAWABLE, GC, x + 2, y + 2, r->TermWin.fwidth - 5, r->TermWin.fheight - 5); |
347 | XDrawRectangle (d.display->display, d, GC, x + 2, y + 2, r->TermWin.fwidth - 5, r->TermWin.fheight - 5); |
329 | } |
348 | } |
330 | |
349 | |
331 | x += r->TermWin.fwidth; |
350 | x += r->TermWin.fwidth; |
332 | } |
351 | } |
333 | } |
352 | } |
… | |
… | |
343 | |
362 | |
344 | bool load (const rxvt_fontprop &prop); |
363 | bool load (const rxvt_fontprop &prop); |
345 | |
364 | |
346 | bool has_codepoint (uint32_t unicode); |
365 | bool has_codepoint (uint32_t unicode); |
347 | |
366 | |
348 | void draw (int x, int y, |
367 | void draw (rxvt_drawable &d, int x, int y, |
349 | const text_t *text, int len, |
368 | const text_t *text, int len, |
350 | int fg, int bg); |
369 | int fg, int bg); |
351 | |
370 | |
352 | XFontStruct *f; |
371 | XFontStruct *f; |
353 | codeset cs; |
372 | codeset cs; |
… | |
… | |
428 | |
447 | |
429 | XFontStruct *f = XLoadQueryFont (DISPLAY, name); |
448 | XFontStruct *f = XLoadQueryFont (DISPLAY, name); |
430 | |
449 | |
431 | if (f) |
450 | if (f) |
432 | { |
451 | { |
433 | // the font should really exists now. if not, we have a problem |
452 | // the font should really exist now. if not, we have a problem |
434 | // (e.g. if the user did xset fp rehash just when we were searching fonts). |
453 | // (e.g. if the user did xset fp rehash just when we were searching fonts). |
435 | // in that case, just return garbage. |
454 | // in that case, just return garbage. |
436 | bool ret = set_properties (p, f); |
455 | bool ret = set_properties (p, f); |
437 | XFreeFont (DISPLAY, f); |
456 | XFreeFont (DISPLAY, f); |
438 | return ret; |
457 | return ret; |
… | |
… | |
644 | |
663 | |
645 | return true; |
664 | return true; |
646 | } |
665 | } |
647 | |
666 | |
648 | void |
667 | void |
649 | rxvt_font_x11::draw (int x, int y, |
668 | rxvt_font_x11::draw (rxvt_drawable &d, int x, int y, |
650 | const text_t *text, int len, |
669 | const text_t *text, int len, |
651 | int fg, int bg) |
670 | int fg, int bg) |
652 | { |
671 | { |
653 | // this looks like a mess /. |
672 | // this looks like a mess /. |
654 | // and it is a mess /. |
673 | // and it is a mess /. |
… | |
… | |
670 | { |
689 | { |
671 | const XChar2b *xc = enc_xchar2b (text, len, cs, slow); |
690 | const XChar2b *xc = enc_xchar2b (text, len, cs, slow); |
672 | |
691 | |
673 | if (bg == Color_bg && !slow) |
692 | if (bg == Color_bg && !slow) |
674 | { |
693 | { |
675 | XChangeGC (DISPLAY, GC, GCForeground | GCBackground | GCFont, &v); |
694 | XChangeGC (d.display->display, GC, GCForeground | GCBackground | GCFont, &v); |
676 | XDrawImageString16 (DISPLAY, DRAWABLE, GC, x, y + base, xc, len); |
695 | XDrawImageString16 (d.display->display, d, GC, x, y + base, xc, len); |
677 | } |
696 | } |
678 | else |
697 | else |
679 | { |
698 | { |
680 | clear_rect (x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
699 | clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
681 | |
700 | |
682 | XChangeGC (DISPLAY, GC, GCForeground | GCFont, &v); |
701 | XChangeGC (d.display->display, GC, GCForeground | GCFont, &v); |
683 | |
702 | |
684 | if (slow) |
703 | if (slow) |
685 | { |
704 | { |
686 | do |
705 | do |
687 | { |
706 | { |
688 | if (xc->byte1 || xc->byte2) |
707 | if (xc->byte1 || xc->byte2) |
689 | XDrawString16 (DISPLAY, DRAWABLE, GC, x, y + base, xc, 1); |
708 | XDrawString16 (d.display->display, d, GC, x, y + base, xc, 1); |
690 | |
709 | |
691 | x += r->TermWin.fwidth; |
710 | x += r->TermWin.fwidth; |
692 | xc++; len--; |
711 | xc++; len--; |
693 | } |
712 | } |
694 | while (len); |
713 | while (len); |
695 | } |
714 | } |
696 | else |
715 | else |
697 | XDrawString16 (DISPLAY, DRAWABLE, GC, x, y + base, xc, len); |
716 | XDrawString16 (d.display->display, d, GC, x, y + base, xc, len); |
698 | } |
717 | } |
699 | } |
718 | } |
700 | else |
719 | else |
701 | { |
720 | { |
702 | const char *xc = enc_char (text, len, cs, slow); |
721 | const char *xc = enc_char (text, len, cs, slow); |
703 | |
722 | |
704 | if (bg == Color_bg && !slow) |
723 | if (bg == Color_bg && !slow) |
705 | { |
724 | { |
706 | XChangeGC (DISPLAY, GC, GCForeground | GCBackground | GCFont, &v); |
725 | XChangeGC (d.display->display, GC, GCForeground | GCBackground | GCFont, &v); |
707 | XDrawImageString (DISPLAY, DRAWABLE, GC, x, y + base, xc, len); |
726 | XDrawImageString (d.display->display, d, GC, x, y + base, xc, len); |
708 | } |
727 | } |
709 | else |
728 | else |
710 | { |
729 | { |
711 | clear_rect (x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
730 | clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
712 | |
731 | |
713 | XChangeGC (DISPLAY, GC, GCForeground | GCFont, &v); |
732 | XChangeGC (d.display->display, GC, GCForeground | GCFont, &v); |
714 | |
733 | |
715 | if (slow) |
734 | if (slow) |
716 | { |
735 | { |
717 | do |
736 | do |
718 | { |
737 | { |
719 | if (*xc) |
738 | if (*xc) |
720 | XDrawString (DISPLAY, DRAWABLE, GC, x, y + base, xc, 1); |
739 | XDrawString (d.display->display, d, GC, x, y + base, xc, 1); |
721 | |
740 | |
722 | x += r->TermWin.fwidth; |
741 | x += r->TermWin.fwidth; |
723 | xc++; len--; |
742 | xc++; len--; |
724 | } |
743 | } |
725 | while (len); |
744 | while (len); |
726 | } |
745 | } |
727 | else |
746 | else |
728 | XDrawString (DISPLAY, DRAWABLE, GC, x, y + base, xc, len); |
747 | XDrawString (d.display->display, d, GC, x, y + base, xc, len); |
729 | } |
748 | } |
730 | } |
749 | } |
731 | } |
750 | } |
732 | |
751 | |
733 | ///////////////////////////////////////////////////////////////////////////// |
752 | ///////////////////////////////////////////////////////////////////////////// |
… | |
… | |
738 | //#define SWATHBITS (UNIBITS / 2 + 3) // minimum size for "full" tables |
757 | //#define SWATHBITS (UNIBITS / 2 + 3) // minimum size for "full" tables |
739 | #define SWATHBITS 8 |
758 | #define SWATHBITS 8 |
740 | #endif |
759 | #endif |
741 | |
760 | |
742 | struct rxvt_font_xft : rxvt_font { |
761 | struct rxvt_font_xft : rxvt_font { |
743 | rxvt_font_xft () { f = 0; d = 0; } |
762 | rxvt_font_xft () { f = 0; } |
744 | |
763 | |
745 | void clear (); |
764 | void clear (); |
746 | |
765 | |
747 | rxvt_fontprop properties (); |
766 | rxvt_fontprop properties (); |
748 | |
767 | |
749 | bool load (const rxvt_fontprop &prop); |
768 | bool load (const rxvt_fontprop &prop); |
750 | |
769 | |
751 | void draw (int x, int y, |
770 | void draw (rxvt_drawable &d, int x, int y, |
752 | const text_t *text, int len, |
771 | const text_t *text, int len, |
753 | int fg, int bg); |
772 | int fg, int bg); |
754 | |
773 | |
755 | bool has_codepoint (uint32_t unicode); |
774 | bool has_codepoint (uint32_t unicode); |
756 | |
775 | |
757 | protected: |
776 | protected: |
758 | XftFont *f; |
777 | XftFont *f; |
759 | XftDraw *d; |
|
|
760 | }; |
778 | }; |
761 | |
779 | |
762 | void |
780 | void |
763 | rxvt_font_xft::clear () |
781 | rxvt_font_xft::clear () |
764 | { |
782 | { |
765 | if (f) |
783 | if (f) |
766 | { |
784 | { |
767 | XftFontClose (DISPLAY, f); |
785 | XftFontClose (DISPLAY, f); |
768 | f = 0; |
786 | f = 0; |
769 | } |
|
|
770 | |
|
|
771 | if (d) |
|
|
772 | { |
|
|
773 | XftDrawDestroy (d); |
|
|
774 | d = 0; |
|
|
775 | } |
787 | } |
776 | } |
788 | } |
777 | |
789 | |
778 | rxvt_fontprop |
790 | rxvt_fontprop |
779 | rxvt_font_xft::properties () |
791 | rxvt_font_xft::properties () |
… | |
… | |
886 | { |
898 | { |
887 | return XftCharExists (DISPLAY, f, unicode); |
899 | return XftCharExists (DISPLAY, f, unicode); |
888 | } |
900 | } |
889 | |
901 | |
890 | void |
902 | void |
891 | rxvt_font_xft::draw (int x, int y, |
903 | rxvt_font_xft::draw (rxvt_drawable &d, int x, int y, |
892 | const text_t *text, int len, |
904 | const text_t *text, int len, |
893 | int fg, int bg) |
905 | int fg, int bg) |
894 | { |
906 | { |
895 | if (!d) |
|
|
896 | d = XftDrawCreate (DISPLAY, DRAWABLE, r->display->visual, r->display->cmap); |
|
|
897 | |
|
|
898 | if (bg >= 0 && bg != Color_bg) |
|
|
899 | XftDrawRect (d, &r->PixColors[bg].c, x, y, r->TermWin.fwidth * len, r->TermWin.fheight); |
|
|
900 | else |
|
|
901 | clear_rect (x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
907 | clear_rect (d, x, y, r->TermWin.fwidth * len, r->TermWin.fheight, bg); |
902 | |
908 | |
903 | if (!slow && width == r->TermWin.fwidth && 0) |
909 | if (!slow && width == r->TermWin.fwidth && 0) |
904 | { |
910 | { |
905 | if (sizeof (text_t) == sizeof (FcChar16)) |
911 | if (sizeof (text_t) == sizeof (FcChar16)) |
906 | XftDrawString16 (d, &r->PixColors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar16 *)text, len); |
912 | XftDrawString16 (d, &r->PixColors[fg].c, f, x, y + r->TermWin.fbase, (const FcChar16 *)text, len); |
… | |
… | |
918 | fwidth *= 2; |
924 | fwidth *= 2; |
919 | |
925 | |
920 | XGlyphInfo extents; |
926 | XGlyphInfo extents; |
921 | if (sizeof (text_t) == sizeof (FcChar16)) |
927 | if (sizeof (text_t) == sizeof (FcChar16)) |
922 | { |
928 | { |
923 | XftTextExtents16 (DISPLAY, f, (const FcChar16 *)text, 1, &extents); |
929 | XftTextExtents16 (d.display->display, f, (const FcChar16 *)text, 1, &extents); |
924 | XftDrawString16 (d, &r->PixColors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, |
930 | XftDrawString16 (d, &r->PixColors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, |
925 | y + r->TermWin.fbase, (const FcChar16 *)text, 1); |
931 | y + r->TermWin.fbase, (const FcChar16 *)text, 1); |
926 | } |
932 | } |
927 | else |
933 | else |
928 | { |
934 | { |
929 | XGlyphInfo extents; |
935 | XGlyphInfo extents; |
930 | XftTextExtents32 (DISPLAY, f, (const FcChar32 *)text, 1, &extents); |
936 | XftTextExtents32 (d.display->display, f, (const FcChar32 *)text, 1, &extents); |
931 | XftDrawString32 (d, &r->PixColors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, |
937 | XftDrawString32 (d, &r->PixColors[fg].c, f, x + extents.x + (fwidth - extents.width) / 2, |
932 | y + r->TermWin.fbase, (const FcChar32 *)text, 1); |
938 | y + r->TermWin.fbase, (const FcChar32 *)text, 1); |
933 | } |
939 | } |
934 | } |
940 | } |
935 | |
941 | |
… | |
… | |
1068 | } |
1074 | } |
1069 | |
1075 | |
1070 | return true; |
1076 | return true; |
1071 | } |
1077 | } |
1072 | |
1078 | |
1073 | void |
1079 | bool |
1074 | rxvt_fontset::populate (const char *desc) |
1080 | rxvt_fontset::populate (const char *desc) |
1075 | { |
1081 | { |
1076 | clear (); |
1082 | clear (); |
1077 | |
1083 | |
1078 | fonts.push_back (new_font (0, CS_UNICODE)); |
1084 | fonts.push_back (new_font (0, CS_UNICODE)); |
… | |
… | |
1090 | add_fonts ("fixed"); |
1096 | add_fonts ("fixed"); |
1091 | base_id = fonts.size () - 1; |
1097 | base_id = fonts.size () - 1; |
1092 | } |
1098 | } |
1093 | |
1099 | |
1094 | if ((int)fonts.size () <= base_id || !realize_font (base_id)) |
1100 | if ((int)fonts.size () <= base_id || !realize_font (base_id)) |
1095 | { |
1101 | return false; |
1096 | fprintf (stderr, "unable to load a base font, please provide one using -fn fontname\n"); |
|
|
1097 | exit (1); |
|
|
1098 | } |
|
|
1099 | |
1102 | |
1100 | base_prop = fonts[base_id]->properties (); |
1103 | base_prop = fonts[base_id]->properties (); |
|
|
1104 | |
|
|
1105 | return true; |
1101 | } |
1106 | } |
1102 | |
1107 | |
1103 | int |
1108 | int |
1104 | rxvt_fontset::find_font (uint32_t unicode) |
1109 | rxvt_fontset::find_font (uint32_t unicode) |
1105 | { |
1110 | { |