ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] qt patch
@ 2001-08-21 15:06 Aleksey Novodvorsky
  0 siblings, 0 replies; only message in thread
From: Aleksey Novodvorsky @ 2001-08-21 15:06 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

Hi!
Для любителей qt/kde прилагается патч к qt-2.3.1, исправляющий досадную
багу с печатью tff-шрифтами. Новый qt завтра будет в Sisyphus

Rgrds, AEN


[-- Attachment #2: qt-2.3.1-ps-alt.patch --]
[-- Type: text/plain, Size: 2007 bytes --]

diff -ur qt-2.3.1.orig/src/kernel/qpsprinter.cpp qt-2.3.1/src/kernel/qpsprinter.cpp
--- qt-2.3.1.orig/src/kernel/qpsprinter.cpp	Tue Aug 21 15:26:02 2001
+++ qt-2.3.1/src/kernel/qpsprinter.cpp	Tue Aug 21 17:13:42 2001
@@ -2610,6 +2610,13 @@
   Q_UINT16 fraction;
 } Fixed; // 16.16 bit fixed-point number
 
+static float f2dot14( ushort s )
+{
+    float f = ((float)( s & 0x3fff ))/ 16384.;
+    f += (s & 0x8000) ? ( (s & 0x4000) ? -1 : -2 ) : ( (s & 0x4000) ? 1 : 0 );
+    return f;
+}
+
 static ULONG getULONG(BYTE *p)
 {
   int x;
@@ -4127,8 +4134,8 @@
   USHORT glyphIndex;
   int arg1;
   int arg2;
-  USHORT xscale;
-  USHORT yscale;
+  float xscale = 1 ;
+  float yscale = 1 ;
   USHORT scale01;
   USHORT scale10;
 
@@ -4153,23 +4160,23 @@
     }
 
     if(flags & WE_HAVE_A_SCALE) {
-      xscale = yscale = getUSHORT(glyph);
+      xscale = yscale = f2dot14 (getUSHORT(glyph));
       glyph += 2;
       scale01 = scale10 = 0;
     } else if(flags & WE_HAVE_AN_X_AND_Y_SCALE) {
-      xscale = getUSHORT(glyph);
+      xscale = f2dot14 (getUSHORT(glyph));
       glyph += 2;
-      yscale = getUSHORT(glyph);
+      yscale = f2dot14 (getUSHORT(glyph));
       glyph += 2;
       scale01 = scale10 = 0;
     } else if(flags & WE_HAVE_A_TWO_BY_TWO) {
-      xscale = getUSHORT(glyph);
+      xscale = f2dot14 (getUSHORT(glyph));
       glyph += 2;
       scale01 = getUSHORT(glyph);
       glyph += 2;
       scale10 = getUSHORT(glyph);
       glyph += 2;
-      yscale = getUSHORT(glyph);
+      yscale = f2dot14 (getUSHORT(glyph));
       glyph += 2;
     } else {
       xscale = yscale = scale01 = scale10 = 0;
@@ -4189,8 +4196,14 @@
         s << topost(arg1);
         s << " ";
         s << topost(arg2);
-        s << " translate\n";
-
+        s << " translate ";
+	if ( xscale || yscale ){
+	  s << xscale ;
+	  s << " " ;
+	  s << yscale ;
+	  s << " scale" ;
+	}  
+	s << "\n";
         //fprintf(stderr,"gsave %d %d translate\n", topost(arg1), topost(arg2) );
       }
     } else {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-21 15:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-21 15:06 [sisyphus] qt patch Aleksey Novodvorsky

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git