unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Gregory Heytings via "Emacs development discussions." <emacs-devel@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Suggest installing more fonts?
Date: Sat, 17 Oct 2020 18:36:47 +0000	[thread overview]
Message-ID: <alpine.NEB.2.22.394.2010172006380453.2075@sdf.lonestar.org> (raw)
In-Reply-To: <83r1pwspik.fsf@gnu.org>


>>>> Apparently it's not clear, so I'll say one last time that the feature 
>>>> I propose does _not_ require to install Unifont system-wide.  It is 
>>>> to include Unifont in Emacs (say in etc/unifont), and to offer it as 
>>>> an additional option for glyphless-char-display, along with hex-code, 
>>>> empty-box, thin-space, and zero-width.  The bitmap data would be used 
>>>> to draw the glyph in produce_glyphless_glyph() .
>>>
>>> I don't understand this proposal.  Are you saying Emacs can already 
>>> use a font that is not installed?  If so, can you tell how to do that?
>>
>> I don't (yet) know, but I'd be surprised if this could not be done. 
>> Emacs already creates glyphs dynamically for tofus
>
> No, Emacs doesn't create any glyphs dynamically for tofus, it simply 
> uses a smaller font in a box it itself draws.  See 
> xterm.c:x_draw_glyphless_glyph_string_foreground for how this is done on 
> X (w32 and ns do it very similarly).
>

Yes, but Emacs draws the box itself, and I suppose that if it can draw a 
box, it could instead draw a small black-and-white (8x16 or 16x16) bitmap. 
Emacs already does this for fringe bitmaps AFAIU.

>>> The way Emacs uses fonts is by using various system libraries, such as 
>>> Fontconfig, to find fonts that match certain criteria (script, 
>>> encoding, character codepoint, size, slant, etc.).  How do you propose 
>>> to do that if, for example, Fontconfig knows nothing about a font?
>>
>> The proposal is not to change anything to the way Emacs uses fonts, but 
>> to change something to the way Emacs behaves when it does not find an 
>> appropriate font to display a character.  In that case Emacs would 
>> display a "degraded" glyph (from Unifont), and would issue a warning 
>> that the user should install another font.
>
> I don't see how this can be done without serious changes in the code 
> that finds and uses fonts.  We _need_ the Fontconfig functionality.
>

