comparison lisp/term/w32-win.el @ 27404:dc6ba3cab915

(w32_create_initial_fontsets): Disabled as it conflicts with new face support.
author Jason Rumney <jasonr@gnu.org>
date Sun, 23 Jan 2000 03:27:02 +0000
parents a5791b2ee668
children fc75f27fefc4
comparison
equal deleted inserted replaced
27403:220407a99b21 27404:dc6ba3cab915
163 (coords (posn-x-y (event-start event))) 163 (coords (posn-x-y (event-start event)))
164 (x (car coords)) 164 (x (car coords))
165 (y (cdr coords))) 165 (y (cdr coords)))
166 (if (and (> x 0) (> y 0)) 166 (if (and (> x 0) (> y 0))
167 (set-frame-selected-window nil window)) 167 (set-frame-selected-window nil window))
168 (mapcar 'find-file (car (cdr (cdr event))))) 168 (mapcar 'find-file (car (cdr (cdr event)))))
169 (raise-frame))) 169 (raise-frame)))
170 170
171 (defun w32-drag-n-drop-other-frame (event) 171 (defun w32-drag-n-drop-other-frame (event)
172 "Edit the files listed in the drag-n-drop event, in other frames. 172 "Edit the files listed in the drag-n-drop event, in other frames.
173 May create new frames, or reuse existing ones. The frame editing 173 May create new frames, or reuse existing ones. The frame editing
639 fontset consisting of the Courier New variations for European 639 fontset consisting of the Courier New variations for European
640 languages which are distributed with Windows as \"Multilanguage Support\". 640 languages which are distributed with Windows as \"Multilanguage Support\".
641 641
642 See the documentation of `create-fontset-from-fontset-spec for the format.") 642 See the documentation of `create-fontset-from-fontset-spec for the format.")
643 643
644 (if (fboundp 'new-fontset) 644 ; (if (fboundp 'new-fontset)
645 (progn 645 ; (progn
646 (defun w32-create-initial-fontsets () 646 ; (defun w32-create-initial-fontsets ()
647 "Create fontset-startup, fontset-standard and any fontsets 647 ; "Create fontset-startup, fontset-standard and any fontsets
648 specified in X resources." 648 ; specified in X resources."
649 ;; Create the standard fontset. 649 ; ;; Create the standard fontset.
650 (create-fontset-from-fontset-spec w32-standard-fontset-spec t) 650 ; (create-fontset-from-fontset-spec w32-standard-fontset-spec t)
651 651
652 ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1,...). 652 ; ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1,...).
653 (create-fontset-from-x-resource) 653 ; (create-fontset-from-x-resource)
654 654
655 ;; Try to create a fontset from a font specification which comes 655 ; ;; Try to create a fontset from a font specification which comes
656 ;; from initial-frame-alist, default-frame-alist, or X resource. 656 ; ;; from initial-frame-alist, default-frame-alist, or X resource.
657 ;; A font specification in command line argument (i.e. -fn XXXX) 657 ; ;; A font specification in command line argument (i.e. -fn XXXX)
658 ;; should be already in default-frame-alist as a `font' 658 ; ;; should be already in default-frame-alist as a `font'
659 ;; parameter. However, any font specifications in site-start 659 ; ;; parameter. However, any font specifications in site-start
660 ;; library, user's init file (.emacs), and default.el are not 660 ; ;; library, user's init file (.emacs), and default.el are not
661 ;; yet handled here. 661 ; ;; yet handled here.
662 662
663 (let ((font (or (cdr (assq 'font initial-frame-alist)) 663 ; (let ((font (or (cdr (assq 'font initial-frame-alist))
664 (cdr (assq 'font default-frame-alist)) 664 ; (cdr (assq 'font default-frame-alist))
665 (x-get-resource "font" "Font"))) 665 ; (x-get-resource "font" "Font")))
666 xlfd-fields resolved-name) 666 ; xlfd-fields resolved-name)
667 (if (and font 667 ; (if (and font
668 (not (query-fontset font)) 668 ; (not (query-fontset font))
669 (setq resolved-name (x-resolve-font-name font)) 669 ; (setq resolved-name (x-resolve-font-name font))
670 (setq xlfd-fields (x-decompose-font-name font))) 670 ; (setq xlfd-fields (x-decompose-font-name font)))
671 (if (string= "fontset" 671 ; (if (string= "fontset"
672 (aref xlfd-fields xlfd-regexp-registry-subnum)) 672 ; (aref xlfd-fields xlfd-regexp-registry-subnum))
673 (new-fontset font 673 ; (new-fontset font
674 (x-complement-fontset-spec xlfd-fields nil)) 674 ; (x-complement-fontset-spec xlfd-fields nil))
675 ;; Create a fontset from FONT. The fontset name is 675 ; ;; Create a fontset from FONT. The fontset name is
676 ;; generated from FONT. Create style variants of the 676 ; ;; generated from FONT. Create style variants of the
677 ;; fontset too. Font names in the variants are 677 ; ;; fontset too. Font names in the variants are
678 ;; generated automatially unless X resources 678 ; ;; generated automatially unless X resources
679 ;; XXX.attribyteFont explicitly specify them. 679 ; ;; XXX.attribyteFont explicitly specify them.
680 (let ((styles (mapcar 'car x-style-funcs-alist)) 680 ; (let ((styles (mapcar 'car x-style-funcs-alist))
681 (faces '(bold italic bold-italic)) 681 ; (faces '(bold italic bold-italic))
682 face face-font fontset fontset-spec) 682 ; face face-font fontset fontset-spec)
683 (while faces 683 ; (while faces
684 (setq face (car faces)) 684 ; (setq face (car faces))
685 (setq face-font (x-get-resource (concat (symbol-name face) 685 ; (setq face-font (x-get-resource (concat (symbol-name face)
686 ".attributeFont") 686 ; ".attributeFont")
687 "Face.AttributeFont")) 687 ; "Face.AttributeFont"))
688 (if face-font 688 ; (if face-font
689 (setq styles (cons (cons face face-font) 689 ; (setq styles (cons (cons face face-font)
690 (delq face styles)))) 690 ; (delq face styles))))
691 (setq faces (cdr faces))) 691 ; (setq faces (cdr faces)))
692 (aset xlfd-fields xlfd-regexp-foundry-subnum nil) 692 ; (aset xlfd-fields xlfd-regexp-foundry-subnum nil)
693 (aset xlfd-fields xlfd-regexp-family-subnum nil) 693 ; (aset xlfd-fields xlfd-regexp-family-subnum nil)
694 (aset xlfd-fields xlfd-regexp-registry-subnum "fontset") 694 ; (aset xlfd-fields xlfd-regexp-registry-subnum "fontset")
695 (aset xlfd-fields xlfd-regexp-encoding-subnum "startup") 695 ; (aset xlfd-fields xlfd-regexp-encoding-subnum "startup")
696 ;; The fontset name should have concrete values in 696 ; ;; The fontset name should have concrete values in
697 ;; weight and slant field. 697 ; ;; weight and slant field.
698 (let ((weight (aref xlfd-fields xlfd-regexp-weight-subnum)) 698 ; (let ((weight (aref xlfd-fields xlfd-regexp-weight-subnum))
699 (slant (aref xlfd-fields xlfd-regexp-slant-subnum)) 699 ; (slant (aref xlfd-fields xlfd-regexp-slant-subnum))
700 xlfd-temp) 700 ; xlfd-temp)
701 (if (or (not weight) (string-match "[*?]*" weight)) 701 ; (if (or (not weight) (string-match "[*?]*" weight))
702 (progn 702 ; (progn
703 (setq xlfd-temp 703 ; (setq xlfd-temp
704 (x-decompose-font-name resolved-name)) 704 ; (x-decompose-font-name resolved-name))
705 (aset xlfd-fields xlfd-regexp-weight-subnum 705 ; (aset xlfd-fields xlfd-regexp-weight-subnum
706 (aref xlfd-temp xlfd-regexp-weight-subnum)))) 706 ; (aref xlfd-temp xlfd-regexp-weight-subnum))))
707 (if (or (not slant) (string-match "[*?]*" slant)) 707 ; (if (or (not slant) (string-match "[*?]*" slant))
708 (progn 708 ; (progn
709 (or xlfd-temp 709 ; (or xlfd-temp
710 (setq xlfd-temp 710 ; (setq xlfd-temp
711 (x-decompose-font-name resolved-name))) 711 ; (x-decompose-font-name resolved-name)))
712 (aset xlfd-fields xlfd-regexp-slant-subnum 712 ; (aset xlfd-fields xlfd-regexp-slant-subnum
713 (aref xlfd-temp xlfd-regexp-slant-subnum))))) 713 ; (aref xlfd-temp xlfd-regexp-slant-subnum)))))
714 (setq fontset (x-compose-font-name xlfd-fields)) 714 ; (setq fontset (x-compose-font-name xlfd-fields))
715 (create-fontset-from-fontset-spec 715 ; (create-fontset-from-fontset-spec
716 (concat fontset ", ascii:" font) styles) 716 ; (concat fontset ", ascii:" font) styles)
717 ))))) 717 ; )))))
718 ;; This cannot be run yet, as creating fontsets requires a 718 ; ;; This cannot be run yet, as creating fontsets requires a
719 ;; Window to be initialised so the fonts can be listed. 719 ; ;; Window to be initialised so the fonts can be listed.
720 ;; Add it to a hook so it gets run later. 720 ; ;; Add it to a hook so it gets run later.
721 (add-hook 'before-init-hook 'w32-create-initial-fontsets) 721 ; (add-hook 'before-init-hook 'w32-create-initial-fontsets)
722 )) 722 ; ))
723 723
724 ;; Apply a geometry resource to the initial frame. Put it at the end 724 ;; Apply a geometry resource to the initial frame. Put it at the end
725 ;; of the alist, so that anything specified on the command line takes 725 ;; of the alist, so that anything specified on the command line takes
726 ;; precedence. 726 ;; precedence.
727 (let* ((res-geometry (x-get-resource "geometry" "Geometry")) 727 (let* ((res-geometry (x-get-resource "geometry" "Geometry"))