1. 20 Apr, 2010 1 commit
    • Jan Djärv's avatar
      Gtk tool bars can be text, icons with text or just icons. · f904c0f9
      Jan Djärv authored
      * xsettings.c: Qmonospace_font_name, Qtool_bar_style and
      current_tool_bar_style are new.
      (store_config_changed_event): Rename from store_font_changed_event.
      (XSETTINGS_TOOL_BAR_STYLE): New define.
      (SEEN_FONT, SEEN_TB_STYLE): New enum values.
      (struct xsettings): Add font and tb_style, set xft stuff inside #ifdef
      HAVE_XFT.
      (something_changedCB): store_font_changed_event is now
      store_config_changed_event
      (parse_settings): Rename from parse_xft_settings.  Read
      non-xft xsettings outside #ifdef HAVE_XFT.
      (read_settings): Renamed from read_xft_settings.
      (apply_xft_settings): Take current settings as parameter.  Do not
      call read_(xft)_settings.
      (read_and_apply_settings): New function.
      (xft_settings_event): Do non-xft stuff out of HAVE_XFT.  Call
      read_and_apply_settings if there are settings to be read.
      (init_xsettings): Renamed from init_xfd_settings.
      Call read_and_apply_settings unconditionally.
      (xsettings_initialize): Call init_xsettings.
      (Ftool_bar_get_system_style): New function.
      (syms_of_xsettings): Define Qmonospace_font_name and
      Qtool_bar_style.  Initialize current_tool_bar_style to nil.
      defsubr Stool_bar_get_system_style. Fprovide on
      dynamic-setting.
      
      * xsettings.h (Ftool_bar_get_system_style): Declare.
      
      * xdisp.c: Vtool_bar_style, tool_bar_max_label_size,
      Qtext, Qboth, Qboth_horiz are new.
      (syms_of_xdisp): Intern Qtext, Qboth, Qboth_horiz, DEFVAR
      Vtool_bar_style, tool_bar_max_label_size.
      
      * lisp.h: Extern declare Qtext, Qboth, Qboth_horiz.
      
      * keyboard.c: QClabel is new.
      (parse_tool_bar_item): Take out QClabel from tool bar items.
      Try to construct a label if ther is no QClabel.
      (syms_of_keyboard): Intern :label as QClabel.
      
      * dispextern.h (tool_bar_item_idx): TOOL_BAR_ITEM_LABEL is new.
      (Vtool_bar_style, tool_bar_max_label_size, DEFAULT_TOOL_BAR_LABEL_SIZE):
      New.
      
      * Makefile.in (SOME_MACHINE_LISP): font-setting.el renamed to
      dynamic-setting.el.
      
      * gtkutil.c (xg_tool_bar_menu_proxy): Handle label in tool bar item.
      (xg_make_tool_item, xg_show_toolbar_item): New function.
      (update_frame_tool_bar): Take label from TOOL_BAR_ITEM_LABEL.
      Call xg_make_tool_item to make a tool bar item.
      Call xg_show_toolbar_item.  Use wtoolbar instead of x->toolbar_widget.
      
      * xterm.c (x_draw_image_relief): Take Vtool_bar_button_margin
      into account for toolbars.
      
      * vc-dir.el (vc-dir-tool-bar-map): Add :label on some tool bar items.
      
      * tool-bar.el (tool-bar-setup): Add :label on some tool bar items.
      
      * loadup.el: Load dynamic-setting.el if feature dynamic-setting
      is present.
      
      * info.el (info-tool-bar-map): Add labels.
      
      * cus-start.el (all): Add tool-bar-style and tool-bar-max-label-size.
      
      * cus-edit.el (custom-commands): Add labels for tool bar.
      (custom-buffer-create-internal, Custom-mode): Adjust for
      labels in custom-commands.
      
      * dynamic-setting.el: Renamed from font-setting.el.
      f904c0f9
  2. 08 Apr, 2010 1 commit
    • Jan Djärv's avatar
      Lucid menus can now use Xft for fonts. · 99852628
      Jan Djärv authored
      * xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New.
      (parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that
      in current_font.
      (init_gconf): Read value of SYSTEM_FONT and save it in current_font.
      (Ffont_get_system_normal_font, xsettings_get_system_normal_font): New
      functions.
      (syms_of_xsettings): Initialize current_font. defsubr
      Sfont_get_system_normal_font.
      
      * xsettings.h (Ffont_get_system_normal_font,
      xsettings_get_system_normal_font): Declare.
      
      * xfns.c (extern xlwmenu_default_font): Remove.
      (Fx_create_frame): Remove setting of xlwmenu_default_font, moved
      to xlwmenu.c.
      
      * menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode
      menu items in UTF-8.
      
      * xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID.
      (apply_systemfont_to_menu): New function.
      (set_frame_menubar, create_and_show_popup_menu): Call
      apply_systemfont_to_menu.
      
      * xlwmenu.c (xlwmenu_default_font): Make static.
      (xlwMenuResources): Add XtNfaceName and XtNdefaultFace.
      (string_width): Use XftTextExtentsUtf8 if HAVE_XFT.
      (MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Add versions for
      HAVE_XFT.
      (size_menu): Set max_rest_width in window_state structure.
      (display_menu_item): If HAVE_XFT and xft_draw is set, use
      XftDrawRect and XftDrawStringUtf8 to draw text.
      (make_windows_if_needed): Set max_rest_width and xft_draw
      in windows[i].
      (openXftFont): New.
      (XlwMenuInitialize): Call openXftFont if HAVE_XFT. If mw->menu.font
      is not set, load font fixed and save it in xlwmenu_default_font.
      (XlwMenuInitialize): Set max_rest_width and xft_draw in windows[0].
      (XlwMenuClassInitialize): Initialize xlwmenu_default_font.
      (XlwMenuRealize): Set xft_fg, xft_bg, xft_disabled_fg and
      windows[0].xft_draw if xft_font is set.
      (XlwMenuDestroy): Destroy all xft_draw and close xft_font.
      (facename_changed): New.
      (XlwMenuSetValues): Call facename_changed. If face name did change,
      close old fonts and destroy xft_draw:s.  Then create new ones.
      
      * xlwmenu.h (XtNfaceName, XtCFaceName, XtNdefaultFace,
      XtCDefaultFace): New.
      
      * xlwmenuP.h (_window_state): Add max_rest_width and xft_draw.
      (_XlwMenu_part): Add faceName,xft_fg, xft_bg, xft_disabled_fg and
      xft_font.
      
      * xresources.texi (Lucid Resources): Mention faceName to set Xft fonts.
      99852628
  3. 13 Jan, 2010 1 commit
  4. 01 Dec, 2009 1 commit
  5. 20 Nov, 2009 1 commit
    • Jan Djärv's avatar
      Always suggest system font because .emacs may not have been read yet. · 0d1d0d26
      Jan Djärv authored
      * xfns.c (x_default_font_parameter): Call xsettings_get_system_font.
      
      * xsettings.h: Declare xsettings_get_system_font.
      
      * xsettings.c (xsettings_get_system_font): New function.
      (init_gconf): No use initiating gconf unless we have Xft also.
      (syms_of_xsettings): Only provide system-font-setting if HAVE_XFT and
      HAVE_GCONF.
      0d1d0d26
  6. 17 Nov, 2009 2 commits
    • Andreas Schwab's avatar
      * lisp.h: Remove declaration of Ffont_get_system_font. · 1b9ac145
      Andreas Schwab authored
      * xfns.c: Move include of "xsettings.h".
      * xsettings.h: Use EXFUN to declare Ffont_get_system_font.
      1b9ac145
    • Jan Djärv's avatar
      Handle system default font and changing font parameters. · 637fa988
      Jan Djärv authored
      * xterm.h (struct x_display_info): Add atoms and Window for xsettings.
      
      * xterm.c (handle_one_xevent): Call xft_settings_event for
      ClientMessage, PropertyNotify and DestroyNotify.
      (x_term_init): If we have XFT, get DPI from Xft.dpi.
      Call xsettings_initialize.
      
      * xftfont.c (xftfont_fix_match): New function.
      (xftfont_open): Call XftDefaultSubstitute before XftFontMatch.
      Call xftfont_fix_match after XftFontMatch.
      
      * xfont.c (xfont_driver): Initialize all members.
      
      * xfns.c (x_default_font_parameter): Try font from Ffont_get_system_font.
      Do not get font from x_default_parameter if we got one from
      Ffont_get_system_font.
      (Fx_select_font): Get the defaut font name from :name of FRAME_FONT (f).
      
      * w32font.c (w32font_driver): Initialize all members.
      
      * termhooks.h (enum event_kind): CONFIG_CHANGED_EVENT is new.
      
      * lisp.h: Declare syms_of_xsettings.
      
      * keyboard.c (kbd_buffer_get_event, make_lispy_event): Handle
      CONFIG_CHANGED_EVENT.
      
      * ftfont.c (ftfont_filter_properties): New function.
      
      * frame.c (x_set_font): Remove unused variable lval.
      
      * font.h (struct font_driver): filter_properties is new.
      
      * font.c (font_put_extra): Don't return if val is nil, it means
      boolean option is off.
      (font_parse_fcname): Collect all extra properties in extra_props
      and call filter_properties for all drivers with extra_props and
      font as parameter.
      (font_open_entity): Do not use cache, it does not pick up new fontconfig
      settings like hinting.
      (font_load_for_lface): If spec had a name in it, store it in entity.
      
      * emacs.c (main): Call syms_of_xsettings
      
      * config.in: HAVE_GCONF is new.
      
      * Makefile.in (GCONF_CFLAGS, GCONF_LIBS): New variables for HAVE_GCONF.
      xsettings.o is new.
      
      * menu-bar.el: Put "Use system font" in Option-menu.
      
      * loadup.el: If feature system-font-setting or font-render-setting is
      there, load font-setting.
      
      * Makefile.in (ELCFILES): font-settings.el is new.
      * font-setting.el: New file.
      
      * NEWS: Mention dynamic font changes (font-use-system-font).
      
      * configure.in: New option: --with(out)-gconf.
      Set HAVE_GCONF if we find gconf.
      637fa988
  7. 08 Jan, 2009 1 commit
  8. 09 May, 2008 1 commit
  9. 07 Jan, 2008 1 commit
  10. 25 Jul, 2007 1 commit
  11. 21 Jan, 2007 1 commit
  12. 24 Sep, 2006 2 commits
  13. 06 Feb, 2006 1 commit
  14. 07 Aug, 2005 1 commit
  15. 04 Jul, 2005 1 commit
  16. 16 Apr, 2004 1 commit
  17. 08 Sep, 2003 1 commit
  18. 01 Sep, 2003 1 commit
  19. 25 Aug, 1996 1 commit
  20. 15 Jan, 1996 1 commit
  21. 15 Jun, 1995 1 commit
  22. 03 Mar, 1995 1 commit
  23. 13 Jan, 1992 1 commit
  24. 25 Oct, 1990 2 commits