Mercurial > hg > xemacs-beta
annotate lisp/mule/mule-x-init.el @ 5047:07dcc7000bbf
put width before height consistently, fix a real bug found in the process
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-20 Ben Wing <ben@xemacs.org>
* EmacsFrame.c (EmacsFrameRecomputeCellSize):
* faces.c (default_face_font_info):
* faces.c (default_face_width_and_height):
* faces.c (Fface_list):
* faces.h:
* frame-gtk.c (gtk_set_initial_frame_size):
* frame-gtk.c (gtk_set_frame_size):
* frame-gtk.c (gtk_recompute_cell_sizes):
* frame.c:
* frame.c (frame_conversion_internal_1):
* frame.c (change_frame_size_1):
* frame.c (change_frame_size):
* glyphs-msw.c (mswindows_combo_box_instantiate):
* glyphs-widget.c (widget_instantiate):
* glyphs-widget.c (tree_view_query_geometry):
* glyphs-widget.c (Fwidget_logical_to_character_width):
* glyphs-widget.c (Fwidget_logical_to_character_height):
* indent.c (vmotion_pixels):
* redisplay-output.c (get_cursor_size_and_location):
* redisplay-xlike-inc.c (XLIKE_output_eol_cursor):
* redisplay-xlike-inc.c (XLIKE_flash):
* redisplay.c (calculate_baseline):
* redisplay.c (start_with_point_on_display_line):
* redisplay.c (glyph_to_pixel_translation):
* redisplay.c (pixel_to_glyph_translation):
* window.c (margin_width_internal):
* window.c (frame_size_valid_p):
* window.c (frame_pixsize_valid_p):
* window.c (check_frame_size):
* window.c (set_window_pixsize):
* window.c (window_pixel_height_to_char_height):
* window.c (window_char_height_to_pixel_height):
* window.c (window_displayed_height):
* window.c (window_pixel_width_to_char_width):
* window.c (window_char_width_to_pixel_width):
* window.c (change_window_height):
* window.c (window_scroll):
* window.h:
IMPORTANT: Aidan and Carbon Repo, please pay attention and fix
appropriately!
Rename: default_face_height_and_width -> default_face_width_and_height
and reverse width/height arguments.
Reverse width/height arguments to the following functions:
-- default_face_font_info
-- default_face_height_and_width (see above)
-- check_frame_size
-- frame_size_valid_p (made into a static function)
Fix a redisplay bug where args to default_face_height_and_width
were in the wrong order.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 20 Feb 2010 18:56:01 -0600 |
parents | e34711681f30 |
children | 308d34e9f07d |
rev | line source |
---|---|
502 | 1 ;;; mule-x-init.el --- initialization code for X Windows under MULE -*- coding: iso-2022-7bit; -*- |
428 | 2 ;; Copyright (C) 1994 Free Software Foundation, Inc. |
872 | 3 ;; Copyright (C) 1996, 2002 Ben Wing <ben@xemacs.org> |
428 | 4 |
5 ;; Author: various | |
6 ;; Keywords: mule X11 | |
7 | |
8 ;; This file is part of XEmacs. | |
9 ;; | |
10 ;; XEmacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 ;; | |
15 ;; XEmacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 ;; | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with XEmacs; see the file COPYING. If not, write to the | |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
24 | |
25 ;;; Commentary: | |
26 | |
27 ;;; Code: | |
28 | |
29 ;;; Work around what is arguably a Sun CDE bug. | |
30 | |
4477
e34711681f30
Don't determine whether to call general device-type code at startup,
Aidan Kehoe <kehoea@parhasard.net>
parents:
4103
diff
changeset
|
31 ;; #### This is unused, apparently. |
428 | 32 (defun x-use-halfwidth-roman-font (fullwidth-charset roman-registry) |
33 "Maybe set charset registry of the 'ascii charset to ROMAN-REGISTRY. | |
34 | |
35 Do this only if: | |
36 - the current display is an X device | |
37 - the displayed width of FULLWIDTH-CHARSET is twice the displayed | |
38 width of the 'ascii charset, but only when using ROMAN-REGISTRY. | |
39 | |
40 Traditionally, Asian characters have been displayed so that they | |
41 occupy exactly twice the screen space of ASCII (`halfwidth') | |
42 characters. On many systems, e.g. Sun CDE systems, this can only be | |
43 achieved by using a national variant roman font to display ASCII." | |
872 | 44 (flet ((charset-font-width (charset) |
45 (font-instance-width | |
46 (face-font-instance 'default (selected-device) charset))) | |
47 | |
48 (twice-as-wide (cs1 cs2) | |
49 (let ((width1 (charset-font-width cs1)) | |
50 (width2 (charset-font-width cs2))) | |
51 (and width1 width2 (eq (+ width1 width1) width2))))) | |
428 | 52 |
53 (when (eq 'x (device-type)) | |
4103 | 54 (let ((original-registries (charset-registries 'ascii))) |
55 (condition-case nil | |
56 (unless (twice-as-wide 'ascii fullwidth-charset) | |
57 (set-charset-registries 'ascii (vector roman-registry)) | |
58 (unless (twice-as-wide 'ascii fullwidth-charset) | |
59 ;; Restore if roman-registry didn't help | |
60 (set-charset-registries 'ascii original-registries))) | |
61 (error (set-charset-registries 'ascii original-registries))))))) | |
428 | 62 |
63 ;;;; |