all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 26.3, 28; Set Default Font... CMU Typewriter Text
@ 2020-01-24  9:43 VanL
  2020-01-25  6:10 ` VanL
  0 siblings, 1 reply; 13+ messages in thread
From: VanL @ 2020-01-24  9:43 UTC (permalink / raw)
  To: help-gnu-emacs


Hello,

I am unable to set the default font to CMU Typewriter Text.  The
menu-bar-options list this font as available.  My .Xresources has

  Emacs.FontBackend: ftcrhb,x

The messages buffer lists "set-face-attribute: Font not available:"

┌────
│ ;; GNU Emacs 26.3 (build 1, i386-unknown-openbsd, 
│ ;;                          GTK+ Version 3.24.12)
│ ;;  of 2019-10-11
│ set-face-attribute: Font not available: #<font-spec xft nil 
│ CMU\ Typewriter\ Text nil nil semi-bold normal nil 10.0 nil nil nil 
│ ((:name . "CMU Typewriter Text"))>
│ 
│ ;; GNU Emacs 28.0.50 (build 2, armv7l-unknown-linux-gnueabihf, 
│ ;;                             GTK+ Version 3.24.5)
│ ;;  of 2020-01-05
│ set-face-attribute: Font not available: #<font-spec nil nil 
│ CMU\ Typewriter\ Text nil nil semi-bold normal nil 10.0 nil nil nil nil>
└────

The font was installed from

  https://www.checkmyworking.com/cm-web-fonts/Computer%20Modern.zip

The font is recognised by

  % fc-list | grep -i cmu

showing 

  # openbsd
  /usr/local/share/fonts/cmu/cmuntt.ttf: CMU Typewriter Text:style=Regular

  # linux
  /usr/share/fonts/truetype/cmu/cmuntt.ttf: CMU Typewriter Text:style=Regular

What's missing?

-- VL




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-24  9:43 26.3, 28; Set Default Font... CMU Typewriter Text VanL
@ 2020-01-25  6:10 ` VanL
  2020-01-26 20:04   ` Robert Pluim
  0 siblings, 1 reply; 13+ messages in thread
From: VanL @ 2020-01-25  6:10 UTC (permalink / raw)
  To: help-gnu-emacs


> I am unable to set the default font to CMU Typewriter Text.  The
> menu-bar-options list this font as available.  My .Xresources has
>
>   Emacs.FontBackend: ftcrhb,x
>

  Emacs.FontBackend: ftcrhb,xft,x

Emacs must use FreeType as the above JustWorks™ for the context its in.

-- VL





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-25  6:10 ` VanL
@ 2020-01-26 20:04   ` Robert Pluim
  2020-01-27 13:08     ` VanL
  0 siblings, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2020-01-26 20:04 UTC (permalink / raw)
  To: VanL; +Cc: help-gnu-emacs

>>>>> On Sat, 25 Jan 2020 17:10:43 +1100, VanL <van@scratch.space> said:

    >> I am unable to set the default font to CMU Typewriter Text.  The
    >> menu-bar-options list this font as available.  My .Xresources has
    >> 
    >> Emacs.FontBackend: ftcrhb,x
    >> 

    VanL>   Emacs.FontBackend: ftcrhb,xft,x

    VanL> Emacs must use FreeType as the above JustWorks™ for the context its in.

Why are you messing with Emacs.FontBackend? I canʼt think of any
reason why you should need to set that explicitly rather than letting
Emacs work it out by itself.

Robert



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-26 20:04   ` Robert Pluim
@ 2020-01-27 13:08     ` VanL
  2020-01-27 14:24       ` Robert Pluim
  0 siblings, 1 reply; 13+ messages in thread
From: VanL @ 2020-01-27 13:08 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

Robert Pluim <rpluim@gmail.com> writes:

>     >> Emacs.FontBackend: ftcrhb,x
>
>     VanL>   Emacs.FontBackend: ftcrhb,xft,x
>
>     VanL> Emacs must use FreeType as the above JustWorks™ for the
>     VanL> context its in.
>
> Why are you messing with Emacs.FontBackend? I canʼt think of any
> reason why you should need to set that explicitly rather than letting
> Emacs work it out by itself.

The creepy crawly spidery font that occurs in Emacs-28 between quote
marks, by default, was something I lived with to the moment it was
raised in a thread on emacs-devel.   Then on, I followed the discussion
on fonts to improve that setting.   And, pieced together the info that
is at the head of this thread.   Another discomfort I live with is a
long delay when I first open a file with a mix of CJ asia east fonts.

The delay is about as long as the time it takes to transfer a 4Gb data
file.   Attached is a capture of the packet traffic activity.


[-- Attachment #2: delay-like-waiting-for-duration-of-4Gb-transfer --]
[-- Type: image/png, Size: 10082 bytes --]

[-- Attachment #3: Type: text/plain, Size: 190 bytes --]


That delay occurred due to the fonts included below from the signature file.

-- VL
李 A fallen flower
德 Returning to
煒 The branch? its a butterfly (蝴蝶). -Bashō (芭蕉)


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-27 13:08     ` VanL
@ 2020-01-27 14:24       ` Robert Pluim
  2020-01-27 15:31         ` VanL
  0 siblings, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2020-01-27 14:24 UTC (permalink / raw)
  To: VanL; +Cc: help-gnu-emacs

>>>>> On Tue, 28 Jan 2020 00:08:35 +1100, VanL <van@scratch.space> said:

    VanL> Robert Pluim <rpluim@gmail.com> writes:
    >> >> Emacs.FontBackend: ftcrhb,x
    >> 
    VanL> Emacs.FontBackend: ftcrhb,xft,x
    >> 
    VanL> Emacs must use FreeType as the above JustWorks™ for the
    VanL> context its in.
    >> 
    >> Why are you messing with Emacs.FontBackend? I canʼt think of any
    >> reason why you should need to set that explicitly rather than letting
    >> Emacs work it out by itself.

    VanL> The creepy crawly spidery font that occurs in Emacs-28 between quote
    VanL> marks, by default, was something I lived with to the moment it was
    VanL> raised in a thread on emacs-devel.   Then on, I followed the discussion
    VanL> on fonts to improve that setting.   And, pieced together the info that
    VanL> is at the head of this thread.   Another discomfort I live with is a
    VanL> long delay when I first open a file with a mix of CJ asia east fonts.

OK, but that has nothing to do with FontBackend. If the default font
is not to your liking, you can change it easily enough.

The delay I think is inevitable when Emacs has to search through lots
of fonts.

Robert



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-27 14:24       ` Robert Pluim
@ 2020-01-27 15:31         ` VanL
  2020-01-27 15:59           ` Robert Pluim
  0 siblings, 1 reply; 13+ messages in thread
From: VanL @ 2020-01-27 15:31 UTC (permalink / raw)
  To: help-gnu-emacs

Robert Pluim <rpluim@gmail.com> writes:

> OK, but that has nothing to do with FontBackend. If the default font
> is not to your liking, you can change it easily enough.

From what I can tell, the Cairo and Harbuzz parts in the Emacs has
something to do with FontBackend.   They are preferred to xft, maybe.

> The delay I think is inevitable when Emacs has to search through lots
> of fonts.

OK, but where are those loops in the source code?   And can the initial
start phase preload the fonts in memory?   The fonts reside at the X
server and client ends.   Why the busy network transfer? 

-- VL
"The number two was particularly ugly." -Donald E. Knuth




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-27 15:31         ` VanL
@ 2020-01-27 15:59           ` Robert Pluim
  2020-01-27 17:50             ` VanL
  0 siblings, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2020-01-27 15:59 UTC (permalink / raw)
  To: VanL; +Cc: help-gnu-emacs

>>>>> On Tue, 28 Jan 2020 02:31:16 +1100, VanL <van@scratch.space> said:

    VanL> Robert Pluim <rpluim@gmail.com> writes:
    >> OK, but that has nothing to do with FontBackend. If the default font
    >> is not to your liking, you can change it easily enough.

    VanL> From what I can tell, the Cairo and Harbuzz parts in the Emacs has
    VanL> something to do with FontBackend.   They are preferred to xft, maybe.

Your build will either use Cairo, or XFT. You canʼt have both in the
same build at the same time, and messing with FontBackend is just
going to cause you problems later. And yes, Cairo is preferred,
because libXft is unmaintained, which gives rise to all sorts of
display problems with certain fonts.

    >> The delay I think is inevitable when Emacs has to search through lots
    >> of fonts.

    VanL> OK, but where are those loops in the source code?   And can the initial
    VanL> start phase preload the fonts in memory?   The fonts reside at the X
    VanL> server and client ends.   Why the busy network transfer? 

Preload which fonts? Emacs doesnʼt know which fonts itʼs going to need
until it sees what characters itʼs being asked to display.

Robert



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-27 15:59           ` Robert Pluim
@ 2020-01-27 17:50             ` VanL
  2020-01-27 18:02               ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: VanL @ 2020-01-27 17:50 UTC (permalink / raw)
  To: help-gnu-emacs

Robert Pluim <rpluim@gmail.com> writes:

> Preload which fonts? Emacs doesnʼt know which fonts itʼs going to need
> until it sees what characters itʼs being asked to display.

The font to preload is 'CMU Typewriter Text' and I expect the sequence
of binary from file are interpreted by Emacs, magically, into code
points that map to characters in the Unicode font.   But, maybe Emacs's
Unicode handling is half baked.   And, overlays from more code tables
help interpretation.

-- VL




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-27 17:50             ` VanL
@ 2020-01-27 18:02               ` Eli Zaretskii
  2020-01-27 18:55                 ` VanL
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2020-01-27 18:02 UTC (permalink / raw)
  To: help-gnu-emacs

> From: VanL <van@scratch.space>
> Date: Tue, 28 Jan 2020 04:50:23 +1100
> 
> Robert Pluim <rpluim@gmail.com> writes:
> 
> > Preload which fonts? Emacs doesnʼt know which fonts itʼs going to need
> > until it sees what characters itʼs being asked to display.
> 
> The font to preload is 'CMU Typewriter Text' and I expect the sequence
> of binary from file are interpreted by Emacs, magically, into code
> points that map to characters in the Unicode font.

You expect that based on your customizations?  If so, can you show
those customizations?  The default font is not CMU Typewriter Text, so
you must somehow tell Emacs you want this font instead.

> But, maybe Emacs's Unicode handling is half baked.

Why, of course!  "Half baked" is actually an understatement.  Emacs
doesn't really grok Unicode at all...



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-27 18:02               ` Eli Zaretskii
@ 2020-01-27 18:55                 ` VanL
  2020-01-27 19:07                   ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: VanL @ 2020-01-27 18:55 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> The font to preload is 'CMU Typewriter Text' and I expect the sequence
>> of binary from file are interpreted by Emacs, magically, into code
>> points that map to characters in the Unicode font.
>
> You expect that based on your customizations?  If so, can you show
> those customizations?  The default font is not CMU Typewriter Text, so
> you must somehow tell Emacs you want this font instead.

I believe CMU Typewriter Text is in effect based on the following.   And
the setting was made either through the menu-set-font or M-x customize
interface.

  26.3 on mac osx
    mac-ct:-*-CMU Typewriter Text-light-normal-normal-*-20-*-*-*-m-0-iso10646-1 (#x59)

    26.3 on openbsd
    xft:-PfEd-CMU Typewriter Text-normal-normal-normal-*-13-*-*-*-*-0-iso10646-1 (#x59)

    28 on linux
    xft:-PfEd-CMU Typewriter Text-normal-normal-normal-*-11-*-*-*-*-0-iso10646-1 (#x59)

--- start of quote from ~/.emacs

(custom-set-faces
 '(default ((t (:background "gainsboro" :foreground "black" :height 201 :family "CMU Typewriter Text" :foundry "nil" :slant normal :weight light :width normal))))...

--- end ---

>> But, maybe Emacs's Unicode handling is half baked.
>
> Why, of course!  "Half baked" is actually an understatement.  Emacs
> doesn't really grok Unicode at all...

Emacs can't be as bad as Microsoft at Dos6 and Windows7.   [1]

So sad to be on this 2001-2020 timeline when 50 years ago the HAL-9000
was imagined for 20 years ago and they were expecting it in 10 years,
then!

Footnotes: 
[1]  https://www.theverge.com/2020/1/27/21082228/microsoft-windows-7-black-wallpaper-fix-update-support-patch

-- VL




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-27 18:55                 ` VanL
@ 2020-01-27 19:07                   ` Eli Zaretskii
  2020-02-12 10:32                     ` VanL
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2020-01-27 19:07 UTC (permalink / raw)
  To: help-gnu-emacs

