1 | /*--------------------------------*-C-*---------------------------------*; |
1 | /*--------------------------------*-C-*---------------------------------* |
2 | * File: defaultfont.C |
2 | * File: defaultfont.C |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com> |
4 | * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com> |
5 | * - original version. |
5 | * - original version. |
6 | * |
6 | * |
… | |
… | |
30 | |
30 | |
31 | const struct rxvt_fallback_font { |
31 | const struct rxvt_fallback_font { |
32 | codeset cs; |
32 | codeset cs; |
33 | const char *name; |
33 | const char *name; |
34 | } fallback_fonts[] = { |
34 | } fallback_fonts[] = { |
35 | { CS_ISO8859_1, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-1" }, |
35 | { CS_ISO8859_1, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-1" }, |
36 | { CS_ISO8859_15, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-15" }, |
36 | { CS_ISO8859_15, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-15" }, |
37 | { CS_ISO8859_15, "-*-*-*-r-*--*-*-*-*-c-*-fcd8859-15" }, |
37 | { CS_ISO8859_15, "-*-*-*-r-*--*-*-*-*-c-*-fcd8859-15" }, |
38 | |
38 | |
39 | #if ENCODING_EU |
39 | #if ENCODING_EU |
40 | // cyrillic |
40 | // cyrillic |
41 | { CS_KOI8_R, "-*-*-*-r-*--*-*-*-*-c-*-koi8-r" }, |
41 | { CS_KOI8_R, "-*-*-*-r-*--*-*-*-*-c-*-koi8-r" }, |
42 | { CS_KOI8_U, "-*-*-*-r-*--*-*-*-*-c-*-koi8-u" }, |
42 | { CS_KOI8_U, "-*-*-*-r-*--*-*-*-*-c-*-koi8-u" }, |
43 | |
43 | |
44 | { CS_ISO8859_2, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-2" }, |
44 | { CS_ISO8859_2, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-2" }, |
45 | { CS_ISO8859_3, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-3" }, |
45 | { CS_ISO8859_3, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-3" }, |
46 | { CS_ISO8859_4, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-4" }, |
46 | { CS_ISO8859_4, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-4" }, |
47 | { CS_ISO8859_5, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-5" }, |
47 | { CS_ISO8859_5, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-5" }, |
48 | { CS_ISO8859_6, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-6" }, |
48 | { CS_ISO8859_6, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-6" }, |
49 | { CS_ISO8859_7, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-7" }, |
49 | { CS_ISO8859_7, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-7" }, |
50 | { CS_ISO8859_8, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-8" }, |
50 | { CS_ISO8859_8, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-8" }, |
51 | { CS_ISO8859_9, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-9" }, |
51 | { CS_ISO8859_9, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-9" }, |
52 | { CS_ISO8859_10, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-10" }, |
52 | { CS_ISO8859_10, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-10" }, |
53 | { CS_ISO8859_11, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-11" }, |
53 | { CS_ISO8859_11, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-11" }, |
54 | { CS_ISO8859_13, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-13" }, |
54 | { CS_ISO8859_13, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-13" }, |
55 | { CS_ISO8859_14, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-14" }, |
55 | { CS_ISO8859_14, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-14" }, |
56 | { CS_ISO8859_16, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-16" }, |
56 | { CS_ISO8859_16, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-16" }, |
57 | #endif |
57 | #endif |
58 | |
58 | |
59 | // japanese |
59 | // japanese |
60 | #if ENCODING_JP || ENCODING_JP_EXT |
60 | #if ENCODING_JP || ENCODING_JP_EXT |
61 | # if XFT |
61 | # if XFT |
62 | // prefer xft for complex scripts |
62 | // prefer xft for complex scripts |
63 | { CS_UNICODE, "xft:Kochi Gothic:antialias=false" }, |
63 | { CS_UNICODE, "xft:Kochi Gothic:antialias=false" }, |
64 | # endif |
64 | # endif |
65 | { CS_JIS0201_1976_0, "-*-mincho-*-r-*--*-*-*-*-c-*-jisx0201*-0" }, |
65 | { CS_JIS0201_1976_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0201*-0" }, |
66 | { CS_JIS0208_1990_0, "-*-mincho-*-r-*--*-*-*-*-c-*-jisx0208*-0" }, |
66 | { CS_JIS0208_1990_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0208*-0" }, |
67 | { CS_JIS0212_1990_0, "-*-mincho-*-r-*--*-*-*-*-c-*-jisx0212*-0" }, |
67 | { CS_JIS0212_1990_0, "-*-*-*-r-*--*-*-*-*-c-*-jisx0212*-0" }, |
68 | #endif |
68 | #endif |
69 | |
69 | |
70 | #if ENCODING_CN || ENCODING_CN_EXT |
70 | #if ENCODING_CN || ENCODING_CN_EXT |
71 | # if XFT |
71 | # if XFT |
72 | { CS_BIG5_EXT, "xft:AR PL Mingti2L Big5" }, |
72 | { CS_BIG5_EXT, "xft:AR PL Mingti2L Big5" }, |
… | |
… | |
89 | #endif |
89 | #endif |
90 | |
90 | |
91 | #if XFT |
91 | #if XFT |
92 | { CS_UNICODE, "xft:Andale Mono" }, |
92 | { CS_UNICODE, "xft:Andale Mono" }, |
93 | { CS_UNICODE, "xft:Arial Unicode MS" }, |
93 | { CS_UNICODE, "xft:Arial Unicode MS" }, |
|
|
94 | { CS_UNICODE, "xft:FreeMono" }, |
94 | #endif |
95 | #endif |
95 | { CS_UNICODE, "-*-lucidatypewriter-*-*-*-*-*-*-*-*-m-*-iso10646-1" }, |
96 | { CS_UNICODE, "-*-lucidatypewriter-*-*-*-*-*-*-*-*-m-*-iso10646-1" }, |
96 | { CS_UNICODE, "xft:FreeMono" }, |
|
|
97 | { CS_UNICODE, "-*-unifont-*-*-*-*-*-*-*-*-c-*-iso10646-1" }, |
97 | { CS_UNICODE, "-*-unifont-*-*-*-*-*-*-*-*-c-*-iso10646-1" }, |
98 | { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-c-*-iso10646-1" }, |
98 | { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-c-*-iso10646-1" }, |
99 | { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-m-*-iso10646-1" }, |
99 | { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-m-*-iso10646-1" }, |
100 | |
100 | |
101 | #if UNICODE_3 && XFT |
101 | #if UNICODE_3 && XFT |
… | |
… | |
230 | bool has_codepoint (unicode_t unicode) |
230 | bool has_codepoint (unicode_t unicode) |
231 | { |
231 | { |
232 | if (unicode <= 0x001f) |
232 | if (unicode <= 0x001f) |
233 | return true; |
233 | return true; |
234 | |
234 | |
235 | if (unicode >= 0x0080 && unicode <= 0x009f) |
235 | if (unicode <= 0x007f) |
|
|
236 | return false; |
|
|
237 | |
|
|
238 | if (unicode <= 0x009f) |
236 | return true; |
239 | return true; |
237 | |
240 | |
238 | if (unicode >= 0x2500 && unicode <= 0x259f |
241 | if (unicode >= 0x2500 && unicode <= 0x259f) |
239 | && linedraw_offs[unicode - 0x2500] & 15) |
|
|
240 | return true; |
242 | return true; |
241 | |
243 | |
242 | if (IS_COMPOSE (unicode)) |
244 | if (IS_COMPOSE (unicode)) |
243 | return true; |
245 | return true; |
244 | |
246 | |
… | |
… | |
270 | #if ENABLE_COMBINING |
272 | #if ENABLE_COMBINING |
271 | compose_char *cc; |
273 | compose_char *cc; |
272 | #endif |
274 | #endif |
273 | text_t t = *text++; |
275 | text_t t = *text++; |
274 | |
276 | |
275 | int W = r->TermWin.fwidth , w = (W - 1) / 2; |
|
|
276 | int H = r->TermWin.fheight, h = (H - 1) / 2; |
|
|
277 | int x0 = x, x1 = x + w, x2 = x + r->TermWin.fwidth ; |
|
|
278 | int y0 = y, y1 = y + h, y2 = y + r->TermWin.fheight; |
|
|
279 | |
|
|
280 | if (0x2500 <= t && t <= 0x259f |
277 | if (0x2500 <= t && t <= 0x259f) |
281 | && linedraw_offs[t - 0x2500] & 15) |
|
|
282 | { |
278 | { |
283 | uint16_t offs = linedraw_offs[t - 0x2500]; |
279 | uint16_t offs = linedraw_offs[t - 0x2500]; |
284 | uint32_t *a = linedraw_command + (offs >> 4); |
280 | uint32_t *a = linedraw_command + (offs >> 4); |
285 | uint32_t *b = a + (offs & 15); |
281 | uint32_t *b = a + (offs & 15); |
|
|
282 | |
|
|
283 | int W = r->TermWin.fwidth; |
|
|
284 | int H = r->TermWin.fheight; |
286 | |
285 | |
287 | int x_[16]; |
286 | int x_[16]; |
288 | int y_[16]; |
287 | int y_[16]; |
289 | |
288 | |
290 | for (int i = 0; i <= 8; i++) |
289 | for (int i = 0; i <= 8; i++) |
… | |
… | |
333 | XChangeGC (d.display->display, TGC, |
332 | XChangeGC (d.display->display, TGC, |
334 | GCFillStyle | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin, |
333 | GCFillStyle | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin, |
335 | &gcv); |
334 | &gcv); |
336 | } |
335 | } |
337 | |
336 | |
338 | |
|
|
339 | XFillRectangle (d.display->display, d, TGC, x1, y1, x2 - x1 + 1, y2 - y1 + 1); |
337 | XFillRectangle (d.display->display, d, TGC, x1, y1, x2 - x1 + 1, y2 - y1 + 1); |
340 | |
338 | |
341 | if (a) |
339 | if (a) |
342 | { |
340 | { |
343 | XFreePixmap (d.display->display, gcv.stipple); |
341 | XFreePixmap (d.display->display, gcv.stipple); |
344 | gcv.stipple = 0; |
342 | gcv.stipple = 0; |
345 | gcv.fill_style = FillSolid; |
343 | gcv.fill_style = FillSolid; |
346 | XChangeGC (d.display->display, TGC, GCFillStyle, &gcv); |
344 | XChangeGC (d.display->display, TGC, GCFillStyle, &gcv); |
347 | } |
345 | } |
348 | |
|
|
349 | break; |
346 | break; |
350 | case 2: // arc |
347 | case 2: // arc |
351 | XDrawArc (d.display->display, d, TGC, |
348 | XDrawArc (d.display->display, d, TGC, |
352 | x1 - W/2, y1 - H/2, W-1, H-1, |
349 | x1 - W/2, y1 - H/2, W-1, H-1, |
353 | (a - 1) * 90*64, (b - 1) * 90*64); |
350 | (a - 1) * 90*64, (b - 1) * 90*64); |
… | |
… | |
414 | |
411 | |
415 | XFontStruct *f; |
412 | XFontStruct *f; |
416 | codeset cs; |
413 | codeset cs; |
417 | bool enc2b, encm; |
414 | bool enc2b, encm; |
418 | |
415 | |
419 | const char *get_property (XFontStruct *f, const char *property, const char *repl) const; |
416 | char *get_property (XFontStruct *f, const char *property, const char *repl) const; |
420 | bool set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth); |
417 | bool set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth); |
421 | bool set_properties (rxvt_fontprop &p, XFontStruct *f); |
418 | bool set_properties (rxvt_fontprop &p, XFontStruct *f); |
422 | bool set_properties (rxvt_fontprop &p, const char *name); |
419 | bool set_properties (rxvt_fontprop &p, const char *name); |
423 | }; |
420 | }; |
424 | |
421 | |
425 | const char * |
422 | char * |
426 | rxvt_font_x11::get_property (XFontStruct *f, const char *property, const char *repl) const |
423 | rxvt_font_x11::get_property (XFontStruct *f, const char *property, const char *repl) const |
427 | { |
424 | { |
428 | unsigned long value; |
425 | unsigned long value; |
429 | |
426 | |
430 | if (XGetFontProperty (f, XInternAtom (DISPLAY, property, 0), &value)) |
427 | if (XGetFontProperty (f, XInternAtom (DISPLAY, property, 0), &value)) |
431 | return XGetAtomName (DISPLAY, value); |
428 | return XGetAtomName (DISPLAY, value); |
432 | else |
429 | else |
433 | return repl; |
430 | return rxvt_strdup (repl); |
434 | } |
431 | } |
435 | |
432 | |
436 | rxvt_fontprop |
433 | rxvt_fontprop |
437 | rxvt_font_x11::properties () |
434 | rxvt_font_x11::properties () |
438 | { |
435 | { |
… | |
… | |
453 | } |
450 | } |
454 | |
451 | |
455 | bool |
452 | bool |
456 | rxvt_font_x11::set_properties (rxvt_fontprop &p, XFontStruct *f) |
453 | rxvt_font_x11::set_properties (rxvt_fontprop &p, XFontStruct *f) |
457 | { |
454 | { |
458 | const char *weight = get_property (f, "WEIGHT_NAME", "medium"); |
|
|
459 | const char *slant = get_property (f, "SLANT", "r"); |
|
|
460 | |
|
|
461 | unsigned long height; |
455 | unsigned long height; |
462 | if (!XGetFontProperty (f, XInternAtom (DISPLAY, "PIXEL_SIZE", 0), &height)) |
456 | if (!XGetFontProperty (f, XInternAtom (DISPLAY, "PIXEL_SIZE", 0), &height)) |
463 | return false; |
457 | return false; |
464 | |
458 | |
465 | unsigned long avgwidth; |
459 | unsigned long avgwidth; |
466 | if (!XGetFontProperty (f, XInternAtom (DISPLAY, "AVERAGE_WIDTH", 0), &avgwidth)) |
460 | if (!XGetFontProperty (f, XInternAtom (DISPLAY, "AVERAGE_WIDTH", 0), &avgwidth)) |
467 | avgwidth = 0; |
461 | avgwidth = 0; |
468 | |
462 | |
|
|
463 | char *weight = get_property (f, "WEIGHT_NAME", "medium"); |
|
|
464 | char *slant = get_property (f, "SLANT", "r"); |
|
|
465 | |
469 | return set_properties (p, height, weight, slant, avgwidth); |
466 | set_properties (p, height, weight, slant, avgwidth); |
|
|
467 | |
|
|
468 | free (weight); |
|
|
469 | free (slant); |
|
|
470 | |
|
|
471 | return true; |
470 | } |
472 | } |
471 | |
473 | |
472 | bool |
474 | bool |
473 | rxvt_font_x11::set_properties (rxvt_fontprop &p, const char *name) |
475 | rxvt_font_x11::set_properties (rxvt_fontprop &p, const char *name) |
474 | { |
476 | { |
… | |
… | |
578 | f = XLoadQueryFont (DISPLAY, name); |
580 | f = XLoadQueryFont (DISPLAY, name); |
579 | |
581 | |
580 | if (!f) |
582 | if (!f) |
581 | return false; |
583 | return false; |
582 | |
584 | |
583 | const char *registry = get_property (f, "CHARSET_REGISTRY", 0); |
585 | char *registry = get_property (f, "CHARSET_REGISTRY", 0); |
584 | const char *encoding = get_property (f, "CHARSET_ENCODING", 0); |
586 | char *encoding = get_property (f, "CHARSET_ENCODING", 0); |
585 | |
587 | |
586 | if (registry && encoding) |
588 | if (registry && encoding) |
587 | { |
589 | { |
588 | char charset[64]; |
590 | char charset[64]; |
589 | snprintf (charset, 64, "%s-%s", registry, encoding); |
591 | snprintf (charset, 64, "%s-%s", registry, encoding); |
… | |
… | |
602 | if (*charset++ == '-' && !--count) |
604 | if (*charset++ == '-' && !--count) |
603 | break; |
605 | break; |
604 | |
606 | |
605 | cs = codeset_from_name (charset); |
607 | cs = codeset_from_name (charset); |
606 | } |
608 | } |
|
|
609 | |
|
|
610 | free (registry); |
|
|
611 | free (encoding); |
607 | |
612 | |
608 | if (cs == CS_UNICODE) |
613 | if (cs == CS_UNICODE) |
609 | cs = CS_UNICODE_16; // X11 can have a max. of 65536 chars per font |
614 | cs = CS_UNICODE_16; // X11 can have a max. of 65536 chars per font |
610 | |
615 | |
611 | encm = f->min_byte1 != 0 || f->max_byte1 != 0; |
616 | encm = f->min_byte1 != 0 || f->max_byte1 != 0; |
… | |
… | |
724 | |
729 | |
725 | int base = r->TermWin.fbase; |
730 | int base = r->TermWin.fbase; |
726 | |
731 | |
727 | XGCValues v; |
732 | XGCValues v; |
728 | v.foreground = r->PixColors[fg]; |
733 | v.foreground = r->PixColors[fg]; |
729 | v.background = r->PixColors[bg]; |
|
|
730 | v.font = f->fid; |
734 | v.font = f->fid; |
731 | |
735 | |
732 | if (enc2b) |
736 | if (enc2b) |
733 | { |
737 | { |
734 | const XChar2b *xc = enc_xchar2b (text, len, cs, slow); |
738 | const XChar2b *xc = enc_xchar2b (text, len, cs, slow); |
735 | |
739 | |
736 | if (bg == Color_bg && !slow) |
740 | if (bg == Color_bg && !slow) |
737 | { |
741 | { |
|
|
742 | v.background = r->PixColors[bg]; |
738 | XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v); |
743 | XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v); |
739 | XDrawImageString16 (d.display->display, d, TGC, x, y + base, xc, len); |
744 | XDrawImageString16 (d.display->display, d, TGC, x, y + base, xc, len); |
740 | } |
745 | } |
741 | else |
746 | else |
742 | { |
747 | { |
… | |
… | |
764 | { |
769 | { |
765 | const char *xc = enc_char (text, len, cs, slow); |
770 | const char *xc = enc_char (text, len, cs, slow); |
766 | |
771 | |
767 | if (bg == Color_bg && !slow) |
772 | if (bg == Color_bg && !slow) |
768 | { |
773 | { |
|
|
774 | v.background = r->PixColors[bg]; |
769 | XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v); |
775 | XChangeGC (d.display->display, TGC, GCForeground | GCBackground | GCFont, &v); |
770 | XDrawImageString (d.display->display, d, TGC, x, y + base, xc, len); |
776 | XDrawImageString (d.display->display, d, TGC, x, y + base, xc, len); |
771 | } |
777 | } |
772 | else |
778 | else |
773 | { |
779 | { |
… | |
… | |
992 | #endif |
998 | #endif |
993 | |
999 | |
994 | ///////////////////////////////////////////////////////////////////////////// |
1000 | ///////////////////////////////////////////////////////////////////////////// |
995 | |
1001 | |
996 | rxvt_fontset::rxvt_fontset (rxvt_t r) |
1002 | rxvt_fontset::rxvt_fontset (rxvt_t r) |
997 | : r (r) |
1003 | : r (r), fontdesc (0) |
998 | { |
1004 | { |
999 | clear (); |
1005 | clear (); |
1000 | } |
1006 | } |
1001 | |
1007 | |
1002 | rxvt_fontset::~rxvt_fontset () |
1008 | rxvt_fontset::~rxvt_fontset () |
… | |
… | |
1007 | void |
1013 | void |
1008 | rxvt_fontset::clear () |
1014 | rxvt_fontset::clear () |
1009 | { |
1015 | { |
1010 | for (rxvt_font **i = fonts.begin (); i != fonts.end (); i++) |
1016 | for (rxvt_font **i = fonts.begin (); i != fonts.end (); i++) |
1011 | FONT_UNREF (*i); |
1017 | FONT_UNREF (*i); |
|
|
1018 | |
|
|
1019 | free (fontdesc); fontdesc = 0; |
1012 | |
1020 | |
1013 | fonts.clear (); |
1021 | fonts.clear (); |
1014 | base_id = 0; |
1022 | base_id = 0; |
1015 | base_prop.height = 0x7fffffff; |
1023 | base_prop.height = 0x7fffffff; |
1016 | base_prop.weight = rxvt_fontprop::medium; |
1024 | base_prop.weight = rxvt_fontprop::medium; |
… | |
… | |
1124 | bool |
1132 | bool |
1125 | rxvt_fontset::populate (const char *desc) |
1133 | rxvt_fontset::populate (const char *desc) |
1126 | { |
1134 | { |
1127 | clear (); |
1135 | clear (); |
1128 | |
1136 | |
|
|
1137 | fontdesc = strdup (desc); |
|
|
1138 | |
1129 | fonts.push_back (new_font (0, CS_UNICODE)); |
1139 | fonts.push_back (new_font (0, CS_UNICODE)); |
1130 | realize_font (0); |
1140 | realize_font (0); |
1131 | |
1141 | |
1132 | add_fonts (desc); |
1142 | add_fonts (desc); |
1133 | |
1143 | |
… | |
… | |
1151 | } |
1161 | } |
1152 | |
1162 | |
1153 | int |
1163 | int |
1154 | rxvt_fontset::find_font (unicode_t unicode) |
1164 | rxvt_fontset::find_font (unicode_t unicode) |
1155 | { |
1165 | { |
1156 | for (unsigned int i = 0; i < fonts.size (); i++) |
1166 | for (unsigned int i = !!(0x20 <= unicode && unicode <= 0x7f); // skip pseudo-font for ascii |
|
|
1167 | i < fonts.size (); |
|
|
1168 | i++) |
1157 | { |
1169 | { |
1158 | rxvt_font *f = fonts[i]; |
1170 | rxvt_font *f = fonts[i]; |
1159 | |
1171 | |
1160 | if (!f->loaded) |
1172 | if (!f->loaded) |
1161 | { |
1173 | { |