feat: bump title sizes, add font_scale to logo functions, ship SVGs
R-CMD-check / R CMD check (push) Successful in 3m36s
R-CMD-check / R CMD check (push) Successful in 3m36s
- Change rel_large default from 16/14 to 20/14 (~1.43x) to match the Civilytics editorial design system. Subtitle now renders at 1.0x base instead of 0.86x. - Switch axis.text to rel() sizing so all text elements cascade from the root font_size, enabling uniform scaling. - Add font_scale parameter (default 1.1) to civilytics_logo(), add_logo(), and add_logo_ga() — inflates text by ~10% before arrangeGrob composition to compensate for viewport shrinkage. - Ship SVG logo variants (mark, wordmark, pulse) in inst/img/ for Quarto/HTML templates. - Add "Maintaining brand assets" section to README documenting inst/img/ file inventory and update workflow. - Document full font size hierarchy in theme_civilytics() roxygen.
This commit is contained in:
+13
-1
@@ -8,7 +8,8 @@ civilytics_logo(
|
||||
plot,
|
||||
type = c("wordmark", "mark"),
|
||||
variant = c("light", "dark"),
|
||||
margin_param = NULL
|
||||
margin_param = NULL,
|
||||
font_scale = 1.1
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
@@ -22,6 +23,10 @@ civilytics_logo(
|
||||
|
||||
\item{margin_param}{Numeric or `NULL`. Manual margin adjustment passed to
|
||||
[add_logo()].}
|
||||
|
||||
\item{font_scale}{Numeric. Inflate text sizes by this factor to compensate
|
||||
for viewport shrinkage when composing with [gridExtra::arrangeGrob()].
|
||||
Default `1.1` (~10 \% inflation). Set to `1` to disable.}
|
||||
}
|
||||
\value{
|
||||
A grob (from [gridExtra::arrangeGrob()]) ready to draw with
|
||||
@@ -59,5 +64,12 @@ library(ggplot2); library(grid)
|
||||
theme_civilytics_dark()) |>
|
||||
civilytics_logo(variant = "dark", type = "mark") |>
|
||||
grid.draw()
|
||||
|
||||
# Disable font inflation
|
||||
(ggplot(mpg, aes(displ, hwy)) +
|
||||
geom_point() +
|
||||
theme_civilytics()) |>
|
||||
civilytics_logo(font_scale = 1) |>
|
||||
grid.draw()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user