Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37498139
en ru br
Репозитории ALT
S:3.0.5-alt4
5.1: 0.8.6-alt6
4.1: 0.8.6-alt5.M41.1
4.0: 0.8.6-alt5.M40.1
3.0: 0.7.3-alt1
www.altlinux.org/Changes

Группа :: Сети/WWW
Пакет: dillo

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: dillo-0.7.2-asp-charset.patch
Скачать


diff -pruN dillo/dillorc dillo-charset/dillorc
--- dillo/dillorc	2003-02-17 14:14:57.000000000 +0600
+++ dillo-charset/dillorc	2003-02-17 14:41:16.000000000 +0600
@@ -35,6 +35,9 @@ fw_fontname=courier
 # If you prefer oblique over italic fonts, uncoment next line
 #use_oblique=YES
 
+# Use this value as charset part of font for loading. (default is iso8859-1)
+# font_charset=iso8859-5
+
 # Show tooltip popup for images?
 # Note: We use the "title" attribute and not "alt".
 #       More info at: http://bugzilla.mozilla.org/show_bug.cgi?id=25537
diff -pruN dillo/src/dw_style.c dillo-charset/src/dw_style.c
--- dillo/src/dw_style.c	2003-01-08 10:51:42.000000000 +0600
+++ dillo-charset/src/dw_style.c	2003-02-17 14:41:16.000000000 +0600
@@ -245,42 +245,39 @@ static void Dw_style_font_realize (DwSty
    char fontname[256], *ItalicChar;
 
    ItalicChar = prefs.use_oblique ? "o" : "i";
-   sprintf (fontname, "-*-%s-%s-%s-*-*-%d-*-75-75-*-*-iso8859-1",
+   sprintf (fontname, "-*-%s-%s-%s-*-*-%d-*-75-75-*-*-%s",
             font->name,
             font->bold ? "bold" : "medium",
             font->italic ? ItalicChar : "r",
-            font->size);
+            font->size,prefs.font_charset);
    font->font = gdk_font_load (fontname);
 
    if (font->font == NULL && font->italic) {
-      sprintf (fontname, "-*-%s-%s-%s-*-*-%d-*-75-75-*-*-iso8859-1",
+      sprintf (fontname, "-*-%s-%s-%s-*-*-%d-*-75-75-*-*-%s",
                font->name,
                font->bold ? "bold" : "medium",
                (*ItalicChar == 'o') ? "i" : "o",
-               font->size);
+               font->size,prefs.font_charset);
       font->font = gdk_font_load (fontname);
    }
 
    if (try_all) {
       if (font->font == NULL) {
          /* Can't load the font - substitute the default instead. */
-         font->font =
-            gdk_font_load
-            ("-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1");
+         sprintf(fontname,"-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-%s",prefs.font_charset);
+         font->font = gdk_font_load (fontname);
       }
 
       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");
+         sprintf(fontname,"-misc-fixed-medium-r-normal--13-120-75-75-c-80-%s",prefs.font_charset);
+         font->font = gdk_font_load (fontname);
       }
 
       if (font->font == NULL) {
          /* Can't load any suitable font!  */
-         g_warning ("Can't load any ISO8859-1 font!?! :(");
-         font->font =
-            gdk_font_load ("-adobe-helvetica-*-*-*--*-*-*-*-*-*-*-*");
+         g_warning ("Can't load any font with charset '%s'!?! :(",prefs.font_charset);
+         font->font = gdk_fontset_load("-adobe-helvetica-*-*-*--*-*-*-*-*-*-*-*,-misc-fixed-*,*");
       }
    }
 
diff -pruN dillo/src/prefs.c dillo-charset/src/prefs.c
--- dillo/src/prefs.c	2003-02-17 14:14:58.000000000 +0600
+++ dillo-charset/src/prefs.c	2003-02-17 14:41:16.000000000 +0600
@@ -51,6 +51,7 @@ static const struct {
    { "small_icons", DRC_TOKEN_SMALL_ICONS },
    { "limit_text_width", DRC_TOKEN_LIMIT_TEXT_WIDTH },
    { "font_factor", DRC_TOKEN_FONT_FACTOR },
+   { "font_charset", DRC_TOKEN_FONT_CHARSET },
    { "use_dicache", DRC_TOKEN_USE_DICACHE },
    { "show_back", DRC_TOKEN_SHOW_BACK },
    { "show_forw", DRC_TOKEN_SHOW_FORW },
@@ -173,6 +174,10 @@ static guint Prefs_parser(GScanner *scan
    case DRC_TOKEN_FONT_FACTOR:
       prefs.font_factor = strtod(scanner->value.v_string, NULL);
       break;
+   case DRC_TOKEN_FONT_CHARSET:
+       if (prefs.font_charset) g_free(prefs.font_charset);
+       prefs.font_charset = g_strdup(scanner->value.v_string);
+      break;
    case DRC_TOKEN_LIMIT_TEXT_WIDTH:
       prefs.limit_text_width = (strcmp(scanner->value.v_string, "YES") == 0);
       break;
@@ -347,6 +352,7 @@ void a_Prefs_init(void)
    prefs.small_icons = FALSE;
    prefs.limit_text_width = FALSE;
    prefs.font_factor = 1.0;
+   prefs.font_charset = g_strdup("iso8859-1");
    prefs.use_dicache = FALSE;
    prefs.show_back=TRUE;
    prefs.show_forw=TRUE;
@@ -385,6 +391,8 @@ void a_Prefs_freeall(void)
    g_free(prefs.no_proxy);
    if (prefs.no_proxy_vec)
       g_strfreev(prefs.no_proxy_vec);
+   if (prefs.font_charset)
+      g_free (prefs.font_charset);
    a_Url_free(prefs.http_proxy);
    g_free(prefs.fw_fontname);
    g_free(prefs.vw_fontname);
diff -pruN dillo/src/prefs.h dillo-charset/src/prefs.h
--- dillo/src/prefs.h	2003-02-17 14:14:58.000000000 +0600
+++ dillo-charset/src/prefs.h	2003-02-17 14:41:16.000000000 +0600
@@ -41,6 +41,7 @@ typedef enum {
    DRC_TOKEN_PANEL_SIZE,
    DRC_TOKEN_SMALL_ICONS,
    DRC_TOKEN_FONT_FACTOR,
+   DRC_TOKEN_FONT_CHARSET,
    DRC_TOKEN_SHOW_TOOLTIP,
    DRC_TOKEN_LIMIT_TEXT_WIDTH,
    DRC_TOKEN_USE_DICACHE,
@@ -87,6 +88,7 @@ struct _DilloPrefs {
    gboolean small_icons;
    gboolean limit_text_width;
    gdouble font_factor;
+   char *font_charset;
    gboolean use_dicache;
    gboolean show_back;
    gboolean show_forw;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin