unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: Non-ASCII in Lucid menus
Date: Mon, 14 Mar 2005 21:56:35 +0100	[thread overview]
Message-ID: <ec02c7d3e50cb94aea8cc8f6d7537681@swipnet.se> (raw)
In-Reply-To: <jwvr7iit3gx.fsf-monnier+emacs@gnu.org>

>
>> Basically you have to set the default to something else than the
>> XtDdefaultFont(Set), and then check if either has been changed.
>
> But the default is specified as a string (the name of the default 
> font),
> whereas in the code I only have access to mw->menu.font which is
> an XFontStruct*.  How can I tell if this XFontStruct* corresponds to 
> the
> default or not?

You can specify any default you wan't, including another type.  So you 
can say that the default is a XtRFontStruct intead of a XtRString.  
Then you can set the default to NULL and check against that.  When the 
code sees NULL, you extract the default font with XtConvert by giving 
it "XtDefaultFont"/"XtDefaultFontSet".

>
>> But better would be to just have one, as Motif has FontList.
>
> You mean I could just use ".font" instead of ".fontSet", ... Hmm ... 
> that's
> an idea.  I'll have to change the rest of the code that uses
> font->max_bounds.asent and things like that, tho.
>
> BTW, is the HAVE_X_I18N test still necessary?  It'd help if we could 
> just
> assume that X_I18N is available.

I'm not sure.  It is possible some older VMS or other systems still 
have X11R3 or X11R4 (not exactly sure when I18N became available).  
X11R5 and X11R6 do have it, which probably accounts for the majority of 
system nowdays (for example all versions of XFree86 and xorg, and 
Solaris back to 2.5 at least).

>
>>>> Also, the default font used for lucid menus will most certainly be
>>>> different now.
>>> Why?  What can I do about it?
>> It is just that the default for font and fontset in Xt differs.
>
> How?  It seems to be helvetica in both cases.

It depends on your font path.  XtDefaultFont, if no font is specified 
in .Xdefaults or any app-defaults file, is:
     f = XLoadFont(display, "-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-*");
but XtDefaultFontSet is
     f = XCreateFontSet(display, "-*-*-*-R-*-*-*-120-*-*-*-*,*",

(note no ISO8859 in the latter case).  For me that gives different 
matches, for you it may give the same font.  Since more locales specify 
UTF-8 nowdays I think a difference will not be uncommon.

	Jan D.

  reply	other threads:[~2005-03-14 20:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-12 23:47 Non-ASCII in Lucid menus Stefan Monnier
2005-03-13 11:06 ` Jan D.
2005-03-13 13:44   ` Stefan Monnier
2005-03-13 17:45     ` Jan D.
2005-03-14 20:23       ` Stefan Monnier
2005-03-14 20:56         ` Jan D. [this message]
2005-03-14 23:03           ` Miles Bader
2005-03-16 15:36       ` Stefan Monnier
2005-03-16 21:32         ` Jan D.
2005-03-16 23:13           ` Stefan Monnier
2005-03-16 23:38             ` Stefan Monnier
2005-03-17  7:12             ` Jan D.
2005-03-17 13:57               ` Stefan Monnier
2005-03-17 23:01         ` Richard Stallman
2005-03-18  4:32           ` Stefan Monnier
2005-03-18 18:20             ` Richard Stallman
2005-03-18 21:00               ` Stefan Monnier
2005-03-20  0:22                 ` Richard Stallman
2005-03-20  0:50                   ` Stefan Monnier
2005-03-20  3:21                     ` David Kastrup
2005-03-20 11:46                     ` Jan D.
2005-03-13 18:49 ` David Kastrup
2005-03-14  3:00 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2005-03-18 21:26 Jan D.
2005-03-18 22:06 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec02c7d3e50cb94aea8cc8f6d7537681@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).