LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-16-2004, 07:12 AM   #1
Andramalech
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: SUSE 11.2
Posts: 52

Rep: Reputation: 15
emacs font problem


hi,

i have been having some sort of a stupid problem with my emacs since day1 and i dont know whats wrong.. i can vaguely remember that it was ok during my partial set up process, meaning while i was getting the system to a level i would be satisfied with the stuff i have.. (note that i am relatively new to linux world)

with a search on the error message i found such a thread but unfortunately it didnt help a lot, assuming that not many people have seen my reply there i would like to leave the link here:

http://www.linuxquestions.org/questi...hreadid=114535

in short terms, the problem is as follows:
when i start emacs, all the characters on emacs window, including the menus are shown as empty rectangles.... whatever i may type are also rectangles...
on the shell i ran emacs i found this error message:

Warning: Cannot convert string "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1" to type FontStruct

i tried to uninstall and reinstall again (i installed emacs21 and then xemacs21, thought the problem was originating from xemacs, but removing that didnt solve a thing) and tried the steps mentioned in the thread above, the problem is most of the things there dont apply to my system...

i would really appreciate if somebody could give me some tips on this, thnx

BTW: i am using a debian distrobution with 2.9.1 kernel and sid (unstable) version
 
Old 12-16-2004, 07:34 AM   #2
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

do you have a .emacs file ?? if you have, the problem can be there.
so, if you have a init file, try at the terminal
Code:
emacs -q
.
if this one does not solve, try
Code:
emacs -fn variable
and keep in touch...

regards

slackie1000
 
Old 12-16-2004, 12:10 PM   #3
Andramalech
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: SUSE 11.2
Posts: 52

Original Poster
Rep: Reputation: 15
hi slackie

a search for .emacs gave these results:

/usr/bin/b2m.emacs21
/usr/bin/ctags.emacs21
/usr/bin/ebrowse.emacs21
/usr/bin/emacsclient.emacs21
/usr/bin/etags.emacs21
/usr/bin/grep-changelog.emacs21
/usr/bin/rcs-checkin.emacs21
/usr/share/gtkhtml-3.1/keybindingsrc.emacs
/usr/share/xemacs21/xemacs-packages/lisp/ilisp/ilisp.emacs


while the possible solutions u mentioned didnt help a lot..

what exactly should i have instead of "variable" there?

thanks
 
Old 12-16-2004, 12:49 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
Quote:
Warning: Cannot convert string "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1" to type FontStruct
i think this is not an emacs bug but rather some bug in debian that i bet is not causing the problem

try just starting emacs without any arguments and from the menu choose
Options -> Mule
set language to your language then use the set font options and see if you can get it to where it looks ok to you then go
Options -> save options

or an alternative is to make a file in your home directory called .Xresources and put in it
emacs.font: *fixed-bold-r-*-15-*-*

i have also seen this written
Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*

both syntax work
then after saving or changing that file type
xrdb .Xresources
to read it in
(it's read automatically when you log in otherwise)

of course any font you actually have will do

i also think make a .emacs file in your home directory and put in it
(setq scalable-fonts-allowed t)

might help
and also will get you started on your own .emacs file which is an important thing to learn to use

see if that helps

Last edited by foo_bar_foo; 12-16-2004 at 12:51 PM.
 
Old 12-16-2004, 04:25 PM   #5
Andramalech
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: SUSE 11.2
Posts: 52

Original Poster
Rep: Reputation: 15
erm... i cant really say i understood that one fully...
 
Old 12-16-2004, 07:02 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
At which step did you get lost?


Cheers,
Tink
 
Old 12-17-2004, 01:29 AM   #7
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

i don't get it. he wrote that even the menu fonts are rectangular.
how can he start emacs in X and go to the menu and change the font?
somehow he need to change the font before. IMHO, it is clear that there is a problem with the default font. problem something related to the Debian package.
he needs to change the font argument. somehow call emacs with an existing font.

regards

slackie1000
 
Old 12-17-2004, 06:56 AM   #8
Andramalech
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: SUSE 11.2
Posts: 52

Original Poster
Rep: Reputation: 15
agreed with slackie menus are not readable.. and besides i was lost in the stage of creating and moving special files around... if you guys mention some specific file, or something you gotta take it simple and step by step so that i can get it...

*ashamed by his apparent lack of knowledge*
 
Old 12-17-2004, 12:05 PM   #9
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

so, i think my first mail was a bit bad written. i clarify now.
invoking emacs with the option "-q" you ignore the config file
Code:
/home/$USER/.emacs
i thought you could have some strange font definition in your config file.
the second idea is changing the font in the command line.
Code:
emacs -fn $FONT_NAME
with the parameter "-fn" you can give the font name. this is equivalent to change it in Xresources or Xdefault file.
the hard task is to find which font is available in your system.
there is no shame, mate. we are all newbie.

regards

slackie1000
 
Old 12-19-2004, 09:52 AM   #10
Andramalech
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: SUSE 11.2
Posts: 52

Original Poster
Rep: Reputation: 15
hi all,

through some use of xfontsel and emacs -fn <fontname> i managed to see characters on my emacs window...

btw my mistake, characters on the menus are readable but not the popup descriptions for them... i apparently was remembering wrong.. but the suggestions above (regarding to menus) dont work anyways... emacs quits itself for no apparent reason..

now after being able to use a certain font and having some characters, following a friends advice i tried to save options, which would presumably save the font settings as well.. unfortuantely it didnt... but now i have a .emacs file and a .emacs.d directory in my home directory...

.emacs file looks like this as of now:

GNU nano 1.2.4 File: .emacs

(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(case-fold-search t)
'(current-language-environment "Latin-1")
'(default-input-method "latin-1-prefix"))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)


how should i modify it?

Thanks, everybody...
 
Old 12-20-2004, 06:44 AM   #11
Andramalech
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: SUSE 11.2
Posts: 52

Original Poster
Rep: Reputation: 15
the new situation is as follows..

i have been actively asking and trying to acquire info on #debian @freenode... first of there wasnt any .Xdefaults or .xsession files in my home directory...(actually as far as i can recall not anywhere else either)-... i tried to create a .Xdefaults file as suggested by some, over there.. it now contains:

#emacs*font: 10x20
emacs, xemacs
emacs*Background: DarkSlateGray
emacs*Foreground: Wheat
emacs*pointerColor: Orchid
emacs*cursorColor: Orchid
emacs*bitmapIcon: on
emacs*font: fixed
emacs.geometry: 80x25


two different settings i tried.. first one commented out... both ways, still doesnt help...

then i decided that it might as well be a configuration corruption or so... so i purged all packages related to emacs, emacsen, xemacs etc.. then apt-get install emacs21, hoping that it would be a clean start... too bad, i was mistaken....

i have also realised that people have been telling me that an asterisk is missing in the error message i get... i am starting to think that there is just no such font... i might need to change the font libraries, or better font settings...

Quote:
Originally posted by foo_bar_foo
[B]i think this is not an emacs bug but rather some bug in debian that i bet is not causing the problem

try just starting emacs without any arguments and from the menu choose
Options -> Mule
set language to your language then use the set font options and see if you can get it to where it looks ok to you then go
Options -> save options/B]
tried that it gives segmentation fault and kills itself... (when u pick a language, or a font)


Quote:
Originally posted by foo_bar_foo
[B]or an alternative is to make a file in your home directory called .Xresources and put in it
emacs.font: *fixed-bold-r-*-15-*-*

i have also seen this written
Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*

both syntax work
then after saving or changing that file type
xrdb .Xresources
to read it in
(it's read automatically when you log in otherwise)

/B]
too big.. :S and btw only the first line works with me.. i tried to change 15 to 12 but there wasnt such a font.. i tried something else and now it works...



Quote:
Originally posted by foo_bar_foo

i also think make a .emacs file in your home directory and put in it
(setq scalable-fonts-allowed t)

might help
and also will get you started on your own .emacs file which is an important thing to learn to use
there wasn't anything about fonts in .emacs as u can see from my previous post... my question is what kind of parameters one can use in there.. what's the general way of modifying, like what to do, and what not to do... (like certain parts not to be touched)

anyways... it's more or less solved my problem... i still get the same FontStruct error in the shell and the pop up menu descriptions are still rectangles but at least characters are readable...

regards and thanks to all..
cheers,

/Andra
 
Old 12-22-2004, 05:38 AM   #12
Andramalech
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: SUSE 11.2
Posts: 52

Original Poster
Rep: Reputation: 15
weird thing... today it decided to not work again... :S
 
Old 01-15-2005, 03:17 PM   #13
marcosdumay
LQ Newbie
 
Registered: Jan 2005
Distribution: Debian, testing
Posts: 19

Rep: Reputation: 1
I'm having a similar problem. while I agree that it may be a debian problem, none of the following worked, emacs still complains about the same fonts:

Quote:
try just starting emacs without any arguments and from the menu choose
Options -> Mule
set language to your language then use the set font options and see if you can get it to where it looks ok to you then go
Options -> save options

or an alternative is to make a file in your home directory called .Xresources and put in it
emacs.font: *fixed-bold-r-*-15-*-*

i have also seen this written
Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*

both syntax work
then after saving or changing that file type
xrdb .Xresources
to read it in
(it's read automatically when you log in otherwise)

of course any font you actually have will do

i also think make a .emacs file in your home directory and put in it
(setq scalable-fonts-allowed t)

might help
and also will get you started on your own .emacs file which is an important thing to learn to use

see if that helps
Starting emacs with -font fixed argument works and modifying the fonts on the options->mule menu also does, but if I save the modifications, next time I run emacs, it dies with segmentation fault (well, at least this is emacs fault).
I am replacing emacs link on my path by a script that calls it with -font fixed option. The script is following.

emacs -font tixed $@

This will not fix the problem, but will make emacs work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to increase the font size in emacs CodeWarrior Linux - Software 4 11-04-2009 10:34 PM
Fixed some font problems (Debian, emacs, abiword, acroread) Filias Cupio LinuxQuestions.org Member Success Stories 3 04-23-2006 12:18 PM
emacs font size pfaendtner Linux - Software 2 09-24-2004 04:08 AM
font size in emacs koyi Linux - Software 0 06-28-2004 08:35 AM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 07:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration