1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-30 09:00:31 -08:00
Commit graph

73 commits

Author SHA1 Message Date
Paul Eggert
af59aa6e3c Port to Solaris 10, which doesn't support FC_HINT_STYLE. 2011-02-11 21:13:34 -08:00
Glenn Morris
233ba4d924 Merge from emacs-23; up to 2010-05-26T14:19:15Z!monnier@iro.umontreal.ca. 2011-02-05 14:30:14 -08:00
Kenichi Handa
ea2460a0d8 Use FC_DUAL only when it is defined. 2011-02-02 11:15:29 +09:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Juanma Barranquero
ca3fa30248 Merge changes from emacs-23 branch. 2010-10-19 13:44:07 +02:00
Kenichi Handa
31daa5e17c Fix incorrect font metrics when the same font is opened with different pixelsizes. 2010-10-15 16:49:11 +09:00
Dan Nicolaescu
04bab72cc6 Remove extern declarations in .c files, .h files have them.
* src/data.c:
* src/dired.c:
* src/editfns.c:
* src/filelock.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/keyboard.c:
* src/keymap.c:
* src/lread.c:
* src/menu.c:
* src/print.c:
* src/search.c:
* src/sound.c:
* src/window.c:
* src/xdisp.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xmenu.c:
* src/xterm.c: Remove declarations.
2010-08-05 16:34:12 -07:00
Dan Nicolaescu
971de7fb15 Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C.
* src/atimer.c:
* src/bidi.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/ccl.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/doprnt.c:
* src/ecrt0.c:
* src/editfns.c:
* src/fileio.c:
* src/filelock.c:
* src/filemode.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/ftxfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/insdel.c:
* src/intervals.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/md5.c:
* src/menu.c:
* src/minibuf.c:
* src/prefix-args.c:
* src/print.c:
* src/ralloc.c:
* src/regex.c:
* src/region-cache.c:
* src/scroll.c:
* src/search.c:
* src/sound.c:
* src/strftime.c:
* src/syntax.c:
* src/sysdep.c:
* src/termcap.c:
* src/terminal.c:
* src/terminfo.c:
* src/textprop.c:
* src/tparam.c:
* src/undo.c:
* src/unexelf.c:
* src/window.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xgselect.c:
* src/xmenu.c:
* src/xrdb.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c:
* src/xterm.c: Likewise.
2010-07-04 00:50:25 -07:00
Jan D
f57e2426f0 Remove __P and P_ from .c and .m files and definition of P_
* lisp.h:
* atimer.h: Remove define for P_.

* alloc.c: Remove __P and P_ from .c and .m files.
* atimer.c:
* buffer.c:
* callint.c:
* category.c:
* charset.c:
* chartab.c:
* cm.c:
* coding.c:
* composite.c:
* data.c:
* dired.c:
* dispnew.c:
* doc.c:
* editfns.c:
* emacs.c:
* eval.c:
* fileio.c:
* filelock.c:
* fns.c:
* font.c:
* fontset.c:
* frame.c:
* ftfont.c:
* ftxfont.c:
* gmalloc.c:
* gtkutil.c:
* image.c:
* indent.c:
* intervals.c:
* keyboard.c:
* keymap.c:
* lread.c:
* marker.c:
* menu.c:
* minibuf.c:
* print.c:
* process.c:
* scroll.c:
* search.c:
* sound.c:
* strftime.c:
* syntax.c:
* sysdep.c:
* term.c:
* terminal.c:
* textprop.c:
* unexalpha.c:
* w32console.c:
* w32fns.c:
* w32font.c:
* w32menu.c:
* w32term.c:
* w32uniscribe.c:
* window.c:
* xdisp.c:
* xfaces.c:
* xfns.c:
* xfont.c:
* xftfont.c:
* xmenu.c:
* xselect.c:
* xterm.c: Likewise.

