Tony Mechelynck <[email protected]> wrote: > On 31/08/13 19:38, Rainer M. Canavan wrote: > > >
[...] > > > > The Font Selector doesn't seem to work with either Motif 2.1 or 1.2. > > While it displays a font in the "SampleLable" box at startup, I can't > > seem to get it to display anything but "no specific match" in the > > Name and Sample Label box, if I select anything at all, including "*", > > in the Font, Style or Size boxes. The lists in each of the boxes > > are limited to whatever matches the criteria selected in the other boxes, > > so the dialog is at least partially working. > > > > Is anyone still left here who cares about the motif GUI? > > > > thanks, > > > > rainer > > > In some GUIs, including Motif, you're supposed to be able to get a font > selector dialog by > > :set guifont=* > > > This dialog will only show fonts acceptable for the Normal group, > however, which means only fonts defined with the monotype property set > in their font file. That's exactly what it's doing over here. The problem is that the dialog just doesn't work at first - it doesn't display a proper preview and complains about an invalid font selection on OK. Thanks to you hints I've now discovered that the dialog starts working if I manually set a valid font once e.g. with :set guifont=-*-lucidatypewriter-medium-r-*-*-14-*-75-75-m-*-*-* > For Motif and Athena, you can set the fonts for the Menu and Tooltip > groups separately, but not by means of a dialog. Your colorscheme will > have to include a :hi line with the font argument, and on Motif and > Athena (and any X11 GUI other than GTK2) the "font name" value is a > complicated name, something like (I'm guessing what would apply to > Helvetica Oblique) > > hi Menu font=*-helvetica-medium-o-normal-*-*-75-*-*-p-*-* I think the -p- is not in the right place. > where -o- means Oblique and -p- means Proportional. Normally they would > be -r- (Roman) and -m- (Monotype) respectively, for something usable for > the text you edit (and settable in 'guifont', but on this system I have > no monotype Helvetica font -no Helvetica Mono- AFAICT). The asterisks > are wildcards. There is such a thing as Helvetica Monospace, but I don't have it. I've just picked something else with xfontsel. > see > http://vim.wikia.com/Setting_the_font_in_the_GUI > :help XLFD > If it doesn't work on your first try, you may have to check which XLFDs > are available on your system for the font you want and/or use trial and > error. Those do actually work. I wasn't aware of the limitation that the GUI fonts had to be monotype as well, and that they can be set from within vim instead of the usual Xresources. :hi Menu font= complains with an appropriate error message if I try e.g. Helvetica. If I'm not mistaken, the fixed_width requirement is controlled by the do_menu flag in hl_do_font() in src/syntax.c: HL_TABLE()[idx].sg_fontset = fontset_name2handle(arg, 0 # ifdef FONTSET_ALWAYS || do_menu # endif # ifdef FEAT_BEVAL_TIP || do_tooltip # endif ); Can anyone explain why this is done? regards, rainer -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
