hello all!
I changed the file dw_style.c as the following and the
function font->font = gdk_fontset_load (fontname);
is
integrant for my chinese support .But the function arose dillo can not COPY & PLASTER .
static void Dw_style_font_realize (DwStyleFont *font, gboolean
try_all)
{
char fontname[256], *ItalicChar;
@@ -250,15 +251,20
@@
font->bold ? "bold" : "medium",
font->italic ? ItalicChar :
"r",
font->size);
- font->font = gdk_font_load (fontname);
+
strcat (fontname,
+
"-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-1,"
+ "
-misc-simsun-medium-r-normal--16-*-*-*-*-*-gb18030.2000-0");
+
font->font = gdk_fontset_load (fontname);
if (font->font == NULL
&& font->italic) {
- sprintf (fontname,
"-*-%s-%s-%s-*-*-%d-*-75-75-*-*-iso8859-1",
+ sprintf
(fontname,
"-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-1,"
+
"-misc-simsun-medium-r-normal--16-*-*-*-*-*-gb18030.2000-0",
+
//"
-*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*",
font->name,
font->bold
? "bold" : "medium",
(*ItalicChar == 'o') ? "i" :
"o",
font->size);
- font->font = gdk_font_load (fontname);
+ font->font = gdk_fontset_load (fontname);
}
if
(try_all) {
@@ -266,21 +272,24 @@
/* Can't load the font - substitute the
default instead. */
font->font =
gdk_font_load
-
("-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1");
+
("-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1,"
+
"-misc-simsun-medium-r-normal--16-*-*-*-*-*-gb18030.2000-0");
}
if
(font->font == NULL) {
/* Try another platform-font that should be
available. (iPaq) */
font->font =
gdk_font_load
-
("-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-1");
+
("-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-1,"
+
"-misc-simsun-medium-r-normal--16-*-*-*-*-*-gb18030.2000-0");
}
if
(font->font == NULL) {
/* Can't load any suitable font! */
g_warning
("Can't load any ISO8859-1 font!?! :(");
font->font =
Page: 15
File:
E:\project_back\dillo-0.7.2-chinese.patch 2003-6-20, 8:39:00
- gdk_font_load
("-adobe-helvetica-*-*-*--*-*-*-*-*-*-*-*");
+ gdk_font_load
("-adobe-helvetica-*-*-*--*-*-*-*-*-*-*-*,"
+
"-misc-simsun-medium-r-normal--16-*-*-*-*-*-gb18030.2000-0");
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sincerely
Yours
Xingqiang Wang
Embedded Software
Division.
Neusoft Middleware Technologies Company
Neusoft Park, Hun Nan
Industrial Area, New & High-Tech Development Zone, Shenyang 110179,
PRC
TEL:+86-24-83665518
E-mail:wang_xq@neusoft.com
Http://www.neusoft.com