While it is often advisable to visit the webpage for a font repository when
looking for a font, in order to see examples etc, search_web_fonts()
provide a quick lookup based on family name in the repositories supported by
systemfonts (currently Google Fonts and
Font Squirrel). The lookup is based on fuzzy
matching provided by utils::adist()
and the matching parameters can be
controlled through ...
Arguments
- family
The font family name to look for
- n_max
The maximum number of matches to return
- ...
Arguments passed on to
utils::adist
costs
a numeric vector or list with names partially matching insertions, deletions and substitutions giving the respective costs for computing the Levenshtein distance, or
NULL
(default) indicating using unit cost for all three possible transformations.counts
a logical indicating whether to optionally return the transformation counts (numbers of insertions, deletions and substitutions) as the
"counts"
attribute of the return value.fixed
a logical. If
TRUE
(default), thex
elements are used as string literals. Otherwise, they are taken as regular expressions andpartial = TRUE
is implied (corresponding to the approximate string distance used byagrep
withfixed = FALSE
).partial
a logical indicating whether the transformed
x
elements must exactly match the completey
elements, or only substrings of these. The latter corresponds to the approximate string distance used byagrep
(by default).ignore.case
a logical. If
TRUE
, case is ignored for computing the distances.useBytes
a logical. If
TRUE
distance computations are done byte-by-byte rather than character-by-character.