diff --git a/collects/mred/mred.ss b/collects/mred/mred.ss index 448ca8af8b..28b1fa121b 100644 --- a/collects/mred/mred.ss +++ b/collects/mred/mred.ss @@ -114,7 +114,6 @@ font% font-list% font-name-directory<%> - get-face-list get-resource get-the-editor-data-class-list get-the-snip-class-list @@ -233,6 +232,7 @@ message+check-box message-box/custom message+check-box/custom + get-face-list get-file get-file-list put-file diff --git a/collects/mred/private/fontdialog.ss b/collects/mred/private/fontdialog.ss index 94ba1fa5ea..15d46aa292 100644 --- a/collects/mred/private/fontdialog.ss +++ b/collects/mred/private/fontdialog.ss @@ -39,28 +39,7 @@ (let ([s (send (send edit get-style-list) find-named-style "Standard")]) (send s set-delta (font->delta f))))))] [p (make-object horizontal-pane% f)] - [face (make-object list-box% #f - (let ([l (wx:get-face-list)] - [ugly? (lambda (a) - (and (positive? (string-length a)) - (not (or (char-alphabetic? (string-ref a 0)) - (char-numeric? (string-ref a 0)) - (char=? #\- (string-ref a 0))))))]) - ;; Sort space-starting first (for Xft), and - ;; otherwise push names that start with an - ;; ASCII non-letter/digit/hyphen to the end - (sort l (lambda (a b) - (let ([a-sp? (char=? #\space (string-ref a 0))] - [b-sp? (char=? #\space (string-ref b 0))] - [a-ugly? (ugly? a)] - [b-ugly? (ugly? b)]) - (cond [(eq? a-sp? b-sp?) - (cond - [(eq? a-ugly? b-ugly?) - (string-locale-ciexact w) (inexact->exact h)))]))) + + (define ugly? + (lambda (a) + (and (positive? (string-length a)) + (not (or (char-alphabetic? (string-ref a 0)) + (char-numeric? (string-ref a 0)) + (char=? #\- (string-ref a 0))))))) + + (define compare-face-names + (lambda (a b) + (let ([a-sp? (char=? #\space (string-ref a 0))] + [b-sp? (char=? #\space (string-ref b 0))] + [a-ugly? (ugly? a)] + [b-ugly? (ugly? b)]) + (cond [(eq? a-sp? b-sp?) + (cond + [(eq? a-ugly? b-ugly?) + (string-locale-ci