32 lines
1022 B
R
32 lines
1022 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/fonts.R
|
|
\name{civilytics_load_fonts}
|
|
\alias{civilytics_load_fonts}
|
|
\title{Load Civilytics brand fonts}
|
|
\usage{
|
|
civilytics_load_fonts(force = FALSE)
|
|
}
|
|
\arguments{
|
|
\item{force}{Logical. If \code{TRUE}, reload fonts even if they were already
|
|
loaded in this session. Default \code{FALSE}.}
|
|
}
|
|
\value{
|
|
Invisibly returns \code{TRUE} if fonts were loaded, \code{FALSE} if skipped
|
|
(already loaded and \code{force = FALSE}).
|
|
}
|
|
\description{
|
|
Downloads Inter, Libre Franklin, Source Serif 4 and JetBrains Mono from
|
|
Google Fonts via \code{sysfonts::font_add_google()}, then calls
|
|
\code{showtext::showtext_auto()} so that all graphics devices render text with
|
|
those fonts. This is called automatically when the package loads; use this
|
|
function to retry if the initial load failed (e.g., the machine was offline
|
|
at load time).
|
|
|
|
Subsequent calls within the same session are no-ops unless \code{force = TRUE}.
|
|
}
|
|
\examples{
|
|
\dontrun{
|
|
civilytics_load_fonts()
|
|
}
|
|
}
|