لم تعُد "مجموعات Google" تتيح المشاركات أو الاشتراكات الجديدة من Usenet. وسيبقى بالإمكان عرض المحتوى السابق.

Getting emacs23 to use Bitstream Vera Sans Mono-8 font

304 مرّات مشاهدة
التخطي إلى أول رسالة غير مقروءة

Doctor Who

غير مقروءة،
18‏/07‏/2008، 12:59:43 م18‏/7‏/2008
إلى help-gn...@gnu.org
I'm trying to get emacs23 to use Bitstream Vera Sans Mono-8 as the
font. When I try to invoke emacs like this:

emacs --font "Bitstream Vera Sans Mono-8"

I get the error:

Font `Bitstream Vera Sans Mono-8' is not defined

What is the proper way to get emacs23 using this font (which is
installed). Preferably, I would like to make this permanent and not
have to invoke emacs in such a way each time.

Thanks for your response!


Wolfgang Zweimueller

غير مقروءة،
19‏/07‏/2008، 2:39:43 م19‏/7‏/2008
إلى
"Doctor Who" <whod...@gmail.com> writes:

> I'm trying to get emacs23 to use Bitstream Vera Sans Mono-8 as the
> font. When I try to invoke emacs like this:
>
> emacs --font "Bitstream Vera Sans Mono-8"
>
> I get the error:
>
> Font `Bitstream Vera Sans Mono-8' is not defined

I had the same problem (with another font). My solution was to put
this line into ~/.Xresources:

Emacs.font: dejavu sans mono

Then do a "xrdb -merge ~/.Xresources" or restart your X11. Now Emacs
should start with that font.

hth,
Wolfgang

Joel J. Adamson

غير مقروءة،
19‏/07‏/2008، 2:37:16 م19‏/7‏/2008
إلى Doctor Who،help-gn...@gnu.org
"Doctor Who" <whod...@gmail.com> writes:

> I'm trying to get emacs23 to use Bitstream Vera Sans Mono-8 as the
> font. When I try to invoke emacs like this:
>
> emacs --font "Bitstream Vera Sans Mono-8"
>
> I get the error:
>
> Font `Bitstream Vera Sans Mono-8' is not defined

One way to do it:
,----~/.Xdefaults
|
| !Emacs
| Emacs*font: -xos4-terminus-medium-*-normal-*-12-*-*-*-*-*-iso10646-1
| Emacs*cursorColor: magenta
| Emacs*foreground: White
| Emacs*background: Black
| Emacs*borderwidth: 0
| Emacs*bitmapIcon: on
| ! Lucid resources:
| Emacs.pane.menubar.font: -adobe-helvetica-medium-r-*-*-14-*-*-*-*-*-iso10646-1
| Emacs*menu*fontSet: -adobe-helvetica-medium-r-*-*-14-*-*-*-*-*-iso10646-1
| Emacs.dialog*.font: -adobe-helvetica-medium-r-*-*-14-*-*-*-*-*-iso10646-1
| Emacs.dialog*.foreground: Black
| Emacs.dialog*.background: Gray
| Emacs.pane.menubar.foreground: Black
| Emacs.pane.menubar.background: Gray
`----

$ xrdb ~/.Xdefaults

and open Emacs anew.

Use xfontsel to find the name of the font that you want (where I have
terminus above).

Another way is to customize the default face and put in the name of the
font under "Family."

Joel
--
Joel J. Adamson
(303) 880-3109
Public key: http://pgp.mit.edu
http://www.unc.edu/~adamsonj
http://trashbird1240.blogspot.com


Tim X

غير مقروءة،
19‏/07‏/2008، 9:50:52 م19‏/7‏/2008
إلى

Also, with CVS versions you can now select the font from the options
menu and if you have built with GTK, it will use the GTK font selection
widgets. Once you select your font, if you save your options, it will be
saved in your .emacs for next time.

Tim


--
tcross (at) rapttech dot com dot au

Doctor Who

غير مقروءة،
19‏/07‏/2008، 5:17:41 م19‏/7‏/2008
إلى Joel J. Adamson،help-gn...@gnu.org
> Joel


Thanks. A couple of questions:

1) If I use the example .Xdefaults like you listed above, are the
pipe symbols (|} included at the beginning of several lines to be
included as well?

2) Apparently I'm not familiar with the xfonsel command enough to get
the desired output I want. I'm trying to use Bitstream Vera Sans-8 as
the default font for the emacs editor window. Running 'xfontsel
-pattern Bitstream' does not give any results (that I can see).

Thanks!


Tim X

غير مقروءة،
20‏/07‏/2008، 3:44:01 ص20‏/7‏/2008
إلى
"Doctor Who" <whod...@gmail.com> writes:

The correct command is xfontsel. Start it up and select Bitstream from
the family and then work forward. However.....

I'm not sure xfontsel is still a good way to select fonts now we have
support for freetype, xft etc. At one time, xfontsel was unable to deal
with things like true type fonts and antialiased fonts etc.

Try using the fc-* family of font manipulation commands, such as
fc-match and fc-list. See the man pages.

Doctor Who

غير مقروءة،
20‏/07‏/2008، 8:58:02 ص20‏/7‏/2008
إلى help-gn...@gnu.org

Thanks for the reply...unfortunately that did not work for me. Not
sure if the problem is specific to my OS (openSUSE 11.0 in this case)
as to where it is looking for those settings. The font in the menu
bar looks great, but the font in the editor screen does not respect
what is put in ~/.Xresources.


Doctor Who

غير مقروءة،
20‏/07‏/2008، 9:04:26 ص20‏/7‏/2008
إلى help-gn...@gnu.org

Thanks. So I found the default font I want to use as the default in
the emacs editor window using fc-list:

Bitstream Vera Sans Mono:style=Roman

Now, how do I go about having emacs-23 use this font in the editor
window? Do I use ~/.Xresources or ~/Xdefaults. What is the correct
syntax for the file to use?

Thanks!


Dan Espen

غير مقروءة،
20‏/07‏/2008، 10:46:16 ص20‏/7‏/2008
إلى
"Doctor Who" <whod...@gmail.com> writes:

> Thanks. A couple of questions:
>
> 1) If I use the example .Xdefaults like you listed above, are the
> pipe symbols (|} included at the beginning of several lines to be
> included as well?

Those are exclamation marks.
They indicate commented out lines.

When setting X resources, another useful command
is appres.


The command:

appres Emacs

will show all the current X resources that match "Emacs".

Note:

I don't have Emacs-gtk installed.
Normally gtk programs don't pay any attention to X Resources.
I think you might have more success using the menu bar dialogs.

Doctor Who

غير مقروءة،
20‏/07‏/2008، 2:15:06 م20‏/7‏/2008
إلى help-gn...@gnu.org

Well, using 'Options -> Set Default Font' in emacs and choosing DejaVu
or Bitstream results in poor-looking fonts in the editor interface,
while choosing Monospace gives much better looking fonts. I'm curious
if emacs can't find the Bitstream or DejaVu fonts and is falling back
to the 'uglier' font somehow. How could I tell?

This is using xftgnuemacs obtained and built using:

$ cvs -z3 -d:pserver:anon...@cvs.savannah.gnu.org:/sources/emacs co emacs
$ cd emacs
$ ./configure --with-x-toolkit=gtk --enable-font-backend --with-xft
$ make bootstrap
$ make
# make install
$ emacs &

Thanks!


Dan Espen

غير مقروءة،
20‏/07‏/2008، 3:00:45 م20‏/7‏/2008
إلى
"Doctor Who" <whod...@gmail.com> writes:

> On 7/20/08, Dan Espen <dan...@more.mk.spamtelcordia.com> wrote:
>> "Doctor Who" <whod...@gmail.com> writes:
>>
>>> Thanks. A couple of questions:
>>>
>>> 1) If I use the example .Xdefaults like you listed above, are the
>>> pipe symbols (|} included at the beginning of several lines to be
>>> included as well?
>>
>> Those are exclamation marks.
>> They indicate commented out lines.
>>
>> When setting X resources, another useful command
>> is appres.
>>
>>
>> The command:
>>
>> appres Emacs
>>
>> will show all the current X resources that match "Emacs".
>>
>> Note:
>>
>> I don't have Emacs-gtk installed.
>> Normally gtk programs don't pay any attention to X Resources.
>> I think you might have more success using the menu bar dialogs.
>>
>
> Well, using 'Options -> Set Default Font' in emacs and choosing DejaVu
> or Bitstream results in poor-looking fonts in the editor interface,

You need to define what you mean by poor, maybe post a screenshot
somewhere and provide a link.

> while choosing Monospace gives much better looking fonts. I'm curious
> if emacs can't find the Bitstream or DejaVu fonts and is falling back
> to the 'uglier' font somehow. How could I tell?

I'm not a fan of proportional fonts in the body of the editor.
What all these fancy fonts buy you is anti aliasing which can make fonts
look crisper.

To see if anti aliasing is active use xmag or any of the other magnifier
applications. The fonts will have gray or colored edges.

To identify the actual font is harder, maybe try using the same font
in some other application and compare with a magnifier.

Joel J. Adamson

غير مقروءة،
20‏/07‏/2008، 4:24:34 م20‏/7‏/2008
إلى Dan Espen،help-gn...@gnu.org
Dan Espen <dan...@MORE.mk.SPAMtelcordia.com> writes:

> "Doctor Who" <whod...@gmail.com> writes:
>
>> Thanks. A couple of questions:
>>
>> 1) If I use the example .Xdefaults like you listed above, are the
>> pipe symbols (|} included at the beginning of several lines to be
>> included as well?
>
> Those are exclamation marks.

He might have been referring to the marks at the very beginning, which
are the selection indicators of boxquote.el.

> I think you might have more success using the menu bar dialogs.

Emacs does for background color, foreground color, font and a few other
attributes. Emacs is not a "GTK app" in the same sense as Epiphany or
Evince.

Tim X

غير مقروءة،
21‏/07‏/2008، 3:37:37 ص21‏/7‏/2008
إلى
"Doctor Who" <whod...@gmail.com> writes:

>
> Thanks. So I found the default font I want to use as the default in
> the emacs editor window using fc-list:
>
> Bitstream Vera Sans Mono:style=Roman
>
> Now, how do I go about having emacs-23 use this font in the editor
> window? Do I use ~/.Xresources or ~/Xdefaults. What is the correct
> syntax for the file to use?
>

Your options are -

emacs -fn "Bitstream Vera Sans Mono-12" # for a 12pt font.

Add it to .Xresources as the line

Emacs.font: Bitstream Vera Sans Mono

or just use the select default font from the options menu.

Tim X

غير مقروءة،
21‏/07‏/2008، 3:40:01 ص21‏/7‏/2008
إلى
"Doctor Who" <whod...@gmail.com> writes:

If your running a GTK based version of emacs 23, its actually the other
way round. The fonts in the GTK widgets don't respect/honor
.Xresources/Xdefaults settings. Only the font in the editing 'window'
does. See the emacs manual in the section on Xresources.

Tim X

غير مقروءة،
21‏/07‏/2008، 3:45:13 ص21‏/7‏/2008
إلى
adam...@email.unc.edu (Joel J. Adamson) writes:

> Dan Espen <dan...@MORE.mk.SPAMtelcordia.com> writes:
>
>> "Doctor Who" <whod...@gmail.com> writes:
>>
>>> Thanks. A couple of questions:
>>>
>>> 1) If I use the example .Xdefaults like you listed above, are the
>>> pipe symbols (|} included at the beginning of several lines to be
>>> included as well?
>>
>> Those are exclamation marks.
>
> He might have been referring to the marks at the very beginning, which
> are the selection indicators of boxquote.el.
>
>> I think you might have more success using the menu bar dialogs.
>
> Emacs does for background color, foreground color, font and a few other
> attributes. Emacs is not a "GTK app" in the same sense as Epiphany or
> Evince.
>
> Joel

Your very correct that its not a full GTK app. However, recent versions
do now allow you to set the default font using the GTK font selection
widgets from the options menu. Once you have done this, saving your
options will result in the font specification being saved into your .emacs file

0 رسالة جديدة