X-Loop: help-debbugs@HIDDEN Subject: bug#29630: 25.3; Unable to change fontset using :family face attribute Resent-From: Thomas Morgan <tlm@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 09 Dec 2017 21:41:01 +0000 Resent-Message-ID: <handler.29630.B.151285562917637 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 29630 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 29630 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.151285562917637 (code B ref -1); Sat, 09 Dec 2017 21:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Dec 2017 21:40:29 +0000 Received: from localhost ([127.0.0.1]:54247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1eNmrE-0004aO-DW for submit <at> debbugs.gnu.org; Sat, 09 Dec 2017 16:40:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <tlm@HIDDEN>) id 1eNmeG-0004GZ-Vg for submit <at> debbugs.gnu.org; Sat, 09 Dec 2017 16:27:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <tlm@HIDDEN>) id 1eNmeA-0003FR-HY for submit <at> debbugs.gnu.org; Sat, 09 Dec 2017 16:26:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38236) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <tlm@HIDDEN>) id 1eNmeA-0003Ey-DC for submit <at> debbugs.gnu.org; Sat, 09 Dec 2017 16:26:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <tlm@HIDDEN>) id 1eNme8-0003Tp-N3 for bug-gnu-emacs@HIDDEN; Sat, 09 Dec 2017 16:26:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <tlm@HIDDEN>) id 1eNme5-00039r-HI for bug-gnu-emacs@HIDDEN; Sat, 09 Dec 2017 16:26:56 -0500 Received: from mail-io0-x236.google.com ([2607:f8b0:4001:c06::236]:38402) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <tlm@HIDDEN>) id 1eNme5-00038r-6q for bug-gnu-emacs@HIDDEN; Sat, 09 Dec 2017 16:26:53 -0500 Received: by mail-io0-x236.google.com with SMTP id d14so5871360ioc.5 for <bug-gnu-emacs@HIDDEN>; Sat, 09 Dec 2017 13:26:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziiuu-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=GCK8S39chXhuCnGX7nqetWqkufb/pRbNKfkFkXqdzCA=; b=IA+lz3J/IrH7eZQHroIhknBL8mPrcVW1UpH4xx8q84f3ALMP46MwH5eRAeCit8R/LF oDFq9GFPXbnjLIiBVTbNti15IeLDzzWsJe1edeqObTBp/VWuQUJb8AGNMl1o0Qv6o8mo /zNFvE95hW70DY5gJ9ESy+WBYeOVpIafih5UYdbaaTt454fFrWgptGwzTBb1N+U+h5uu Cme3rk4c/h57Umk8HF3zenAHTCHq8nKauWKc53hFPGajfJvMAk08Nn8kVnYFHBpWwJ/h pwZB7YpzyrTWfpa74exHE/4UNhLiWXYuk05kCh50xIqH7Jfn3cnNsuYyIpHZSieZBobv vYVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=GCK8S39chXhuCnGX7nqetWqkufb/pRbNKfkFkXqdzCA=; b=IsQTM40tbh5nqoPQwn1uJfgAbz9onfD0+6zEDW0tPU39rJvytP+C3VmUy9z7tLGjBB xkesDL7gIjaoDmZ/T3SAollA8189Bm7fODx+0Wtb44HejfsWPE4Dulrv5jNKQI5RT+6P h3VqV73PyvTmIRC+nXJh3mfZ9xMg1PzTxZhj86gUnnsBk9QUgDVnOBscqP5wsVNJP9ki hPeuiHcXHPrZo53E3Sq3oABar63beuDP3Y5ctfLdsvZ1nIYopyJASxz6rxeQjN6uDqKx 1y95ZzL9VNHZ3NIdwdPjeP3DICnGC7R08UfypFPtNBEdJc0sonYtNCCx6xbbBuTf+Fa3 orJQ== X-Gm-Message-State: AKGB3mJmN8YYrf7RF+BVeUSYjKU68BqflNUiyKMesG1QWXowVEU/YAmf FfdGPrz7wJdCX2lKIMN19pY0c8gY X-Google-Smtp-Source: AGs4zMYuX8pzXsfkr8Nf7Vz0UCfLb6g6IHDNf2VPZJhJLcrRwFMMZ6txgFeq4rIjepgwut2G1NVYBw== X-Received: by 10.107.182.196 with SMTP id g187mr20523423iof.225.1512854811387; Sat, 09 Dec 2017 13:26:51 -0800 (PST) Received: from algol.localdomain (ip-47-212-239-173.east.us.northamericancoax.com. [173.239.212.47]) by smtp.gmail.com with ESMTPSA id x97sm2155410ita.9.2017.12.09.13.26.49 for <bug-gnu-emacs@HIDDEN> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Dec 2017 13:26:49 -0800 (PST) Received: by algol.localdomain (Postfix, from userid 1000) id 344941839B1; Sat, 9 Dec 2017 16:26:48 -0500 (EST) From: Thomas Morgan <tlm@HIDDEN> Date: Sat, 09 Dec 2017 16:26:48 -0500 Message-ID: <871sk3twx3.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Mailman-Approved-At: Sat, 09 Dec 2017 16:40:27 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) I started Emacs with `emacs -Q' and created a new fontset by entering the following expression in *scratch* and evaluating it with C-M-x. (create-fontset-from-fontset-spec "-*-Liberation Mono-normal-normal-normal-*-*-*-*-*-m-0-fontset-liberation") I wanted to use this as the default font for the frame so I checked the Emacs Lisp manual. Section 37.12.1, Face Attributes, explains the :family attribute: Font family or fontset (a string). See (emacs)Fonts, for more information about font families. The function `font-family-list' (see below) returns a list of available family names. See (elisp)Fontsets, for information about fontsets. According to this, a string representing a fontset can be used as the value of the :family attribute. I tried using the fontset alias "fontset-liberation" by evaluating the following expression in *scratch* as above. (progn (set-face-attribute 'default nil :family "fontset-liberation") (font-at 0 nil "a")) This changed the frame's font to something other than Liberation Mono and returned: #<font-object "-CYRE-Podkova-normal-normal-normal-*-15-*-*-*-*-0-iso10646-1"> I expected it to be Liberation Mono. I thought perhaps the problem was that I used the fontset alias rather than the fontset name, so I tried the fontset name instead: (progn (set-face-attribute 'default nil :family "-*-liberation mono-normal-normal-normal-*-*-*-*-*-m-0-fontset-liberation") (font-at 0 nil "a")) This signaled an error: "Invalid face foundry". I checked the manual again and read the sections linked to from the quote above: (emacs)Fonts and (elisp)Fontsets. They don't seem to explain how to specify a fontset with the :family face attribute. The documentation for the :font attribute doesn't say that it can be a fontset. But (elisp)Font and Color Parameters says the `font' frame parameter can be the name of a fontset and the frame parameter is "equivalent to the `font' attribute of the `default' face". So one can infer that the :font attribute of a face can be a fontset name. I tested this: (progn (set-face-attribute 'default nil :font "-*-liberation mono-normal-normal-normal-*-*-*-*-*-m-0-fontset-liberation") (font-at 0 nil "a")) This changes the font to Liberation Mono as expected: #<font-object "-1ASC-Liberation Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1"> I also tried equivalent expressions with set-face-font and using the fontset alias, all of which succeeded. The font is correct but the fontset is actually fontset-auto1, not fontset-liberation. I'll make another report about that. I think the documentation for the :family attribute should be changed to explain how to refer to a fontset if it's possible to do that. If it's not possible to specify a fontset with the :family attribute, the text about fontsets should be removed. Here is information from report-emacs-bug: In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 2017-11-05 built on localhost Windowing system distributor 'The X.Org Foundation', version 11.0.11905000 Configured using: 'configure --disable-dependency-tracking --prefix=/nix/store/7px74nmmy9wnl594jsk0lcgz1ygsbwfj-emacs-25.3 --with-modules --with-x-toolkit=gtk3 --with-xft' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES Important settings: value of $LC_ALL: en_US.utf8 value of $LC_COLLATE: C value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set "-*-liberation mono-normal-normal-normal-*-*-*-*-*-m-0-fontset-liberation" Mark set #<font-object "-CYRE-Podkova-normal-normal-normal-*-15-*-*-*-*-0-iso10646-1"> Mark set Entering debugger... Back to top level Mark set #<font-object "-1ASC-Liberation Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1"> Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu cl-loaddefs pcase cl-lib debug time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 100076 5220) (symbols 48 21018 0) (miscs 40 3069 127) (strings 32 18822 4645) (string-bytes 1 764635) (vectors 16 15076) (vector-slots 8 511125 5409) (floats 8 167 42) (intervals 56 249 0) (buffers 976 18))
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Thomas Morgan <tlm@HIDDEN> Subject: bug#29630: Acknowledgement (25.3; Unable to change fontset using :family face attribute) Message-ID: <handler.29630.B.151285562917637.ack <at> debbugs.gnu.org> References: <871sk3twx3.fsf@HIDDEN> X-Gnu-PR-Message: ack 29630 X-Gnu-PR-Package: emacs Reply-To: 29630 <at> debbugs.gnu.org Date: Sat, 09 Dec 2017 21:41:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 29630 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 29630: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D29630 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#29630: 25.3; Unable to change fontset using :family face attribute Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 10 Dec 2017 17:25:02 +0000 Resent-Message-ID: <handler.29630.B29630.15129266944793 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 29630 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Thomas Morgan <tlm@HIDDEN>, Kenichi Handa <handa@HIDDEN> Cc: 29630 <at> debbugs.gnu.org Reply-To: Eli Zaretskii <eliz@HIDDEN> Received: via spool by 29630-submit <at> debbugs.gnu.org id=B29630.15129266944793 (code B ref 29630); Sun, 10 Dec 2017 17:25:02 +0000 Received: (at 29630) by debbugs.gnu.org; 10 Dec 2017 17:24:54 +0000 Received: from localhost ([127.0.0.1]:55551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1eO5LS-0001FD-6j for submit <at> debbugs.gnu.org; Sun, 10 Dec 2017 12:24:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1eO5LQ-0001F1-0e for 29630 <at> debbugs.gnu.org; Sun, 10 Dec 2017 12:24:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1eO5LK-0006aY-4C for 29630 <at> debbugs.gnu.org; Sun, 10 Dec 2017 12:24:46 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1eO5LG-0006Xc-9V; Sun, 10 Dec 2017 12:24:42 -0500 Received: from [176.228.60.248] (port=2325 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <eliz@HIDDEN>) id 1eO5LF-0006vl-Na; Sun, 10 Dec 2017 12:24:42 -0500 Date: Sun, 10 Dec 2017 19:24:26 +0200 Message-Id: <83fu8its1h.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-reply-to: <871sk3twx3.fsf@HIDDEN> (message from Thomas Morgan on Sat, 09 Dec 2017 16:26:48 -0500) References: <871sk3twx3.fsf@HIDDEN> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) > From: Thomas Morgan <tlm@HIDDEN> > Date: Sat, 09 Dec 2017 16:26:48 -0500 > > The documentation for the :font attribute doesn't say that it can > be a fontset. But (elisp)Font and Color Parameters says the `font' > frame parameter can be the name of a fontset and the frame parameter > is "equivalent to the `font' attribute of the `default' face". So > one can infer that the :font attribute of a face can be a fontset > name. I tested this: > > (progn > (set-face-attribute 'default nil :font > "-*-liberation mono-normal-normal-normal-*-*-*-*-*-m-0-fontset-liberation") > (font-at 0 nil "a")) > > This changes the font to Liberation Mono as expected: > > #<font-object "-1ASC-Liberation Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1"> > > I also tried equivalent expressions with set-face-font and > using the fontset alias, all of which succeeded. > > The font is correct but the fontset is actually fontset-auto1, > not fontset-liberation. I'll make another report about that. > > I think the documentation for the :family attribute should be > changed to explain how to refer to a fontset if it's possible > to do that. If it's not possible to specify a fontset with the > :family attribute, the text about fontsets should be removed. Thanks, I've updated the documentation to match what the code does. I'm CC'ing Handa-san, who might know more about this, and maybe explain how to fix the code to accept fontsets as value of :family. Currently, it doesn't seem to work, and I don't know enough about this to figure out whether it ever did or was supposed to. This whole area of Emacs is awfully under-documented.
X-Loop: help-debbugs@HIDDEN Subject: bug#29630: 25.3; Unable to change fontset using :family face attribute References: <871sk3twx3.fsf@HIDDEN> Resent-From: handa <handa@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 21 Dec 2017 15:21:02 +0000 Resent-Message-ID: <handler.29630.B29630.151386962131714 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 29630 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 29630 <at> debbugs.gnu.org, tlm@HIDDEN Received: via spool by 29630-submit <at> debbugs.gnu.org id=B29630.151386962131714 (code B ref 29630); Thu, 21 Dec 2017 15:21:02 +0000 Received: (at 29630) by debbugs.gnu.org; 21 Dec 2017 15:20:21 +0000 Received: from localhost ([127.0.0.1]:46294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1eS2dx-0008FS-1t for submit <at> debbugs.gnu.org; Thu, 21 Dec 2017 10:20:21 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <handa@HIDDEN>) id 1eS2dv-0008FG-BD for 29630 <at> debbugs.gnu.org; Thu, 21 Dec 2017 10:20:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <handa@HIDDEN>) id 1eS2dP-0000NE-Ur for 29630 <at> debbugs.gnu.org; Thu, 21 Dec 2017 10:20:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <handa@HIDDEN>) id 1eS2d1-0008IO-16; Thu, 21 Dec 2017 10:19:23 -0500 Received: from fl1-119-240-91-176.iba.mesh.ad.jp ([119.240.91.176]:40132 helo=shatin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from <handa@HIDDEN>) id 1eS2d0-0000Av-Hj; Thu, 21 Dec 2017 10:19:22 -0500 Received: from handa by shatin with local (Exim 4.86_2) (envelope-from <handa@HIDDEN>) id 1eS2cu-00051g-C2; Fri, 22 Dec 2017 00:19:16 +0900 From: handa <handa@HIDDEN> In-Reply-To: <83fu8its1h.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 10 Dec 2017 19:24:26 +0200) Date: Fri, 22 Dec 2017 00:19:16 +0900 Message-ID: <87d1382jnv.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) > > From: Thomas Morgan <tlm@HIDDEN> > > Date: Sat, 09 Dec 2017 16:26:48 -0500 > > > > The documentation for the :font attribute doesn't say that it can > > be a fontset. But (elisp)Font and Color Parameters says the `font' > > frame parameter can be the name of a fontset and the frame parameter > > is "equivalent to the `font' attribute of the `default' face". So > > one can infer that the :font attribute of a face can be a fontset > > name. I tested this: > > > > (progn > > (set-face-attribute 'default nil :font > > "-*-liberation mono-normal-normal-normal-*-*-*-*-*-m-0-fontset-liberation") > > (font-at 0 nil "a")) > > > > This changes the font to Liberation Mono as expected: > > > > #<font-object "-1ASC-Liberation Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1"> > > > > I also tried equivalent expressions with set-face-font and > > using the fontset alias, all of which succeeded. > > > > The font is correct but the fontset is actually fontset-auto1, > > not fontset-liberation. Here, fontset works as just a provider of font-related properties (family, weight, size, etc), and then, based on the selected font, a new fontset is automatically created. This roundabout behavior was not to break (Emacs-internal) backward compatibility by introducing the concept of fontset. At least, calling set-fontset-font for the fontset of the current frame should work... and worked as far as I rememnber... but I've just found that this does not work with the latest Emacs?!? (set-fontset-font nil 'unicode-bmp "dejavu sans mono") (set-fontset-font nil 'unicode-bmp "Freemono" nil 'append) I'm now checking what is wrong. --- K. Handa handa@HIDDEN
X-Loop: help-debbugs@HIDDEN Subject: bug#29630: 25.3; Unable to change fontset using :family face attribute Resent-From: Thomas Morgan <tlm@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 24 Dec 2017 05:26:01 +0000 Resent-Message-ID: <handler.29630.B29630.1514093134630 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 29630 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: handa <handa@HIDDEN> Cc: 29630 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN> Received: via spool by 29630-submit <at> debbugs.gnu.org id=B29630.1514093134630 (code B ref 29630); Sun, 24 Dec 2017 05:26:01 +0000 Received: (at 29630) by debbugs.gnu.org; 24 Dec 2017 05:25:34 +0000 Received: from localhost ([127.0.0.1]:49856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1eSymz-0000A5-L7 for submit <at> debbugs.gnu.org; Sun, 24 Dec 2017 00:25:33 -0500 Received: from mail-io0-f182.google.com ([209.85.223.182]:32840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <tlm@HIDDEN>) id 1eSymy-00009t-Dj for 29630 <at> debbugs.gnu.org; Sun, 24 Dec 2017 00:25:32 -0500 Received: by mail-io0-f182.google.com with SMTP id t196so28323761iof.0 for <29630 <at> debbugs.gnu.org>; Sat, 23 Dec 2017 21:25:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziiuu-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=PYZUGe2m/Ybc+YnhW4Yxbu1zs7HxZkVJPBeYbioTfJc=; b=nzKb8VnWgTDMfM7HuDKjequ35fTD3Bd0rz1BZ2VYYCJptQrd9133fx9vTyjsVfwZfW 6cECF928w4/BGNlS+m6YvtDonYTPf3YfhXvvMiWppbZpHZw2G01M2rhk9hNpNOE+kJiJ 70WJb8cJc13gtvQTYuQ8kqLGjB5Bi9uR6MDmZa8Wm5PMNMVNJXUdqo/fkERixauDkjlb oNA2HxCquM6cTUsvyPcpHzLtgjgcHxAc6oFIR56NvzGMO+1tEeeRgJ7okd0IJKKERO5V m7WLluP7bTYW7fDFB9m5m8HV2qC1DiKbU9QIrWH25905Zx7pKe5SLgLPOEwk2j3nW3p8 EQbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=PYZUGe2m/Ybc+YnhW4Yxbu1zs7HxZkVJPBeYbioTfJc=; b=kYQVHE6ov6BQ/OnySnCFs7EinUCMHWs+nMWVBW8DoyTwHoFzcev6/g7LIlgLDvM+YW oRlKu6aEzef+owBly1bfMXpJBdYaREwYFuRBhilfSqNN+fCsgTul8AMVeLbWOaS135kT pHGLnMILMFPiNbs6+p0vdx8P1DpF3WaBfOwC3x14Ij5JghKrUWETBU1rDUxfn4WZBi2N CHmRI09sT5JeEJOfMLkeLSs0G6xo0XlvBX6q0fkjm53bNVtb3zqr75MmaRuZHL3ciDLR NLFfRjBRz7vdnkVdyyvwVtNOIGseiXagi+UfWaPcbqiU4kgiS60ZzDhLIEZOfzU3tEo9 WrMA== X-Gm-Message-State: AKGB3mKyvvQmI6KnitCjzHxqnXnOYyEt3S7c6gxQa+L8N+xu4J76TkYf CDoSRLbPD8huxz4NmheTtQFs1NXw X-Google-Smtp-Source: ACJfBovgZgM/VhM6S98hWX35cfwMzP5v2JZ3XE3mMtsh2foFFHS6Q2ThtjqwaLWRjmlGEl8ISXfkkw== X-Received: by 10.107.160.145 with SMTP id j139mr23400370ioe.236.1514093126473; Sat, 23 Dec 2017 21:25:26 -0800 (PST) Received: from sadr.localdomain (ip-9-214-239-173.east.us.northamericancoax.com. [173.239.214.9]) by smtp.gmail.com with ESMTPSA id a69sm7521398itc.18.2017.12.23.21.25.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Dec 2017 21:25:24 -0800 (PST) Received: by sadr.localdomain (Postfix, from userid 1000) id 25EF1280931; Sat, 23 Dec 2017 21:25:22 -0800 (PST) From: Thomas Morgan <tlm@HIDDEN> References: <87d1382jnv.fsf@HIDDEN> Date: Sat, 23 Dec 2017 21:25:22 -0800 In-Reply-To: <87d1382jnv.fsf@HIDDEN> (handa@HIDDEN's message of "Fri, 22 Dec 2017 00:19:16 +0900") Message-ID: <87zi68elz1.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) handa <handa@HIDDEN> writes: > Here, fontset works as just a provider of font-related properties > (family, weight, size, etc), and then, based on the selected font, a new > fontset is automatically created. This roundabout behavior was not to > break (Emacs-internal) backward compatibility by introducing the concept > of fontset. Thank you, Handa-san. (elisp)Face Attributes says this: `:font' [...] If you specify a string, the contents of the string should be a font name (*note (emacs)Fonts::); if the font name is an XLFD containing wildcards, Emacs chooses the first font matching those wildcards. [...] Would it make sense to add the following after the quoted sentence? You may also specify a fontset name as a string. For reasons of backward compatibility, in the case of the `default' face this may automatically generate a new fontset based on the family, weight, size, and other font-related properties of the specified fontset. It would probably also be helpful to document the :fontset attribute in the manual, if that's the proper way to specify a fontset for the the frame's default face. > At least, calling set-fontset-font for the fontset of the current frame > should work... and worked as far as I rememnber... but I've just found > that this does not work with the latest Emacs?!? > > (set-fontset-font nil 'unicode-bmp "dejavu sans mono") > (set-fontset-font nil 'unicode-bmp "Freemono" nil 'append) > > I'm now checking what is wrong. This seems to work for me with Emacs 25.3.1. To test it I started Emacs with `emacs -Q' and evaluated this in *scratch*: (progn (set-fontset-font nil 'unicode-bmp "DejaVu Sans Mono") (set-fontset-font nil 'unicode-bmp "FreeMono" nil 'append) (list (font-at 0 nil "G") (font-at 0 nil "=E2=85=81"))) (The second character is TURNED SANS-SERIF CAPITAL G, which is covered by FreeMono but not by DejaVu Sans Mono.) As expected, this was displayed in the echo area: (#<font-object "-PfEd-DejaVu Sans Mono-normal-normal-normal-*-15-*-*-*-m-0-= iso10646-1"> #<font-object "-GNU -FreeMono-normal-normal-normal-*-15-*-*-*-m-0-iso10646= -1">)
X-Loop: help-debbugs@HIDDEN Subject: bug#29630: 25.3; Unable to change fontset using :family face attribute References: <871sk3twx3.fsf@HIDDEN> Resent-From: handa <handa@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 27 Dec 2017 12:34:01 +0000 Resent-Message-ID: <handler.29630.B29630.15143780049174 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 29630 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Thomas Morgan <tlm@HIDDEN> Cc: 29630 <at> debbugs.gnu.org, eliz@HIDDEN Received: via spool by 29630-submit <at> debbugs.gnu.org id=B29630.15143780049174 (code B ref 29630); Wed, 27 Dec 2017 12:34:01 +0000 Received: (at 29630) by debbugs.gnu.org; 27 Dec 2017 12:33:24 +0000 Received: from localhost ([127.0.0.1]:53187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1eUAtg-0002Ns-4M for submit <at> debbugs.gnu.org; Wed, 27 Dec 2017 07:33:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <handa@HIDDEN>) id 1eUAtd-0002Nd-TC for 29630 <at> debbugs.gnu.org; Wed, 27 Dec 2017 07:33:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <handa@HIDDEN>) id 1eUAtX-0008Ii-EX for 29630 <at> debbugs.gnu.org; Wed, 27 Dec 2017 07:33:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <handa@HIDDEN>) id 1eUAtS-0008AP-20; Wed, 27 Dec 2017 07:33:10 -0500 Received: from fl1-119-240-91-176.iba.mesh.ad.jp ([119.240.91.176]:42154 helo=shatin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from <handa@HIDDEN>) id 1eUAtR-0005te-F5; Wed, 27 Dec 2017 07:33:09 -0500 Received: from handa by shatin with local (Exim 4.86_2) (envelope-from <handa@HIDDEN>) id 1eUAtM-00007N-SN; Wed, 27 Dec 2017 21:33:04 +0900 From: handa <handa@HIDDEN> In-Reply-To: <87zi68elz1.fsf@HIDDEN> (message from Thomas Morgan on Sat, 23 Dec 2017 21:25:22 -0800) Date: Wed, 27 Dec 2017 21:33:04 +0900 Message-ID: <87wp18gxkv.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) In article <87zi68elz1.fsf@HIDDEN>, Thomas Morgan <tlm@HIDDEN> writes: > `:font' > [...] If you specify a string, the contents of the string should > be a font name (*note (emacs)Fonts::); if the font name is an XLFD > containing wildcards, Emacs chooses the first font matching those > wildcards. [...] > Would it make sense to add the following after the quoted sentence? > You may also specify a fontset name as a string. For reasons of > backward compatibility, in the case of the `default' face this may > automatically generate a new fontset based on the family, weight, > size, and other font-related properties of the specified fontset. The generation of a new fontset happens every time you change a font of the default face; not only when you specify a fontset for :font. So, here, as an explanation of :font, I think what we have to say is that specifying a fontset name is the same as specifying a font that the fontset defines for ASCII. For instance, Even if yoy create a fontset as this name: (create-fontset-from-fontset-spec "-*-dejavu sans mono-normal-normal-normal-*-*-*-*-*-m-0-fontset-dejavu") when you do: (set-fontset-font "fontset-dejavu" 'unicode-bmp (font-spec :family "Freemono")) giving "fontset-dejavu" to :font is the same as giving (font-spec :family "Freemono"). > It would probably also be helpful to document the :fontset attribute > in the manual, if that's the proper way to specify a fontset for the > the frame's default face. I don't remember how :fontset attribute works here, sorry. :-( I tried: (set-face-attribute 'default nil :fontset "fontset-dejavu") but it seems that it has no effect?!? On the other hand, (modify-frame-parameters nil '((font . "fontset-dejavu"))) works. > > At least, calling set-fontset-font for the fontset of the current frame > > should work... and worked as far as I rememnber... but I've just found > > that this does not work with the latest Emacs?!? > > > > (set-fontset-font nil 'unicode-bmp "dejavu sans mono") > > (set-fontset-font nil 'unicode-bmp "Freemono" nil 'append) > > > > I'm now checking what is wrong. That was my misunderstanding, sorry. I have two versions of freemono fonts, ttf and otf, and Emacs (or fontconfig) found otf version, but I was expecting ttf version that has more glyphs. --- K. Handa handa@HIDDEN
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.