aboutsummaryrefslogtreecommitdiffstats
path: root/src/font.c
Commit message (Collapse)AuthorAgeFilesLines
* * font.c (syms_of_font): Make the style table vars read-only.Stefan Monnier2010-04-201-0/+8
|
* Addendum to last patch: add "Medium" GTK font name keyword.Chong Yidong2010-02-261-0/+6
|
* Recognize more keywords in GTK font names (Bug#5646).Chong Yidong2010-02-261-0/+18
| | | | | * font.c (font_parse_fcname): Recognize "Book", "Condensed", and "Semi-Condensed" keywords in GTK names (Bug#5646).
* font.c (font_parse_xlfd): If FONT is a font-entity and pixel size in NAME is ↵Kenichi Handa2010-01-311-0/+2
| | | | invalid, return -1.
* Add 2010 to copyright years.Glenn Morris2010-01-131-2/+2
|
* Fix slowdown and wrong font choosed by XSETTINGS changes. bug #5157.Jan Djärv2010-01-061-10/+13
| | | | | | | | | | | | | | | | | | | * font.c (font_open_entity): Enable chache and call cached_font_ok for the driver if defined. (QCuser_spec): New symbol. (font_spec_from_name): Save name as user-spec. (font_load_for_lface): Keep user-spec instead of name. (font_open_by_name): Save name as user-spec. (syms_of_font): Initialize QCuser_spec. * xftfont.c (xftfont_open): Call xftfont_add_rendering_parameters. (xftfont_add_rendering_parameters, xftfont_cached_font_ok): New. (syms_of_xftfont): Initialize xftfont_driver.cached_font_ok. * font.h (struct font_driver): Add cached_font_ok. * font-setting.el (font-setting-change-default-font): Use user-spec instead of name.
* Fixing user-spec for fonts instead of using name.Jan Djärv2010-01-061-5/+9
|
* (Fclear_font_cache): Pass correct cache argument toAndreas Schwab2009-12-191-3/+3
| | | | font_clear_cache.
* Fix a comment and delete trailing whitespace.Chong Yidong2009-12-051-8/+8
|
* (font_load_for_lface, font_open_by_name): Don't store nameYAMAMOTO Mitsuharu2009-12-011-3/+7
| | | | if entity is Qnil.
* (font_open_entity): Don't use ASET if font_object is Qnil.YAMAMOTO Mitsuharu2009-11-241-1/+2
|
* Set Xft defaults if no XSETTING is found, better default for Gtk+ font dialog.Jan Djärv2009-11-231-8/+14
| | | | | | | | | | | | | | | | * xfns.c (Fx_select_font): Try to convert Fontconfig name to Gtk name because that is what Gtk+ font dialog understands. * font.c (font_make_object, Fcopy_font_spec): Use Fcopy_alist instead of Fcopy_sequence. (font_open_by_name): Put name given into QCname for font-object returned. * frame.c (x_set_font): Save original font name as frame parameter font-parameter. * xsettings.c (set_default_xft_settings): New function. (init_xfd_settings): Call set_default_xft_settings if no XSETTINGS window is found.
* * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): RemoveAndreas Schwab2009-11-211-1/+1
| | | | | | | ignored second argument. All callers changed. * regex.c (STRING_CHAR, STRING_CHAR_AND_LENGTH, RE_STRING_CHAR) (RE_STRING_CHAR_AND_LENGTH): Likewise. * xdisp.c (string_char_and_length): Likewise.
* Handle system default font and changing font parameters.Jan Djärv2009-11-171-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * xterm.c (syms_of_xterm):Dan Nicolaescu2009-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xselect.c (syms_of_xselect): * xmenu.c (syms_of_xmenu): * xfns.c (syms_of_xfns): * xfaces.c (syms_of_xfaces): * xdisp.c (syms_of_xdisp): * window.c (syms_of_window): * w32fns.c (syms_of_w32fns): * undo.c (syms_of_undo): * textprop.c (syms_of_textprop): * terminal.c (syms_of_terminal): * syntax.c (syms_of_syntax): * sound.c (syms_of_sound): * search.c (syms_of_search): * print.c (syms_of_print): * minibuf.c (syms_of_minibuf): * macros.c (syms_of_macros): * keymap.c (syms_of_keymap, initial_define_key) (initial_define_lispy_key): * keyboard.c (syms_of_keyboard): * insdel.c (syms_of_insdel): * image.c (syms_of_image): * fringe.c (syms_of_fringe): * frame.c (syms_of_frame): * fontset.c (syms_of_fontset): * fns.c (syms_of_fns): * fns.c (syms_of_fns): * fileio.c (syms_of_fileio): * fileio.c (syms_of_fileio): * eval.c (syms_of_eval): * doc.c (syms_of_doc): * dispnew.c (syms_of_display): * dired.c (syms_of_dired): * dbusbind.c (syms_of_dbusbind): * data.c (syms_of_data): * composite.c (syms_of_composite): * coding.c (syms_of_coding): * cmds.c (syms_of_cmds): * charset.c (define_charset_internal, syms_of_character): * ccl.c (syms_of_ccl): * category.c (syms_of_category, init_category_once): * casetab.c (syms_of_casetab): * casefiddle.c (syms_of_casefiddle): * callint.c (syms_of_callint): * bytecode.c (syms_of_bytecode): * buffer.c (keys_of_buffer, syms_of_buffer): * alloc.c (syms_of_alloc): * process.c (syms_of_process, init_process): * lread.c (syms_of_lread, init_obarray): * font.c (build_style_table): * emacs.c (syms_of_emacs, main): Replace calls to intern with intern_c_string, calls to make_pure_string with make_pure_c_string. Use pure_cons instead of Fcons. * process.c (socket_options): Make it const. (set_socket_option, init_process): Use a const pointer. * lread.c (intern_c_string): New function. (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool) (defvar_int): Uset it. Make the name const char*. * font.c (struct table_entry): Remove unused member. Make NAMES constant. (weight_table, slant_table, width_table): Make constant. * emacs.c (struct standard_args): Make name and longname constant.
* * process.c (socket_options): Make it const.Dan Nicolaescu2009-11-061-5/+4
| | | | | | | | | | | | | | | | | | | | | | (set_socket_option, init_process): Use a const pointer. * lread.c (intern_c_string): New function. (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool) (defvar_int): Uset it. Make the name const char*. * lisp.h (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool) (defvar_int): Update prototypes. (DEFUN, EXFUN): Support for prototypes is now required. (intern_c_string): New prototype. (struct Lisp_Subr): Make symbol_name constant. * font.c (struct table_entry): Remove unused member. Make NAMES constant. (weight_table, slant_table, width_table): Make constant. * emacs.c (struct standard_args): Make name and longname constant. * character.h (DEFSYM): Use intern_c_string.
* * alloc.c: Do not define struct catchtag.Dan Nicolaescu2009-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c: Move struct catchtag definition ... * lisp.h: ... here. * image.c: Move png.h #include earlier to avoid warnings. * xterm.c: * xsmfns.c: * xselect.c: * xrdb.c: * xmenu.c: * xftfont.c: * xfont.c: * xfns.c: * xfaces.c: * xdisp.c: * window.c: * widget.c: * w32xfns.c: * w32uniscribe.c: * w32term.c: * w32select.c: * w32reg.c: * w32proc.c: * w32menu.c: * w32inevt.c: * w32heap.c: * w32font.c: * w32fns.c: * w32console.c: * w32.c: * w16select.c: * vm-limit.c: * unexsol.c: * unexec.c: * unexcw.c: * unexaix.c: * undo.c: * tparam.c: * textprop.c: * terminfo.c: * terminal.c: * termcap.c: * term.c: * syntax.c: * sound.c: * sheap.c: * search.c: * scroll.c: * region-cache.c: * regex.c: * ralloc.c: * process.c: * print.c: * msdos.c: * minibuf.c: * menu.c: * marker.c: * macros.c: * keymap.c: * keyboard.c: * intervals.c: * insdel.c: * indent.c: * gtkutil.c: * ftxfont.c: * ftfont.c: * fringe.c: * frame.c: * fontset.c: * font.c: * fns.c: * floatfns.c: * filelock.c: * fileio.c: * emacs.c: * editfns.c: * dosfns.c: * doprnt.c: * doc.c: * dispnew.c: * dired.c: * dbusbind.c: * data.c: * composite.c: * coding.c: * cmds.c: * cm.c: * chartab.c: * charset.c: * character.c: * ccl.c: * category.c: * casetab.c: * casefiddle.c: * callproc.c: * callint.c: * bytecode.c: * buffer.c: * atimer.c: Include setjmp.h. (Bug#4643) * xlwmenu.c: * lwlib.c: * lwlib-utils.c: * lwlib-Xm.c: * lwlib-Xlw.c: * lwlib-Xaw.c: Include setjmp.h.
* (font_unparse_xlfd, font_unparse_fcname): Use long format in printf, and ↵Adrian Robert2009-10-131-6/+7
| | | | cast argument.
* * font.c (DEFAULT_ENCODING) [HAVE_NS]: Remove special case.Adrian Robert2009-09-231-4/+0
|
* Update comment for HAVE_NS code in font_find_for_lface().Adrian Robert2009-09-181-0/+1
|
* (font_parse_xlfd): Check DPI and AVGWIDTH properties more rigidly.Kenichi Handa2009-07-281-3/+8
|
* (font_vconcat_entity_vectors): New function.Kenichi Handa2009-07-141-98/+166
| | | | | | | | | | | | (struct font_sort_data): New member font_driver_preference. (font_compare): Check font_driver_preference. (font_sort_entities): The format of the first argument changed. (font_delete_unmatched): Likewise. (font_list_entities): The return type changed. (font_select_entity): The format of the second argument changed. (font_find_for_lface): Adjusted for the above changes. Don't suppress the checking of C even if the repertory supports it. (Flist_fonts): Adjusted for the above changes.
* (font_sort_entities, font_list_entities)Kenichi Handa2009-06-231-12/+14
| | | | | | | | | | (font_matching_entity, font_open_entity) (font_close_object): Change font_add_log to FONT_ADD_LOG. (Vfont_log): Delete static. (font_log_env_checked): Delete this variable. (font_add_log): Don't check font_log_env_checked. (font_deferred_log): Check Vfont_log. (init_font): New function.
* (font_parse_family_registry): Fix for one-char foundry.Kenichi Handa2009-06-101-2/+2
| | | | (font_sort_entities): Initialize prefer_prop[FONT_AVGWIDTH_INDEX].
* (font_sort_entities): Renamed from font_sort_entites.Kenichi Handa2009-05-191-4/+4
| | | | Callers changed.
* (font_find_for_lface): Copy SPEC's FONT_TYPE too.Kenichi Handa2009-05-181-0/+1
|
* (Ffont_spec): Check arguments.Kenichi Handa2009-05-151-1/+6
|
* (font_update_drivers): Sanity fallback to avoid disabling all drivers.Stefan Monnier2009-05-061-0/+17
|
* * xfaces.c (face_at_buffer_position): New arg base_face_id.Chong Yidong2009-04-301-2/+3
| | | | | | | | | | | | | | | * xdisp.c (handle_face_prop): Pass base_face_id of iterator to face_at_buffer_position. (face_before_or_after_it_pos, get_next_display_element) (note_mouse_highlight): Update face_at_buffer_position call. * term.c (term_mouse_highlight): * msdos.c (IT_note_mouse_highlight): * fontset.c (Finternal_char_font): * font.c (font_at, font_range): Update face_at_buffer_position call. * dispextern.h (face_at_buffer_position): Update prototype.
* (font_score): Check AVGWIDTH too.Kenichi Handa2009-04-211-0/+3
|
* (font_load_for_lface): Cancel previous change.Kenichi Handa2009-04-211-2/+1
|
* (font_put_frame_data): Use xfree instead of free.Andreas Schwab2009-04-181-1/+1
|
* * font.c (Qja, Qko): Move definitions here from ftfont.c.Chong Yidong2009-04-171-0/+6
| | | | | | * font.h (Qja, Qko): Extern them. * ftfont.c (Qja, Qko): Remove declarations. * xfont.c (Qja, Qko): Remove declarations.
* (font_sort_entites): Change the meaning of the argKenichi Handa2009-04-161-40/+13
| | | | | BEST-ONLY. Don't optimize for VEC of lenght 1. (font_select_entity): Just return the value of font_sort_entites.
* (Ffont_info): Fix docstring. Fix the second element ofKenichi Handa2009-04-141-4/+4
| | | | the returned value.
* (font_delete_unmatched): Preserve the order of listKenichi Handa2009-04-131-2/+9
| | | | | | | | elements. (font_select_entity): Suppress the code to optimize for the same kind of fonts. (font_load_for_lface): Get a font that supports at least ASCII characters.
* (font_put_extra): If VAL is nil, delete the slot for PROPKenichi Handa2009-04-091-1/+12
| | | | | from the list of extra properties. (font_clear_prop): Be sure to delete `:name' font property.
* (find_font_encoding): Return Qnil for unsupported encoding.Kenichi Handa2009-03-241-2/+1
|
* (font_open_by_spec): New function.Kenichi Handa2009-03-111-9/+23
| | | | (font_open_by_name): Use font_open_by_spec.
* (font_select_entity): New function.Kenichi Handa2009-03-051-63/+75
| | | | (font_find_for_lface): Use font_select_entity to select a font.
* (font_style_to_value): Set value for unknown symbols toChong Yidong2009-02-271-5/+5
| | | | | | 100 instead of 255. (weight_table, slant_table, width_table): Treat "unspecified" as the default value.
* (Qfont_spec, Qfont_entity, Qfont_object): DefinitionsChong Yidong2009-02-211-6/+0
| | | | moved to data.c.
* (Ffont_spec): Fix typo.Kenichi Handa2009-02-181-1/+1
|
* (font_check_otf_features): Fix handling of `nil' element.Kenichi Handa2009-02-181-3/+30
| | | | (Ffont_spec): Describe :lang and :otf in the docstring.
* Remove spurious semicolons.Juanma Barranquero2009-02-111-1/+1
|
* (Ffont_spec): Docstring modified.Kenichi Handa2009-02-051-1/+2
|
* (font_parse_xlfd): Handle patterns of length < 2.Chong Yidong2009-01-241-2/+2
|
* (font_spec_from_name): Return Qnil if font name could not be parsed.Chong Yidong2009-01-191-5/+11
| | | | (font_parse_name): Treat a `?' character as part of an XLFD.
* (Ffont_variation_glyphs): Silence compiler.Glenn Morris2009-01-161-1/+3
|
* (font_clear_prop): If clearing the family, clear the font width indexChong Yidong2009-01-131-1/+7
| | | | too.