From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] Add new 'show-font' package? Date: Fri, 06 Sep 2024 10:23:49 +0300 Message-ID: <87r09xfdoa.fsf@protesilaos.com> References: <87msknu635.fsf@protesilaos.com> <87jzfqjtdh.fsf@posteo.net> <867cbq4cun.fsf@gnu.org> <87zfol4a5t.fsf@protesilaos.com> <86ttet1fbe.fsf@gnu.org> <874j6tgv0w.fsf@protesilaos.com> <86plph1cc1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39079"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 06 09:24:38 2024 Return-path: Envelope-to: ged-emacs-devel@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 1smTKd-0009yR-LC for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Sep 2024 09:24:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smTKB-0003TI-Sa; Fri, 06 Sep 2024 03:24:07 -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 1smTKA-0003Pr-O6 for emacs-devel@gnu.org; Fri, 06 Sep 2024 03:24:06 -0400 Original-Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smTJz-0007JM-SJ; Fri, 06 Sep 2024 03:23:57 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id E9D9B1BF204; Fri, 6 Sep 2024 07:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1725607431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SSfXzbY2T7ZNd/RfRxTVVoB/yCRMVolkYjDOhAd1HOY=; b=gm7+KL1wv/ReOqtNFlZHWtrY8XOeBIGtrcpdNww8R7DUyf9eMZ0AnZCM8ZloFmGnFJ/9dW CK0BlrlKCS7NlpYDltNJt2IuHf7vRjGDRyeyX9j862ORTV6dtF6RpEZup4qNF4fPUCinar WZR+Ban60f4QERiNGiu36QwJxqqpFX/eMdzNatZtWIIDOJNq+1votsW1fFrGSmT1hEA+Uh Bglw7r5e5uRoXb6Yapx4t4etgCgrEmOXPfz9STVeWziWLqf2rhjKlJjljFdw1Y0DmCt5DQ a49laVRlJW6VdRnqBG0obRdYZ35ZWdDYteyqy7cjCjerR8gcmjLWVlrLSxzKFA== In-Reply-To: <86plph1cc1.fsf@gnu.org> X-GND-Sasl: info@protesilaos.com Received-SPF: pass client-ip=2001:4b98:dc4:8::228; envelope-from=info@protesilaos.com; helo=relay8-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323458 Archived-At: > From: Eli Zaretskii > Date: Fri, 6 Sep 2024 10:16:30 +0300 > [... 11 lines elided] >> All I need is to figure out how to get/guess the name of a font >> based on the file name (ideally without depending on an external program >> that may not be installed on the user's end). > > Why do you need that? IME, users don't care about file names of the > fonts. Imagine the user has just downloaded a font in "~/Downloads" and tries to visit it. The idea is to get the font family out of this file and check if it exists on the system. If it exists, then we perform the preview of the font, otherwise we inform the user that the font called FONT is not installed (and then suggest to install it, but I will do that later). -- Protesilaos Stavrou https://protesilaos.com