• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/progmodes/

Lines Matching +defs:ps +defs:font +defs:info +defs:database

53 ;; ebnf2ps uses ps-print package (version 5.2.3 or later), so see ps-print to
57 ;; NOTE: ps-print zebra stripes and line number options doesn't have effect on
105 ;; The spooling mechanism is the same as used by ps-print and was designed for
109 ;; printouts). As ebnf2ps and ps-print use the same Emacs buffer to spool
110 ;; images, you can intermix the spooling of ebnf2ps and ps-print images.
112 ;; ebnf2ps use the same hook of ps-print in the `kill-emacs-hook' so that you
140 ;; `ebnf-eps-region' never spool the EPS image, so they don't use the ps-print
615 ;; `ebnf-terminal-font' Specify terminal font.
631 ;; `ebnf-production-font' Specify production font.
633 ;; `ebnf-non-terminal-font' Specify non-terminal font.
649 ;; `ebnf-special-font' Specify special font.
660 ;; `ebnf-except-font' Specify except font.
671 ;; `ebnf-repeat-font' Specify repeat font.
702 ;; `ebnf-debug-ps' Non-nil means to generate PostScript
815 ;; See documentation for `ebnf-style-database'.
824 ;; font height is given by:
825 ;; (terminal font height + non-terminal font height) / 2
836 ;; | | } font height / 2 } entry }
840 ;; : | : : | : } font height / 2 }
844 ;; : : : : : } font height }
846 ;; : : : : } font height / 2 }
850 ;; : : } font height / 2 }
852 ;; : } font height + extra }
866 ;; : | : : | : } font height }
870 ;; : : : } font height * 2 }
874 ;; : } font height * 2 }
883 ;; + + } font height } }
887 ;; : + + : } font height }
893 ;; : : : } font height * 2 }
897 ;; : } font height * 2 }
913 ;; | | } font height }
919 ;; + : : + } font height }
924 ;; : : : } font height * 2 }
928 ;; : } font height * 2 }
938 ;; | | } font height } } height
945 ;; : : : } font height * 2 }
949 ;; : } font height * 2 }
956 ;; XXXXXX: } production font height }
958 ;; } font height }
966 ;; : : : } font height * 2 }
970 ;; : } font height * 2 }
977 ;; | | } font height / 2 } entry }
981 ;; : | : : : : | : } font height / 2 }
985 ;; : : : : : : : } font height }
987 ;; : : : : : : } font height / 2 }
991 ;; : : : : } font height / 2 } width
995 ;; : : } font height / 2 }
997 ;; : } font height + extra }
1004 ;; | | } font height / 2 } entry }
1008 ;; : | : : : : | : } font height / 2 }
1012 ;; : : : : : : : } font height }
1014 ;; : : : : : : } font height / 2 }
1018 ;; : : : : } font height } width
1022 ;; : : } font height / 2 }
1024 ;; : } font height + extra }
1118 (require 'ps-print)
1120 (and (string< ps-print-version "5.2.3")
1121 (error "`ebnf2ps' requires `ps-print' package version 5.2.3 or later"))
1296 (defcustom ebnf-special-font '(7 Courier "Black" "Gray95" bold italic)
1297 "*Specify special font.
1299 See documentation for `ebnf-production-font'."
1349 (defcustom ebnf-except-font '(7 Courier "Black" "Gray90" bold italic)
1350 "*Specify except font.
1352 See documentation for `ebnf-production-font'."
1402 (defcustom ebnf-repeat-font '(7 Courier "Black" "Gray85" bold italic)
1403 "*Specify repeat font.
1405 See documentation for `ebnf-production-font'."
1455 (defcustom ebnf-terminal-font '(7 Courier "Black" "White")
1456 "*Specify terminal font.
1458 See documentation for `ebnf-production-font'."
1531 (defcustom ebnf-production-font '(10 Helvetica "Black" "White" bold)
1532 "*Specify production header font.
1539 SIZE is the font size.
1540 NAME is the font name symbol.
1542 bold - use bold font.
1543 italic - use italic font.
1555 See `ps-font-info-database' for valid font name."
1574 (defcustom ebnf-non-terminal-font '(7 Helvetica "Black" "White")
1575 "*Specify non-terminal font.
1577 See documentation for `ebnf-production-font'."
1946 (defcustom ebnf-debug-ps nil
2097 (interactive (list (ps-print-preprint current-prefix-arg)))
2105 (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg)))
2108 (ps-do-despool filename)))
2238 (defalias 'ebnf-despool 'ps-despool)
2296 ebnf-special-font %s
2301 ebnf-except-font %s
2306 ebnf-repeat-font %s
2313 ebnf-terminal-font %s
2318 ebnf-non-terminal-font %s
2325 ebnf-production-font %s
2345 ebnf-debug-ps %S
2356 (ps-print-quote ebnf-special-font)
2357 (ps-print-quote ebnf-special-shape)
2361 (ps-print-quote ebnf-except-font)
2362 (ps-print-quote ebnf-except-shape)
2366 (ps-print-quote ebnf-repeat-font)
2367 (ps-print-quote ebnf-repeat-shape)
2373 (ps-print-quote ebnf-terminal-font)
2374 (ps-print-quote ebnf-terminal-shape)
2378 (ps-print-quote ebnf-non-terminal-font)
2379 (ps-print-quote ebnf-non-terminal-shape)
2384 (ps-print-quote ebnf-sort-production)
2385 (ps-print-quote ebnf-production-font)
2386 (ps-print-quote ebnf-arrow-shape)
2387 (ps-print-quote ebnf-chart-shape)
2388 (ps-print-quote ebnf-user-arrow)
2393 (ps-print-quote ebnf-justify-sequence)
2396 (ps-print-quote ebnf-syntax)
2405 ebnf-debug-ps
2429 ebnf-special-font
2434 ebnf-except-font
2439 ebnf-repeat-font
2446 ebnf-terminal-font
2451 ebnf-non-terminal-font
2458 ebnf-production-font
2478 ebnf-debug-ps
2487 (defvar ebnf-style-database
2492 (ebnf-special-font . '(7 Courier "Black" "Gray95" bold italic))
2497 (ebnf-except-font . '(7 Courier "Black" "Gray90" bold italic))
2502 (ebnf-repeat-font . '(7 Courier "Black" "Gray85" bold italic))
2509 (ebnf-terminal-font . '(7 Courier "Black" "White"))
2514 (ebnf-non-terminal-font . '(7 Helvetica "Black" "White"))
2521 (ebnf-production-font . '(10 Helvetica "Black" "White" bold))
2542 (ebnf-debug-ps . nil)
2575 "Style database.
2614 See `ebnf-style-database' documentation."
2616 (and (assoc name ebnf-style-database)
2618 (or (assoc inherits ebnf-style-database)
2620 (setq ebnf-style-database
2622 ebnf-style-database)))
2629 See `ebnf-style-database' documentation."
2631 (or (assoc name ebnf-style-database)
2633 (let ((db ebnf-style-database))
2639 (setq ebnf-style-database (assq-delete-all name ebnf-style-database)))
2646 See `ebnf-style-database' documentation."
2648 (let ((style (or (assoc name ebnf-style-database)
2671 See `ebnf-style-database' documentation."
2685 See `ebnf-style-database' documentation."
2699 See `ebnf-style-database' documentation."
2716 See `ebnf-style-database' documentation."
2724 (let ((value (cdr (assoc style ebnf-style-database))))
2819 (defvar ebnf-font-height-P 0)
2820 (defvar ebnf-font-height-T 0)
2821 (defvar ebnf-font-height-NT 0)
2822 (defvar ebnf-font-height-S 0)
2823 (defvar ebnf-font-height-E 0)
2824 (defvar ebnf-font-height-R 0)
2825 (defvar ebnf-font-width-P 0)
2826 (defvar ebnf-font-width-T 0)
2827 (defvar ebnf-font-width-NT 0)
2828 (defvar ebnf-font-width-S 0)
2829 (defvar ebnf-font-width-E 0)
2830 (defvar ebnf-font-width-R 0)
3811 % ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4:
3861 length 12 add dict % Make a new font (a new dict the same size
3864 begin % Make the new font the current dictionary.
3868 % to the new one except for the font ID.
3874 % Use the font's bounding box to determine the ascent, descent,
3876 % transformed using the font's matrix.
3914 currentdict % Leave the new font on the stack
3915 end % Stop using the font as the current dictionary
3916 definefont % Put the font into the font dictionary
3917 pop % Discard the returned font
4092 (rgb (ps-color-scale the-color)))
4112 (defsubst ebnf-message-info (messag)
4196 ebnf-font-width-P)
4206 (let* ((ps-color-p (and ebnf-color-p (ps-color-device)))
4207 (ps-print-color-scale (if ps-color-p
4208 (float (car (ps-color-values "white")))
4212 (old-ps-output (symbol-function 'ps-output))
4213 (old-ps-output-string (symbol-function 'ps-output-string))
4215 ebnf-debug-ps error-msg horizontal
4217 ;; redefines `ps-output' and `ps-output-string'
4218 (defalias 'ps-output 'ebnf-eps-output)
4219 (defalias 'ps-output-string 'ps-output-string-prim)
4258 ;; restore `ps-output' and `ps-output-string'
4259 (defalias 'ps-output old-ps-output)
4260 (defalias 'ps-output-string old-ps-output-string)
4319 (let* ((ps-color-p (and ebnf-color-p (ps-color-device)))
4320 (ps-print-color-scale (if ps-color-p
4321 (float (car (ps-color-values "white")))
4323 ps-zebra-stripes ps-line-number ps-razzle-dazzle
4324 ps-print-hook
4325 ps-print-begin-sheet-hook
4326 ps-print-begin-page-hook
4327 ps-print-begin-column-hook)
4328 (ps-generate (current-buffer) (point-min) (point-max)
4358 (<= the-width ps-width-remaining))
4360 ps-width-remaining (- ps-width-remaining
4389 (<= cur-width ps-width-remaining)
4390 (<= (ebnf-node-height prod) ps-height-remaining))
4395 ps-width-remaining (- ps-width-remaining
4405 (> (ebnf-node-height prod) ps-height-remaining))
4407 (setq ps-width-remaining (- ps-width-remaining
4413 (and (> height ps-height-remaining)
4415 (setq ps-width-remaining ps-print-width
4416 ps-height-remaining (- ps-height-remaining
4423 (ebnf-message-info "Generating")
4425 (ps-output-string (if ebnf-production-name-p
4428 (ps-output " "
4437 (ps-output "EOS\n"))
4447 (ps-output (ebnf-format-float (- entry (ebnf-node-entry (car alt))))
4452 (ps-output (format "%d " nlist)
4466 (ps-output "EOS\n"))
4471 (ps-output "BOS\n")
4481 (ps-output "EOS\n"))
4502 (ps-output (ebnf-format-float
4509 (ps-output "EOS\n")))
4520 (ps-output (ebnf-format-float entry width)
4528 (ps-output "EOS\n"))
4543 (ps-output (ebnf-format-float entry
4555 (ps-output "EOS\n"))
4567 (ps-output-string times)
4568 (ps-output " "
4576 (* (length times) ebnf-font-width-R))
4581 (ps-output "EOS\n"))
4589 (ps-output (ebnf-format-float
4596 ebnf-font-width-E
4604 ebnf-font-width-E ebnf-space-E))
4606 (ps-output "EOS\n"))
4610 (ps-output-string (ebnf-node-name node))
4611 (ps-output " " (ebnf-format-float (ebnf-node-width node))
4761 (ps-output (ebnf-format-float width) " EA\n"))
4765 (ps-output (ebnf-format-float height) " vm\n"))
4769 (ps-output (ebnf-format-float width) " hm\n"))
4777 (ps-output (ebnf-format-float (+ height ebnf-production-vertical-space))
4782 (ps-output (ebnf-format-float (+ width ebnf-production-horizontal-space))
4787 (when (< ps-height-remaining ps-print-height)
4789 (ps-next-page)
4790 (ps-output "\n")))
4793 (defsubst ebnf-font-size (font) (nth 0 font))
4794 (defsubst ebnf-font-name (font) (nth 1 font))
4795 (defsubst ebnf-font-foreground (font) (nth 2 font))
4796 (defsubst ebnf-font-background (font) (nth 3 font))
4797 (defsubst ebnf-font-list (font) (nthcdr 4 font))
4798 (defsubst ebnf-font-attributes (font)
4799 (lsh (ps-extension-bit (cdr font)) -2))
4802 (defconst ebnf-font-name-select
4806 (defun ebnf-font-name-select (font)
4807 (let* ((font-list (ebnf-font-list font))
4808 (font-index (+ (if (memq 'bold font-list) 1 0)
4809 (if (memq 'italic font-list) 2 0)))
4810 (name (ebnf-font-name font))
4811 (database (cdr (assoc name ps-font-info-database)))
4812 (info-list (or (cdr (assoc 'fonts database))
4813 (error "Invalid font: %s" name))))
4814 (or (cdr (assoc (aref ebnf-font-name-select font-index)
4815 info-list))
4816 (error "Invalid attributes for font %s" name))))
4819 (defun ebnf-font-select (font select)
4820 (let* ((name (ebnf-font-name font))
4821 (database (cdr (assoc name ps-font-info-database)))
4822 (size (cdr (assoc 'size database)))
4823 (base (cdr (assoc select database))))
4825 (/ (* (ebnf-font-size font) base)
4827 (error "Invalid font: %s" name))))
4830 (defsubst ebnf-font-width (font)
4831 (ebnf-font-select font 'avg-char-width))
4832 (defsubst ebnf-font-height (font)
4833 (ebnf-font-select font 'line-height))
4848 (ps-printing-region nil nil nil)
4879 ebnf-font-height-P (ebnf-font-height ebnf-production-font)
4880 ebnf-font-height-T (ebnf-font-height ebnf-terminal-font)
4881 ebnf-font-height-NT (ebnf-font-height ebnf-non-terminal-font)
4882 ebnf-font-height-S (ebnf-font-height ebnf-special-font)
4883 ebnf-font-height-E (ebnf-font-height ebnf-except-font)
4884 ebnf-font-height-R (ebnf-font-height ebnf-repeat-font)
4885 ebnf-font-width-P (ebnf-font-width ebnf-production-font)
4886 ebnf-font-width-T (ebnf-font-width ebnf-terminal-font)
4887 ebnf-font-width-NT (ebnf-font-width ebnf-non-terminal-font)
4888 ebnf-font-width-S (ebnf-font-width ebnf-special-font)
4889 ebnf-font-width-E (ebnf-font-width ebnf-except-font)
4890 ebnf-font-width-R (ebnf-font-width ebnf-repeat-font)
4891 ebnf-space-T (* ebnf-font-height-T 0.5)
4892 ebnf-space-NT (* ebnf-font-height-NT 0.5)
4893 ebnf-space-S (* ebnf-font-height-S 0.5)
4894 ebnf-space-E (* ebnf-font-height-E 0.5)
4895 ebnf-space-R (* ebnf-font-height-R 0.5))
4896 (let ((basic (+ ebnf-font-height-T ebnf-font-height-NT)))
4920 (ps-flush-output)
4922 (set-buffer ps-spool-buffer)
4936 (ps-output "\n")))))
4958 "\n%%DocumentNeededResources: font "
4962 (ps-remove-duplicates
4963 (mapcar 'ebnf-font-name-select
4964 (list ebnf-production-font
4965 ebnf-terminal-font
4966 ebnf-non-terminal-font
4967 ebnf-special-font
4968 ebnf-except-font
4969 ebnf-repeat-font)))
4970 "\n%%+ font ")))
4976 (- ebnf-eps-upper-y (* ebnf-font-height-P 0.7)))
4997 (ebnf-format-float (ebnf-font-size ebnf-production-font))
4998 (ebnf-font-name-select ebnf-production-font))
5000 (ebnf-font-foreground ebnf-production-font)
5003 (ebnf-font-background ebnf-production-font)
5006 (ebnf-font-attributes ebnf-production-font))
5009 (ebnf-format-float (ebnf-font-size ebnf-terminal-font))
5010 (ebnf-font-name-select ebnf-terminal-font))
5012 (ebnf-font-foreground ebnf-terminal-font)
5015 (ebnf-font-background ebnf-terminal-font)
5018 (ebnf-font-attributes ebnf-terminal-font))
5032 (ebnf-font-size ebnf-non-terminal-font))
5033 (ebnf-font-name-select ebnf-non-terminal-font))
5035 (ebnf-font-foreground ebnf-non-terminal-font)
5038 (ebnf-font-background ebnf-non-terminal-font)
5041 (ebnf-font-attributes ebnf-non-terminal-font))
5054 (ebnf-format-float (ebnf-font-size ebnf-special-font))
5055 (ebnf-font-name-select ebnf-special-font))
5057 (ebnf-font-foreground ebnf-special-font)
5060 (ebnf-font-background ebnf-special-font)
5063 (ebnf-font-attributes ebnf-special-font))
5076 (ebnf-format-float (ebnf-font-size ebnf-except-font))
5077 (ebnf-font-name-select ebnf-except-font))
5079 (ebnf-font-foreground ebnf-except-font)
5082 (ebnf-font-background ebnf-except-font)
5085 (ebnf-font-attributes ebnf-except-font))
5098 (ebnf-format-float (ebnf-font-size ebnf-repeat-font))
5099 (ebnf-font-name-select ebnf-repeat-font))
5101 (ebnf-font-foreground ebnf-repeat-font)
5104 (ebnf-font-background ebnf-repeat-font)
5107 (ebnf-font-attributes ebnf-repeat-font))
5142 (and ebnf-debug-ps ebnf-debug))))
5165 (ebnf-message-info "Calculating dimensions")
5169 ebnf-font-height-P
5184 ebnf-font-height-T
5185 ebnf-font-width-T
5192 ebnf-font-height-NT
5193 ebnf-font-width-NT
5200 ebnf-font-height-S
5201 ebnf-font-width-S
5205 (defun ebnf-terminal-dimension1 (node font-height font-width space)
5206 (let ((height (+ space font-height space))
5211 (* len font-width)
5228 ebnf-font-height-S)
5234 (* (length times) ebnf-font-width-R)))))
5256 ebnf-font-width-E