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

Lines Matching +defs:find +defs:file

1 ;;; ps-bdf.el --- BDF font file handler for ps-print
12 ;; This file is part of GNU Emacs.
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
31 ;; Functions for getting bitmap information from X's BDF font file are
46 (list (expand-file-name "fonts/bdf" installation-directory))
55 (list (expand-file-name "fonts/bdf" installation-directory))))
57 (defun bdf-expand-file-name (bdfname)
58 "Return an absolute path name of a `BDF' font file BDFNAME.
61 (if (file-name-absolute-p bdfname)
62 (and (file-readable-p bdfname)
68 (setq dir (expand-file-name bdfname (car dir-list)))
69 (not (file-readable-p dir))))
74 (defsubst bdf-file-mod-time (filename)
78 (nth 5 (file-attributes filename)))
80 (defun bdf-file-newer-than-time (filename mod-time)
84 (let ((file-name (bdf-expand-file-name filename)))
85 (and file-name
86 (let* ((new-mod-time (bdf-file-mod-time file-name))
93 (defun bdf-find-file (bdfname)
94 "Return a buffer visiting a bdf file BDFNAME.
98 (let ((file-name (bdf-expand-file-name bdfname)))
99 (and file-name
104 (insert-file-contents file-name)
107 (defvar bdf-cache-file (if (eq system-type 'ms-dos)
113 "Name of cache file which contains information of `BDF' font files.")
123 "Return a cached information about `BDF' font files from a cache file.
124 The variable `bdf-cache-file' holds the cache file name.
125 If the cache file is not readable, this return nil."
128 (and (file-readable-p bdf-cache-file)
130 (load-file bdf-cache-file)
137 "Write out cached information of `BDF' font file to a file.
138 The variable `bdf-cache-file' holds the cache file name.
139 The file is written if and only if the file already exists and writable."
141 (file-exists-p bdf-cache-file)
142 (file-writable-p bdf-cache-file)
144 nil bdf-cache-file)))
147 "Cache FONT-INFO as information about one `BDF' font file.
183 "Read `BDF' font file BDFNAME and return information (FONT-INFO) of the file.
188 BDFFILE is a name of a font file (excluding directory part).
190 ABSOLUTE-PATH is an absolute path of the font file.
213 MAXLEN is a maximum bytes of one glyph information in the font file.
215 OFFSET-VECTOR is a vector of a file position which starts bitmap data
216 of the glyph in the font file.
218 Nth element of OFFSET-VECTOR is a file position for the glyph of code
221 (let* ((absolute-path (bdf-expand-file-name bdfname))
222 (buf (and absolute-path (bdf-find-file absolute-path)))
233 (error "BDF file %s doesn't exist" bdfname))
308 (list bdfname absolute-path (bdf-file-mod-time absolute-path)
323 "Return information about `BDF' font file BDFNAME.
332 (not (file-readable-p (bdf-info-absolute-path font-info)))
333 (bdf-file-newer-than-time bdfname (bdf-info-mod-time font-info)))
339 (defun bdf-find-font-info (bdfnames)
340 "Return information about `BDF' font file with alternative names BDFNAMES.
342 If BDFNAMES is a list of file names, this function finds the first file
344 on that file name."
351 (null (bdf-expand-file-name fname))))
357 "Read `BDF' font file BDFNAME to get bitmap data at file position OFFSET.
358 BDFNAME is an absolute path name of the font file.
371 (insert-file-contents bdfname nil offset (+ offset maxlen))
409 "Return bitmap information of glyphs of CODES in `BDF' font file BDFNAME.
410 CODES is a list of encoding number of glyphs in the file.
415 (let* ((font-info (bdf-find-font-info bdfname))
439 (font-info (bdf-find-font-info font-name))