From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Pixel-based display functions Date: Fri, 30 Jan 2015 17:28:33 +0200 Message-ID: <83lhkkl23i.fsf@gnu.org> References: <83egricpvg.fsf@gnu.org> <87zj97vic8.fsf@building.gnus.org> <83wq4argjp.fsf@gnu.org> <87iofui8vo.fsf@building.gnus.org> <838ugqqczp.fsf@gnu.org> <877fw9dndz.fsf@building.gnus.org> <83a914ozsh.fsf@gnu.org> <874mrb1t62.fsf_-_@building.gnus.org> <87vbjrl49k.fsf@violet.siamics.net> <8361bqogah.fsf@gnu.org> <87k306pfi9.fsf@building.gnus.org> <87egqekrd7.fsf@building.gnus.org> <877fw53eat.fsf@building.gnus.org> <877fw4zsdv.fsf@building.gnus.org> <831tmcn4k4.fsf@gnu.org> <87386szq1w.fsf@building.gnus.org> <83wq44ljm9.fsf@gnu.org> <87vbjowlqv.fsf@building.gnus.org> <83oapglbx6.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1422631735 3059 80.91.229.3 (30 Jan 2015 15:28:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2015 15:28:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: larsi@gnus.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 30 16:28:55 2015 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 1YHDV8-0005Zs-NY for ged-emacs-devel@m.gmane.org; Fri, 30 Jan 2015 16:28:54 +0100 Original-Received: from localhost ([::1]:37373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHDV7-0001j2-Rt for ged-emacs-devel@m.gmane.org; Fri, 30 Jan 2015 10:28:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHDUu-0001it-BO for emacs-devel@gnu.org; Fri, 30 Jan 2015 10:28:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHDUr-0007s2-5d for emacs-devel@gnu.org; Fri, 30 Jan 2015 10:28:40 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:42347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHDUq-0007ry-TR for emacs-devel@gnu.org; Fri, 30 Jan 2015 10:28:37 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NIZ00F00XKVQP00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Fri, 30 Jan 2015 17:28:35 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIZ00FVSXNMQC00@a-mtaout23.012.net.il>; Fri, 30 Jan 2015 17:28:35 +0200 (IST) In-reply-to: <83oapglbx6.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 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:182060 Archived-At: > Date: Fri, 30 Jan 2015 13:56:21 +0200 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org > > (In the display engine, there's a thing called the "face ID" that is > computed as part of displaying text, which takes the characters into > consideration, which is why I suggested 'face' in the first place. > I will try to see how to do the same in Lisp.) Not really the same, but how about using (aref char-script-table (char-after POS)) to find where in the text you have characters from a different script? If this is fast enough, it should give you a conservative estimation of where to call font-at again. (It's conservative because the same font can, and usually does, cover more than a single script.) One more issue that I think needs to be handled are characters for which there's no font installed on the user's system. We display them as defined by glyphless-char-display-control. Or maybe you should allow the text to overflow in this case: after all, it's not really legible, is it?