NEWS


BFHtheme 0.5.6

Interne ændringer

BFHtheme 0.5.5

Nye features

BFHtheme 0.5.2

Interne ændringer

BFHtheme 0.5.1

Breaking Changes

Bug Fixes

Internal Changes

BFHtheme 0.5.0

Breaking Changes

New Features

Bug Fixes

Documentation

BFHtheme 0.3.0

Breaking Changes 🚨

This release simplifies the add_bfh_logo() function to enforce consistent, brand-compliant logo placement across all visualizations.

Logo Placement Simplified

The add_bfh_logo() function now uses fixed positioning to ensure consistent branding:

Removed parameters:

New default behavior:

Migration:

Before (v0.2.0):

p <- ggplot(data, aes(x, y)) + geom_point() + theme_bfh()

# Custom positioning and sizing
add_bfh_logo(p, get_bfh_logo(), position = "topright", size = 0.15, padding = 0.02)

After (v0.3.0):

p <- ggplot(data, aes(x, y)) + geom_point() + theme_bfh()

# Simplified API - fixed positioning
add_bfh_logo(p)  # Uses default bfh_mark.png, fixed position

# With custom logo
add_bfh_logo(p, logo_path = "/path/to/custom_logo.png")

# With transparency
add_bfh_logo(p, alpha = 0.7)

Updated Function Signature

# OLD
add_bfh_logo(plot, logo_path, position = "bottomright",
             size = 0.1, alpha = 1, padding = 0.02)

# NEW
add_bfh_logo(plot, logo_path = NULL, alpha = 1)

Improvements


BFHtheme 0.2.0

Breaking Changes 🚨

This release simplifies the public API by removing redundant convenience wrappers, theme variants, and making low-level configuration functions internal. The package now exports 33 core functions (down from 49), making it easier to learn and maintain.

Functions Removed

Seven functions have been completely removed:

add_logo() → Use add_bfh_logo() + get_bfh_logo()

Before (v0.1.0):

p <- ggplot(data, aes(x, y)) + geom_point() + theme_bfh()
add_logo(p, position = "topright", size = 0.15)

After (v0.2.0):

p <- ggplot(data, aes(x, y)) + geom_point() + theme_bfh()
add_bfh_logo(p, get_bfh_logo(), position = "topright", size = 0.15)

apply_bfh_theme() → Use theme_bfh() + scales directly

Before (v0.1.0):

ggplot(data, aes(x, y, color = group)) +
  geom_point() +
  apply_bfh_theme(add_color_scale = TRUE)

After (v0.2.0):

ggplot(data, aes(x, y, color = group)) +
  geom_point() +
  theme_bfh() +
  scale_color_bfh()

add_bfh_color_bar() → Use ggplot2 annotations

Before (v0.1.0):

p + add_bfh_color_bar(position = "top")

After (v0.2.0):

# Use standard ggplot2 annotate for custom styling
p + annotate("rect",
             xmin = -Inf, xmax = Inf,
             ymin = Inf, ymax = Inf * 0.98,
             fill = bfh_cols("hospital_primary"),
             alpha = 0.1)

Theme Variants Removed → Use theme_bfh() only

Removed functions:

Before (v0.1.0):

ggplot(data, aes(x, y)) +
  geom_point() +
  theme_bfh_dark()  # or theme_bfh_minimal(), theme_bfh_print(), etc.

After (v0.2.0):

# Use theme_bfh() and customize as needed
ggplot(data, aes(x, y)) +
  geom_point() +
  theme_bfh() +
  theme(
    # Customize for specific use cases
    plot.background = element_rect(fill = "#1a1a1a")  # for dark theme
  )

Functions Made Internal

The following functions are now internal (unexported). Advanced users can still access them via BFHtheme:::function_name(), but they are no longer part of the official public API:

Cache management:

Font configuration (one-time setup):

Migration for internal functions:

Most users never needed these functions. If you do need them, access via ::::

# OLD (v0.1.0)
check_bfh_fonts()
clear_bfh_font_cache()

# NEW (v0.2.0)
BFHtheme:::check_bfh_fonts()
BFHtheme:::clear_bfh_font_cache()

Improvements

Bug Fixes

Documentation


BFHtheme 0.1.0

Initial release with core theming functionality.

Features