jgtk uses gtksourceview instead of directly paints on a canvas. If
interline spacing can be done, it would be via gtktextview/gtksourceview
api. gedit on gnome also use gtksourceview, is it also capable of changing
interline spacing?

Вск, 23 Янв 2011, Charles Turner писал(а):
> On Jan 23, 2011, at 6:53 AM, chris burke wrote:
> 
> > I don't know how to do this, any ideas? The usual Mac Vim does not use GTK.
> 
> I have no practical experience with this but:
> 
> The setting for gvim is:
> 
> > set linespace = 1  " integer values with 1 being default
> 
> 
> and gvim on Linux, for example, uses GTK/Cairo/Pango for text rendering.
> 
> Looking through the gvim source I found this in gui_gtk_x11.c:
> 
> > /*
> >  * Adjust gui.char_height (after 'linespace' was changed).
> >  */
> >     int
> > gui_mch_adjust_charheight(void)
> > {
> >     PangoFontMetrics        *metrics;
> >     int                     ascent;
> >     int                     descent;
> > 
> >     metrics = pango_context_get_metrics(gui.text_context, gui.norm_font,
> >                             pango_context_get_language(gui.text_context));
> >     ascent  = pango_font_metrics_get_ascent(metrics);
> >     descent = pango_font_metrics_get_descent(metrics);
> > 
> >     pango_font_metrics_unref(metrics);
> > 
> >     gui.char_height = (ascent + descent + PANGO_SCALE - 1) / PANGO_SCALE
> >                                                             + p_linespace;
> >     /* LINTED: avoid warning: bitwise operation on signed value */
> >     gui.char_ascent = PANGO_PIXELS(ascent + p_linespace * PANGO_SCALE / 2);
> > 
> >     /* A not-positive value of char_height may crash Vim.  Only happens
> >      * if 'linespace' is negative (which does make sense sometimes). */
> >     gui.char_ascent = MAX(gui.char_ascent, 0);
> >     gui.char_height = MAX(gui.char_height, gui.char_ascent + 1);
> > 
> >     return OK;
> > }
> 
> 
> There's a mac-specific gui_gtk_mac.c, but it enables options to use the 
> native ATSUI rendering features, which is, I guess, not where you want to go.
> 
> HTH, Charles
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to