From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cecilio Pardo Newsgroups: gmane.emacs.bugs Subject: bug#73730: 31.0.50; Support for color fonts on MS-Windows Date: Sun, 20 Oct 2024 20:37:32 +0200 Message-ID: <9d47824a-38ad-4df1-b824-a553531e3bb8@imayhem.com> References: <36a6b4d5-c719-44d6-957d-bcd7db5a854b@imayhem.com> <86o73s14x5.fsf@gnu.org> <0a0c622c-5b69-4f30-94b1-67a238e124b4@imayhem.com> <861q0gqpkf.fsf@gnu.org> <0d2238ff-5cf9-4ba7-97ab-11b76892198d@imayhem.com> <86bjzjp7vv.fsf@gnu.org> <80dc50bd-b2d4-4d21-ad38-322412588b3b@imayhem.com> <86cyjuiwah.fsf@gnu.org> <206b72b7-eea9-4515-b68d-69180317452f@imayhem.com> <8634kqipzu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30499"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 73730@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 20 20:39:03 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t2apR-0007mG-T6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Oct 2024 20:39:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2apD-0007G4-E5; Sun, 20 Oct 2024 14:38:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2ap2-0007FV-Rj for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 14:38:37 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t2ap2-0004CE-JN for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 14:38:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=WTUdWG3CoxB4RfsIzNrzKnj+3trTiffofXZW35Zxnq0=; b=sd1rKuZPMChWqUHDpQ/qwKLloUkrk8dwizCvpkD5DhBnCxRaBfIiJbXrnyZIqiQvNchCe5SH2T4uJq4LkxfCcyN461qWoBrhNCgYJ0Lidb/EXecvEAKuAUra+VrbHiJo5IKp4s5fQwG7NNI7/a9bGBqQgweDCWaGNh3vox94tklitaTYonDtG9L57lJvGWwflN2b4yn9lkLFBMULmSEz5TAL4cRFr6MGtgiEDWxnAOWTkfkOcmeoRH8Ph7ue/UlmEjLJY+FzVQ6DzIf3nFiXsL74Ayrd5wRwbNIvmiP9/z2cNvLcJperk4JwmnHZE662HbjR0o17OsS4RnukQEUE8Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2apR-0006aS-Uj for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 14:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Cecilio Pardo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2024 18:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73730 X-GNU-PR-Package: emacs Original-Received: via spool by 73730-submit@debbugs.gnu.org id=B73730.172944948925220 (code B ref 73730); Sun, 20 Oct 2024 18:39:01 +0000 Original-Received: (at 73730) by debbugs.gnu.org; 20 Oct 2024 18:38:09 +0000 Original-Received: from localhost ([127.0.0.1]:48463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2aob-0006Yi-B8 for submit@debbugs.gnu.org; Sun, 20 Oct 2024 14:38:09 -0400 Original-Received: from mail.imayhem.com ([82.223.54.191]:51021 helo=zealous-pike.82-223-54-191.plesk.page) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2aoZ-0006YS-VP for 73730@debbugs.gnu.org; Sun, 20 Oct 2024 14:38:08 -0400 Original-Received: from [192.168.68.105] (111.red-88-21-7.staticip.rima-tde.net [88.21.7.111]) by zealous-pike.82-223-54-191.plesk.page (Postfix) with ESMTPSA id A312380122; Sun, 20 Oct 2024 18:37:33 +0000 (UTC) Authentication-Results: zealous-pike.82-223-54-191.plesk.page; spf=pass (sender IP is 88.21.7.111) smtp.mailfrom=cpardo@imayhem.com smtp.helo=[192.168.68.105] Received-SPF: pass (zealous-pike.82-223-54-191.plesk.page: connection is authenticated) Content-Language: es-ES In-Reply-To: <8634kqipzu.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294002 Archived-At: On 20/10/2024 20:33, Eli Zaretskii wrote: >> Date: Sun, 20 Oct 2024 20:20:29 +0200 >> From: Cecilio Pardo >> >> On 20/10/2024 18:17, Eli Zaretskii wrote: >> >>>> If the case of size <= 0, we are now falling back to >>>> w32font_text_extents. >>> >>> Maybe it's better to use some default size in text_extents instead? >>> The pixel size of the default font is known (see FRAME_LINE_HEIGHT), >>> so maybe just use it if you get a font of size zero? That could be a >>> more future-proof fix, since we could get such fonts in other >>> situations as well. >> >> The reason w32fint_text_extents has a value to return is because when >> the specified font size is 0: >> >> "The font mapper uses a default height value when it searches for a match." >> >> So it gives a font with a size that we cannot know, because when we ask >> it says it is 0. >> >> So we may return our own default. > > I'm not sure I understand the last sentence above. > > It should be easy to modify w32-find-non-USB-fonts to specify a > default value for SIZE if the caller didn't provide it. I just > thought that other callers could do something similar, and therefore > it would be better to use FRAME_LINE_HEIGHT of the selected frame as > the size internally in text_extents if the caller specified zero. If > what you say above disagrees with that, please elaborate why you > disagree. No, I meant to agree. Sorry I wasn't clear.