1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
--- libhtmlw/HTMLwidgets.c.orig Wed May 14 22:12:21 1997
+++ libhtmlw/HTMLwidgets.c Mon Feb 22 13:41:52 1999
@@ -106,7 +106,12 @@
static void setTextSize _ArgProto((Widget, int, int));
static Widget GetAsciiTextWidget _ArgProto((Widget));
+#ifdef CHIMERA_JP
+#define XTextWidth(font, string, count) TextWidth(font, string, count)
+#define FONTHEIGHT(font) FontHeight(font)
+#else
#define FONTHEIGHT(font) (font->max_bounds.ascent + font->max_bounds.descent)
+#endif
static Widget
GetAsciiTextWidget(w)
@@ -131,7 +136,11 @@
int columns;
int lines;
{
+#ifdef CHIMERA_JP
+ XFontSet font = NULL;
+#else
XFontStruct *font = NULL;
+#endif
Position lm, rm, tm, bm;
Dimension width, height;
Widget rw;
@@ -139,7 +148,11 @@
rw = GetAsciiTextWidget(w);
XtVaGetValues (rw,
+#ifdef CHIMERA_JP
+ XtNfontSet, &font,
+#else
XtNfont, &font,
+#endif
XtNleftMargin, &lm,
XtNrightMargin, &rm,
XtNtopMargin, &tm,
@@ -1173,13 +1186,21 @@
* For the various widgets, return their font structures so
* we can use the font's baseline to place them.
*/
+#ifdef CHIMERA_JP
+XFontSet
+#else
XFontStruct *
+#endif
GetWidgetFont (hw, wptr)
HTMLWidget hw;
WidgetInfo *wptr;
{
Widget child;
+#ifdef CHIMERA_JP
+ XFontSet font;
+#else
XFontStruct *font;
+#endif
/*
* For option menus we have to first get the child that has the
@@ -1187,7 +1208,11 @@
*/
if (wptr->type == W_OPTIONMENU)
{
+#ifdef CHIMERA_JP
+ XtVaGetValues (wptr->w, XtNfontSet, &font, NULL);
+#else
XtVaGetValues (wptr->w, XtNfont, &font, NULL);
+#endif
}
else
{
@@ -1197,15 +1222,27 @@
int nc;
XtVaGetValues (wptr->w, XtNchildren, &wl, XtNnumChildren, &nc, NULL);
child = *++wl;
+#ifdef CHIMERA_JP
+ XtVaGetValues (child, XtNfontSet, &font, NULL);
+#else
XtVaGetValues (child, XtNfont, &font, NULL);
+#endif
}
else if (wptr->type == W_TEXTFIELD || wptr->type == W_PASSWORD)
{
+#ifdef CHIMERA_JP
+ XtVaGetValues (GetAsciiTextWidget(wptr->w), XtNfontSet, &font, NULL);
+#else
XtVaGetValues (GetAsciiTextWidget(wptr->w), XtNfont, &font, NULL);
+#endif
}
else
{
+#ifdef CHIMERA_JP
+ XtVaGetValues (wptr->w, XtNfontSet, &font, NULL);
+#else
XtVaGetValues (wptr->w, XtNfont, &font, NULL);
+#endif
}
}
@@ -2090,7 +2127,11 @@
if (type == W_OPTIONMENU)
{
+#ifdef CHIMERA_JP
+ XFontSet font;
+#else
XFontStruct *font;
+#endif
Dimension maxWidth = 0, width, iW;
argcnt = 0;
@@ -2122,7 +2163,11 @@
if (i == 0)
{
XtVaGetValues (w,
+#ifdef CHIMERA_JP
+ XtNfontSet, &font,
+#else
XtNfont, &font,
+#endif
XtNinternalWidth, &iW,
NULL);
}
@@ -2265,10 +2310,18 @@
if (size > list_cnt) size = list_cnt;
if (size > 1)
{
+#ifdef CHIMERA_JP
+ XFontSet font = NULL;
+#else
XFontStruct *font = NULL;
+#endif
Dimension h, width, s;
+#ifdef CHIMERA_JP
+ XtVaGetValues (w, XtNfontSet, &font,
+#else
XtVaGetValues (w, XtNfont, &font,
+#endif
XtNinternalHeight, &h,
XtNwidth, &width,
XtNrowSpacing, &s,
@@ -2505,3 +2558,16 @@
XtSetMappedWhenManaged (eptr->widget_data->w, True);
}
}
+
+#ifdef CHIMERA_JP
+int
+TextWidth(fs, str, len)
+XFontSet fs;
+char *str;
+int len;
+{
+ XRectangle logical, ink;
+ XmbTextExtents(fs, str, len, &ink, &logical);
+ return logical.width;
+}
+#endif
--- mxw/Imakefile.orig Tue Mar 14 12:39:59 1995
+++ mxw/Imakefile Mon Feb 22 21:15:38 1999
@@ -24,7 +24,7 @@
OBJS = ScrollText.o OutputSel.o StrReq.o AuthReq.o Bookmark.o $(R4OBJS)
EXTRA_INCLUDES = -I./
-EXTRA_DEFINES = $(XRELEASE) $(CEXTRA_DEFINES)
+EXTRA_DEFINES = $(XRELEASE) $(CEXTRA_DEFINES) $(KANJI_DEFINES)
NormalLibraryTarget(mxw, $(OBJS))
DependTarget()
--- mxw/ScrollText.c.orig Wed May 21 18:05:09 1997
+++ mxw/ScrollText.c Mon Feb 22 17:37:27 1999
@@ -123,7 +123,11 @@
ArgList args;
Cardinal *num_args;
{
+#ifdef CHIMERA_JP
+ XFontSet font;
+#else
XFontStruct *font;
+#endif
Dimension width, height;
Widget text = PRIVATE(new,text_widget) =
@@ -145,12 +149,20 @@
}
XtVaGetValues(text,
+#ifdef CHIMERA_JP
+ XtNfontSet, &font,
+#else
XtNfont, &font,
+#endif
XtNwidth, &width,
XtNheight, &height,
NULL);
+#ifdef CHIMERA_JP
+ PRIVATE(new,font_width) = FontWidth(font);
+#else
PRIVATE(new,font_width) = font->max_bounds.width;
+#endif
if (!new->core.width)
{
--- src/Chimera.ad.orig Thu May 22 10:20:36 1997
+++ src/Chimera.ad Mon Feb 22 21:30:16 1999
@@ -284,3 +284,6 @@
!*html.verticalScrollBarPos: 0
!*html.horizontalScrollBarPos: 0
!*html.autoSize: True
+
+! Japanese resources
+*international: True
|