From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: ucs-normalize and diacritics Date: Wed, 25 Jul 2018 22:11:47 +0200 Message-ID: <87k1pj5b3w.fsf@gmail.com> References: <8736w88pnn.fsf@gmail.com> <83lga0v4ff.fsf@gnu.org> <87tvoo73s9.fsf@gmail.com> <83fu08ujln.fsf@gnu.org> <837eljv0v0.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1532549429 23329 195.159.176.226 (25 Jul 2018 20:10:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2018 20:10:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 25 22:10:25 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiQ76-0005zZ-Rz for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2018 22:10:24 +0200 Original-Received: from localhost ([::1]:55387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiQ9D-00036s-HC for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2018 16:12:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiQ8X-00036k-Ax for emacs-devel@gnu.org; Wed, 25 Jul 2018 16:11:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiQ8U-00067g-9l for emacs-devel@gnu.org; Wed, 25 Jul 2018 16:11:53 -0400 Original-Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:35128) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fiQ8U-00066i-1P; Wed, 25 Jul 2018 16:11:50 -0400 Original-Received: by mail-wm0-x234.google.com with SMTP id o18-v6so7234974wmc.0; Wed, 25 Jul 2018 13:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-followup-to:mail-copies-to :gmane-reply-to-list:date:message-id:mime-version :content-transfer-encoding; bh=2hKpFILuLMeToJRC+0z2c1+XRi7x16cJcNraTblzMCg=; b=gpH8djmxIsbaMdg50/yI5iebWVXRCm1G4nVKtw7k8r5zb+y4Ytig96AkP6+G+Rzxya Bsi0+XrshbnqIc23WPMMyaLxngnvcJX79SrZFDDhqRX/CZrtCHzrzHaT0Db5jFVUJVo0 vLssVZcNnjupeNkUHfLWipjh6+5oXTPPkNwpDZa2BGQzCBTpmeSvy8VHB8wpl6A/MMjK 1CLmaq9WVBOkCaTdJGT4lkzkZG+2TCwcY59iDNWHPZYjLBfkfWWyarV/4/PvPrmSlDJY Zk4NXbtpAUrshvwIhDL7n2Rfnm1YOJOyRSz0/LBL0fApz0aAoSsfJdUWDOuMNxBjdv1R i37g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-followup-to :mail-copies-to:gmane-reply-to-list:date:message-id:mime-version :content-transfer-encoding; bh=2hKpFILuLMeToJRC+0z2c1+XRi7x16cJcNraTblzMCg=; b=mD8J6knd6YIL/PEwmgp3jcqJirdF+wPgNUhTwsdeWIrmB3uRjWX3R7ihqaoSPdloCz LtG4oZ62rdXVD/PlEON2u7bFxvf3Iu93VXXlDBkcoibkei6/YV+B1nAtOdMZO7FhUkxQ SXKGY7MSyzTknyqTckAcqkdsTXU6LSP2epjJsGJ66NvKkTTG38U0G+pHyEyEu6fvTbxY LWXBPV3qSEraacas8wX775VUWHEW4qV9XNiOWo8HB61cAYwyvwNVUJRUow5cRCjy9sdG +6w158Bc1ZmAL17tOc6fDpvl1NResVyNPl3uJckMPruNigwWgIRJdctcjnpMi15tMX9G +VGg== X-Gm-Message-State: AOUpUlFmcfWgj7AxFQuRfD7qjmI2JcqeLsRyQT4DFsTtV3CLXYss9ycO a0nKi0VksV09rTdBPsHUgz9M20lC X-Google-Smtp-Source: AAOMgpdxJu+L59WrAnyr+RXf3YlrADXbpwr3UaQR2oGe8HVXJ0PWtbwFkxnTsIVikwavzb9yr3/oew== X-Received: by 2002:a1c:2b43:: with SMTP id r64-v6mr5129548wmr.96.1532549508637; Wed, 25 Jul 2018 13:11:48 -0700 (PDT) Original-Received: from rpluim-ubuntu (vav06-1-78-207-202-134.fbx.proxad.net. [78.207.202.134]) by smtp.gmail.com with ESMTPSA id b123-v6sm8151653wma.24.2018.07.25.13.11.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 13:11:47 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::234 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:227813 Archived-At: Eli Zaretskii writes: >> Date: Wed, 25 Jul 2018 05:36:52 +0300 >> From: Eli Zaretskii >> Cc: emacs-devel@gnu.org >>=20 >> > Would it be worth allowing emacs to change the font of the >> > preceding character to match the diacritic and (re-)attempt >> > composition? >>=20 >> Theoretically, yes. But it could mean a serious surgery in how >> character composition is integrated into the display engine, and there >> are also usability and UI aspects that need to be considered, because >> the user might have good reasons to use the font she uses for the base >> character. > > I've looked at the related code, and it least the first part doesn't > seem to be too hard: it just needs expanding some APIs. The relevant > function is autocmp_chars, called from composition_reseat_it, which is > called by the CHAR_COMPOSED_P macro. The only problem to solve is how > to determine what font to use if the composition includes more than 2 > characters, and Emacs selects more than 2 fonts to display them (e.g., > 3-character composition, each character needs a different font). How common is 3-character composition likely to be? (for that matter, how common is 2-character composition? I explicitly use input methods for this kind of stuff). I can envisage an algorithm that takes a combining character, then scans backwards to see if the font used for it will cover all previous characters, recursively. It does seem like a lot of effort for a small return. In any case, based on my quick testing with gedit, we=CA=BCre no better or worse than it is, it also does not compose if the font of the base character doesn=CA=BCt cover the combining character. Robert