The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Xfig (rus X xfig patch)


<< Предыдущая ИНДЕКС Поиск в статьях src Установить закладку Перейти на закладку Следующая >>
Ключевые слова: rus, X, xfig, patch,  (найти похожие документы)
_ RU.LINUX (2:5077/15.22) ___________________________________________ RU.LINUX _ From : Boris Tobotras 2:5020/510 22 Sep 98 19:23:58 Subj : Re: Xfig ________________________________________________________________________________ >>>>> "Andrei" == Andrei Smirnov writes: Andrei> Кто-нибудь пользует Xfig? Можно ли его научить вставлять русский Andrei> текст? Можно. Hо сложно :( Вот два грусных хака, пробуй. diff -r -u xfig.3.3.0-beta2/Doc/xfig.man xfig.3.3.0-beta2-my/Doc/xfig.man - --- xfig.3.3.0-beta2/Doc/xfig.man Fri Dec 20 20:17:14 1996 +++ xfig.3.3.0-beta2-my/Doc/xfig.man Tue Jul 1 19:59:25 1997 @@ -556,6 +556,11 @@ will automatically switch to non-scaling fonts. .\"------- .At +.BR \-enc [ oding ] +.Ap +Chooses X11 font encoding (default: ISO8859). +.\"------- +.At .BR \-sh [ owallbuttons ] .Ap Show all the diff -r -u xfig.3.3.0-beta2/main.c xfig.3.3.0-beta2-my/main.c - --- xfig.3.3.0-beta2/main.c Sat Dec 14 01:26:54 1996 +++ xfig.3.3.0-beta2-my/main.c Tue Jul 1 21:09:30 1997 @@ -201,6 +201,8 @@ XtOffset(appresPtr, image_editor), XtRString, (caddr_t) NULL}, {"magnification", "Magnification", XtRFloat, sizeof(float), XtOffset(appresPtr, magnification), XtRFloat, (caddr_t) & F100}, + {"encoding", "Encoding", XtRString, sizeof(char *), + XtOffset(appresPtr, encoding), XtRString, (caddr_t) "ISO8859"}, {"paper_size", "Papersize", XtRString, sizeof(char *), XtOffset(appresPtr, paper_size), XtRString, (caddr_t) NULL}, {"multiple", XtCOrientation, XtRBoolean, sizeof(Boolean), @@ -250,6 +252,7 @@ {"-specialtext", ".specialtext", XrmoptionNoArg, "True"}, {"-scalablefonts", ".scalablefonts", XrmoptionNoArg, "True"}, {"-noscalablefonts", ".scalablefonts", XrmoptionNoArg, "False"}, + {"-encoding", ".encoding", XrmoptionSepArg, "ISO8859"}, {"-monochrome", ".monochrome", XrmoptionNoArg, "True"}, {"-internalBW", ".internalborderwidth", XrmoptionSepArg, 0}, {"-internalBorderWidth", ".internalborderwidth", XrmoptionSepArg, 0}, @@ -339,6 +342,7 @@ [-userscale <scale>] \ [-userunit <units>] \ [-visual <visual>] \ +[-encoding <fontencoding>] \ [file]\n"; Atom wm_protocols[2]; diff -r -u xfig.3.3.0-beta2/resources.h xfig.3.3.0-beta2-my/resources.h - --- xfig.3.3.0-beta2/resources.h Mon Nov 11 21:56:41 1996 +++ xfig.3.3.0-beta2-my/resources.h Tue Jul 1 19:55:19 1997 @@ -143,6 +143,8 @@ int transparent; /* transparent color for GIF export (-2=none, -1=background) */ float magnification; /* export/print magnification */ + char *encoding; /* X font encoding (defaults to + iso8859) [BT] */ } appresStruct, *appresPtr; extern appresStruct appres; diff -r -u xfig.3.3.0-beta2/w_drawprim.c xfig.3.3.0-beta2-my/w_drawprim.c - --- xfig.3.3.0-beta2/w_drawprim.c Wed Jan 8 23:08:21 1997 +++ xfig.3.3.0-beta2-my/w_drawprim.c Tue Jul 1 19:56:41 1997 @@ -128,7 +128,9 @@ x_fontinfo[f].template = ps_fontinfo[f+1].name; } else { strcpy(template,x_fontinfo[0].template); /* nope, check for font size 0 */ - strcat(template,"0-0-*-*-*-*-*-*"); + strcat(template,"0-0-*-*-*-*-"); + strcat(template, appres.encoding ); + strcat(template, "-*"); if ((fontlist = XListFonts(tool_d, template, 1, &count))==0) appres.SCALABLEFONTS = False; /* none, turn off request for them */ } @@ -142,12 +144,14 @@ nf = NULL; strcpy(template,x_fontinfo[f].template); strcat(template,"*-*-*-*-*-*-"); - /* add ISO8859 (if not Symbol font or ZapfDingbats) to font name */ + /* add encoding (if not Symbol font or ZapfDingbats) to font name */ if (strstr(template,"symbol") == NULL && - strstr(template,"zapfdingbats") == NULL) - strcat(template,"ISO8859-*"); + strstr(template,"zapfdingbats") == NULL) { + strcat(template, appres.encoding ); + strcat(template,"-*"); + } else - strcat(template,"*-*"); + strcat(template,"*-*"); /* don't free the Fontlist because we keep pointers into it */ p = 0; if ((fontlist = XListFonts(tool_d, template, MAXNAMES, &count))==0) { @@ -290,10 +294,12 @@ strcpy(template,x_fontinfo[fnum].template); /* attach pointsize to font name */ strcat(template,"%d-*-*-*-*-*-"); - /* add ISO8859 (if not Symbol font or ZapfDingbats) to font name */ + /* add encoding (if not Symbol font or ZapfDingbats) to font name */ if (strstr(template,"symbol") == NULL && - strstr(template,"zapfdingbats") == NULL) - strcat(template,"ISO8859-*"); + strstr(template,"zapfdingbats") == NULL) { + strcat(template,appres.encoding); + strcat(template,"-*"); + } else strcat(template,"*-*"); /* use the pixel field instead of points in the fontname so that the diff -r -N -u transfig.3.2.0-beta2/fig2dev/dev/genps.c transfig.3.2.0-beta2-my/fig2dev/dev/genps.c - --- transfig.3.2.0-beta2/fig2dev/dev/genps.c Thu Jan 9 02:00:31 1997 +++ transfig.3.2.0-beta2-my/fig2dev/dev/genps.c Wed Jul 2 12:31:48 1997 @@ -276,6 +276,10 @@ paperspec = TRUE; /* user-specified */ break; + case 'i': /* turn off ISO font encoding */ + dont_encode = TRUE; + break; + default: put_msg(Err_badarg, opt, "ps"); exit(1); @@ -1381,7 +1385,7 @@ if (multi_page) fprintf(tfp, "/o%d {", no_obj++); - if (PSisomap[t->font+1] == TRUE) + if (dont_encode != TRUE && PSisomap[t->font+1] == TRUE) fprintf(tfp, TEXT_PS, PSFONT(t), "-iso", PSFONTMAG(t)); else fprintf(tfp, TEXT_PS, PSFONT(t), "", PSFONTMAG(t)); @@ -1801,6 +1805,9 @@ F_text *t; unsigned char *s; + if (dont_encode == TRUE) + return(0); + if (ob->texts != NULL) { for (t = ob->texts; t != NULL; t = t->next) @@ -1829,7 +1836,7 @@ if (ob->texts != NULL) { for (t = ob->texts; t != NULL; t = t->next) - if (PSisomap[t->font+1] == FALSE) + if (dont_encode != TRUE && PSisomap[t->font+1] == FALSE) { fprintf(tfp, "/%s /%s-iso isovec ReEncode\n", PSFONT(t), PSFONT(t)); PSisomap[t->font+1] = TRUE; diff -r -N -u transfig.3.2.0-beta2/fig2dev/fig2dev.c transfig.3.2.0-beta2-my/fig2dev/fig2dev.c - --- transfig.3.2.0-beta2/fig2dev/fig2dev.c Sat Nov 9 03:37:56 1996 +++ transfig.3.2.0-beta2-my/fig2dev/fig2dev.c Wed Jul 2 12:56:43 1997 @@ -63,6 +63,7 @@ Boolean magspec=FALSE; /* set if the user specifies the magnification */ Boolean multispec=FALSE; /* set if the user specifies multiple pages */ Boolean paperspec=FALSE; /* set if the user specifies the paper size */ +Boolean dont_encode=FALSE; /* set if the user specifies do not reencode fonts */ Boolean pats_used, pattern_used[NUMPATTERNS]; Boolean multi_page = FALSE; /* multiple page option for PostScript */ char papersize[20]; @@ -113,7 +114,7 @@ prog = *argv; /* add :? */ /* sum of all arguments */ - while ((c = fig_getopt(argc, argv, "aAcC:d:ef:l:L:Mm:n:Pp:s:S:t:vVx:X:y:Y:wWz:?")) != EOF) { + while ((c = fig_getopt(argc, argv, "aAcC:d:ef:l:L:Mm:n:Pp:s:S:t:vVx:X:y:Y:wWz:i?")) != EOF) { /* generic option handling */ switch (c) { diff -r -N -u transfig.3.2.0-beta2/fig2dev/fig2dev.h transfig.3.2.0-beta2-my/fig2dev/fig2dev.h - --- transfig.3.2.0-beta2/fig2dev/fig2dev.h Fri Jan 10 20:28:27 1997 +++ transfig.3.2.0-beta2-my/fig2dev/fig2dev.h Wed Jul 2 12:28:54 1997 @@ -105,6 +105,7 @@ extern Boolean paperspec; /* true of the command-line args specified -z */ extern Boolean multispec; /* true of the command-line args specified -M */ extern char papersize[]; /* paper size */ +extern Boolean dont_encode; /* true if the command-line args specified -i */ struct paperdef { -- Best regards, -- Boris. Overall, OS/2's problems fall into two categories: IBM and Microsoft. --- Gnus v5.5/XEmacs 20.3 - "London" * Origin: Linux inside (2:5020/510@fidonet)

<< Предыдущая ИНДЕКС Поиск в статьях src Установить закладку Перейти на закладку Следующая >>

 Добавить комментарий
Имя:
E-Mail:
Заголовок:
Текст:




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру