Commit 81d8160b authored by Raymond Toy's avatar Raymond Toy
Browse files

Unify naming of Core X11 and Xft2 fonts in CLM, use in INTERFACE.

The substance of this commit is the new file,
src/motif/lisp/fonts.lisp. This file contains a couple of trivial
models of Core X11 and fontconfig names, heuristics for telling them
apart, a convention for deciding the ambiguous cases, and a utility
that uses that convention to generate corresponding resource strings
for OpenMotif. For the moment the only exported interfaces are
user-customizable *AMBIGUOUS-FONT-DISPOSITION*, exported in
src/motif/lisp/initial.lisp. src/tools/clmcom.lisp is adjusted to
include fonts.lisp.

src/interface/interface.lisp take advantage of the new font naming
functionality, by calling GENERATE-HEURISTICATED-FONT-RESOURCES with
some tag names and new user-customizable font name variables to create
fallback resources. src/interface/initial.lisp exports those font name
parent 254aa315
Pipeline #4678 passed with stages
in 28 minutes and 23 seconds
......@@ -22,6 +22,8 @@
......@@ -64,6 +64,13 @@
(defconstant +header-tag+ "header")
(defconstant +italic-tag+ "italic")
;; Default fonts. Users are allowed to customize these. Note that
;; changing them only takes effect the next time these interface
;; programs start a fresh motifd process.
(defvar *default-font-name* "Helvetica-12:Regular")
(defvar *header-font-name* "Helvetica-12:Bold")
(defvar *italic-font-name* "Helvetica-12:Italic")
;;;; Functions for dealing with interface widgets
......@@ -74,7 +81,10 @@
(let ((con (xt::open-motif-connection
*default-server-host* *default-display*
"lisp" "Lisp"
nil ;; fallback resources go here.
(list "" +header-tag+ +italic-tag+)
(list *default-font-name* *header-font-name*
(and *system-motif-server*
(ext:process-pid *system-motif-server*)))))
(with-motif-connection (con)
This diff is collapsed.
......@@ -220,7 +220,8 @@
......@@ -48,6 +48,7 @@
; "target:motif/lisp/timer-support"
(defparameter interface-files
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment