unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problem with font selection / BigSur OS
@ 2020-11-28 17:03 Nicolas P. Rougier
  2020-11-29 12:40 ` Daniel Martín
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas P. Rougier @ 2020-11-28 17:03 UTC (permalink / raw)
  To: emacs-devel


After upgrading to BigSur OS (Apple) and using EmacsMac 27.1, I'm 
unable to select some font weights. It worked with previous 
version (Catalina) and I think this is not related to any Emacs 
change. I would thus like to understand why it fails but I don't 
know where to look for the code responsible to select a font given 
a spec.

More precisely, for the following three lines, the last one 
evaluates to nil:

(find-font (font-spec :family "Roboto Mono" :weight 'regular))
(find-font (font-spec :family "Roboto Mono" :weight 'thin))
(find-font (font-spec :family "Roboto Mono" :weight 'light))

while the equivalent using fc-match on a terminal returns the 
correct filename:

fc-match "Roboto Mono:style=Regular"
fc-match "Roboto Mono:style=Thin"
fc-match "Roboto Mono:style=Light"

From this, I can deduce Emacs doesn't use fontconfig on mac but 
then I don't know which method is used instead.


Nicolas



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

* Re: Problem with font selection / BigSur OS
  2020-11-28 17:03 Problem with font selection / BigSur OS Nicolas P. Rougier
@ 2020-11-29 12:40 ` Daniel Martín
  2020-11-29 13:04   ` Nicolas P. Rougier
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Martín @ 2020-11-29 12:40 UTC (permalink / raw)
  To: Nicolas P. Rougier; +Cc: emacs-devel

"Nicolas P. Rougier" <nicolas.rougier@inria.fr> writes:
>
> From this, I can deduce Emacs doesn't use fontconfig on mac but then I
> don't know which method is used instead.
>

See nsfont.m, which is the font backend driver for macOS/GNUstep.  If
you set NSFONT_TRACE to 1 and recompile Emacs, you'll have additional
debug trace information that may be useful.

You could also report this problem with M-x report-emacs-bug, for better
visibility/tracking.



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

* Re: Problem with font selection / BigSur OS
  2020-11-29 12:40 ` Daniel Martín
@ 2020-11-29 13:04   ` Nicolas P. Rougier
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas P. Rougier @ 2020-11-29 13:04 UTC (permalink / raw)
  To: Daniel Martín; +Cc: emacs-devel


Thanks, I've sent a bug report.

Nicolas

Daniel Martín <mardani29@yahoo.es> writes:

> "Nicolas P. Rougier" <nicolas.rougier@inria.fr> writes:
>>
>> From this, I can deduce Emacs doesn't use fontconfig on mac but 
>> then I
>> don't know which method is used instead.
>>
>
> See nsfont.m, which is the font backend driver for 
> macOS/GNUstep.  If
> you set NSFONT_TRACE to 1 and recompile Emacs, you'll have 
> additional
> debug trace information that may be useful.
>
> You could also report this problem with M-x report-emacs-bug, 
> for better
> visibility/tracking.




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

end of thread, other threads:[~2020-11-29 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-28 17:03 Problem with font selection / BigSur OS Nicolas P. Rougier
2020-11-29 12:40 ` Daniel Martín
2020-11-29 13:04   ` Nicolas P. Rougier

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).