From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nicolas Martyanoff Newsgroups: gmane.emacs.devel Subject: Font selection depending on the face weight Date: Mon, 22 May 2023 14:20:05 +0200 Message-ID: <87ilckwoay.fsf@valhala.localdomain> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21002"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 22 14:21:05 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 1q14XA-0005HD-82 for ged-emacs-devel@m.gmane-mx.org; Mon, 22 May 2023 14:21:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q14WN-0005iu-8k; Mon, 22 May 2023 08:20:15 -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 1q14WK-0005ie-9T for emacs-devel@gnu.org; Mon, 22 May 2023 08:20:12 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q14WI-00060h-3H for emacs-devel@gnu.org; Mon, 22 May 2023 08:20:11 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-30796c0cbcaso5994264f8f.1 for ; Mon, 22 May 2023 05:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=n16f-net.20221208.gappssmtp.com; s=20221208; t=1684758007; x=1687350007; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=HEHe8iV6fviRT1eVSm/G/NuBM5vUjr38bMFRuhETY2A=; b=Uq0c6J1npy2L+DivZ+R64qt5e/3q/qo6naCs2YTST6m9GocVZUIvde/jOS6BC7h4Wq cMZ5uYBnaRl2Djp4RWHU1vp9FGiUIMIk76ZEhaUb7MHteNZxUO1B93k35fd1TrWc2Nxu 2tQT/sEOmXs4gv7w1SYnCz2i8rUYcrmYKYOKspQxUU0SfGVcRrq9ihz7Be+w0d/nMaKY 38PV5Y6Apf8Pmy68aXKm8HzkBFNNLgBZg/69m1MLEkYh27ehPwAVguVI388o/l6otXp0 Zf+SNScfAiP0OzxfzXoVjXNf/cz1MT61OhwPk+JiM+Vj+aYIk8flLm2+BZgZptRY8le7 G6uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684758007; x=1687350007; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HEHe8iV6fviRT1eVSm/G/NuBM5vUjr38bMFRuhETY2A=; b=kSLXHEvb2T3MUoThkoURmbr5svI0n1VufwP2GTPDK10If0RpKxsrAUASf0GcdK92BN WwCRhfmjaUfKdpxVqoPr5ajaLH9T3IocEPuYj4A5ur0yYjlhAISI+PbZqZfZa1ceMEqx sui1TUGd4sud4ymkt172+VltMssHjppaVU1S7DC7C24dqteVh9vC86z1S8sUusUkmLbv Z3bTaKntLgXyXJonQ4yGxnWMQBWb/Qnsx/PKmxyhv6upuTy5eAwU1PQLZUy502aAghvb 1NnswDzqOrP0rpixfZOFY5R76EaZbLvGIgh5t7qh/OW2qW33s9G6HH4Nsum29ZNV9zl2 8H0Q== X-Gm-Message-State: AC+VfDxx2/+ggYS/yEGDm9PLZQddQyZwMBBPQl0htRBrmNIAxteUO2FG oCPgAHEWSZUxgj4OJBX1K8PAeBq26iOldIUCJJFjnw== X-Google-Smtp-Source: ACHHUZ4Jp1bNtAPtysauWSLLQgjPenWrYsRHoEkuIDn9bMg3DmwdFuFcqopwUeuFcuLqZrvguTYy0w== X-Received: by 2002:adf:fa51:0:b0:2fa:26cc:71f0 with SMTP id y17-20020adffa51000000b002fa26cc71f0mr8003642wrr.10.1684758006965; Mon, 22 May 2023 05:20:06 -0700 (PDT) Original-Received: from valhala (2a01cb04000943008cd04fe2c793033e.ipv6.abo.wanadoo.fr. [2a01:cb04:9:4300:8cd0:4fe2:c793:33e]) by smtp.gmail.com with ESMTPSA id b4-20020a5d45c4000000b003047d5b8817sm7569318wrs.80.2023.05.22.05.20.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 05:20:06 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=nicolas@n16f.net; helo=mail-wr1-x430.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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:306268 Archived-At: Hi, I stumbled upon a strange behaviour. With the IntelOne Mono font [1], Emacs (Emacs 28.2 GUI on Linux) maps font faces as follows: '((t :font "IntelOne Mono-11" :weight light)) -> "Light" '((t :font "IntelOne Mono-11" :weight semi-light)) -> "Light" '((t :font "IntelOne Mono-11" :weight normal)) -> "Medium" '((t :font "IntelOne Mono-11" :weight medium)) -> "Medium" '((t :font "IntelOne Mono-11" :weight semi-bold)) -> "Bold" None of the Emacs weight maps to the "Normal" font weight (Light, Medium, Normal and Bold are the name of the weights as reported by all other applications). >From a quick search, Emacs uses font-weight-table to map numeric font weights to symbolic weights, but I cannot find any link between these numeric values and the weight names reported by other applications. Is there something I can do to control (or at least understand) the way weights are mapped? [1] https://github.com/intel/intel-one-mono Best, -- Nicolas Martyanoff https://n16f.net nicolas@n16f.net