Mercurial > vim
comparison src/gui_gtk_x11.c @ 38:c524f99c7925 v7.0022
updated for version 7.0022
author | vimboss |
---|---|
date | Sun, 12 Dec 2004 11:37:09 +0000 |
parents | 125e80798a85 |
children | 410fa1a31baf |
comparison
equal
deleted
inserted
replaced
37:fdf55076c53f | 38:c524f99c7925 |
---|---|
2720 gui.text_context = gtk_widget_create_pango_context(widget); | 2720 gui.text_context = gtk_widget_create_pango_context(widget); |
2721 pango_context_set_base_dir(gui.text_context, PANGO_DIRECTION_LTR); | 2721 pango_context_set_base_dir(gui.text_context, PANGO_DIRECTION_LTR); |
2722 | 2722 |
2723 if (gui.norm_font != NULL) | 2723 if (gui.norm_font != NULL) |
2724 { | 2724 { |
2725 gui_mch_init_font(p_guifont, 0); | 2725 gui_mch_init_font(p_guifont, FALSE); |
2726 gui_set_shellsize(FALSE, FALSE); | 2726 gui_set_shellsize(FALSE, FALSE); |
2727 } | 2727 } |
2728 } | 2728 } |
2729 #endif /* HAVE_GTK_MULTIHEAD */ | 2729 #endif /* HAVE_GTK_MULTIHEAD */ |
2730 | 2730 |
4788 if (font == NULL && report_error) | 4788 if (font == NULL && report_error) |
4789 EMSG2(_(e_fontwidth), name); | 4789 EMSG2(_(e_fontwidth), name); |
4790 #endif | 4790 #endif |
4791 | 4791 |
4792 return font; | 4792 return font; |
4793 } | |
4794 | |
4795 /* | |
4796 * Return the name of font "font" in allocated memory. | |
4797 */ | |
4798 /*ARGSUSED*/ | |
4799 char_u * | |
4800 gui_mch_get_fontname(GuiFont font, char_u *name) | |
4801 { | |
4802 #ifdef HAVE_GTK2 | |
4803 if (font != NOFONT) | |
4804 { | |
4805 char *name = pango_font_description_to_string(font); | |
4806 | |
4807 if (name != NULL) | |
4808 { | |
4809 char_u *s = vim_strsave((char_u *)name); | |
4810 | |
4811 g_free(name); | |
4812 return s; | |
4813 } | |
4814 } | |
4815 #else | |
4816 /* Don't know how to get the name, return what we got. */ | |
4817 if (name != NULL) | |
4818 return vim_strsave(name); | |
4819 #endif | |
4820 return NULL; | |
4793 } | 4821 } |
4794 | 4822 |
4795 #if !defined(HAVE_GTK2) || defined(PROTO) | 4823 #if !defined(HAVE_GTK2) || defined(PROTO) |
4796 /* | 4824 /* |
4797 * Set the current text font. | 4825 * Set the current text font. |