From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: HarfBuzz is available on MS-Windows Date: Sat, 08 Jun 2019 15:45:54 +0300 Message-ID: <83sgsknt31.fsf@gnu.org> References: <83o93iwwtn.fsf@gnu.org> <83o939p3n6.fsf@gnu.org> <83h890ppke.fsf@gnu.org> <86blz86zul.fsf@gmail.com> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="227731"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 08 14:47:23 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hZakl-000x2p-BN for ged-emacs-devel@m.gmane.org; Sat, 08 Jun 2019 14:47:23 +0200 Original-Received: from localhost ([::1]:58322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZakc-0006Ef-9U for ged-emacs-devel@m.gmane.org; Sat, 08 Jun 2019 08:47:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49262) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZajT-0006EJ-IF for emacs-devel@gnu.org; Sat, 08 Jun 2019 08:46:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hZajT-0004j3-El; Sat, 08 Jun 2019 08:46:03 -0400 Original-Received: from [176.228.60.248] (port=2812 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hZajR-0007Eq-VY; Sat, 08 Jun 2019 08:46:02 -0400 In-reply-to: <86blz86zul.fsf@gmail.com> (message from Andy Moreton on Sat, 08 Jun 2019 13:11:46 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:237331 Archived-At: > From: Andy Moreton > Date: Sat, 08 Jun 2019 13:11:46 +0100 > > Emacs should be capable of finding a font to display all of the > characters in HELLO, as it can do so given some fontset customisation. Only if fonts to support all of the characters are available on the user's system. It could be that all of the fonts are available on Windows 10 (I don't have such a system handy to verify that), but this certainly isn't so on older versions of Windows. > > In addition, quality of built-in fonts changes with time, so a font > > that comes with the system today might be less desirable to use > > tomorrow. Thus, including those fonts in our sources would mean we > > need to track the development of system fonts, update the fonts in our > > default fontsets, and perhaps make the fontset dependent on the OS > > version. This would be a maintenance burden. > > It is more important to give users a working tool than to reduce > maintenance effort. This is a noble goal, but it's impractical to expect that, at least for Windows. Guess how many developers actually touch the related code, or even have a good enough understanding of what happens there. > The selection of fonts shipped with each platform changes fairly > slowly, so this should not present an undue burden. My experience is very different. Specifically wrt Windows, we have a major new version every 2 to 3 years, with minor updates in-between. This is more frequent than Emacs releases its major versions. And if you want to get an idea regarding the amount of font-related changes in each major release of Windows, look here: https://docs.microsoft.com/en-us/globalization/input/font-support Just to study and understand what each new font means will take a significant amount of time. Besides, even the information about which fonts are available on what versions of Windows, and which scripts they cover reasonably well, is currently not available in the form that can be directly compared with our fontset setup (the above page only lists _new_ fonts, but significant changes are also made in existing fonts). So we are nowhere near being on top of this. If you want to contribute to improving this situation, please consider coming on-board and collecting the necessary information, then we could start talking about where we have inadequate support and how to make things better. Otherwise, at best things will be left where they are now, because no one works on this on a routine basis, and (speaking about myself personally) I doubt if we even have enough expert knowledge, let alone free time and energy, for doing the job. > > If you'd like to try debugging this, I can help by pointing to the > > code where this happens. In general, start with the fontset as defined > > in fontset.el, and then look in w32font.c:w32font_list_internal and > > its subroutines. > > I can try debugging from there - any further hints are welcome. The function add_font_entity_to_list is the first place to look. It performs all the checks to determine whether a font might fit the requirements of the font spec. For Uniscribe and HarfBuzz, the match_data->opentype_only flag is set. The subroutines of add_font_entity_to_list, font_matches_spec and font_supported_scripts also perform important checks. If you have more specific questions, I will try my best to answer them. TIA.