From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: ynyaaa@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#39264: 26.3; (frame-char-width) is different from real char width of monospace font 'Noto Sans Mono' Date: Fri, 24 Jan 2020 23:55:42 +0900 Message-ID: <86sgk4sy35.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="6025"; mail-complaints-to="usenet@ciao.gmane.io" To: 39264@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 24 15:56:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1iv0NY-0001WA-Mb for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Jan 2020 15:56:12 +0100 Original-Received: from localhost ([::1]:43370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv0NX-0002mL-Gb for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Jan 2020 09:56:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48160) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv0NQ-0002mC-7I for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 09:56:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iv0NO-0006kQ-KN for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 09:56:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48609) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iv0NO-0006kM-Gf for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 09:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iv0NO-0003JF-FV for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 09:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ynyaaa@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jan 2020 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39264 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157987775612712 (code B ref -1); Fri, 24 Jan 2020 14:56:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Jan 2020 14:55:56 +0000 Original-Received: from localhost ([127.0.0.1]:54582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iv0NH-0003Iy-Tc for submit@debbugs.gnu.org; Fri, 24 Jan 2020 09:55:56 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:39160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iv0ND-0003Iq-Iq for submit@debbugs.gnu.org; Fri, 24 Jan 2020 09:55:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48130) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv0NB-0002jS-OR for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 09:55:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iv0NA-0006Zx-8F for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 09:55:49 -0500 Original-Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:50594) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iv0N9-0006Zj-VX for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 09:55:48 -0500 Original-Received: by mail-pj1-x102a.google.com with SMTP id r67so1149409pjb.0 for ; Fri, 24 Jan 2020 06:55:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=aw4D5xaXEXqKbjU2+x7zf9L3fda/f9E7TxlvyaYozHg=; b=EScVATS/tPawqqgQ/Ls7EMTq0rhBt8Mh3CvPFPOdh9YzHY71+1x0YRDgVM5Jj38hb8 ffLarO1iPUS41CQTQ5ieMH5zyHeihG7LMadteYoGwKspZSOET7iFueZHjgAkSe/ogdTN jWUFkzT+5BDOt2/1G/6ng0iYeo3XkEniYwI54WfUkD5nqovr3Q42XoJy4jTGoTGgfgVa b4N+MUjQtfmVc718cRtqHc+Ije/hWu5cpwrIHSxVPjZEr3GZXgSER26FfHLzY3ZOO2EV GimIedfcMaR2+YpGniElCmdHWc4GwqcF3oNDlUSNv9PnMiQD04TVvOlcN9ZmpkkfuBx8 Hneg== 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=aw4D5xaXEXqKbjU2+x7zf9L3fda/f9E7TxlvyaYozHg=; b=WMWFcpgxf1h8+fxfnkoL7vaerY4fShhGnHOfnLXBnP4xbNvY2ZYcCMNxZ2/b4L6uls OzkrYVa+DkWr4hVDVFOZ3gD9LkVi5KwkbW2rdagHcAqt5GncdWzYNsciM1Mc99iAFrep efottoRDlCJLRbR5ESeguw/xztLZ2292veXvVO1f0hH4lTFRrFS0Q5U5vRTb6gx0VtWv zJCjq9Za681tUhgD/QSGZXBg98MeivddKqTUhttGdHdh9KegV22e4U9iAChnq8xFc2Gj 8ong4BlDvzy/zbzncfkSXNbY6jt7k2/pxSLh6Zd3sBAenFiPdOgtFPnc8HZrHxY+RRug MLcQ== X-Gm-Message-State: APjAAAVHLhNtQwNr/wOwZaOl0kQr0adBs5Dyy+GDV9h6Tlp6tEF7mfZX tbhwpW9M0x19vqPS4tTg3RZnlxuW X-Google-Smtp-Source: APXvYqyYLXefY5P+iRP/reV0e1TsBN+FJzc5P4ZvRmqSNfbNie8xG4aVRgW9AzvcswFfx+hNI2giSQ== X-Received: by 2002:a17:902:aa96:: with SMTP id d22mr3911426plr.204.1579877746328; Fri, 24 Jan 2020 06:55:46 -0800 (PST) Original-Received: from HP (east42-p111.eaccess.hi-ho.ne.jp. [219.121.173.112]) by smtp.gmail.com with ESMTPSA id w8sm6242972pfn.186.2020.01.24.06.55.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Jan 2020 06:55:45 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175222 Archived-At: I installed Noto fonts. With setting frame font to "Noto Sans Mono", which is a monospace font, (frame-char-width) and the real char width may differ. For example, using "Noto Sans Mono-13", (frame-char-width) is one pixel larger. (progn (set-frame-font "Noto Sans Mono-13") (list (frame-char-width) (car (window-text-pixel-size nil 1 2)))) => (11 10) Then the TAB pixel width is 8 pixels wider than 8 SPCs. And the frame with 80-character width is wider than a real 80-character line. Here is a list of problematic combinations of font names and font sizes. The sizes are selected from between 10 and 20. ;;; NOTE: THIS FORM USE #'set-frame-font MANY TIMES (let (last cell ret) (save-window-excursion (with-temp-buffer (switch-to-buffer (current-buffer)) (insert ?\s) (dolist (family (sort (font-family-list) #'string<)) (when (and (not (equal family last)) (string-match "Noto.*Mono" family)) (setq cell (list family) ret (cons cell ret)) (dolist (size (number-sequence 10 20)) (set-frame-font (format "%s-%d" family size)) (unless (= (car (window-text-pixel-size nil 1 2)) (frame-char-width)) (setq cell (nconc cell (list size)))))) (setq last family)))) (nreverse ret)) => (("Noto Mono") ("Noto Sans Mono" 13 14 15 17 18 19 20) ("Noto Sans Mono Blk" 13 14 15 17 18 19 20) ("Noto Sans Mono CJK JP Bold" 10 11 12 13 14 15 16 17 18 19 20) ("Noto Sans Mono CJK JP Regular" 10 11 12 13 14 15 16 17 18 19 20) ("Noto Sans Mono CJK KR Bold" 10 11 12 13 14 15 16 17 18 19 20) ("Noto Sans Mono CJK KR Regular" 10 11 12 13 14 15 16 17 18 19 20) ("Noto Sans Mono CJK SC Bold" 10 11 12 13 14 15 16 17 18 19 20) ("Noto Sans Mono CJK SC Regular" 10 11 12 13 14 15 16 17 18 19 20) ("Noto Sans Mono CJK TC Bold" 10 11 12 13 14 15 16 17 18 19 20) ("Noto Sans Mono CJK TC Regular" 10 11 12 13 14 15 16 17 18 19 20) ("Noto Sans Mono Cond" 12 14 16 17 19 20) ("Noto Sans Mono Cond Blk" 12 14 16 17 19 20) ("Noto Sans Mono Cond ExtBd" 12 14 16 17 19 20) ("Noto Sans Mono Cond ExtLt" 12 14 16 17 19 20) ("Noto Sans Mono Cond Light" 12 14 16 17 19 20) ("Noto Sans Mono Cond Med" 12 14 16 17 19 20) ("Noto Sans Mono Cond SemBd" 12 14 16 17 19 20) ("Noto Sans Mono Cond Thin" 12 14 16 17 19 20) ("Noto Sans Mono ExtBd" 13 14 15 17 18 19 20) ("Noto Sans Mono ExtCond" 15 18) ("Noto Sans Mono ExtCond Blk" 15 18) ("Noto Sans Mono ExtCond ExtBd" 15 18) ("Noto Sans Mono ExtCond ExtLt" 15 18) ("Noto Sans Mono ExtCond Light" 15 18) ("Noto Sans Mono ExtCond Med" 15 18) ("Noto Sans Mono ExtCond SemBd" 15 18) ("Noto Sans Mono ExtCond Thin" 15 18) ("Noto Sans Mono ExtLt" 13 14 15 17 18 19 20) ("Noto Sans Mono Light" 13 14 15 17 18 19 20) ("Noto Sans Mono Med" 13 14 15 17 18 19 20) ("Noto Sans Mono SemBd" 13 14 15 17 18 19 20) ("Noto Sans Mono SemCond" 10 11 15 17 19 20) ("Noto Sans Mono SemCond Blk" 10 11 15 17 19 20) ("Noto Sans Mono SemCond ExtBd" 10 11 15 17 19 20) ("Noto Sans Mono SemCond ExtLt" 10 11 15 17 19 20) ("Noto Sans Mono SemCond Light" 10 11 15 17 19 20) ("Noto Sans Mono SemCond Med" 10 11 15 17 19 20) ("Noto Sans Mono SemCond SemBd" 10 11 15 17 19 20) ("Noto Sans Mono SemCond Thin" 10 11 15 17 19 20) ("Noto Sans Mono Thin" 13 14 15 17 18 19 20)) In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 built on CIRROCUMULUS Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor 'Microsoft Corp.', version 10.0.18363 Recent messages: Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2 Important settings: value of $LANG: JPN locale-coding-system: cp932 Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t display-time-mode: t tooltip-mode: t global-eldoc-mode: t 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 Load-path shadows: None found. Features: (term/bobcat descr-text mailclient browse-url cus-edit cus-start cus-load wid-edit info crm eieio-opt speedbar sb-image ezimage dframe shadow emacsbug network-stream nsm starttls tls gnutls mailalias smtpmail auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs sendmail sort mail-extr message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader compare-w diff-mode easy-mmode find-func cl-extra pp ibuf-ext ibuffer ibuffer-loaddefs seq thingatpt help-fns radix-tree misearch multi-isearch help-mode easymenu cl-print byte-opt gv bytecomp byte-compile cl-loaddefs cl-lib cconv debug time elec-pair time-date mule-util japan-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 238951 47126) (symbols 48 50848 0) (miscs 40 140 601) (strings 32 120075 1414) (string-bytes 1 2925132) (vectors 16 31299) (vector-slots 8 1261645 35200) (floats 8 74 499) (intervals 56 17535 168) (buffers 992 22))