-;; TODO
-;; the C++ version in font-interface.cc is usually used.
-;;
-;; FIXME: this has silently been broken by the introduction
-;; of wildcards in the font list.
-(define (properties-to-font-name fonts properties-alist-list)
- (let* (
- ;; change order to change priorities of qualifiers.
- (q-order '(font-family font-series font-shape
- font-design-size font-relative-size))
- (rawqualifiers (map (lambda (x)
- (chain-assoc x properties-alist-list))
- q-order))
- (qualifiers (filter-list pair? rawqualifiers))
- (selected (find-first-font qualifiers fonts))
- (err (current-error-port)))
-
- (if (equal? selected "")
- (begin
- (display "\ncouldn't find any font satisfying " err)
- (write qualifiers err)
- "cmr10"
- )
- selected) ; return the topmost.
- ))