Metropolitan-Council / councilR

A curated collection of commonly used templates, color palettes, functions, and more!
Other
6 stars 1 forks source link

council_theme: Error in council_theme() : object 'use_fonts' not found #1

Closed ashleyasmus closed 4 years ago

ashleyasmus commented 4 years ago

I receive the message "Error in council_theme() : object 'use_fonts' not found" when trying to use the council_theme.

I think this might be because use_fonts is not specified in the function call:

function (use_showtext = FALSE, size_header = 22, size_axis_title = 14, 
    size_legend_title = 14, size_axis_text = 11, size_legend_text = 10, 
    size_caption = 8, size_margin = 10) 
{
    if (use_fonts == TRUE) {
...

Related: I see this in the section "if use_fonts == TRUE":

files <- sysfonts::font_files()
sysfonts::font_add("HelveticaNeueLT Std Cn", "HelveticaNeueLTStd-Cn.otf")
sysfonts::font_add("HelveticaNeueLT Std Lt", "HelveticaNeueLTStd-Lt.otf")
sysfonts::font_add("Arial Narrow", "ARIALN.TTF")

I think that this font HelveticaNeueLT Std Cn does not exist, and only comes in Lt/Med/UltLt. This is what I have in my font_files():

 

eroten commented 4 years ago

Fixed in 169a9ca59d702d883809fdb1d43c839fff9e6dad