* ebrowse.c: Remove P_ and __P.
* etags.c:
* movemail.c:
* pop.c:
* update-game-score.c: Likewise.
2010-07-02 14:19:53 +02:00
Naohiro Aota
3d8416fce9 Check FC_DUAL too. For such fonts, check width one by one (Bug#4129).
* xftfont.c (xftfont_open): Check font width one by one also when
spacing is dual.

* ftfont.c (ftfont_open): Ditto.
2010-06-30 10:22:18 -04:00
Kenichi Handa
769e9d470d Check FC_DUAL too. For such fonts, check width one by one. 2010-06-30 15:55:41 +09:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Jan Djärv
d0cf45b702 Fix slowdown and wrong font choosed by XSETTINGS changes. bug #5157.
* 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.
2010-01-06 20:38:39 +01:00
Jan Djärv
223e5fc656 xftfont.c: Parse symbolic names for constants also.
(QClcdfilter): New variable.
(xftfont_open): Parse constant names for RGBA, HINT_STYLE and LCDFILTER.
(syms_of_xftfont): Initialize QClcdfilter.
2009-12-13 13:16:17 +00:00
Kenichi Handa
91ce241591 (struct xftfont_info): New member matrix.
(xftfont_open): Setup xftfont_info->matrix.
2009-12-12 02:11:29 +00:00
Jan Djärv
ece2d4ed18 Don't crash if an X terminal is deleted with force == t.
* xftfont.c (xftfont_end_for_frame): Just return if dpyinfo->display
is NULL.

* xterm.c (x_delete_terminal): Set dpyinfo->display to NULL.

* frame.c (frame_make_pointer_invisible)
(frame_make_pointer_visible): Just return if there isn't any selected
frame.
2009-11-27 17:27:04 +00:00
Jan Djärv
21050de1b8 * xftfont.c (xftfont_fix_match): Older versions of fontconfig does
not have FC_LCD_*.  #define them if not there.
2009-11-17 13:47:29 +00:00
Jan Djärv
a6eb20d8fe #ifdef on FC_LCD_FILTER.
* xftfont.c (xftfont_fix_match): Older versions of fontconfig does
not have FC_LCD_FILTER.  #ifdef it.

* xsettings.c (parse_xft_settings, apply_xft_settings): Ditto

* xftfont.c (xftfont_fix_match): New function.
(xftfont_open): Call XftDefaultSubstitute before XftFontMatch.
Call xftfont_fix_match after XftFontMatch.
2009-11-17 09:53:45 +00:00
Jan Djärv
637fa98808 Handle system default font and changing font parameters.
* 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.
2009-11-17 08:21:23 +00:00
Dan Nicolaescu
d7306fe6b1 * alloc.c: Do not define struct catchtag.
* 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.
2009-10-19 04:27:09 +00:00
Kenichi Handa
ea12eb8178 (xftfont_open): Fix typo: FC_RGBA->FC_HINT_STYLE. 2009-07-10 11:30:37 +00:00
Chong Yidong
99061dfcf6 * xftfont.c (xftfont_open): Avoid passing NULL argument to
XftLockFace.
2009-06-30 22:07:44 +00:00
YAMAMOTO Mitsuharu
9cb363dbda (xftfont_open): Make sure that Xrender extension is added
before Xft one (Bug#1696).
2009-05-11 09:30:34 +00:00
Kenichi Handa
b840b299b9 (xftfont_has_char): Special handling of ja' and ko' adstyle. 2009-04-16 01:38:35 +00:00
Kenichi Handa
bc981e4e5a (xftfont_open): Fix setting font->underline_thickness. 2009-04-06 11:08:56 +00:00
Juanma Barranquero
8510724d46 Remove spurious semicolons. 2009-02-11 09:45:12 +00:00
Kenichi Handa
6570a1c427 (xftfont_has_char): New function.
(syms_of_xftfont): Register xftfont_has_char in xftfont_driver.
2009-01-29 12:13:59 +00:00
Kenichi Handa
b0c25608cd (struct xftfont_info): New member `index'. 2009-01-27 05:08:40 +00:00
Glenn Morris
76b6f70759 Add 2009 to copyright years. 2009-01-08 03:15:17 +00:00
Kenichi Handa
2781b4e0a3 (xftfont_open): Genarate a multibyte string if give names are utf-8. 2008-12-19 05:39:19 +00:00
Chong Yidong
5c629bf654 (xftfont_open): Free Xft font pattern if XftFontOpenPattern fails. 2008-12-15 01:57:40 +00:00
Chong Yidong
9743ac48dd (syms_of_xftfont): Fix typo. 2008-12-09 23:54:29 +00:00
Kenichi Handa
0fce2b40e3 (struct xftfont_info): New member ft_size. Make the
member order compatible with struct ftfont_info.
(xftfont_open): Add FC_CHARSET to the pattern.  Set
xftfont_info->ft_size.  Don't unlock the face.  Check BDF
properties if appropriate.
(xftfont_close): Unlock the face.
(xftfont_anchor_point, xftfont_shape): Deleted.
(syms_of_xftfont): Don't set members anchor_point and shape of
xftfont_driver.
2008-07-09 00:32:01 +00:00
Kenichi Handa
1cf6763fdb (xftfont_open): Don't call FcConfigSubstitute and
XftDefaultSubstitute (they are called in XftFontMatch).
(xftfont_open): Fix args to ftfont_font_format.
2008-06-30 07:40:40 +00:00
Kenichi Handa
808dd567ef (xftfont_open): Handle QCembolden only when FC_EMBOLDEN is defined. 2008-06-21 11:15:04 +00:00
Kenichi Handa
dc2226d0dc (xftfont_open): Add FOUNDRY, SPACING, DPI, SCALABLE to the pattern. 2008-06-20 12:28:22 +00:00
Kenichi Handa
81094fabdc (QChinting , QCautohint, QChintstyle, QCrgba)
(QCembolden): New variables.
(syms_of_xftfont): DEFSYM them.
(xftfont_open): Call XftFontMatch.  Don't trust the result of
XftTextExtents8 if the pixel_size is less than 5.
2008-06-19 00:41:48 +00:00
Kenichi Handa
951b8112ca (xftfont_open): Delete unused variable. If
underline_thickness is not 1, adjust underline_position.
2008-05-25 11:04:53 +00:00
Kenichi Handa
686ee70366 (xftfont_open): Ajusted for the change of extra info
set by ftfont_list.
2008-05-19 06:18:51 +00:00
Glenn Morris
9ec0b715e2 Switch to recommended form of GPLv3 permissions notice. 2008-05-14 07:50:26 +00:00
Kenichi Handa
3528e709a4 (xftfont_list): Adjusted for the change of `list'
callback function.
(xftfont_match): Adjusted for the fontmat change of font-entity.
(xftfont_open): Adjusted for the format change of font-entity and
font-object.  Adjusted for the change of struct font.  Return a
font-object.  Don't update dpyinfo->smallest_font_height and
dpyinfo->smallest_char_width.
(xftfont_close): Block input while calling XftFontClose.
(xftfont_prepare_face): Don't block input while calling
xftfont_get_colors.  Adjusted for the change of struct font.
(xftfont_shape): Return value of error case fixed.
2008-05-14 01:43:03 +00:00
Kenichi Handa
785543daa7 (xftfont_draw): Pay attention to s->padding_p. 2008-02-25 01:43:55 +00:00
Kenichi Handa
3370d9f5b3 (xftfont_default_fid): Delete it.
(xftfont_open): Set xfont->fid to 0.
2008-02-17 02:03:32 +00:00
Glenn Morris
77ad4cfe12 Update copyright years and GPL version. 2008-02-06 04:24:36 +00:00
Kenichi Handa
b5b2545a19 (xftfont_encode_char): Use the macro FONT_INVALID_CODE. 2007-12-25 10:30:29 +00:00
Kenichi Handa
173f0ce256 (xftfont_start_for_frame): Delete prototype. 2007-12-18 11:26:43 +00:00
Kenichi Handa
365131acac (struct xftfont_info): Delete the member ft_face.
(xftfont_open): Don't keep locking face.
(xftfont_close): Don't unlock face.
(xftfont_anchor_point): Lock and unlock face.
(xftfont_shape): Likewise.
2007-12-10 07:36:01 +00:00