From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Pixel-based display functions Date: Sat, 31 Jan 2015 11:42:51 +1100 Message-ID: <874mr7vkz8.fsf@building.gnus.org> References: <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> <83lhkkl23i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422665023 25934 80.91.229.3 (31 Jan 2015 00:43:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2015 00:43:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 31 01:43:39 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 1YHM9y-0002ra-2o for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2015 01:43:38 +0100 Original-Received: from localhost ([::1]:39306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHM9x-0007ev-6c for ged-emacs-devel@m.gmane.org; Fri, 30 Jan 2015 19:43:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHM9j-0007dw-GF for emacs-devel@gnu.org; Fri, 30 Jan 2015 19:43:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHM9e-00025o-HZ for emacs-devel@gnu.org; Fri, 30 Jan 2015 19:43:23 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:43913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHM9e-00025h-Al; Fri, 30 Jan 2015 19:43:18 -0500 Original-Received: from diaman3.lnk.telstra.net ([203.45.116.145] helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1YHM9J-0005ct-8y; Sat, 31 Jan 2015 01:42:58 +0100 In-Reply-To: <83lhkkl23i.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Jan 2015 17:28:33 +0200") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1YHM9J-0005ct-8y MailScanner-NULL-Check: 1423269778.93776@s3IM1JuqnsCJ8lnSSK/jBw X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 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:182105 Archived-At: Eli Zaretskii writes: > 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.) That's a very good idea; thanks. I'll try using that as a segmenting function and see whether this thing ends up being fast enough... > 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? I stumbled upon this issue a couple of days ago, I think. It was a utf-8-encoded web page that had one iso-8859-1 character in it, and `font-get-glyphs' returned nil for that "character" (which was displayed as \241 or something). But these should have a pretty predictable width, probably. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/