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
GENERATE-HEURISTICATED-FONT-RESOURCES and a
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
variables.
parent 254aa315
Pipeline #4678 passed with stages
in 28 minutes and 23 seconds
......@@ -22,6 +22,8 @@
(:use "TOOLKIT" "LISP" "EXTENSIONS" "KERNEL")
(:shadow "CLASS-DIRECT-SUPERCLASSES")
(:export "*INTERFACE-STYLE*" "+HEADER-TAG+" "+ITALIC-TAG+"
"*DEFAULT-FONT-NAME*" "*HEADER-FONT-NAME*" "*ITALIC-FONT-NAME*"
"*AMBIGUOUS-FONT-DISPOSITION*"
"USE-GRAPHICS-INTERFACE" "VERIFY-SYSTEM-SERVER-EXISTS"
"CREATE-INTERFACE-SHELL" "POPUP-INTERFACE-PANE"
"CREATE-INTERFACE-PANE-SHELL" "FIND-INTERFACE-PANE"
......
......@@ -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.
(generate-heuristicated-font-resources
(list "" +header-tag+ +italic-tag+)
(list *default-font-name* *header-font-name*
*italic-font-name*))
(and *system-motif-server*
(ext:process-pid *system-motif-server*)))))
(with-motif-connection (con)
......
This diff is collapsed.
......@@ -220,7 +220,8 @@
"IS-APPLICATION-SHELL" "IS-COMPOSITE" "IS-CONSTRAINT" "IS-OBJECT"
"IS-OVERRIDE-SHELL" "IS-RECT-OBJ" "IS-SHELL" "IS-TOP-LEVEL-SHELL"
"IS-TRANSIENT-SHELL" "IS-VENDOR-SHELL" "IS-W-M-SHELL"
"XT-WIDGET-PARENT"))
"XT-WIDGET-PARENT" "*AMBIGUOUS-FONT-DISPOSITION*"
"GENERATE-HEURISTICATED-FONT-RESOURCES"))
......
......@@ -48,6 +48,7 @@
"target:motif/lisp/callbacks"
"target:motif/lisp/widgets"
; "target:motif/lisp/timer-support"
"target:motif/lisp/fonts"
"target:motif/lisp/main"))
(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