From unknown Sat Aug 16 00:28:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40057 <40057@debbugs.gnu.org> To: bug#40057 <40057@debbugs.gnu.org> Subject: Status: 26.3; Won't display Big5 characters using Xft Reply-To: bug#40057 <40057@debbugs.gnu.org> Date: Sat, 16 Aug 2025 07:28:18 +0000 retitle 40057 26.3; Won't display Big5 characters using Xft reassign 40057 emacs submitter 40057 Brian Schack severity 40057 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 13 19:40:28 2020 Received: (at submit) by debbugs.gnu.org; 13 Mar 2020 23:40:28 +0000 Received: from localhost ([127.0.0.1]:60381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCtul-00026H-4u for submit@debbugs.gnu.org; Fri, 13 Mar 2020 19:40:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:43996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCt6A-0000t4-F6 for submit@debbugs.gnu.org; Fri, 13 Mar 2020 18:48:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55300) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCt68-00084I-NE for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2020 18:48:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCt66-0002ys-Vz for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2020 18:48:08 -0400 Received: from co01.mbox.net ([165.212.64.31]:47656) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCt66-0002sk-Oi for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2020 18:48:06 -0400 Received: from co01.mbox.net (localhost [127.0.0.1]) by co01.mbox.net (Postfix) with ESMTP id 48fLSj0Hmkzs4GK for ; Fri, 13 Mar 2020 22:48:05 +0000 (UTC) X-USANET-Received: from co01.mbox.net [127.0.0.1] by co01.mbox.net via mtad (C8.MAIN.4.17E) with ESMTP id 875ycmwWc4896M01; Fri, 13 Mar 2020 22:48:01 -0000 X-USANET-Routed: 3 gwsout-vs Q:cmvirus X-USANET-Routed: 3 gwsout-vs Q:cmvirus X-USANET-GWS2-Tenant: usa.net X-USANET-GWS2-Tagid: UNKN Received: from ca32.cms.usa.net [165.212.11.132] by co01.mbox.net via smtad (C8.MAIN.4.17D) with ESMTP id XID742ycmwWc8118X01; Fri, 13 Mar 2020 22:48:01 -0000 X-USANET-Source: 165.212.11.132 OUT bschack-cocoa@usa.net ca32.cms.usa.net CLR X-USANET-MsgId: XID742ycmwWc8118X01 Received: from Brian-Schacks-Computer.local [24.68.122.116] by ca32.cms.usa.net (ESMTPSA/brian.schack@usa.net) via mtad (C8.MAIN.4.10M) with ESMTPSA id 668ycmwWB1216M32 (using TLSv1.2 with cipher AES256-GCM-SHA384); Fri, 13 Mar 2020 22:48:01 -0000 X-USANET-Auth: 24.68.122.116 AUTH brian.schack@usa.net Brian-Schacks-Computer.local TLS From: Brian Schack To: bug-gnu-emacs@gnu.org Subject: 26.3; Won't display Big5 characters using Xft Date: Fri, 13 Mar 2020 15:47:57 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Z-USANET-MsgId: XID668ycmwWB1216X32 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 165.212.64.31 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 13 Mar 2020 19:40:25 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) My emacs (which is compiled with X11 and Xft, but not GTK or NextStep) won't display Big5-encoded characters; the easiest way to see this is: % emacs -Q `C-h h' `C-s big5(' On my system, the glyphs displayed are from the LastResort font. After digging around, I think I know why it happens, and how to fix it. I can give details on what's going on, but the fix is simple - change a line in ftfont.c: --- ../../ftfont.old.c 2020-03-11 14:57:35.000000000 -0700 +++ ../../ftfont.new.c 2020-03-11 14:57:44.000000000 -0700 @@ -108,7 +108,7 @@ { "iso8859-15", { 0x00A0, 0x00A1, 0x00D0, 0x0152 }}, { "iso8859-16", { 0x00A0, 0x0218}}, { "gb2312.1980-0", { 0x4E13 }, "zh-cn"}, - { "big5-0", { 0xF6B1 }, "zh-tw" }, + { "big5-0", { 0x9C21 }, "zh-tw" }, { "jisx0208.1983-0", { 0x4E55 }, "ja"}, { "ksc5601.1985-0", { 0xAC00 }, "ko"}, { "cns11643.1992-1", { 0xFE32 }, "zh-tw"}, Explanation: To check if a fontconfig font can support a character set, Emacs uses a set of unique characters (all in Unicode), in fcfont.c:fc_charset_table. However, the character given for the big5-0 character set (0xF6B1) is *not* Unicode, it is big5. Changing it to the equivalent Unicode character (0x9C21) fixes the problem - Xft successfully finds fonts other than LastResort to display the big5 characters. Extra note: The file macfont.m has a similar mapping table, called cf_charset_table. It has this line for big5: { "big5-0", { /* 0xF6B1 in ftfont.c */ 0x4EDC }, CFSTR ("zh-Hant") }, It's clear that the maintainer of this file saw the problem and fixed it in macfont.m, but didn't fix it in ftfont.c. I have a version of emacs compiled with NextStep stuff, and sure enough, it displays big5 characters correctly. Hope this helps! If you have any questions, let me know. Brian ---------------------------------------------------------------------- In GNU Emacs 26.3 (build 1, x86_64-apple-darwin10.8.0, X toolkit, Xaw scroll bars) of 2020-02-23 built on Brian-Schacks-Computer.local Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 Recent messages: nsmenu.m nsselect.m nsterm.m Mark saved where search started Making completion list... Mark saved where search started Mark set [2 times] Mark saved where search started [2 times] Finding changes in /Users/schack/Projects/Emacs/emacs-26.3/src/coding.c...done Finding changes in /Users/schack/Projects/Emacs/emacs-26.3/src/ftfont.c...done Configured using: 'configure --with-x-toolkit=athena --without-ns --with-gnutls=no --with-xft' Configured features: XPM JPEG TIFF GIF PNG NOTIFY ACL LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM THREADS Important settings: value of $LC_CTYPE: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: C/*l Minor modes in effect: diff-auto-refine-mode: t TeX-PDF-mode: t shell-dirtrack-mode: t desktop-save-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow fortune emacsbug sendmail whitespace diff-mode vc face-remap lisp-mnt url-http url-gw url-cache url-auth bbdb-gui sort gnus-cite smiley mm-archive gnus-async gnus-bcklg qp gnus-ml disp-table pcmpl-unix misearch multi-isearch w3m-cookie w3m-form w3m-filter w3m-bookmark w3m-tabmenu w3m-session ffap w3m w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util grep nndraft nnmh nnrss xml mm-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util nnfolder utf-7 bbdb-gnus bbdb-snarf mail-extr bbdb-com cl network-stream nsm starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap nntp gnus-cache multishell multishell-list savehist cl-print debug conf-mode m4-mode cl-extra help-mode vc-cvs perl-mode vc-dispatcher preview prv-emacs tex-buf font-latex latex latex-flymake flymake-proc flymake warnings thingatpt tex-ispell tex-style tex crm tex-mode compile shell sh-script smie executable org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr wid-edit org-docview doc-view image-mode dired dired-loaddefs org-bibtex bibtex org-bbdb org-w3m elec-pair jka-compr vc-filewise vc-rcs map cc-mode cc-fonts cc-guess cc-menus cc-cmds finder-inf info tex-site gnuplot-autoloads package epg-config url-handlers url-parse auth-source eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv org-element cl-seq avl-tree generator org advice org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu easymenu calendar cal-loaddefs desktop frameset w3m-load cc-styles cc-align cc-engine cc-vars cc-defs offlineimap derived edmacro kmacro cl-loaddefs cl-lib comint ansi-color ring bbdb-sc supercite easy-mmode regi bbdb-autoloads bbdb timezone paren cus-start cus-load time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd 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 kqueue dynamic-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 2080534 22721) (symbols 48 55526 2) (miscs 40 1884 1057) (strings 32 383670 8294) (string-bytes 1 13035276) (vectors 16 76063) (vector-slots 8 1577357 247498) (floats 8 446 356) (intervals 56 91697 663) (buffers 992 123)) -- NAPOLEON: What shall we do with this soldier, Guiseppe? Everything he says is wrong. GUISEPPE: Make him a general, Excellency, and then everything he says will be right. - G. B. Shaw, "The Man of Destiny" From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 14 04:33:22 2020 Received: (at 40057-done) by debbugs.gnu.org; 14 Mar 2020 08:33:22 +0000 Received: from localhost ([127.0.0.1]:60574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jD2EU-0001mC-Kq for submit@debbugs.gnu.org; Sat, 14 Mar 2020 04:33:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jD2ET-0001m0-6B for 40057-done@debbugs.gnu.org; Sat, 14 Mar 2020 04:33:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jD2EN-0006s7-Ps; Sat, 14 Mar 2020 04:33:15 -0400 Received: from [176.228.60.248] (port=2012 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jD2EM-0003fP-BW; Sat, 14 Mar 2020 04:33:15 -0400 Date: Sat, 14 Mar 2020 10:33:13 +0200 Message-Id: <83o8sz72uu.fsf@gnu.org> From: Eli Zaretskii To: Brian Schack In-Reply-To: (message from Brian Schack on Fri, 13 Mar 2020 15:47:57 -0700) Subject: Re: bug#40057: 26.3; Won't display Big5 characters using Xft References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40057-done Cc: 40057-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Brian Schack > Date: Fri, 13 Mar 2020 15:47:57 -0700 > Z-USANET-MsgId: XID668ycmwWB1216X32 > > My emacs (which is compiled with X11 and Xft, but not GTK or NextStep) > won't display Big5-encoded characters; the easiest way to see this is: > > % emacs -Q > `C-h h' > `C-s big5(' > > On my system, the glyphs displayed are from the LastResort font. > > After digging around, I think I know why it happens, and how to fix it. > I can give details on what's going on, but the fix is simple - change a > line in ftfont.c: Thanks, fixed. From unknown Sat Aug 16 00:28:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 11 Apr 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator