Subject: FVWM: UTF-8 Font

From: Michelle Konzack <[email-masked]>
Date: Mon, 28 Jun 2004 12:13:22 +0200

Hello all, 

Curently I am crating a "fvwm" in arabic but I have on problem:

If I have menus which are only in one language, it works quiet well but 
not if I have arabic and english. For this I use:

  ____ ( '/home/michelle/fvwm-ar/menus/TaskBarStartMenu' ) _____________
 /
|  DestroyMenu TaskBarStartMenu
|  AddToMenu   [email-masked]@^black^
|  + "IBM / Linux"					Exec rplaydsp mplayer /home/michelle/.mplayer/Videos/prodigy90_med.mpg
|  + ""	Nop
|  + "القتل rplay%32x32.bomb.xpm%"			Exec rplay -s
|  + ""	Nop
|  + "Manpage: fvwm%32x32.help.xpm%"		Exec exec xterm -g 68x45-0-5 -fn 9x15 -fb 9x15bold -T "Manpage: fvwm2" -n "fvwm2" -e mcview /usr/share/man/man1/fvwm2.1.gz
|  + ""	Nop
|  + "Cam%32x32.audiovol.xpm%"			Exec exec xterm -g 80x25+266+206 -T "Cam" -e cam
|  + "Mozilla%32x32.mozilla.xpm%"			Exec exec mozilla
|  + "Midnight Commander%32x32.filemgr.xpm%"	Exec exec xterm -g 100x40+156+100 -fn 7x14 -fb 7x14bold -T "Midnight Commander" -n "mc" -e mc
|  + ""	Nop
|  + "الوحدة32x32.modules.xpm%"			Popup Fvwm2module
|  + "الأشكا32x32.modules.xpm%"		Popup Fvwm2form
|  + "المخطوطات32x32.modules.xpm%"			Popup Fvwm2script
|  + ""	Nop
|  + "القذائف32x32.shells.xpm%"			Popup Shells
|  + "البرامج32x32.programs.xpm%"		Popup Programs
|  + "الوثائق32x32.documents.xpm%"		Popup Documents
|  + "Web-Sites%32x32.documents.xpm%"		Popup WebSites
|  + "FTP-Sites%32x32.documents.xpm%"		Popup FTPSites
|  + ""	Nop
|  + "التفضيلا32x32.settings.xpm%"		Popup Settings
|  + "البحث32x32.find1.xpm%"			FvwmScripf FvwmScript-Find
|  + "المساعدة32x32.help.xpm%"			Exec exec xman
|  + " المساعدةzu Fvwm2%32x32.help.xpm%"		Popup Fvwm2help
|  + "المرة32x32.run.xpm%"			Exec grun
|  + ""	Nop
|  + "متحرر32x32.shutdown.xpm"			Module FvwmScript FvwmScript-Quit
|  
|  MenuStyle       arabic Font "-arabic-newspaper-medium-r-normal--24-*-*-*-*-*-iso10646-1"
|  ChangeMenuStyle arabic TaskBarStartMenu
 \______________________________________________________________________

But how can I make bilingual menus ?
I need a combination of arabic/french and arabic/english.

Thanks for your Help
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

---

From: Ben Winslow <[email-masked]>
Date: Tue, 29 Jun 2004 00:20:09 -0400

>   ____ ( '/home/michelle/fvwm-ar/menus/TaskBarStartMenu' ) _____________
snip

The following works for me:
DestroyMenu arabic
AddToMenu arabic "العربية" Title
+ "العربية"                             Exec exec xmessage "Arabic"
+ "English"                             Exec exec xmessage "English"
+ "Français"                            Exec exec xmessage "French"
+ "'Deutsche' enthält keine Akzente"    Exec exec xmessage "German"

This doesn't look terribly different from your menu, so I suspect the
problem you're having is occurring because the font being used
(-arabic-newspaper-*) does not have any Latin characters.

GTK2 applications (technically, the Pango library) will look for a glyph
in alternate fonts when it isn't present in the user's preferred font,
which may be why this went unnoticed.  (gucharmap, from GNOME, will show
you what font a glyph actually came from if you mouse2 over the glyph in
the character table.)  FVWM does not (as far as I can tell) support
searching through other fonts like this, so the best you could do is ask
nicely that they support this or use a different font.

If Xft is available, the "Arial", "Courier New", and "Times New Roman"
truetype fonts have enough glyphs for all of the characters in the
example menu above, so they should be fine for Arabic, English, and
French.  These fonts are available under a free-ish license in the
"Microsoft True Type Core Fonts for the Web" package, which can be
easily be downloaded using the msttcorefonts Debian package (which is in
contrib.)

HTH/Ich hoffe, das hilft dir,
-- 
Ben Winslow <[email-masked]>