unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs choosing a font with no latin characters when passed a bogus -fn
@ 2008-06-19 15:43 Juanma Barranquero
  2008-06-20  6:26 ` Kenichi Handa
  2008-06-21 22:48 ` Jason Rumney
  0 siblings, 2 replies; 6+ messages in thread
From: Juanma Barranquero @ 2008-06-19 15:43 UTC (permalink / raw)
  To: emacs-devel Mailinglist

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

Until a few weeks ago, Emacs crashed when passed a non-existent
font/fontset, like

  emacs -Q -fn "-*-nonexistent"

Now it does not crash, but I'm still getting a weird effect (as
witnessed in the font log below, and the attached image).

AFAICS, Emacs is selecting fonts (Estrangelo Edessa, Gautami, Latha,
Mangal, etc.) that do not have Latin characters. In the case shown in
the image, Emacs displays Latin characters using U+072C SIRIAC LETTER
TAW (glyph #x9A) of the following font

-outline-Estrangelo Edessa-normal-normal-normal-script-13-*-*-*-p-*-iso10646-1

If I remove Estrangelo Edessa from my system, Emacs chooses the
Gautami font (though in that case it uses more than one glyph to
display latin characters).

   Juanma




uniscribe-list: -*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Gautami-normal-normal-normal-*-p-*-nonexistent
  -outline-Latha-normal-normal-normal-*-p-*-nonexistent
  -outline-Mangal-normal-normal-normal-*-p-*-nonexistent
  -outline-MV Boli-normal-normal-normal-*-p-*-nonexistent
  -outline-Raavi-normal-normal-normal-*-p-*-nonexistent
  -outline-Shruti-normal-normal-normal-*-p-*-nonexistent
  -outline-Tunga-normal-normal-normal-*-p-*-nonexistent
w32font-list: -*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Gautami-normal-normal-normal-*-p-*-nonexistent
  -outline-Latha-normal-normal-normal-*-p-*-nonexistent
  -outline-Mangal-normal-normal-normal-*-p-*-nonexistent
  -outline-MV Boli-normal-normal-normal-*-p-*-nonexistent
  -outline-Raavi-normal-normal-normal-*-p-*-nonexistent
  -outline-Shruti-normal-normal-normal-*-p-*-nonexistent
  -outline-Tunga-normal-normal-normal-*-p-*-nonexistent
list: -*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Gautami-normal-normal-normal-*-p-*-nonexistent
  -outline-Latha-normal-normal-normal-*-p-*-nonexistent
  -outline-Mangal-normal-normal-normal-*-p-*-nonexistent
  -outline-MV Boli-normal-normal-normal-*-p-*-nonexistent
  -outline-Raavi-normal-normal-normal-*-p-*-nonexistent
  -outline-Shruti-normal-normal-normal-*-p-*-nonexistent
  -outline-Tunga-normal-normal-normal-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Gautami-normal-normal-normal-*-p-*-nonexistent
  -outline-Latha-normal-normal-normal-*-p-*-nonexistent
  -outline-Mangal-normal-normal-normal-*-p-*-nonexistent
  -outline-MV Boli-normal-normal-normal-*-p-*-nonexistent
  -outline-Raavi-normal-normal-normal-*-p-*-nonexistent
  -outline-Shruti-normal-normal-normal-*-p-*-nonexistent
  -outline-Tunga-normal-normal-normal-*-p-*-nonexistent
sort-by: -*-normal-normal-normal-*-16-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-*-p-*-nonexistent
open: -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-16-*-p-*-nonexistent
uniscribe-list: -outline-Estrangelo Edessa-*-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
w32font-list: -outline-Estrangelo Edessa-*-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
list: -outline-Estrangelo Edessa-normal-*-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
sort-by: -outline-Estrangelo
Edessa-normal-italic-normal-script-16-*-p-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-*-p-*-nonexistent
open: -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-16-*-p-*-nonexistent
list: -*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Gautami-normal-normal-normal-*-p-*-nonexistent
  -outline-Latha-normal-normal-normal-*-p-*-nonexistent
  -outline-Mangal-normal-normal-normal-*-p-*-nonexistent
  -outline-MV Boli-normal-normal-normal-*-p-*-nonexistent
  -outline-Raavi-normal-normal-normal-*-p-*-nonexistent
  -outline-Shruti-normal-normal-normal-*-p-*-nonexistent
  -outline-Tunga-normal-normal-normal-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Gautami-normal-normal-normal-*-p-*-nonexistent
  -outline-Latha-normal-normal-normal-*-p-*-nonexistent
  -outline-Mangal-normal-normal-normal-*-p-*-nonexistent
  -outline-MV Boli-normal-normal-normal-*-p-*-nonexistent
  -outline-Raavi-normal-normal-normal-*-p-*-nonexistent
  -outline-Shruti-normal-normal-normal-*-p-*-nonexistent
  -outline-Tunga-normal-normal-normal-*-p-*-nonexistent
sort-by: -*-unspecified-unspecified-unspecified-*-428567-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-*-p-*-nonexistent
open: -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-428567-*-p-*-nonexistent
list: -outline-Estrangelo Edessa-*-normal-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
sort-by: -outline-Estrangelo
Edessa-light-normal-normal-script-16-*-p-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-*-p-*-nonexistent
list: -outline-Estrangelo Edessa-*-normal-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
sort-by: -outline-Estrangelo
Edessa-light-normal-normal-script-16-*-p-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-*-p-*-nonexistent
list: -outline-Estrangelo Edessa-*-normal-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
sort-by: -outline-Estrangelo
Edessa-bold-normal-normal-script-16-*-p-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-*-p-*-nonexistent
list: -outline-Estrangelo Edessa-normal-*-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
  -outline-Estrangelo Edessa-normal-normal-normal-script-*-p-*-nonexistent
sort-by: -outline-Estrangelo
Edessa-normal-italic-normal-script-16-*-p-*-nonexistent
  uniscribe:-outline-Estrangelo
Edessa-normal-normal-normal-script-*-p-*-nonexistent

[-- Attachment #2: bug1.jpg --]
[-- Type: image/jpeg, Size: 10450 bytes --]

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

* Re: Emacs choosing a font with no latin characters when passed a bogus -fn
  2008-06-19 15:43 Emacs choosing a font with no latin characters when passed a bogus -fn Juanma Barranquero
@ 2008-06-20  6:26 ` Kenichi Handa
  2008-06-21 22:48 ` Jason Rumney
  1 sibling, 0 replies; 6+ messages in thread
From: Kenichi Handa @ 2008-06-20  6:26 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

In article <f7ccd24b0806190843l324bd9f5qe410c10798c9c4c2@mail.gmail.com>, "Juanma Barranquero" <lekktu@gmail.com> writes:

> Until a few weeks ago, Emacs crashed when passed a non-existent
> font/fontset, like

>   emacs -Q -fn "-*-nonexistent"

> Now it does not crash, but I'm still getting a weird effect (as
> witnessed in the font log below, and the attached image).

It should terminate Emacs with this kind of message:

Font `-*-nonexistent' is not defined

At least, on GNU/Linux, Emacs does so.

---
Kenichi Handa
handa@ni.aist.go.jp




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

* Re: Emacs choosing a font with no latin characters when passed a bogus -fn
  2008-06-19 15:43 Emacs choosing a font with no latin characters when passed a bogus -fn Juanma Barranquero
  2008-06-20  6:26 ` Kenichi Handa
@ 2008-06-21 22:48 ` Jason Rumney
  2008-06-22  2:22   ` Juanma Barranquero
  1 sibling, 1 reply; 6+ messages in thread
From: Jason Rumney @ 2008-06-21 22:48 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel Mailinglist

Juanma Barranquero wrote:
> Until a few weeks ago, Emacs crashed when passed a non-existent
> font/fontset, like
> 
>   emacs -Q -fn "-*-nonexistent"
> 
> Now it does not crash, but I'm still getting a weird effect (as
> witnessed in the font log below, and the attached image).
> 
> AFAICS, Emacs is selecting fonts (Estrangelo Edessa, Gautami, Latha,
> Mangal, etc.) that do not have Latin characters.