With the proposal, there is no need to find the font, it is already 
included, and only used as a fallback when no appropriate font has been 
found.  Unifont is just a long sequence of small bitmaps, Emacs only has 
to pick the bitmap corresponding to a given character in that list and to 
draw it.  For example, the character "A" in Unifont is the 8x16 bitmap 
"0000000018242442427E424242420000" which occupies only 16 bytes.



  reply	other threads:[~2020-10-17 18:36 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 10:54 Suggest installing more fonts? Lars Ingebrigtsen
2020-10-16 11:07 ` Eli Zaretskii
2020-10-16 11:30   ` Gregory Heytings via Emacs development discussions.
2020-10-16 12:50     ` Eli Zaretskii
2020-10-16 12:59       ` Gregory Heytings via Emacs development discussions.
2020-10-16 13:13         ` Eli Zaretskii
2020-10-16 14:38           ` Gregory Heytings via Emacs development discussions.
2020-10-16 15:48             ` Eli Zaretskii
2020-10-16 16:09               ` Gregory Heytings via Emacs development discussions.
2020-10-16 18:48                 ` Eli Zaretskii
2020-10-16 19:40                   ` Stefan Monnier
2020-10-17  6:57                     ` Eli Zaretskii
2020-10-17 13:49                       ` Stefan Monnier
2020-10-17 14:08                         ` Eli Zaretskii
2020-10-17 15:04                           ` Stefan Monnier
2020-10-17 15:18                             ` Eli Zaretskii
2020-10-16 13:24     ` Lars Ingebrigtsen
2020-10-16 14:08       ` Gregory Heytings via Emacs development discussions.
2020-10-16 15:34         ` Eli Zaretskii
2020-10-16 15:51           ` Gregory Heytings via Emacs development discussions.
2020-10-16 13:24   ` Lars Ingebrigtsen
2020-10-16 13:30     ` Rudolf Schlatte
2020-10-17  6:14       ` Lars Ingebrigtsen
2020-10-16 14:41     ` Eli Zaretskii
2020-10-17  6:23       ` Lars Ingebrigtsen
2020-10-17  8:55         ` Eli Zaretskii
2020-10-18  8:03           ` Lars Ingebrigtsen
2020-10-18 15:21             ` Eli Zaretskii
2020-10-19  8:31               ` Lars Ingebrigtsen
2020-10-19 14:50                 ` Eli Zaretskii
2020-10-20 10:28                   ` Lars Ingebrigtsen
2020-10-20 14:31                     ` Eli Zaretskii
2020-10-21 10:46                       ` Lars Ingebrigtsen
2020-10-21 11:31                         ` Michael Albinus
2020-10-21 11:58                           ` Stefan Kangas
2020-10-21 14:54                           ` Eli Zaretskii
2020-10-21 16:03                             ` tofu-help-mode (was: Suggest installing more fonts?) Stefan Monnier
2020-10-22 12:07                               ` tofu-help-mode Lars Ingebrigtsen
2020-10-22 15:21                                 ` tofu-help-mode Stefan Monnier
2020-10-23 10:46                                   ` tofu-help-mode Lars Ingebrigtsen
2020-10-21 17:46                             ` Suggest installing more fonts? Michael Albinus
2020-10-21 18:14                               ` Eli Zaretskii
2020-10-22  7:27                                 ` Michael Albinus
2020-10-22 13:09                                   ` Eli Zaretskii
2020-10-23 16:53                                     ` Michael Albinus
2020-10-23 18:13                                       ` Eli Zaretskii
2020-10-25 11:47                                         ` Michael Albinus
2020-10-25 15:19                                           ` Eli Zaretskii
2020-10-21 17:25                           ` Juri Linkov
2020-10-21 11:59                         ` Basil L. Contovounesios
2020-10-21 12:05                           ` Lars Ingebrigtsen
2020-10-21 12:31                             ` Stephen Berman
2020-10-21 14:47                         ` Eli Zaretskii
2020-10-21 20:19                           ` Rasmus
2020-10-22  2:34                             ` Eli Zaretskii
2020-10-22 12:34                               ` Rasmus
2020-10-22 13:35                                 ` Eli Zaretskii
2020-10-21 20:19                           ` Rasmus
2020-10-22 11:32                           ` Lars Ingebrigtsen
2020-10-22 12:02                             ` Gregory Heytings via Emacs development discussions.
2020-10-22 12:08                               ` Lars Ingebrigtsen
2020-10-22 12:29                                 ` Gregory Heytings via Emacs development discussions.
2020-10-22 13:31                                 ` Eli Zaretskii
2020-10-23  3:49                                   ` Richard Stallman
2020-10-23  6:59                                     ` Eli Zaretskii
2020-10-23  8:28                                       ` Andreas Schwab
2020-10-23 11:01                                         ` Eli Zaretskii
2020-10-23 15:50                                           ` Andreas Schwab
2020-10-23 16:38                                             ` Stefan Monnier
2020-10-23 18:03                                             ` Eli Zaretskii
2020-10-23 18:43                                               ` Robert Pluim
2020-10-23 19:31                                                 ` Eli Zaretskii
2020-10-24  9:35                                                   ` Robert Pluim
2020-10-23 10:45                                   ` Lars Ingebrigtsen
2020-10-23 11:07                                     ` Eli Zaretskii
2020-10-23 14:59                                       ` Stefan Monnier
2020-10-23 17:56                                         ` Eli Zaretskii
2020-10-23 18:13                                           ` Stefan Monnier
2020-10-23 18:23                                             ` Eli Zaretskii
2020-10-23 18:36                                               ` Stefan Monnier
2020-10-23 18:18                                           ` Gregory Heytings via Emacs development discussions.
2020-10-22 13:16                             ` Eli Zaretskii
2020-10-22 13:40                               ` Gregory Heytings via Emacs development discussions.
2020-10-22 13:52                                 ` Eli Zaretskii
2020-10-22 14:20                                   ` Gregory Heytings via Emacs development discussions.
2020-10-22 15:50                                     ` Eli Zaretskii
2020-10-16 18:48 ` Stefan Monnier
2020-10-16 19:13   ` Eli Zaretskii
2020-10-16 19:37     ` Stefan Monnier
2020-10-17  6:37       ` Eli Zaretskii
2020-10-17 13:44         ` Stefan Monnier
2020-10-16 19:42   ` Gregory Heytings via Emacs development discussions.
2020-10-16 19:49     ` Stefan Monnier
2020-10-16 22:14       ` Gregory Heytings via Emacs development discussions.
2020-10-16 22:35         ` Stefan Monnier
2020-10-16 23:02           ` Gregory Heytings via Emacs development discussions.
2020-10-17  7:46             ` Eli Zaretskii
2020-10-17 11:21               ` Gregory Heytings via Emacs development discussions.
2020-10-17 12:13                 ` Eli Zaretskii
2020-10-17 13:09                   ` Gregory Heytings via Emacs development discussions.
2020-10-17 13:33                     ` Eli Zaretskii
2020-10-17 16:09                       ` Gregory Heytings via Emacs development discussions.
2020-10-17 16:30                         ` Eli Zaretskii
2020-10-17 17:37                           ` Gregory Heytings via Emacs development discussions.
2020-10-17 17:58                             ` Eli Zaretskii
2020-10-17 18:36                               ` Gregory Heytings via Emacs development discussions. [this message]
2020-10-17 18:50                                 ` Eli Zaretskii
2020-10-17 18:56                                   ` Eli Zaretskii
2020-10-17 19:18                                   ` Gregory Heytings via Emacs development discussions.
2020-10-17 19:33                                     ` Eli Zaretskii
2020-10-18  8:06                           ` Lars Ingebrigtsen
2020-10-18 14:55                             ` Eli Zaretskii
2020-10-17 17:30                 ` Drew Adams
2020-10-18  4:12             ` Richard Stallman
2020-10-18 14:45               ` Eli Zaretskii
2020-10-20 22:46       ` Stephen Leake
2020-10-17  6:31   ` Lars Ingebrigtsen
2020-10-17  9:08     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.NEB.2.22.394.2010172006380453.2075@sdf.lonestar.org \
    --to=emacs-devel@gnu.org \
    --cc=eliz@gnu.org \
    --cc=ghe@sdf.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).