Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37905489
en ru br
Репозитории ALT
S:2.4.7-alt1
5.1: 1.4.2-alt1.M51.2
4.1: 1.3.10-alt0.M41.4
+updates:1.3.9-alt1.M41.1
4.0: 1.2.12-alt6.M40.9
+updates:1.2.12-alt6.M40.8
3.0: 1.1.20-alt14.1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: cups

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

Патч: cups-1.1.20-alt-texttops-nimbus.patch
Скачать


diff -Naur cups-1.1.20/filter/texttops.c cups-1.1.20.new/filter/texttops.c
--- cups-1.1.20/filter/texttops.c	2004-03-17 18:20:01 +0300
+++ cups-1.1.20.new/filter/texttops.c	2004-03-17 18:19:23 +0300
@@ -53,6 +53,22 @@
 int		Directions[256];/* Text directions for each font */
 
 
+/**
+ * convert font name to appropriate nimbus font
+ */
+const char *nimbus_name(const char* font)
+{
+    if (!strcmp(font,"Courier"))
+	return	"NimbusMonL-Regu";
+    else if(!strcmp(font,"Courier-Bold"))
+	return "NimbusMonL-Bold";
+    else if(!strcmp(font,"Courier-Oblique"))
+	return "NimbusMonL-ReguObli";
+    else if(!strcmp(font,"Courier-BoldOblique"))
+	return "NimbusMonL-BoldObli";
+    else
+	return font;
+}
 /*
  * Local functions...
  */
@@ -842,7 +858,7 @@
 
     for (i = PrettyPrint ? 2 : 1; i >= 0; i --)
     {
-      printf("/%s findfont\n", Fonts[0][i]);
+      printf("/%s findfont\n", nimbus_name(Fonts[0][i]));
       puts("dup length 1 add dict begin\n"
 	   "	{ 1 index /FID ne { def } { pop pop } ifelse } forall\n"
 	   "	/Encoding cupsEncoding00 def\n"
@@ -862,7 +878,7 @@
     for (i = 1 + PrettyPrint; i >= 0; i --)
       for (j = 0; j < NumFonts; j ++)
       {
-	printf("/%s findfont\n", Fonts[j][i]);
+	printf("/%s findfont\n", nimbus_name(Fonts[j][i]));
 	printf("dup length 1 add dict begin\n"
 	       "	{ 1 index /FID ne { def } { pop pop } ifelse } forall\n"
 	       "	/Encoding cupsEncoding%02x def\n"
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin