From: Aleksey Novodvorsky <aen@logic.ru> To: sisyphus@altlinux.ru Subject: [sisyphus] qt patch Date: Tue, 21 Aug 2001 19:06:09 +0400 Message-ID: <3B8278E1.ABE07335@logic.ru> (raw) [-- 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 {
reply other threads:[~2001-08-21 15:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=3B8278E1.ABE07335@logic.ru \ --to=aen@logic.ru \ --cc=sisyphus@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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