emacs-devel
[Top][All Lists]
Advanced

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

Re: Default face problem


From: Kim F. Storm
Subject: Re: Default face problem
Date: Mon, 01 May 2006 10:25:54 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Kenichi Handa <address@hidden> writes:

> In article <address@hidden>, address@hidden (Kim F. Storm) writes:
>
>> address@hidden (Kim F. Storm) writes:
>>> Sascha Wilde <address@hidden> writes:
>>> 
>>>>>> I still do see a heavy misalignment of the header line in ses (with
>>>>>> X11), but only when using a font with an odd size
>>>>>> (-*-terminus-medium-r-*-*-17-*-*-*-*-*-iso8859-1 here).
>>> 
>>> I see it too.
>>> 
>>> If I customize the default face, and change the height from 99 to 100,
>>> it works again.  I'll look into what's wrong.
>
> This is because the current Emacs refuses to use an
> auto-scaled font because it's usually too agree to use for
> the editing work.  

Thanks for the explanation.  I think I understand.

But why does it think it is ok to use such a font as the
frame's default font?

The problem we see is because the :align-to specs in the header line
are formatted based on the width of the frame's default font, but if
the default font is not used in the frame text, the result is very
confusing.


>                    It at first checks the availability of
> the specified font (without checking it's auto-scaled or
> not), but, later on deciding a font for a face, it lists
> fonts matching with family-name and registry-name, then
> selects the best one among them.  

Wouldn't it make sense to fix the frame's default font at this
step (eg. in realize_basic_faces) when it is detected that
the specified default font is "not available".

The test could be something like this (pseudo-code) inserted
just after realizing the default face:

if (frame->default_face->font != frame->default_font)
  frame->default_font = frame->default_face->font;


>                                   On this selection,
> auto-scaled font is refused even if scalable-fonts-allowed
> is non-nil.  So, in your case the 16-dots font (that is
> surely included in terminus font package) is selected.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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