> From: VanL <van@scratch.space>
> Date: Tue, 28 Jan 2020 05:55:47 +1100
> 
> (custom-set-faces
>  '(default ((t (:background "gainsboro" :foreground "black" :height 201 :family "CMU Typewriter Text" :foundry "nil" :slant normal :weight light :width normal))))...

With this, I see no reason for you to mess with Emacs.FontBackend in
.Xdefaults.  (However, I suggest to use :font in the customization
instead of relying on :family.)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-01-27 19:07                   ` Eli Zaretskii
@ 2020-02-12 10:32                     ` VanL
  2020-02-16  2:23                       ` VanL
  0 siblings, 1 reply; 13+ messages in thread
From: VanL @ 2020-02-12 10:32 UTC (permalink / raw)
  To: help-gnu-emacs


>> (custom-set-faces
>>  '(default ((t (:background "gainsboro" :foreground "black" :height
>> 201 :family "CMU Typewriter Text" :foundry "nil" :slant normal
>> :weight light :width normal))))...
>
> With this, I see no reason for you to mess with Emacs.FontBackend in
> .Xdefaults.  (However, I suggest to use :font in the customization
> instead of relying on :family.)

That :family keyword in that line is controlled by the M-x customize
interface inserting to the Emacs's initial configuration setup
file... well, anyway, I had hoped to learn something about the UTF-8 and
Unicode by messing with Emacs.FontBackend in .Xdefaults.  But it wasn't
the original driving intent.  I only wanted to get a better looking font
and not the particularly ugly default in scarey quote in emacs-28 build
2020-01-05.

  plan9port/font/sample
  from http://www.columbia.edu/kermit/utf8.html

That file sampling various languages displays relatively immediately.
Like under 2.0 seconds.  I don't experience the delay like waiting for 4Gb
to transfer before a file with multiple languages displays.

-- 
OK.  I got a good idea.  Who is the fastest will win.  Boeing.  SpaceX.  Go...




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: 26.3, 28; Set Default Font... CMU Typewriter Text
  2020-02-12 10:32                     ` VanL
@ 2020-02-16  2:23                       ` VanL
  0 siblings, 0 replies; 13+ messages in thread
From: VanL @ 2020-02-16  2:23 UTC (permalink / raw)
  To: help-gnu-emacs


>>> (custom-set-faces
>>>  '(default ((t (:background "gainsboro" :foreground "black" :height
>>> 201 :family "CMU Typewriter Text" :foundry "nil" :slant normal
>>> :weight light :width normal))))...
>>
>> With this, I see no reason for you to mess with Emacs.FontBackend in
>> .Xdefaults.  

Commenting out the line from .Xdefaults as

  !Emacs.FontBackend: ftcrhb,xft,x

has the effect of

  : % emacs &
  : % libGL error: No matching fbConfigs or visuals found
  : libGL error: failed to load driver: swrast

that results in all the X fonts from the remotely run emacs being chunky
ugly, again.

The fonts look how they ought to be having in the .Xdefaults

  Emacs.FontBackend: ftcrhb,xft,x

-- 




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-02-16  2:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-24  9:43 26.3, 28; Set Default Font... CMU Typewriter Text VanL
2020-01-25  6:10 ` VanL
2020-01-26 20:04   ` Robert Pluim
2020-01-27 13:08     ` VanL
2020-01-27 14:24       ` Robert Pluim
2020-01-27 15:31         ` VanL
2020-01-27 15:59           ` Robert Pluim
2020-01-27 17:50             ` VanL
2020-01-27 18:02               ` Eli Zaretskii
2020-01-27 18:55                 ` VanL
2020-01-27 19:07                   ` Eli Zaretskii
2020-02-12 10:32                     ` VanL
2020-02-16  2:23                       ` VanL

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.