In fact, it has filtered the list of fonts down to those that do not
contain support for any recognized Windows "charset", since the registry
you supplied in the xfld pattern was not mapped by
w32-charset-info-alist.  Fonts for languages with poor OS support tend
to be deliberately broken so they can be used with various kludge
solutions on older versions of Windows, so it is not surprising that
they map ASCII codepoints to one or more characters in other scripts
rather than returning the .notdef glyph or including a basic ASCII subset.

I added a script condition to the entry for iso10646-1 fonts for latin
characters in fontset.el, which should result in a random latin font
being selected instead of using these fonts.

> sort-by: -*-unspecified-unspecified-unspecified-*-428567-*-nonexistent

Where did the 428567 come from? This looks like a real bug, though it
does later get reverted to 16, so probably never noticeable.





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

* Re: Emacs choosing a font with no latin characters when passed a bogus -fn
  2008-06-21 22:48 ` Jason Rumney
@ 2008-06-22  2:22   ` Juanma Barranquero
  2008-06-23 21:27     ` Jason Rumney
  0 siblings, 1 reply; 6+ messages in thread
From: Juanma Barranquero @ 2008-06-22  2:22 UTC (permalink / raw)
  To: Jason Rumney; +Cc: emacs-devel Mailinglist

On Sun, Jun 22, 2008 at 00:48, Jason Rumney <jasonr@gnu.org> wrote:

> I added a script condition to the entry for iso10646-1 fonts for latin
> characters in fontset.el, which should result in a random latin font
> being selected instead of using these fonts.

With a trunk build from today, I still see the same problem.

> Where did the 428567 come from? This looks like a real bug, though it
> does later get reverted to 16, so probably never noticeable.

No idea. I can try to debug it, if you can point out what/where to
look for (approx.).

   Juanma




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

* Re: Emacs choosing a font with no latin characters when passed a bogus -fn
  2008-06-22  2:22   ` Juanma Barranquero
