diff --git a/collects/racket/draw/private/dc.rkt b/collects/racket/draw/private/dc.rkt index 9eac1baf59..6c2ba7c1da 100644 --- a/collects/racket/draw/private/dc.rkt +++ b/collects/racket/draw/private/dc.rkt @@ -562,6 +562,7 @@ [(partly-smoothed) CAIRO_ANTIALIAS_GRAY] [(smoothed) CAIRO_ANTIALIAS_SUBPIXEL])) (cairo_font_options_set_hint_metrics o2 CAIRO_HINT_METRICS_OFF) + ;; good idea?: (cairo_font_options_set_hint_style o2 CAIRO_HINT_STYLE_NONE) (pango_cairo_context_set_font_options context o2) (cairo_font_options_destroy o2))) diff --git a/collects/racket/draw/private/font.rkt b/collects/racket/draw/private/font.rkt index c0a92d8e4a..737358252d 100644 --- a/collects/racket/draw/private/font.rkt +++ b/collects/racket/draw/private/font.rkt @@ -32,7 +32,7 @@ l))) (define (size? v) (and (exact-positive-integer? v) - (byte? v))) + (v . <= . 1024))) (define-local-member-name s-set-table-key) @@ -306,7 +306,7 @@ #:underlined? [underlined? #f] #:smoothing [smoothing 'default] #:size-in-pixels? [size-in-pixels? #f]) - (unless (size? size) (raise-type-error 'make-font "exact integer in [1, 255]" size)) + (unless (size? size) (raise-type-error 'make-font "exact integer in [1, 1024]" size)) (unless (or (not face) (string? face)) (raise-type-error 'make-font "string or #f" face)) (unless (family-symbol? family) (raise-type-error 'make-font "family-symbol" family)) (unless (style-symbol? style) (raise-type-error 'make-font "style-symbol" style)) diff --git a/collects/racket/draw/unsafe/cairo.rkt b/collects/racket/draw/unsafe/cairo.rkt index b2d63fec17..65abc36c78 100644 --- a/collects/racket/draw/unsafe/cairo.rkt +++ b/collects/racket/draw/unsafe/cairo.rkt @@ -177,6 +177,7 @@ (define-cairo cairo_set_font_options (_fun _cairo_t _cairo_font_options_t -> _void)) (define-cairo cairo_font_options_set_antialias (_fun _cairo_font_options_t _int -> _void)) (define-cairo cairo_font_options_set_hint_metrics (_fun _cairo_font_options_t _int -> _void)) +(define-cairo cairo_font_options_set_hint_style (_fun _cairo_font_options_t _int -> _void)) (define-cairo cairo_show_glyphs (_fun _cairo_t _cairo_glyph_t-pointer _int -> _void)) @@ -403,6 +404,14 @@ CAIRO_HINT_METRICS_OFF CAIRO_HINT_METRICS_ON) +(define-enum + 0 + CAIRO_HINT_STYLE_DEFAULT + CAIRO_HINT_STYLE_NONE + CAIRO_HINT_STYLE_SLIGHT + CAIRO_HINT_STYLE_MEDIUM + CAIRO_HINT_STYLE_FULL) + (define-enum 0 CAIRO_PATTERN_TYPE_SOLID diff --git a/collects/scribblings/draw/draw-funcs.scrbl b/collects/scribblings/draw/draw-funcs.scrbl index adc1398a98..80d942c13d 100644 --- a/collects/scribblings/draw/draw-funcs.scrbl +++ b/collects/scribblings/draw/draw-funcs.scrbl @@ -44,7 +44,7 @@ this procedure is preferred because it defaults @racket[alpha?] in a more useful way.} -@defproc[(make-font [#:size size (integer-in 1 255) 12] +@defproc[(make-font [#:size size (integer-in 1 1024) 12] [#:face face (or/c string? #f) #f] [#:family family (one-of/c 'default 'decorative 'roman 'script 'swiss 'modern 'symbol 'system) diff --git a/collects/scribblings/draw/font-class.scrbl b/collects/scribblings/draw/font-class.scrbl index fea1f86e5a..a87cb8ab3d 100644 --- a/collects/scribblings/draw/font-class.scrbl +++ b/collects/scribblings/draw/font-class.scrbl @@ -85,7 +85,7 @@ See also @defconstructor*/make[(() - ([size (integer-in 1 255)] + ([size (integer-in 1 1024)] [family (one-of/c 'default 'decorative 'roman 'script 'swiss 'modern 'symbol 'system)] [style (one-of/c 'normal 'italic 'slant) 'normal] @@ -95,7 +95,7 @@ See also 'smoothed 'unsmoothed) 'default] [size-in-pixels? any/c #f]) - ([size (integer-in 1 255)] + ([size (integer-in 1 1024)] [face string?] [family (one-of/c 'default 'decorative 'roman 'script 'swiss 'modern 'symbol 'system)] @@ -144,7 +144,7 @@ face and family specifications, only. } @defmethod[(get-point-size) - (integer-in 1 255)]{ + (integer-in 1 1024)]{ Gets the font's size (roughly the height). Despite the method name, the size may be in logical units instead of points, depending on the