-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from TxWRI/documentation
Documentation
- Loading branch information
Showing
21 changed files
with
284 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# twriTemplates 0.2.0 | ||
|
||
* Initial package release. | ||
* Includes two rmarkdown templates for word and pdf document creation. | ||
* Includes two ggplot2 themes for print and presentation graphics. | ||
* Unit testing handled by testthat | ||
* Github actions used for r-cmd-check | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,47 @@ | ||
init_fonts <- function(fonts) { | ||
MoristonRegular <- fonts[fonts$name == "MoristonPersonal-Medium",]$path | ||
MoristonSemibold <- fonts[fonts$name == "MoristonPersonal-Semibold",]$path | ||
systemfonts::register_font("Moriston_personal", | ||
plain = MoristonRegular, | ||
bold = MoristonSemibold, | ||
features = systemfonts::font_feature(letters = , | ||
numbers = c("lining","tabular"))) | ||
|
||
## make sure fonts are installed | ||
if(length(fonts[fonts$family == "Moriston Personal",]$path) == 0){ | ||
packageStartupMessage("Moriston Personal font was not found, | ||
please install from https://agrilife.tamu.edu/wp-content/uploads/2021/03/AgriFonts.zip") | ||
} else { | ||
## register moriston fonts with systemfonts because styles are not defined by default | ||
MoristonRegular <- fonts[fonts$name == "MoristonPersonal-Medium",]$path | ||
MoristonSemibold <- fonts[fonts$name == "MoristonPersonal-Semibold",]$path | ||
systemfonts::register_font("Moriston_TWRI", | ||
plain = MoristonRegular, | ||
bold = MoristonSemibold, | ||
features = systemfonts::font_feature(letters = , | ||
numbers = c("lining"))) | ||
} | ||
|
||
if(length(fonts[fonts$family == "Oswald",]$path) == 0){ | ||
packageStartupMessage("Oswald font was not found, | ||
please install from https://agrilife.tamu.edu/wp-content/uploads/2021/03/AgriFonts.zip") | ||
} else { | ||
Oswald_Bold <- fonts[fonts$name == "Oswald-SemiBold",]$path | ||
Oswald_Normal <- fonts[fonts$name == "Oswald-Light",]$path | ||
systemfonts::register_font("Oswald_TWRI", | ||
plain = Oswald_Normal, | ||
bold = Oswald_Bold, | ||
) | ||
} | ||
|
||
|
||
if(length(fonts[fonts$family == "Minion Pro",]$path) == 0){ | ||
packageStartupMessage("Minion Pro font was not found, | ||
please install from https://agrilife.tamu.edu/wp-content/uploads/2021/03/AgriFonts.zip") | ||
} | ||
## don't need to register minion pro | ||
|
||
## register cabin | ||
OpenSansCondensed <- fs::path_package("twriTemplates", "fonts", "OpenSansCondensed", "OpenSansCondensed-Light.ttf") | ||
OpenSansCondensed_Bold <- fs::path_package("twriTemplates", "fonts", "OpenSansCondensed", "OpenSansCondensed-Bold.ttf") | ||
OpenSansCondensed_Italic <- fs::path_package("twriTemplates", "fonts", "OpenSansCondensed", "OpenSansCondensed-LightItalic.ttf") | ||
systemfonts::register_font("OpenSansCondensed_TWRI", | ||
plain = OpenSansCondensed, | ||
bold = OpenSansCondensed_Bold, | ||
italic = OpenSansCondensed_Italic) | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.