@ 2008-06-23 21:27     ` Jason Rumney
  2008-06-23 21:59       ` Juanma Barranquero
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Rumney @ 2008-06-23 21:27 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel Mailinglist

Juanma Barranquero wrote:
> On Sun, Jun 22, 2008 at 00:48, Jason Rumney <jasonr@gnu.org> wrote:
> 
>> I added a script condition to the entry for iso10646-1 fonts for latin
>> characters in fontset.el, which should result in a random latin font
>> being selected instead of using these fonts.
> 
> With a trunk build from today, I still see the same problem.

I see the problem too, it appears slightly different now
(abbreviated C-u C-x = data):

        character: t (116, #o164, #x74)
....
          display: no font available


But it still appears to be using the font
-outline-Estrangelo Edessa-normal-normal-normal-script-16-*-p-*-unknown
when Emacs is started as emacs -Q -fn -*-unknown





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

* Re: Emacs choosing a font with no latin characters when passed a bogus -fn
  2008-06-23 21:27     ` Jason Rumney
@ 2008-06-23 21:59       ` Juanma Barranquero
  0 siblings, 0 replies; 6+ messages in thread
From: Juanma Barranquero @ 2008-06-23 21:59 UTC (permalink / raw)
  To: Jason Rumney; +Cc: emacs-devel Mailinglist

On Mon, Jun 23, 2008 at 23:27, Jason Rumney <jasonr@gnu.org> wrote:

> But it still appears to be using the font
> -outline-Estrangelo Edessa-normal-normal-normal-script-16-*-p-*-unknown
> when Emacs is started as emacs -Q -fn -*-unknown

Another weird problem with glyph selection:

I compiled the trunk in a friend's laptop (with Windows XP Pro) with
the same toolset that I use in my computer. Emacs works fine until I
display etc/HELLO. At this point, the glyphs in the first column of
etc/HELLO are garbled. Moving the cursor over the buffer garbles all
glyphs until Emacs is unusable.

One curious thing: in that computer, the new backend's performance
(and in particular, line-by-line scrolling performance) is very good.
As far as I can see, the main difference is that the computer doesn't
have many fonts installed; \Windows\fonts has ~250 .TTF, vs. ~340 in
my laptop and ~450 at work (both perform quite badly). Alas, I forgot
to check whether my friend's laptop has ClearType active, but I think
it is.

   Juanma




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

end of thread, other threads:[~2008-06-23 21:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-19 15:43 Emacs choosing a font with no latin characters when passed a bogus -fn Juanma Barranquero
2008-06-20  6:26 ` Kenichi Handa
2008-06-21 22:48 ` Jason Rumney
2008-06-22  2:22   ` Juanma Barranquero
2008-06-23 21:27     ` Jason Rumney
2008-06-23 21:59       ` Juanma Barranquero

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