-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.rmd
56 lines (49 loc) · 1.22 KB
/
readme.rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(echo = TRUE,
dpi = 300,
warning = FALSE,
message = FALSE,
out.width = "100%",
out.height = "100%",
fig.align = 'center',
comment = "##")
```
```r
library(showtext)
showtext_auto(enable = TRUE)
font_add("ShineTypewriter", regular = "./ShineTypewriter-lgwzd.ttf")
library(magick)
library(hexSticker)
sticker(
subplot = './bg.png',
s_x = 0.96,
s_y = 0.95,
s_width = 2,
s_height = 2,
package = "sdsfun",
p_family = "ShineTypewriter",
p_size = 25,
p_color = ggplot2::alpha("#ffffff",.85),
p_x = 1.05,
p_y = 1,
dpi = 300,
asp = 1,
h_size = 1.75,
h_color = ggplot2::alpha("#d8c8ab",.75),
h_fill = ggplot2::alpha('#ffffff',0),
white_around_sticker = T,
url = "https://stscl.github.io/sdsfun",
u_color = "white",
u_size = 5,
filename = "sdsfun_logo1.png"
)
# finally make sdsfun_logo1.png background transparent
# https://uutool.cn/img-matting/
image_read('./sdsfun_logo1.png') |>
image_resize("240x278")|>
image_write('./sdsfun_logo.png')
```
![](./sdsfun_logo.png)