From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: Font selection depending on the face weight Date: Mon, 22 May 2023 15:00:24 +0200 Message-ID: <87jzx0jzbr.fsf@gmail.com> References: <87ilckwoay.fsf@valhala.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36147"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Nicolas Martyanoff Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 22 15:01:47 2023 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 1q15AZ-0009FM-6B for ged-emacs-devel@m.gmane-mx.org; Mon, 22 May 2023 15:01:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q159j-0005KP-3Z; Mon, 22 May 2023 09:00:55 -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 1q159L-00054V-5P for emacs-devel@gnu.org; Mon, 22 May 2023 09:00:31 -0400 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q159I-0005P5-Vs for emacs-devel@gnu.org; Mon, 22 May 2023 09:00:30 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-306dbad5182so3940696f8f.1 for ; Mon, 22 May 2023 06:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684760426; x=1687352426; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from:from :to:cc:subject:date:message-id:reply-to; bh=U4aA+ccXshfL7TcimXFfgxPDX9JGyRhbwqVz4sMGWmM=; b=pM8KJX+m5l0yvqV0H3gq1W6Jd6D+mqwWFMvfLk0VRFGdEOH6F2ZUmXQAdMb0SXVJoT i8UstpBjrcsoPPUEgrAbyAWHZebp7bDJzI22lcAa0yHZlm1EfbKDL8jO9FMpeLeGCjgp jjVARU6PDJ65qJeOjQ2lAh7DkxlP5Tdc2Zhx8/RrDbzWjfcDYdm0Fo2VcwstDENWskno JtjSXDgmBf3ZYW+Rx8mnJw8jTXZXHGNFVCWXwNF0PNsiMY184ayRI6hB8ShpoaI6ygf1 Ehsh0pmlVFnJKm5XnREUvq/fgLohXJKHosx7mi6k15kbiYy4AO+Y51nYvBdUKviByIle 4wfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684760426; x=1687352426; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=U4aA+ccXshfL7TcimXFfgxPDX9JGyRhbwqVz4sMGWmM=; b=Bah82LQx8gwkbx33yERAIWLHPt43kpVBLkFrwrJFLDt5NzT8psIlJf0nW+E0ZTa83G VcR2Z9XuhYfaLYqztc9sn897SegA7wGiQRoK6Xmnd6tiBU1W+L5eZBliQb0QxYPsTGXi LpPeiXsRMZTj6VXbjxpxL5lMkRFZYSpipccXpjP4o2MaD/pAQ8y2WM0p/b/GXimZDc41 fKIDvlU5/6eAqAwLySD0aUh1bGq/tFDiHOJcguqCBmPa7wBdUJ/LmR5Ox4FlkOzsg4SB YReodmDoTZHxYv6V6IuJVO7ttnINFLcnLmVsxWeGO13AI6hM7Nk6MDhWvHctm1IOU1LQ LOaw== X-Gm-Message-State: AC+VfDxrpnoBNwUZ9yPfgYw1c+Uhcepq0LzXYWsqBmBN6mW605mvyQJ0 J6Ijn2AOXYp8qPZzZivCOUSFbZTlUN4= X-Google-Smtp-Source: ACHHUZ4uRlmb9TQ+XFNQJqXAYpDOnLtJdmUkla52L6bj/hEjpBRKlvmpUjCrFDTxhZZkCCBXhMjKfg== X-Received: by 2002:adf:ec0b:0:b0:307:cd98:c00f with SMTP id x11-20020adfec0b000000b00307cd98c00fmr7154007wrn.33.1684760425827; Mon, 22 May 2023 06:00:25 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id l1-20020a05600012c100b0030630de6fbdsm7626439wrx.13.2023.05.22.06.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 06:00:25 -0700 (PDT) In-Reply-To: <87ilckwoay.fsf@valhala.localdomain> (Nicolas Martyanoff's message of "Mon, 22 May 2023 14:20:05 +0200") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=rpluim@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:306269 Archived-At: >>>>> On Mon, 22 May 2023 14:20:05 +0200, Nicolas Martyanoff said: Nicolas> Hi, Nicolas> I stumbled upon a strange behaviour. With the IntelOne Mono fo= nt [1], Nicolas> Emacs (Emacs 28.2 GUI on Linux) maps font faces as follows: Nicolas> '((t :font "IntelOne Mono-11" :weight light)) -> "Light" Nicolas> '((t :font "IntelOne Mono-11" :weight semi-light)) -> "Light" Nicolas> '((t :font "IntelOne Mono-11" :weight normal)) -> "Medium" Nicolas> '((t :font "IntelOne Mono-11" :weight medium)) -> "Medium" Nicolas> '((t :font "IntelOne Mono-11" :weight semi-bold)) -> "Bold" Nicolas> None of the Emacs weight maps to the "Normal" font weight (Lig= ht, Nicolas> Medium, Normal and Bold are the name of the weights as reporte= d by all Nicolas> other applications). This has changed in emacs-29. From etc/NEWS: *** Emacs now supports 'medium' fonts. Emacs previously didn't distinguish between the 'regular'/'normal' weight and the 'medium' weight, but it now also supports the (heavier) 'medium' weight. However, this means that if you specify a weight of 'normal' and the font doesn't have this weight, Emacs won't find the font spec. In these cases, replacing ":weight 'normal" with ":weight 'medium" should fix the issue. Would it be possible to check with emacs-29? Nicolas> From a quick search, Emacs uses font-weight-table to map numer= ic font Nicolas> weights to symbolic weights, but I cannot find any link betwee= n these Nicolas> numeric values and the weight names reported by other applicat= ions. Nicolas> Is there something I can do to control (or at least understand= ) the way Nicolas> weights are mapped? I once understood some of it, but I=CA=BCve long since repressed that info :-) Robert --=20