From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: Cursors: Is superimposing the same glyph a feature? Date: Fri, 15 Feb 2019 23:34:35 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="59644"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 16 08:35:34 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guuVX-000FK6-9O for ged-emacs-devel@m.gmane.org; Sat, 16 Feb 2019 08:35:31 +0100 Original-Received: from localhost ([127.0.0.1]:52801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guuVW-0002ZG-5p for ged-emacs-devel@m.gmane.org; Sat, 16 Feb 2019 02:35:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guuUs-0002Yt-N7 for emacs-devel@gnu.org; Sat, 16 Feb 2019 02:34:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guuUp-00088i-3g for emacs-devel@gnu.org; Sat, 16 Feb 2019 02:34:49 -0500 Original-Received: from gateway34.websitewelcome.com ([192.185.148.214]:22830) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1guuUj-0007lp-Gi for emacs-devel@gnu.org; Sat, 16 Feb 2019 02:34:44 -0500 Original-Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 48B2694116 for ; Sat, 16 Feb 2019 01:34:37 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id uuUegol36dnCeuuUfgnDoZ; Sat, 16 Feb 2019 01:34:37 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Cc :To:From:Message-ID:Date:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dWoRco4bRiPFGUbMbgnR3Kvcqa50wQxIFOXhmyuKBEI=; b=mtbV3IpcrmxJ7XpMeMcX0jxLa8 5hBaeWdkNAhYMBlB5O6e5C/F9cjBiT6GDbc/UzX+jY7AHMcBxZ3J9YjIx82s24B4Yx3S/1Wp3xqgs FjN+/TzHztl1MViAllA58OmiOf3CJ9C7L83lNcjCpIPc2CF5cz6ZpDfDAINGBU3Hm6yTh5iDJ3UYr LFEmXr22Hg2/HnZzvdhn3TUg7JAwvLTqjUKBFc4grMwjc6iRj3oH7T/LCBrF+AZJa3q9nBXvZAuoI hnR4XrGvmrmL3M9zEiP8RhsZRJnsbDD4FmX7tE9JcyFoBdiE9LW0FQlR7JI9QJbSeD49M+6DlQAA/ x+8zZvTg==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:50703 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1guuUe-0046RI-Ds; Sat, 16 Feb 2019 01:34:36 -0600 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1guuUe-0046RI-Ds X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:50703 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.185.148.214 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:233412 Archived-At: Thank you, Eli, for reading and responding to this particular thread. Here is a link to a screenshot depicting a somewhat bold appearance of the = letter "A" on Emacs 26.1 for OSX without any modifications to the source co= de -- the build was downloaded from https://emacsformacosx.com/. HBAR_CURS= OR and BAR_CURSOR have the same result. https://www.lawlist.com/images/hbar_double_imprint.png Here are my minimal settings in the .emacs file, and then I blew-up the siz= e of the font to get a better screenshot: (blink-cursor-mode -1) (setq default-frame-alist (list '(cursor-type . (hbar . 1)) '(background-color . "black") '(foreground-color . "white"))) You may need to blow-up the image and break-out the micrometer to discern t= hat the letter "A" with the HBAR_CURSOR is somewhat wider, with more jagged= edges, and the middle triangle is somewhat smaller (because the walls of t= he letter "A" are thicker). This phenomenon is more easily noticed with th= e naked eye when holding down the left/right arrow key (repeating) and watc= hing the character at point become bold, and then the bold is removed when = moving on to the next character at point. =46rom what I have been able to discern, drawing a cursor inhibits/prevents= ns_maybe_dumpglyphs_background from erasing the glyph area (i.e., no erasi= ng rectangle is drawn), and drawing a cursor also inhibits/prevents font->d= river->draw (within ns_draw_glyph_string) from drawing the glyph "with the = background". The result is a double-imprint over an existing glyph creatin= g a somewhat bold appearance. The reason this question is being asked (i.e., whether this is a feature or= simply an oversight) is because I would like to redraw the fake cursors wh= en they get erased due to a left_overwritten situation as determined by dra= w_glyphs in xdisp.c. I can simply draw a fake HBAR/BAR cursor without draw= ing a new glyph; or, I can follow-up the creation of fake cursor with font-= >driver->draw and double-imprint the glyph -- by not erasing the glyph area= beforehand with a rectangle, and by ensuring that the last argument to fon= t->driver->draw is NIL (i.e., draw the glyph without any background). I do not see this same behavior on the NT or X11 ports of the GUI version o= f Emacs. A little more background information: I am working on update_window and up= date_text_area to redraw the fake cursors that get erased when the screen u= pdates by calls to write_glyphs and clear_end_of_line. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > Date: [02-15-2019 10:31:34] <15 Feb 2019 20:31:34 +0200> > From: Eli Zaretskii > To: Keith David Bershatsky > CC: emacs-devel@gnu.org > Subject: Re: Cursors: Is superimposing the same glyph a feature? >=20 > > Date: Fri, 15 Feb 2019 08:27:32 -0800 > > From: Keith David Bershatsky > > > > In the case of an HBAR_CURSOR; however, the result is a second imprint = of the same glyph -- creating a bold appearance of the glyph with the curso= r. Is the bold appearance "a feature", or is this something that has just = been overlooked? >=20 > Where do you see the character at point being bold with hbar cursor? > I don't see it here.