diff --git a/typed-racket-more/typed/racket/draw.rkt b/typed-racket-more/typed/racket/draw.rkt index 5908dc3a..082b03f5 100644 --- a/typed-racket-more/typed/racket/draw.rkt +++ b/typed-racket-more/typed/racket/draw.rkt @@ -34,6 +34,7 @@ Font-Weight Font-Smoothing Font-Hinting + Font-Name-Directory<%> Bitmap% Bitmap-DC% Brush-Style @@ -148,5 +149,5 @@ [the-brush-list (-inst (parse-type #'Brush-List%))] [the-color-database (-inst (parse-type #'Color-Database<%>))] [the-font-list (-inst (parse-type #'Font-List%))] - ; font-name-directory + [the-font-name-directory (-inst (parse-type #'Font-Name-Directory<%>))] [the-pen-list (-inst (parse-type #'Pen-List%))]) diff --git a/typed-racket-more/typed/racket/private/gui-types.rkt b/typed-racket-more/typed/racket/private/gui-types.rkt index 0cab2090..6e8a192d 100644 --- a/typed-racket-more/typed/racket/private/gui-types.rkt +++ b/typed-racket-more/typed/racket/private/gui-types.rkt @@ -21,6 +21,7 @@ DC<%> Font% Font-List% + Font-Name-Directory<%> GL-Config% GL-Context<%> Linear-Gradient% @@ -533,6 +534,21 @@ (case-> (Char -> Boolean) (Char Any -> Boolean))])) +(define-type Font-Name-Directory<%> + (Class [find-family-default-font-id (-> Font-Family Integer)] + [find-or-create-font-id (-> String Font-Family Integer)] + [get-face-name (-> Integer (Option String))] + [get-family (-> Integer Font-Family)] + [get-font-id (-> String Font-Family Integer)] + [get-post-script-name + (-> Integer Font-Weight Font-Style (Option String))] + [get-screen-name + (-> Integer Font-Weight Font-Style (Option String))] + [set-post-script-name + (-> Integer Font-Weight Font-Style String Void)] + [set-screen-name + (-> Integer Font-Weight Font-Style String Void)])) + ;; racket/gui (provide Area<%>