From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sebastian Urban Newsgroups: gmane.emacs.bugs Subject: bug#42603: EWW shows chars > #xFF with font set by "set-fontset-font" Date: Fri, 31 Jul 2020 18:10:06 +0200 Message-ID: <4ed2f04a-a928-b1e1-12ee-0fd90d384f25@gmail.com> References: <3193cd96-a53f-d9da-ab27-0baf01f1b313@gmail.com> <83ft9af9bt.fsf@gnu.org> <83d04ef8kh.fsf@gnu.org> <73d8c2fe-5c7e-43d0-d7c0-81199eb69510@gmail.com> <83k0yjetx6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14245"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 Cc: 42603@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 31 18:11:10 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 1k1Xcj-0003dh-Q2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Jul 2020 18:11:09 +0200 Original-Received: from localhost ([::1]:39050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1Xci-0007mv-Rn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Jul 2020 12:11:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1Xcc-0007mm-Ek for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2020 12:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55185) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1Xcc-0006GS-68 for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2020 12:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k1Xcb-0008Kr-Ut for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2020 12:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sebastian Urban Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jul 2020 16:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42603 X-GNU-PR-Package: emacs Original-Received: via spool by 42603-submit@debbugs.gnu.org id=B42603.159621181131980 (code B ref 42603); Fri, 31 Jul 2020 16:11:01 +0000 Original-Received: (at 42603) by debbugs.gnu.org; 31 Jul 2020 16:10:11 +0000 Original-Received: from localhost ([127.0.0.1]:38498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1Xbm-0008Jk-Ow for submit@debbugs.gnu.org; Fri, 31 Jul 2020 12:10:11 -0400 Original-Received: from mail-lj1-f174.google.com ([209.85.208.174]:37179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1Xbk-0008JQ-L3 for 42603@debbugs.gnu.org; Fri, 31 Jul 2020 12:10:09 -0400 Original-Received: by mail-lj1-f174.google.com with SMTP id w14so3120363ljj.4 for <42603@debbugs.gnu.org>; Fri, 31 Jul 2020 09:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vXfxf7qh1QutWmTOpb7AlS3/nZwDjNqwMPQ2sUp2v1c=; b=u28PIhg8DtYSrz8F4Wg79E/xkuvPz+3JdQY278xVh2ZedUlUQt4+rk/Y0IPcLCwt6x SKYq7gn6h5R0Vts8I03l1+FX6wUU2/ZInSKH6mopg0PQId9n49rj6DM4h4QIEFN7X0xG RFYnjtNahSpB2G/8z6xhSPgwWaU3ETMpDPThOM5kbZZDvSDJ6b8YTYogephkjen95dT4 +XwCp7slNYsJmfsWDvY1FXtR7rV+R2p/sI61Ijqoeom7Cb1sLUramG5V2qVETGhuhPpI 4Z0S9wg0174d2f43AdmkJsd227lzPMLPAPttn7WO4c+WvL6n0FpX/CVuDaZO61M6dCQk X5Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vXfxf7qh1QutWmTOpb7AlS3/nZwDjNqwMPQ2sUp2v1c=; b=kyXuEsa+o71otF+gL5DJYa8GwEYPDHkmagQY2AKOnB8LU7deCjY0unWn1xsyPGHj55 ifJOajpxfkuc3uggEK1eFYKh1CNINFW6s6/qNgEmve0B1yomgI5oGu5DKEsqeXRcd0eD 7ESS46LNpjIQUnu6VCJW6FjJUYYQyUYUdcmZHFCLFSZy/cMgrnLbwu5HZv3dsCoL+rUi gf9r6OHyqcr9N1xoqFKvWcFLePKu4AmMi9TS7VCSwNktkWn7ROAEKISBz6x5zH1kuHMy t6XeK0z2QL7XqsYjqkL7MvY1p3U0caWRvtgSFsu1wAM/1cBIoCyPA348bQcNbkgHUqCU Hx2w== X-Gm-Message-State: AOAM531GX2u3ZoMAkkggr0MwKJS4nYp0RhScLN4lSRibkyHxkcomwu71 XFCJeCTBzyLVpRztazxmh9ZdQxEd X-Google-Smtp-Source: ABdhPJwba4t12V+bKcOIf6X0FLlcmU8rVcuTCfPT6b4tDf3t2Ffy9Pzq0Ay5CB7VTbrL5oPfkHpouQ== X-Received: by 2002:a2e:1641:: with SMTP id 1mr2110022ljw.73.1596211801915; Fri, 31 Jul 2020 09:10:01 -0700 (PDT) Original-Received: from [192.168.1.100] (ip-89-161-2-137.tel.tkb.net.pl. [89.161.2.137]) by smtp.gmail.com with ESMTPSA id y26sm1737858ljm.132.2020.07.31.09.10.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 Jul 2020 09:10:01 -0700 (PDT) In-Reply-To: <83k0yjetx6.fsf@gnu.org> Content-Language: en-GB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:183736 Archived-At: >> My use case is not related to EWW, but to fonts overall. I use it to >> "prevent" Emacs from searching for fonts, and to display codes of >> characters instead of glyphs, to speed up loading text in situations >> like in case of view-hello-file. > > In that case, you should indeed use set-fontset-font, but instead of > telling Emacs that each of the fonts covers all of the Unicode, you > should tell Emacs which ranges of characters, or which scripts, should > be rendered by what fonts. > (...) >> (set-fontset-font "fontset-default" 'unicode "Consolas") >> (set-fontset-font "fontset-default" 'unicode "Symbola" nil 'append) > > Instead of using 'unicode' in the above 2 lines, use either symbols of > scripts you want to render with each font, or explicit ranges of > character codepoints. And if I want some characters to be rendered, and the rest not to be rendered - to which font I should assign "the rest"? My reasoning was: - use Consolas as default and for as much Unicode as it covers, - then additionally use Symbola, - then use fonts from noto-fonts.elc according to the script, - everything else - don't show. >> When I type C-u C-x = on any of above letters, it says: >> There are text properties here: >> face variable-pitch >> and the variable-pitch says Arial, but it's not Arial. > > You countermanded that with you over-optimistic set-fontset-font > setting, I think. I guess I underestimated the power of set-fontset-font, it was good as long as it was used in buffer with default font and had the same value as default font. Anyway, I think I found a better way to use set-fontset-font in my case: -(set-fontset-font "fontset-default" 'unicode "Consolas") +(set-fontset-font "fontset-default" 'unicode "nil") I don't think I have "nil" font, and it seems to work in both HELLO file (it loads faster, codes for some chars instead of glyphs) and in EWW buffer. >> I DON'T want to change whole text to TNR, or any other font, with this >> command, quite the opposite, I don't want IT to change chars above >> 256, in EWW buffer that uses variable-pitch font, which is Arial. > > Then why did you use this: > > (set-fontset-font t 'unicode "Times New Roman") > > ? It tells Emacs the opposite: to use Times New Roman for _any_ > character (because the 'unicode' script spans all the characters you > can possibly have). With background info about how I set fonts, I think it is easier to see "why". I should have describe this "bug" from perspective of my init.el instead of out of context setting TNR. S. U.