{"size": 2078, "ext": "scrbl", "max_stars_repo_path": "draw-doc/scribblings/draw/font-list-class.scrbl", "max_stars_repo_name": "Bogdanp/draw", "max_stars_repo_stars_event_min_datetime": "2015-03-24T15:04:13.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-25T03:43:21.000Z", "max_issues_repo_path": "draw-doc/scribblings/draw/font-list-class.scrbl", "max_issues_repo_name": "Bogdanp/draw", "max_issues_repo_issues_event_min_datetime": "2015-01-30T20:28:55.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-02T08:43:11.000Z", "max_forks_repo_path": "draw-doc/scribblings/draw/font-list-class.scrbl", "max_forks_repo_name": "Bogdanp/draw", "max_forks_repo_forks_event_min_datetime": "2015-01-29T22:12:33.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-17T09:51:49.000Z"}
{"max_stars_count": 15, "max_issues_count": 37, "max_forks_count": 21, "avg_line_length": 46.1777777778, "max_line_length": 110, "alphanum_fraction": 0.4778633301}
#lang scribble/doc
@(require "common.rkt")

@defclass/title[font-list% object% ()]{

A @racket[font-list%] object maintains a list of @racket[font%]
 objects to avoid repeatedly creating fonts.

A global font list, @racket[the-font-list], is created automatically.


@defconstructor[()]{

Creates an empty font list.

}

@defmethod*[([(find-or-create-font [size (real-in 0.0 1024.0)]
                                   [family (or/c 'default 'decorative 'roman 'script 
                                                 'swiss 'modern 'symbol 'system)]
                                   [style (or/c 'normal 'italic 'slant)]
                                   [weight (or/c 'normal 'bold 'light)]
                                   [underline? any/c #f]
                                   [smoothing (or/c 'default 'partly-smoothed 'smoothed 'unsmoothed) 'default]
                                   [size-in-pixels? any/c #f]
                                   [hinting (or/c 'aligned 'unaligned) 'aligned])
              (is-a?/c font%)]
             [(find-or-create-font [size (real-in 0.0 1024.0)]
                                   [face string?]
                                   [family (or/c 'default 'decorative 'roman 'script
                                                 'swiss 'modern 'symbol 'system)]
                                   [style (or/c 'normal 'italic 'slant)]
                                   [weight (or/c 'normal 'bold 'light)]
                                   [underline any/c #f]
                                   [smoothing (or/c 'default 'partly-smoothed 'smoothed 'unsmoothed) 'default]
                                   [size-in-pixels? any/c #f]
                                   [hinting (or/c 'aligned 'unaligned) 'aligned])
              (is-a?/c font%)])]{

Finds an existing font in the list or creates a new one (that is
 automatically added to the list). The arguments are the same as for
 creating a @racket[font%] instance.

@history[#:changed "1.4" @elem{Changed @racket[size] to allow non-integer and zero values.}]}}
