Skip to content

Commit

Permalink
fixed issue that I had with AirBnb fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
welch16 committed Mar 11, 2018
1 parent fe72769 commit 0c8d11b
Show file tree
Hide file tree
Showing 17 changed files with 314 additions and 88 deletions.
20 changes: 10 additions & 10 deletions R/theme_tech.R
Expand Up @@ -10,16 +10,16 @@
#' theme_tech(theme="etsy")

theme_tech <- function(theme="airbnb", tech_key = list(
# airbnb = list(
# family_title="Circular Air Bold"
# , family_text = "Circular Air Medium"
# , colour_title = "#F14000"
# , colour_text = "#535353"),
airbnb = list(
family_title="."
, family_text = "."
family_title="Circular Air Bold"
, family_text = "Circular Air Medium"
, colour_title = "#F14000"
, colour_text = "#535353"),
# airbnb = list(
# family_title="Arial"
# , family_text = "Arial"
# , colour_title = "#F14000"
# , colour_text = "#535353"),
facebook = list(
family_title="Facebook Letter Faces"
, family_text = "Facebook Letter Faces"
Expand All @@ -31,8 +31,8 @@ theme_tech <- function(theme="airbnb", tech_key = list(
, colour_title = "#dd4b39"
, colour_text = "black"),
etsy = list(
family_title="."
, family_text = "."
family_title="Georgia"
, family_text = "Georgia"
, colour_title = "#F14000"
, colour_text = "#535353"),
twitter = list(
Expand All @@ -42,7 +42,7 @@ theme_tech <- function(theme="airbnb", tech_key = list(
, colour_text = "black"),
X23andme = list(
family_title = "Helvetica Neue Bold"
, family_text = "."
, family_text = "Helvetica"
, colour_title = "#7BC143"
, colour_text = "#DA1963"
)
Expand Down
311 changes: 259 additions & 52 deletions README.html

Large diffs are not rendered by default.

51 changes: 35 additions & 16 deletions README.md
@@ -1,4 +1,11 @@
# ggplot2 tech themes, scales, and geoms
---
title: "ggplot2 tech themes, scales, and geoms"
output:
html_document:
fig_height: 5
fig_width: 10
keep_md: yes
---



Expand Down Expand Up @@ -33,8 +40,6 @@ d + theme_tech(theme="airbnb") +
subtitle="now with subtitles for ggplot2 >= 2.1.0")
```

![](README_files/figure-html/unnamed-chunk-3-1.png)


```r
d + theme_airbnb_fancy() +
Expand All @@ -43,8 +48,6 @@ d + theme_airbnb_fancy() +
subtitle="now with subtitles for ggplot2 >= 2.1.0")
```

![](README_files/figure-html/unnamed-chunk-4-1.png)




Expand All @@ -55,7 +58,7 @@ d + theme_tech(theme="etsy") +
subtitle="now with subtitles for ggplot2 >= 2.1.0")
```

![](README_files/figure-html/unnamed-chunk-5-1.png)
![](README_files/figure-html/unnamed-chunk-5-1.png)<!-- -->



Expand All @@ -67,7 +70,7 @@ d + theme_tech(theme="facebook") +
subtitle="now with subtitles for ggplot2 >= 2.1.0")
```

![](README_files/figure-html/unnamed-chunk-6-1.png)
![](README_files/figure-html/unnamed-chunk-6-1.png)<!-- -->



Expand All @@ -78,7 +81,7 @@ d + theme_tech(theme="google") +
subtitle="now with subtitles for ggplot2 >= 2.1.0")
```

![](README_files/figure-html/unnamed-chunk-7-1.png)
![](README_files/figure-html/unnamed-chunk-7-1.png)<!-- -->



Expand All @@ -89,9 +92,17 @@ d + theme_tech(theme="twitter") +
subtitle="now with subtitles for ggplot2 >= 2.1.0")
```

![](README_files/figure-html/unnamed-chunk-8-1.png)
![](README_files/figure-html/unnamed-chunk-8-1.png)<!-- -->


```r
d + theme_tech(theme="X23andme") +
scale_fill_tech(theme="X23andme") +
labs(title="23andme theme",
subtitle="now with subtitles for ggplot2 >= 2.1.0")
```

![](README_files/figure-html/unnamed-chunk-9-1.png)<!-- -->

Tech geoms, inspired by [emoGG](https://github.com/dill/emoGG).

Expand All @@ -110,7 +121,7 @@ ggplot(aes(x,y), data=d2) +
ggtitle("Airbnb geom")
```

![](README_files/figure-html/unnamed-chunk-10-1.png)
![](README_files/figure-html/unnamed-chunk-11-1.png)<!-- -->



Expand All @@ -121,7 +132,7 @@ ggplot(aes(x,y), data=d2) +
ggtitle("Etsy geom")
```

![](README_files/figure-html/unnamed-chunk-11-1.png)
![](README_files/figure-html/unnamed-chunk-12-1.png)<!-- -->


```r
Expand All @@ -131,7 +142,7 @@ ggplot(aes(x,y), data=d2) +
ggtitle("Facebook geom")
```

![](README_files/figure-html/unnamed-chunk-12-1.png)
![](README_files/figure-html/unnamed-chunk-13-1.png)<!-- -->



Expand All @@ -142,7 +153,7 @@ ggplot(aes(x,y), data=d2) +
ggtitle("Google geom")
```

![](README_files/figure-html/unnamed-chunk-13-1.png)
![](README_files/figure-html/unnamed-chunk-14-1.png)<!-- -->



Expand All @@ -153,9 +164,17 @@ ggplot(aes(x,y), data=d2) +
ggtitle("Twitter geom")
```

![](README_files/figure-html/unnamed-chunk-14-1.png)
![](README_files/figure-html/unnamed-chunk-15-1.png)<!-- -->


```r
ggplot(aes(x,y), data=d2) +
geom_tech(size=0.15, theme="X23andme") +
theme_tech("X23andme") +
ggtitle("23andme geom")
```

![](README_files/figure-html/unnamed-chunk-16-1.png)<!-- -->

### Install fonts:

Expand All @@ -179,9 +198,9 @@ font_import(pattern = 'product-sans.ttf', prompt=FALSE)


## Airbnb
download.file("https://github.com/ricardo-bion/ggtech/blob/master/Circular%20Air-Medium%203.46.45%20PM.ttf", "/Library/Fonts/Circular Air-Medium 3.46.45 PM.ttf", method="curl")
download.file("https://dl.dropboxusercontent.com/u/2364714/airbnb_ttf_fonts/Circular%20Air-Medium%203.46.45%20PM.ttf", "/Library/Fonts/Circular Air-Medium 3.46.45 PM.ttf", method="curl")

download.file("https://github.com/ricardo-bion/ggtech/blob/master/Circular%20Air-Bold%203.46.45%20PM.ttf", "/Library/Fonts/Circular Air-Bold 3.46.45 PM.ttf", method="curl")
download.file("https://dl.dropboxusercontent.com/u/2364714/airbnb_ttf_fonts/Circular%20Air-Bold%203.46.45%20PM.ttf", "/Library/Fonts/Circular Air-Bold 3.46.45 PM.ttf", method="curl")

font_import(pattern = 'Circular', prompt=FALSE)

Expand Down
Binary file modified README_files/figure-html/unnamed-chunk-11-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-12-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-13-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-14-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README_files/figure-html/unnamed-chunk-15-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README_files/figure-html/unnamed-chunk-16-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-3-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-4-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-5-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-6-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-7-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_files/figure-html/unnamed-chunk-8-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README_files/figure-html/unnamed-chunk-9-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions man/theme_tech.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0c8d11b

Please sign in to comment.