emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modify-frame-parameters in Emacs 23 for fonts


From: Drew Adams
Subject: Re: modify-frame-parameters in Emacs 23 for fonts
Date: Thu, 10 Apr 2008 23:46:30 -0700

Resending -

----
From: Drew Adams Sent: Saturday, April 05, 2008 7:18 PM
I'm using this: GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-04-04 on
LENNART-69DE564.

(frame-parameter nil 'font) ->
"-*-Lucida Console-normal-r-*-*-14-*-96-96-c-*-iso8859-1"

(modify-frame-parameters
 nil
 (list
  (cons
   'font
   "-*-Lucida Console-normal-r-*-*-15-*-96-96-c-*-iso8859-1")))

(frame-parameter nil 'font) ->
"-outline-lucida console-normal-roman-normal-mono-15-*-*-*-*-*-fontset-startup"

What's that about? In Emacs 20, 21, and 22, the result is just the font I
specified.

I have code that zooms frames (font size). I change just the point size in the
font spec, using `x-decompose-font-name' and `x-compose-font-name'. I check that
the result is a legitimate font using `x-list-fonts'. If not, I increase or
decrease the increment until I find the font that works with the closest size.

[Yes, I know there are other ways to adjust font size, but I've found that this
method is flexible for users and provides certain benefits.]

My code no longer works without change, because after one call to
`modify-frame-parameters' the font is no longer something recognized by
`x-list-fonts'. I can comment out the part that iterates until it finds a size
that works (recognized by `x-list-fonts'). That works, but I'm still curious
about this. (Is there perhaps a bug in `x-list-fonts' or in
`modify-frame-parameters'?)

I couldn't find anything that helps me understand this in the manuals. I haven't
tried to dig through any code. Can someone light my lantern about this?

I looked in NEWS also, and saw something about a font backend (I didn't follow
the threads here about that). But I couldn't find anything in the Elisp or Emacs
manuals about "backend" or "back?end", except for version-control back ends.

A NEWS entry also says this: "the configure option `--disable-font-backend'
(also available as a run-time option)." But I can't find any such option
(variable) with `backend' or `back-end' in its name (except for
`vc-handled-backends'). I see, in both NEWS and in my frames, a parameter named
`font-backend', but I have no idea what it is. For me, its value is
(font-backend uniscribe gdi), FWIW.

Finding the function `fontp' mentioned in NEWS (but not in the Elisp manual,
alas), I also tried that in place of `x-list-fonts'. But it too does not
indicate that "-outline-lucida
console-normal-roman-normal-mono-15-*-*-*-*-*-fontset-startup" is a legitimate
font.

I see font terms in NEWS that I don't see explained in the manual: font-entity
object, font-spec object, font property value. I also see functions mentioned,
such as `font-font', that my Emacs does not recognize. Are they perhaps only for
X?

This whole area is a murky one, for me. Do others feel that this stuff is
explained well enough - in either the manuals or NEWS? Am I the only dummy about
this? Is this is a hidden subject for some secret club? ;-) If not, how about
some explanation?











reply via email to

[Prev in Thread] Current Thread [Next in Thread]