summaryrefslogtreecommitdiff
path: root/src/w32font.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve font selection by family on MS-WindowsEli Zaretskii2016-03-241-1/+2
| | | | | | | | | | * src/w32font.c (w32font_list_internal): Allow 'ascii-0' charset, in addition to 'iso10646-1', 'unicode-bmp', and 'unicode-sip'. This avoids rejecting many font families whose members are shown by 'font-family-list', in particular 'courier' requested by info.el. Without this change, many values of ':family' attribute of a face have no effect on MS-Windows, because they are rejected due to bogus mismatch of the charset.
* Rework C source files to avoid ^(Paul Eggert2016-03-101-2/+2
| | | | | | | | Work around Bug#22884 by rewording comments and strings to avoid ‘(’ at the start of a line unless it starts a function. This change is a short-term hack; in the longer run we plan to fix cc-mode’s performance for C files that have ‘(’ at the start of a line in a comment or string.
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* Include file cleanup for w32 files in src directoryEli Zaretskii2015-10-221-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32xfns.c: Don't include keyboard.h, window.h, charset.h, fontset.h, blockinput.h. * src/w32uniscribe.c: Don't include dispextern.h, character.h, charset.h, fontset.h. * src/w32term.c: Don't include systty.h, systime.h, charset.h, character.h, ccl.h, dispextern.h, disptab.h, intervals.h, process.h, atimer.h, keymap.h, w32heap.h. Include bitmap/gray.xbm in an ifdef-ed away block. Include fcntl.h for CYGWIN. (set_frame_param): Remove unused function. * src/w32select.c: Don't include charset.h and composite.h. (setup_config, Fw32_get_clipboard_data): Avoid compiler warnings due to pointer signedness mismatches. * src/w32reg.c (w32_get_string_resource): Avoid compiler warnings due to pointer signedness mismatches. * src/w32proc.c: Include unistd.h. Don't include systime.h, process.h, dispextern.h. (sys_spawnve, Fw32_short_file_name, Fw32_long_file_name) (Fw32_application_type): Avoid compiler warnings due to pointer signedness mismatches. * src/w32menu.c: Don't include keymap.h, termhooks.h, window.h, character.h, charset.h, dispextern.h. (simple_dialog_show, add_menu_item): Avoid compiler warnings due to pointer signedness mismatches. * src/w32inevt.c: Don't include dispextern.h, window.h, termhooks.h, w32heap.h. * src/w32font.c: Don't include dispextern.h, character.h, charset.h, fontset.h, font.h. (intern_font_name, add_font_entity_to_list) (registry_to_w32_charset, w32_to_x_charset, fill_in_logfont) (list_all_matching_fonts): Avoid compiler warnings due to pointer signedness mismatches. * src/w32fns.c: Don't include character.h, intervals.h, dispextern.h, epaths.h, charset.h, ccl.h, fontset.h, systime.h, termhooks.h, w32heap.h, bitmap/gray.xbm, font.h, w32font.h. (w32_color_map_lookup, add_system_logical_colors_to_map) (x_decode_color, x_set_name, FPRINTF_WM_CHARS, Fxw_color_defined_p) (Fxw_color_values, x_display_info_for_name, Fset_message_beep) (x_create_tip_frame, Fx_file_dialog, Fsystem_move_file_to_trash) (w32_parse_hot_key, Ffile_system_info, w32_kbd_patch_key): Avoid compiler warnings, mainly due to pointer signedness mismatches. (unwind_create_frame_1): Remove unused function. * src/w32console.c: Don't include character.h, disptab.h, frame.h, window.h, termhooks.h, dispextern.h. (w32con_write_glyphs, w32con_write_glyphs_with_face): Fix pointer signedness mismatch. * src/w32.c: Include c-strcase.h and systty.h. Don't include w32heap.h.
* Fix display of glyphless characters with problematic fontsEli Zaretskii2015-05-281-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | * src/w32term.c (x_draw_glyph_string_background): Force redraw of glyph string background also when the font in use claims preposterously large global height value. Helps to remove artifacts left from previous displays when glyphless characters are displayed as hex code in a box. * src/xterm.c (x_draw_glyph_string_background): Force redraw of glyph string background also when the font in use claims preposterously large global height value. Helps to remove artifacts left from previous displays when glyphless characters are displayed as hex code in a box. * src/w32font.c (w32font_draw): Fix background drawing for glyphless characters that display as acronyms or hex codes in a box. * src/xftfont.c (xftfont_draw): Fix background drawing for glyphless characters that display as acronyms or hex codes in a box. * src/xdisp.c (produce_glyphless_glyph): Compute reasonable values for it->ascent and it->descent when the font claims preposterously large global values. (FONT_TOO_HIGH): Move from here... * src/dispextern.h (FONT_TOO_HIGH): ...to here.
* Teach MS-Windows font back-end return per-glyph ascent/descentEli Zaretskii2015-05-261-7/+25
| | | | | | | | | | | | | | | | | | * src/w32font.h (struct w32_metric_cache): Add ascent and descent values. * src/w32font.c (w32font_text_extents): Compute, cache, and accumulate per-glyph ascent and descent values, instead of copying global values from the font. If the values are not available from the font data, i.e., non-TTF fonts, fall back on font-global values. (compute_metrics): Compute and return per-glyph ascent and descent values, if returned by GetGlyphOutlineW, falling back on font-global values. (Bug#20628) * src/w32term.c (w32_draw_rectangle): Add 1 pixel to width and height of rectangle to be drawn, to be compatible with XDrawRectangle. Fixes glyphless-char display as hex codes in a box, when per-glyph ascent/descent values are used.
* Fix support of scripts in w32font.c (Bug#19993)Eli Zaretskii2015-03-121-15/+87
| | | | | | | | | | | | | | src/w32font.c (font_supported_scripts): Add subranges for Latin Supplement, Latin Extended-A/B, Vai, Supplemental Punctuation, Tai Le, Buginese, Yijing Hexagrams, Ancient Greek Numbers, Tai Xuan Jing, Counting Rods, Sundanese, Lepcha, Ol Chiki, Saurashtra, Kayah Li, Rejang, Ancient Symbols, Phistos Disc, Carian, Lycian, Lydian, Dominoe Tiles, and Mahjong Tiles. Break the Mathematical Alphanumeric Symbols into several "scripts" like fontset.el does. (syms_of_w32font): DEFSYM all the new script symbols. lisp/international/fontset.el (script-representative-chars): Add a representative character for 'vai'.
* Prefer 'Qfoo' to 'intern ("foo")' in w32 source filesEli Zaretskii2015-02-211-4/+4
| | | | | | | src/w32term.c (queue_notifications): src/w32inevt.c (handle_file_notifications): src/w32font.c (w32_enumfont_pattern_entity): Prefer 'Qfoo' to 'intern ("foo")'.
* Use bool for boolean in w32menu.c, w32font.c, w32uniscribe.c.Eli Zaretskii2015-01-291-4/+6
| | | | | | | | | | src/w32uniscribe.c (uniscribe_list, uniscribe_match): Use bool where appropriate. src/w32font.c (struct font_callback_data, w32font_list_internal) (w32font_driver, w32font_match_internal): Use bool where appropriate. src/w32menu.c (x_activate_menubar, set_frame_menubar) (w32_dialog_show, initialize_frame_menubar, w32_menu_show) (is_simple_dialog): Use bool where appropriate.
* MS-Windows followup to previous commitEli Zaretskii2015-01-051-45/+0
| | | | | | | src/w32proc.c, src/w32.h, src/w32fns.c, src/w32font.c, src/w32menu.c: src/w32notify.c, src/w32proc.c, src/w32select.c, src/w32term.c: src/w32uniscribe.c: Remove declarations of Q* variables that represent symbols.
* Compute C decls for DEFSYMs automaticallyPaul Eggert2015-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Bug#15880. This patch also makes Q constants (e.g., Qnil) constant addresses from the C point of view. * make-docfile.c: Revamp to generate table of symbols, too. Include <stdbool.h>. (xstrdup): New function. (main): Don't process the same file twice. (SYMBOL): New constant in enum global_type. (struct symbol): Turn 'value' member into a union, either v.value for int or v.svalue for string. All uses changed. (add_global): New arg svalue, which overrides value, so that globals can have a string value. (close_emacs_global): New arg num_symbols; all uses changed. Output lispsym decl. (write_globals): Output symbol globals too. Output more ATTRIBUTE_CONST, now that Qnil etc. are C constants. Output defsym_name table. (scan_c_file): Move most of guts into ... (scan_c_stream): ... new function. Scan for DEFSYMs and record symbols found. Don't read past EOF if file doesn't end in newline. * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle: * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c: * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c: * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c: * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c: * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c: * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m: * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c: * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c: * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c: * xselect.c, xsettings.c, xterm.c: Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs). These names are now defined automatically by make-docfile. * alloc.c (init_symbol): New function. (Fmake_symbol): Use it. (c_symbol_p): New function. (valid_lisp_object_p, purecopy): Use it. * alloc.c (marked_pinned_symbols): Use make_lisp_symbol instead of make_lisp_ptr. (garbage_collect_1): Mark lispsym symbols. (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro. (mark_object): Use it. (sweep_symbols): Sweep lispsym symbols. (symbol_uses_obj): New function. (which_symbols): Use it. Work for lispsym symbols, too. (init_alloc_once): Initialize Vpurify_flag here; no need to wait, since Qt's address is already known now. (syms_of_alloc): Add lispsym count to symbols_consed. * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0), when testing whether storage is all bits zero. * dispextern (struct image_type): * font.c (font_property_table): * frame.c (struct frame_parm_table, frame_parms): * keyboard.c (scroll_bar_parts, struct event_head): * xdisp.c (struct props): Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and Lisp_Object *, since Qfoo is no longer an object whose address can be taken. All uses changed. * eval.c (run_hook): New function. Most uses of Frun_hooks changed to use it, so that they no longer need to take the address of a Lisp sym. (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable. * frame.c (syms_of_frame): Add defsyms for the frame_parms table. * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here. DEFSYM Qdeactivate_mark before the corresponding var. * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line instead of interning their symbols; this avoids duplicates. (LISP_INITIALLY, TAG_PTR) (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT): New macros. (LISP_INITIALLY_ZERO): Use it. (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol) (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*): Move decls up, to avoid forward uses. Include globals.h earlier, too. (make_lisp_symbol): New function. (XSETSYMBOL): Use it. (DEFSYM): Now just a placeholder for make-docfile. * lread.c (DEFINE_SYMBOLS): Define, for globals.h. (intern_sym): New function, with body taken from old intern_driver. (intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t. All uses changed. (define_symbol): New function. (init_obarray): Define the C symbols taken from lispsym. Use plain DEFSYM for Qt and Qnil. * syntax.c (init_syntax_once): No need to worry about Qchar_table_extra_slots.
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* Default to stack objects on DOS_NT platforms as well.Eli Zaretskii2014-09-251-12/+12
| | | | | | | | | | | | | src/w32term.h (ALIGN_STACK) [__GNUC__]: Define to __attribute__((force_align_arg_pointer)) for GCC 4.2 and later. src/lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition. src/w32proc.c (enum_locale_fn, enum_codepage_fn): Add the ALIGN_STACK attribute. src/w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute. src/w32uniscribe.c (add_opentype_font_name_to_list): Add the ALIGN_STACK attribute. src/w32font.c (add_font_name_to_list, add_font_entity_to_list) (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
* Avoid extra call to oblookup when interning symbols.Dmitry Antipov2014-09-221-1/+1
| | | | | | | | * lisp.h (intern_driver): Add prototype. * lread.c (intern_driver): New function. (intern1, intern_c_string_1, Fintern): * font.c (font_intern_prop): * w32font.c (intern_font_name): Use it.
* Avoid more integer overflows on string size calculations.Dmitry Antipov2014-09-161-1/+1
| | | | | | * category.c (Fmake_category_set): * xdisp.c (get_overlay_arrow_glyph_row): * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
* One more minor cleanup of font subsystem.Dmitry Antipov2014-08-251-78/+69
| | | | | | | | | | | * font.h (struct font_driver): Convert text_extents to return void because returned value is never actually used. * macfont.c (macfont_text_extents): * w32font.c (w32font_text_extents): * xftfont.c (xftfont_text_extents): Adjust to return void and assume that 'metrics' argument is always non-NULL. * ftfont.c (ftfont_text_extents): * xfont.c (xfont_text_extents): Likewise. Avoid redundant memset.
* Next minor cleanup of font subsystem.Dmitry Antipov2014-07-091-16/+1
| | | | | | | | | | | | | | | | * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no users) and FONT_FORMAT_INDEX (set by a few font drivers but never really used). (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove; unused. * ftfont.h (ftfont_font_format): Remove prototype. * ftfont.c (ftfont_font_format): Remove; now unused. (ftfont_open): * nsfont.m (nsfont_open): * w32font.c (w32font_open_internal): * w32uniscribe.c (uniscribe_open): * xfont.c (xfont_open): * xftfont.c (xftfont_open): All users changed.
* * font.h (struct font_driver): Remove get_outline and free_outline;Dmitry Antipov2014-07-041-15/+0
| | | | | | | | | | | | not used by any font driver. * ftfont.c (ftfont_driver): * macfont.m (macfont_driver): * nsfont.m (nsfont_driver): * w32font.c (w32font_driver): * w32uniscribe.c (uniscribe_font_driver): * xfont.c (xfont_driver): Related users changed. * xselect.c (x_get_window_property): Use convenient xmalloc. Call to xfree only if some data was really allocated.
* Fix Cygwin w32 build broken by last commit in w32font.c.Eli Zaretskii2014-01-191-2/+18
| | | | | | | | | | src/w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w) (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w) [!WINDOWSNT]: These functions are no longer compiled on Cygwin; they are replaced by macros that expand into direct calls to the corresponding functions from GDI32.DLL. (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static variables in the Cygwin build, they are unused.
* Fix file name handling on MS-Windows 9X.Eli Zaretskii2014-01-181-41/+4
| | | | | | | | | | | | | | | | | src/w32.c (maybe_load_unicows_dll): New function. src/emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early on, to make sure we can convert file names to and from UTF-8 on Windows 9X. This fixes a failure to start up because Emacs cannot find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>. src/w32font.c [WINDOWSNT]: Include w32.h. (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead of implementing the same stuff. Remove now unused g_b_init_is_windows_9x. src/w32.h (maybe_load_unicows_dll): Add prototype. nt/runemacs.c (ensure_unicows_dll): Don't tell in the message box that "emacs -nw" can do without UNICOWS.DLL on Windows 9X. See w32.c:maybe_load_unicows_dll and its callers for the reason.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Fix some warnings in w32 specific code.Eli Zaretskii2013-12-171-1/+1
| | | | | | | | | | | | | | | src/w32term.c (w32_initialize): Declare the argument of set_user_model as const. src/w32menu.c <MessageBoxW_Proc>: Fix argument declarations. (w32_menu_show): Constify some arguments passed to MessageBox. src/w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO to initialize Lisp objects. src/w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to initialize Lisp objects. src/frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and use variables used only on X under that condition. src/fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows variables not used there.
* * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,Dmitry Antipov2013-12-131-1/+0
| | | | | | * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and 2013-12-12 font-related change to avoid Bug#16128, which is quite hard to fix without even more substantial changes.
* * font.h (struct font_entity) [HAVE_NS]: New field to recordDmitry Antipov2013-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | font driver which was used to create this entity. (struct font) [HAVE_WINDOW_SYSTEM]: New field to record frame where the font was opened. (font_close_object): Add prototype. * font.c (font_make_entity) [HAVE_NS]: Zero out driver field. (font_close_object): Not static any more. Lost frame arg. Adjust comment and users. * alloc.c (cleanup_vector): Call font_close_object to adjust per-frame font counters correctly. If HAVE_NS, also call driver-specific cleanup for font-entity objects. * ftfont.c (ftfont_open): * nsfont.m (nsfont_open): * w32font.c (w32font_open_internal): * xfont.c (xfont_open): * xftfont.c (xftfont_open): Save frame pointer in font object. * macfont.m (macfont_open): Likewise. (macfont_descriptor_entity): Save driver pointer to be able to call its free_entity routine when font-entity is swept. * ftxfont.c (ftxfont_open): Add eassert because frame pointer should be saved by ftfont_driver.open.
* * font.c (font_list_entities): Remove dummy assignment.Dmitry Antipov2013-12-041-1/+0
| | | | | | | * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are used on graphic displays only. Remove unused 'font_encoder' member. * nsfont.m (nsfont_open): * w32font.c (w32font_open_internal): Adjust users.
* Fix bug #6364 with slow scrolling on MS-Windows with bitmap fonts.Tom Seddon2013-11-291-0/+32
| | | | | | | | | | | src/w32font.c (g_b_init_get_char_width_32_w): New static var. (globals_of_w32font): Zero it out. (GetCharWidth32W_Proc): New function pointer. (get_char_width_32_w): New function. (compute_metrics): If get_glyph_outline_w returns an error, try get_char_width_32_w before declaring a failure. This avoids punishing raster (a.k.a. "bitmap") fonts by slowing down redisplay.
* Fix the MS-Windows build broken 2013-10-25T04:35:56Z!dgutov@yandex.ru.Eli Zaretskii2013-10-251-0/+2
| | | | | | | | src/w32font.h (w32font_close): Adjust the prototype to the change in function definition. src/w32font.c (w32font_close): Reintroduce deleted declaration of i. src/w32uniscribe.c (uniscribe_close): Adapt the call to w32font_close to its new prototype.
* Omit unused frame argument of font API's close function.Dmitry Antipov2013-10-251-15/+15
| | | | | | | | | | | | | | * font.h (struct font): Drop frame argument. Adjust comment. * font.c (font_clear_cache, font_close_object): Adjust users. * ftfont.c (ftfont_close): * ftxfont.c (ftxfont_close): * macfont.m (macfont_close): * nsfont.m (nsfont_close): * w32font.c (w32font_close): * xfont.c (xfont_close): * xftfont.c (xftfont_close): Adjust driver-specific close functions, tweak comments and make functions safe if called more than once for the same font object.
* Unify FRAME_window_system_DISPLAY_INFO macros between all ports.Dmitry Antipov2013-09-131-1/+1
| | | | | | | | | | | | | | | | All of them are replaced with FRAME_DISPLAY_INFO, defined in each port to reference the port-specific window system data. * msdos.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * xterm.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify. * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m: * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c: * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c: * xselect.c, xterm.c: All related users changed.
* Drop FRAME_PTR typedef.Dmitry Antipov2013-08-031-9/+9
| | | | | | | | | | | * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h: * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c: * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h: * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h: * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h: * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c: * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c: All related users changed.
* Avoid redundant Lisp_Object <-> struct frame conversions in font API.Dmitry Antipov2013-08-011-13/+10
| | | | | | | | | | | | | | | | | | * font.h (struct font_driver): Change list, match, and list_family functions to accept struct frame * as first arg. * font.c (font_score, font_compare, font_sort_entities): Remove prototypes. (font_sort_entities, font_list_entities, font_select_entity): (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to match font API change. * xfont.c (xfont_list, xfont_match, xfont_list_family): * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family): * ftxfont.c (ftxfont_list, ftxfont_match): * xftfont.c (xftfont_list, xftfont_match): * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family): * w32font.c (w32font_list, w32font_match, w32font_list): (w32font_list_internal, w32_font_match_internal): Likewise. * xfaces.c (Fx_family_fonts): Adjust user.
* Get rid of some platform-specific functions examining windowDmitry Antipov2013-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system and its capabilities. This is a partial rework of the 2013-04-05 change. * lisp.h (have_menus_p): Remove prototype. This function is replaced with platform-independent window_system_available. (check_window_system): Move to... * frame.h (decode_window_system_frame, window_system_available): ...here, add new prototypes. * frame.c (window_system_available, decode_window_system_frame): New functions. (check_window_system): Platform-independent now. * xterm.h (x_in_use): Remove declaration. (check_x_frame): * w32term.h (check_x_frame): * nsterm.h (check_x_frame): Remove prototypes. This function is replaced with platform-independent decode_window_system_frame. * msdos.c (have_menus_p): Remove. * nsfns.m (check_window_system, have_menus_p, check_ns_frame): Remove platform-specific functions. Use check_window_system, decode_window_system_frame and check_ns_display_info where appropriate. Minor style and comment tweaks. * w32fns.c (w32_in_use, check_window_system, have_menus_p) (check_x_frame): Likewise. * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame): Likewise. * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m: * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c: * xmenu.c, xselect.c: All related users changed.
* * frame.h (struct frame): Drop resx and resy because the same data isDmitry Antipov2013-03-201-1/+1
| | | | | | | | | | | | | | | available from window system-specific output context. Adjust users. (default_pixesls_per_inch_x, default_pixesls_per_inch_y): New functions to provide defaults when no window system available. (FRAME_RES_X, FRAME_RES_Y): New macros. (NUMVAL): Moved from xdisp.c. * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface) (Ffont_face_attributes, Fopen_font): * image.c (gs_load): * w32font.c (fill_in_logfont): * xdisp.c (calc_pixel_width_or_height): * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them. * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
* Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
|
* Merge from trunkDaniel Colascione2012-09-171-7/+5
|\
| * Fix MS-Windows build broken by 2012-09-15T07:06:56Z!eggert@cs.ucla.edu, ↵Eli Zaretskii2012-09-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | completing fix for bug #12446. src/w32xfns.c: src/w32uniscribe.c: src/w32term.c: src/w32select.c: src/w32reg.c: src/w32proc.c: src/w32menu.c: src/w32inevt.c: src/w32heap.c: src/w32font.c: src/w32fns.c: src/w32console.c: src/w32.c: src/w16select.c: Remove inclusion of setjmp.h, as it is now included by lisp.h. This completes removal of setjmp.h inclusion erroneously announced in the previous commit. src/lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary more accurate. src/image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is not defined as a macro. The latter happens on MS-Windows.
| * Use bool for booleans in font-related modules.Paul Eggert2012-09-061-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * font.c (font_intern_prop, font_style_to_value) (font_style_symbolic, font_parse_xlfd, font_parse_fcname) (generate_otf_features, font_check_otf_features, font_check_otf) (font_match_p, font_list_entities, font_at): * fontset.c (fontset_id_valid_p, reorder_font_vector (fontset_find_font, Fset_fontset_font) (face_suitable_for_char_p) [0]: * ftfont.c (fc_initialized, ftfont_get_open_type_spec) (ftfont_open, ftfont_text_extents, ftfont_check_otf): (m17n_flt_initialized, ftfont_shape_by_flt): * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw): * nsfont.m (nsfont_draw): * w32font.c (w32font_draw): * w32term.c (x_draw_glyphless_glyph_string_foreground): Use bool for booleans. * font.h: Adjust to above API changes. (struct font, struct font_driver, struct font_driver_list): Use bool for booleans. (struct font): Remove useless member encoding_type. All users removed. * fontset.c, xftfont.c: Omit unnecessary static decls.
* | Implement cygw32Daniel Colascione2012-09-171-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Here, we use the generic window-system configuration system we just implemented to support the w32 window-system in the mainline build under Cygwin. (Previously, the w32 window system could only be compiled as part of the NT-native Emacs build process.) The changes in this patch need to be applied atomically in order to avoid breaking Emacs. The changes include: - Changes throughout the Lisp and C code to not assume that NT Emacs and the w32 window system are synonymous. - Wiring up the regular select(2) event loop to Windows messages - Cleaning up the w32 drag-and-drop receiving code. - Exposing Cygwin path conversion functions to elisp. - Unicode file dialog support when compiling for Cygwin. - Splitting the w32 term lisp initialization code into code applicable to any w32 window-system and code specific to system-type windows-nt. - Integrating the old and new w32 code into the build system.
* Generalize and cleanup font subsystem checks.Dmitry Antipov2012-08-151-6/+3
| | | | | | * font.h (FONT_DEBUG, font_assert): Remove. * font.c, fontset.c, w32font.c, xfont.c, xftfont.c: Change font_assert to eassert. Use eassert where appropriate.
* Define Qnone once for all platforms.Dmitry Antipov2012-08-101-1/+0
| | | | | | | | * frame.c (Qnone): Define here. (syms_of_frame): DEFSYM it. * lisp.h (Qnone): New declaration. * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c: * xfns.c: Remove duplication. Adjust users.
* Don't use the abbreviation "win" to refer to Windows (Bug#10421).Paul Eggert2012-07-291-3/+3
| | | | | | | | | | | | * lisp/org/ob-lilypond.el (ly-w32-ly-path): Rename from ly-win32-ly-path. (ly-w32-pdf-path): Rename from ly-win32-pdf-path. (ly-w32-midi-path): Rename from ly-win32-midi-path. (ly-determine-ly-path, ly-determine-pdf-path, ly-determine-midi-path): Check for "windows-nt", not "win32", in system-type. * src/regex.c (MAX_BUF_SIZE): Remove some incorrect and long-ago-commented-out code that talks about "WIN32". * src/w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95. All uses changed.
* * w32font.c (Qsymbol): Remove local definition.Andreas Schwab2012-07-181-2/+1
| | | | (syms_of_w32font): Don't DEFSYM it.
* Minor adjustments to interning code.Dmitry Antipov2012-07-111-14/+6
| | | | | | | | | * lisp.h (intern, intern_c_string): Redefine as static inline wrappers for intern_1 and intern_c_string_1, respectively. (intern_1, intern_c_string_1): Rename prototypes. * lread.c (intern_1, intern_c_string_1): Simplify Vobarray checking. * font.c (font_intern_prop): Likewise. Adjust comment. * w32font.c (intern_font_name): Likewise.
* Cleanup xmalloc.Dmitry Antipov2012-07-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/coccinelle/xzalloc.cocci: Semantic patch to convert calls to xmalloc with following memset to xzalloc. * src/lisp.h (xzalloc): New prototype. Omit needless casts. * src/alloc.c (xzalloc): New function. Omit needless casts. * src/charset.c: Omit needless casts. Convert all calls to malloc with following memset to xzalloc. * src/dispnew.c: Likewise. * src/fringe.c: Likewise. * src/image.c: Likewise. * src/sound.c: Likewise. * src/term.c: Likewise. * src/w32fns.c: Likewise. * src/w32font.c: Likewise. * src/w32term.c: Likewise. * src/xfaces.c: Likewise. * src/xfns.c: Likewise. * src/xterm.c: Likewise. * src/atimer.c: Omit needless casts. * src/buffer.c: Likewise. * src/callproc.c: Likewise. * src/ccl.c: Likewise. * src/coding.c: Likewise. * src/composite.c: Likewise. * src/doc.c: Likewise. * src/doprnt.c: Likewise. * src/editfns.c: Likewise. * src/emacs.c: Likewise. * src/eval.c: Likewise. * src/filelock.c: Likewise. * src/fns.c: Likewise. * src/gtkutil.c: Likewise. * src/keyboard.c: Likewise. * src/lisp.h: Likewise. * src/lread.c: Likewise. * src/minibuf.c: Likewise. * src/msdos.c: Likewise. * src/print.c: Likewise. * src/process.c: Likewise. * src/region-cache.c: Likewise. * src/search.c: Likewise. * src/sysdep.c: Likewise. * src/termcap.c: Likewise. * src/terminal.c: Likewise. * src/tparam.c: Likewise. * src/w16select.c: Likewise. * src/w32.c: Likewise. * src/w32reg.c: Likewise. * src/w32select.c: Likewise. * src/w32uniscribe.c: Likewise. * src/widget.c: Likewise. * src/xdisp.c: Likewise. * src/xmenu.c: Likewise. * src/xrdb.c: Likewise. * src/xselect.c: Likewise.
* Add NUL-termination to some uses of strncpy.Jim Meyering2012-05-021-2/+5
| | | | | | | * lib-src/pop.c (pop_stat, pop_list, pop_multi_first, pop_last): NUL-terminate the error buffer. * src/w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Spelling fixes.Paul Eggert2011-12-141-1/+1
|
* Fix typos.Juanma Barranquero2011-11-201-10/+10
|
* Spelling fixes.Paul Eggert2011-11-171-1/+1
|
* Fix typos.Juanma Barranquero2011-11-161-3/+3
|