From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: Bidi reordering engine upgraded Date: Thu, 16 Oct 2014 11:42:34 +0200 Message-ID: <877g005p11.fsf@zigzag.favinet> References: <834mv55quj.fsf@gnu.org> <543E9122.6070605@yandex.ru> <8338ap5o7l.fsf@gnu.org> <543E9A1C.2010904@yandex.ru> <831tq95m6x.fsf@gnu.org> <83zjcx450f.fsf@gnu.org> <83y4sh43zq.fsf@gnu.org> <543F41C9.3000507@yandex.ru> <83oatc4gz3.fsf@gnu.org> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1413452369 9048 80.91.229.3 (16 Oct 2014 09:39:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2014 09:39:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 16 11:39:23 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XehWk-0006We-TU for ged-emacs-devel@m.gmane.org; Thu, 16 Oct 2014 11:39:23 +0200 Original-Received: from localhost ([::1]:49425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XehWk-00085c-JK for ged-emacs-devel@m.gmane.org; Thu, 16 Oct 2014 05:39:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XehWO-00085G-Iy for emacs-devel@gnu.org; Thu, 16 Oct 2014 05:39:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XehWF-00016w-JZ for emacs-devel@gnu.org; Thu, 16 Oct 2014 05:39:00 -0400 Original-Received: from smtp209.alice.it ([82.57.200.105]:43480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XehWF-00014m-9O for emacs-devel@gnu.org; Thu, 16 Oct 2014 05:38:51 -0400 Original-Received: from zigzag.favinet (95.245.75.178) by smtp209.alice.it (8.6.060.43) id 5433B0B701A22C27 for emacs-devel@gnu.org; Thu, 16 Oct 2014 11:38:38 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1XehZz-0001Wb-1r for emacs-devel@gnu.org; Thu, 16 Oct 2014 11:42:43 +0200 Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: <83oatc4gz3.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Oct 2014 10:21:52 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.105 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175447 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable () Eli Zaretskii () Thu, 16 Oct 2014 10:21:52 +0300 why we subtract 1 pixel from the cursor glyph's pixel_width I see in XDrawRectangle(3): The XDrawRectangle and XDrawRectangles functions draw the outlines of the specified rectangle or rectangles as if a five-point PolyLine protocol request were specified for each rectangle: [x,y] [x+width,y] [x+width,y+height] [x,y+height] [x,y] So if you use the glyph width directly, the resulting rectangle drawn will invade the next character cell by one pixel. E.g.: Given a glyph width of ten, this is wrong: | 0 1 2 | 012345678901234567890123456 | XXXXXXXXXXX | X X but this is right: | 0 1 2 | 012345678901234567890123456 | XXXXXXXXXX | X X Probably (i don't have docs handy) the other toolkits' rectangle-drawing primitives draw from X,Y to X+W-1,Y+H-1 (NB the -1) so there is no need to manully decrement for them. =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlQ/kw0ACgkQZwMiJEyAdQLc/ACeIVmXPzeaiImv09YrJCX1GqwO SRcAn3ym0Ab5HofgX7vXEa+b+uANiksY =uG6y -----END PGP SIGNATURE----- --=-=-=--