allow larger font sizes --- up to 1024
It's not clear that any limit is still needed, and probably font sizes should be liberalized to reals instead of integers (but I don't want to spend that kind of time right now).
This commit is contained in:
parent
f288c694db
commit
bed64be873
|
@ -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)))
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user