.onLoad calls civilytics_load_fonts(), which calls showtext::showtext_auto(). That makes every graphics device draw text through showtext, which assumes 96 dpi. On a device at 300 dpi (ragg, res = 300) text renders at about a third of its requested size. Correct rendering with ragg and systemfonts then becomes opt-out: callers have to run showtext_auto(FALSE). This is what hid the logo layout bugs in #20.
Options:
Stop calling showtext_auto() on load. Attaching the package changes nothing, and civilytics_load_fonts() turns it on when asked.
Keep it, and document the ragg opt-out in the README and the civilytics_load_fonts() help page.
Turn it on only for devices that need it.
Cost to weigh: option 1 changes how existing reports render on non-ragg devices, which is a breaking change for published reports. Needs a decision before anyone writes code, and a NEWS.md entry whichever way it goes.
`.onLoad` calls `civilytics_load_fonts()`, which calls `showtext::showtext_auto()`. That makes every graphics device draw text through showtext, which assumes 96 dpi. On a device at 300 dpi (ragg, `res = 300`) text renders at about a third of its requested size. Correct rendering with ragg and systemfonts then becomes opt-out: callers have to run `showtext_auto(FALSE)`. This is what hid the logo layout bugs in #20.
**Options:**
1. Stop calling `showtext_auto()` on load. Attaching the package changes nothing, and `civilytics_load_fonts()` turns it on when asked.
2. Keep it, and document the ragg opt-out in the README and the `civilytics_load_fonts()` help page.
3. Turn it on only for devices that need it.
**Cost to weigh:** option 1 changes how existing reports render on non-ragg devices, which is a breaking change for published reports. Needs a decision before anyone writes code, and a `NEWS.md` entry whichever way it goes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
.onLoadcallscivilytics_load_fonts(), which callsshowtext::showtext_auto(). That makes every graphics device draw text through showtext, which assumes 96 dpi. On a device at 300 dpi (ragg,res = 300) text renders at about a third of its requested size. Correct rendering with ragg and systemfonts then becomes opt-out: callers have to runshowtext_auto(FALSE). This is what hid the logo layout bugs in #20.Options:
showtext_auto()on load. Attaching the package changes nothing, andcivilytics_load_fonts()turns it on when asked.civilytics_load_fonts()help page.Cost to weigh: option 1 changes how existing reports render on non-ragg devices, which is a breaking change for published reports. Needs a decision before anyone writes code, and a
NEWS.mdentry whichever way it goes.jared referenced this issue2026-10-15 15:34:35 -04:00