]>
Commit | Line | Data |
---|---|---|
c3d00423 | 1 | diff -BurN dillo-0.6.6.old/dillorc dillo-0.6.6/dillorc |
2 | --- dillo-0.6.6.old/dillorc Thu May 30 01:36:08 2002 | |
3 | +++ dillo-0.6.6/dillorc Sat Jun 1 17:31:30 2002 | |
4 | @@ -35,6 +35,9 @@ | |
5 | # If you prefer oblique over italic fonts, uncoment next line | |
6 | #use_oblique=YES | |
7 | ||
8 | +# Use this value as charset part of font for loading. (default is iso8859-1) | |
9 | +# font_charset=iso8859-5 | |
10 | + | |
11 | # Show ALT popup for images? | |
12 | show_alt=YES | |
13 | ||
14 | diff -BurN dillo-0.6.6.old/src/dw_style.c dillo-0.6.6/src/dw_style.c | |
15 | --- dillo-0.6.6.old/src/dw_style.c Tue May 28 05:14:03 2002 | |
16 | +++ dillo-0.6.6/src/dw_style.c Sat Jun 1 17:31:30 2002 | |
17 | @@ -243,45 +243,44 @@ | |
18 | { | |
19 | char fontname[256], *ItalicChar; | |
20 | ||
21 | - ItalicChar = prefs.use_oblique ? "o" : "i"; | |
22 | - sprintf (fontname, "-*-%s-%s-%s-*-*-%d-*-75-75-*-*-iso8859-1", | |
23 | - font->name, | |
24 | - font->bold ? "bold" : "medium", | |
25 | - font->italic ? ItalicChar : "r", | |
26 | - font->size); | |
27 | - font->font = gdk_font_load(fontname); | |
28 | - | |
29 | - if (font->font == NULL && font->italic) { | |
30 | - sprintf(fontname, "-*-%s-%s-%s-*-*-%d-*-75-75-*-*-iso8859-1", | |
31 | + ItalicChar = prefs.use_oblique ? "o" : "i"; | |
32 | + sprintf (fontname, "-*-%s-%s-%s-*-*-%d-*-75-75-*-*-%s", | |
33 | font->name, | |
34 | font->bold ? "bold" : "medium", | |
35 | - (*ItalicChar == 'o') ? "i" : "o", | |
36 | - font->size); | |
37 | - font->font = gdk_font_load(fontname); | |
38 | - } | |
39 | - | |
40 | - if (try_all) { | |
41 | - if (font->font == NULL) { | |
42 | - /* Can't load the font - substitute the default instead. */ | |
43 | - font->font = | |
44 | - gdk_font_load | |
45 | - ("-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1"); | |
46 | - } | |
47 | - | |
48 | - if (font->font == NULL) { | |
49 | - /* Try another platform-font that should be available. (iPaq) */ | |
50 | - font->font = | |
51 | - gdk_font_load | |
52 | - ("-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-1"); | |
53 | - } | |
54 | - | |
55 | - if (font->font == NULL) { | |
56 | - /* Can't load any suitable font! */ | |
57 | - g_warning ("Can't load any ISO8859-1 font!?! :("); | |
58 | - font->font = | |
59 | - gdk_font_load("-adobe-helvetica-*-*-*--*-*-*-*-*-*-*-*"); | |
60 | - } | |
61 | - } | |
62 | + font->italic ? ItalicChar : "r", | |
63 | + font->size, | |
64 | + prefs.font_charset); | |
65 | + font->font = gdk_font_load(fontname); | |
66 | + | |
67 | + if (font->font == NULL && font->italic) { | |
68 | + sprintf(fontname, "-*-%s-%s-%s-*-*-%d-*-75-75-*-*-%s", | |
69 | + font->name, | |
70 | + font->bold ? "bold" : "medium", | |
71 | + (*ItalicChar == 'o') ? "i" : "o", | |
72 | + font->size, | |
73 | + prefs.font_charset); | |
74 | + font->font = gdk_font_load(fontname); | |
75 | + } | |
76 | + | |
77 | + if (try_all) { | |
78 | + if (font->font == NULL) { | |
79 | + /* Can't load the font - substitute the default instead. */ | |
80 | + sprintf(fontname,"-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-%s",prefs.font_charset); | |
81 | + font->font = gdk_font_load (fontname); | |
82 | + } | |
83 | + | |
84 | + if (font->font == NULL) { | |
85 | + /* Try another platform-font that should be available. (iPaq) */ | |
86 | + sprintf(fontname,"-misc-fixed-medium-r-normal--13-120-75-75-c-80-%s",prefs.font_charset); | |
87 | + font->font = gdk_font_load (fontname); | |
88 | + } | |
89 | + | |
90 | + if (font->font == NULL) { | |
91 | + /* Can't load any suitable font! */ | |
92 | + g_warning ("Can't load any font with charset '%s'!?! :(",prefs.font_charset); | |
93 | + font->font = gdk_fontset_load("-adobe-helvetica-*-*-*--*-*-*-*-*-*-*-*,-misc-fixed-*,*"); | |
94 | + } | |
95 | + } | |
96 | ||
97 | if (font->font) { | |
98 | font->space_width = gdk_char_width (font->font, ' '); | |
99 | diff -BurN dillo-0.6.6.old/src/prefs.c dillo-0.6.6/src/prefs.c | |
100 | --- dillo-0.6.6.old/src/prefs.c Wed Apr 3 20:31:46 2002 | |
101 | +++ dillo-0.6.6/src/prefs.c Sat Jun 1 17:31:30 2002 | |
102 | @@ -52,6 +52,7 @@ | |
103 | { "small_icons", DRC_TOKEN_SMALL_ICONS }, | |
104 | { "limit_text_width", DRC_TOKEN_LIMIT_TEXT_WIDTH }, | |
105 | { "font_factor", DRC_TOKEN_FONT_FACTOR }, | |
106 | + { "font_charset", DRC_TOKEN_FONT_CHARSET }, | |
107 | { "use_dicache", DRC_TOKEN_USE_DICACHE }, | |
108 | { "show_back", DRC_TOKEN_SHOW_BACK }, | |
109 | { "show_forw", DRC_TOKEN_SHOW_FORW }, | |
110 | @@ -172,6 +173,10 @@ | |
111 | case DRC_TOKEN_FONT_FACTOR: | |
112 | prefs.font_factor = strtod(scanner->value.v_string, NULL); | |
113 | break; | |
114 | + case DRC_TOKEN_FONT_CHARSET: | |
115 | + if (prefs.font_charset) g_free(prefs.font_charset); | |
116 | + prefs.font_charset = g_strdup(scanner->value.v_string); | |
117 | + break; | |
118 | case DRC_TOKEN_LIMIT_TEXT_WIDTH: | |
119 | prefs.limit_text_width = (strcmp(scanner->value.v_string, "YES") == 0); | |
120 | break; | |
121 | @@ -338,6 +343,7 @@ | |
122 | prefs.small_icons = FALSE; | |
123 | prefs.limit_text_width = FALSE; | |
124 | prefs.font_factor = 1.0; | |
125 | + prefs.font_charset = g_strdup("iso8859-1"); | |
126 | prefs.use_dicache = FALSE; | |
127 | prefs.show_back=TRUE; | |
128 | prefs.show_forw=TRUE; | |
129 | @@ -374,6 +380,8 @@ | |
130 | g_free(prefs.no_proxy); | |
131 | if (prefs.no_proxy_vec) | |
132 | g_strfreev(prefs.no_proxy_vec); | |
133 | + if (prefs.font_charset) | |
134 | + g_free (prefs.font_charset); | |
135 | a_Url_free(prefs.http_proxy); | |
136 | g_free(prefs.fw_fontname); | |
137 | g_free(prefs.vw_fontname); | |
138 | diff -BurN dillo-0.6.6.old/src/prefs.h dillo-0.6.6/src/prefs.h | |
139 | --- dillo-0.6.6.old/src/prefs.h Wed Apr 3 20:31:46 2002 | |
140 | +++ dillo-0.6.6/src/prefs.h Sat Jun 1 17:31:30 2002 | |
141 | @@ -40,6 +40,7 @@ | |
142 | DRC_TOKEN_PANEL_SIZE, | |
143 | DRC_TOKEN_SMALL_ICONS, | |
144 | DRC_TOKEN_FONT_FACTOR, | |
145 | + DRC_TOKEN_FONT_CHARSET, | |
146 | DRC_TOKEN_SHOW_ALT, | |
147 | DRC_TOKEN_LIMIT_TEXT_WIDTH, | |
148 | DRC_TOKEN_USE_DICACHE, | |
149 | @@ -84,6 +85,7 @@ | |
150 | gboolean small_icons; | |
151 | gboolean limit_text_width; | |
152 | gdouble font_factor; | |
153 | + char *font_charset; | |
154 | gboolean use_dicache; | |
155 | gboolean show_back; | |
156 | gboolean show_forw; |