From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Using more and/or better icons in Emacs Date: Mon, 12 Apr 2021 00:57:34 +0300 Message-ID: <51855893-c7bb-b550-7f4d-e4044c37846b@yandex.ru> References: <2f0b4786-d569-27e6-fa8a-fb47bf08b166@yandex.ru> <0279fbc8-74c3-3766-2b26-b3eb933a501e@yandex.ru> 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="2219"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 To: Alan Third , Stefan Kangas , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 11 23:58:42 2021 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 1lVi6L-0000PJ-Rk for ged-emacs-devel@m.gmane-mx.org; Sun, 11 Apr 2021 23:58:41 +0200 Original-Received: from localhost ([::1]:53822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVi6K-0000Xj-UU for ged-emacs-devel@m.gmane-mx.org; Sun, 11 Apr 2021 17:58:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVi5M-00005B-U2 for emacs-devel@gnu.org; Sun, 11 Apr 2021 17:57:40 -0400 Original-Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:44877) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVi5L-0004dy-16 for emacs-devel@gnu.org; Sun, 11 Apr 2021 17:57:40 -0400 Original-Received: by mail-ed1-x52b.google.com with SMTP id f8so12727236edd.11 for ; Sun, 11 Apr 2021 14:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=71Y+hmOzl4Xv19El0Dg2T8mJXNZWx/RYhrZhN5onWrM=; b=JBoRhQl2Po+TuzW41avsdi85SwidiQiu1gnlGNyjxa7U52O/GiebEbmA7wWtRUxXsM uK3Cgh9V8J8FJsFoCcQXY5iT7UQvVp0fOwI2YnzyvGx+IilNBJGg/rFvmZ+XW8BcDJPv /Yc0lKe7PLklBki4w5UpL/4s95/pLZo7Ewu9L+jeWOJfJ3QDqgGxag9nOg9tJiJlO0OH MK74eh1RijecJFiPr7VYcTF44zZvWBwSIVPamlHE9IPCR8TQ2unRaDgNuVWPB/VIt6rZ UUi99YFKbUMp4D4Df2tXLijSp++JXIe8pu6NqZqNushojuPr4XEd4MiQr9ktY8WycdyZ ShpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=71Y+hmOzl4Xv19El0Dg2T8mJXNZWx/RYhrZhN5onWrM=; b=udvmr7FyCmpq15mLFNX393JOT2WEEnc9PKEyp2s5wmlKnyadT3KRdOmyVDteeQSXdX fFPgyJSS12uP3zzanlG3GabPXjVrjYLY6nK2B7cgJVTU9yFhkloPqGsgkQTbPwfbDlyy xTSb4DQRphZ8YKgLRP+emSmm02BKahF4KXtVVGSgXX8TY0SgMRDak7XfI797ivfFErvZ P3LiZw80c8ToUVTUN8mXsxT3DhqRxTjV9zLeBFS7VCHuY7Ca1vAY0n1YA6KL3FfSKkKl 9vwn4ZTI1LdDbiU/SazXH3ZlxIXamoLWeOm3HQl98Zfi3K6uctoyjvpvz1l87yL0zugY vZCw== X-Gm-Message-State: AOAM532JetBENf+e2SW3itBFbNZfzFchzRMb7pergGKLJKHBRRkR4QOS lGy8gY/dQrNOEJoWzXd2j3Q2znGkNLA= X-Google-Smtp-Source: ABdhPJxMF10v3xKd5KdO2pmNIQjGa/di/7fLNZvH9tDNsJMYheIiK8zahO+QKujjbCo8yyqDa8R2tQ== X-Received: by 2002:aa7:c683:: with SMTP id n3mr15329263edq.214.1618178257210; Sun, 11 Apr 2021 14:57:37 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id t15sm5628193edw.84.2021.04.11.14.57.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 11 Apr 2021 14:57:36 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=raaahh@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267919 Archived-At: On 09.04.2021 22:40, Alan Third wrote: > ... and if you want the actual text height instead of line height it's > more complex, have a look at scale and height in this: > > https://gist.github.com/alanthird/7b86dc66df1ed3b9006bcd3fddd7350f > > although there's probably a better way of doing it. After testing it a bit more, I've noticed that it doesn't take into account the :height attribute of the default face. This seems to return a more correct result: (let ((default-font (face-font 'default))) (* (aref (font-info default-font) 2))) (Adapted from default-font-height.)