| 1 | # Remote font importing basically works |
| 2 | |
| 3 | Code |
| 4 | tagz$html |
| 5 | Output |
| 6 | <style>body { |
| 7 | font-family: foo; |
| 8 | } |
| 9 | </style> |
| 10 | |
| 11 | --- |
| 12 | |
| 13 | Code |
| 14 | tagz$dependencies[[1]]$head |
| 15 | Output |
| 16 | [1] "<link href=\"bar\" rel=\"stylesheet\"/>" |
| 17 | |
| 18 | --- |
| 19 | |
| 20 | Code |
| 21 | tagz$html |
| 22 | Output |
| 23 | <style>body { |
| 24 | font-family: foo; |
| 25 | } |
| 26 | </style> |
| 27 | |
| 28 | --- |
| 29 | |
| 30 | Code |
| 31 | tagz$dependencies[[1]]$head |
| 32 | Output |
| 33 | [1] "<link href=\"bar\" rel=\"stylesheet\"/>" |
| 34 | |
| 35 | --- |
| 36 | |
| 37 | Code |
| 38 | tagz$html |
| 39 | Output |
| 40 | <style>body { |
| 41 | font-family: foo; |
| 42 | } |
| 43 | </style> |
| 44 | |
| 45 | --- |
| 46 | |
| 47 | Code |
| 48 | tagz$dependencies[[1]]$head |
| 49 | Output |
| 50 | NULL |
| 51 | |
| 52 | --- |
| 53 | |
| 54 | Code |
| 55 | tagz$html |
| 56 | Output |
| 57 | <style>body { |
| 58 | font-family: foo; |
| 59 | } |
| 60 | </style> |
| 61 | |
| 62 | --- |
| 63 | |
| 64 | Code |
| 65 | tagz$dependencies[[1]]$head |
| 66 | Output |
| 67 | NULL |
| 68 | |
| 69 | --- |
| 70 | |
| 71 | Code |
| 72 | tagz$html |
| 73 | Output |
| 74 | <style>body { |
| 75 | font-family: Pacifico; |
| 76 | } |
| 77 | </style> |
| 78 | |
| 79 | --- |
| 80 | |
| 81 | Code |
| 82 | tagz$dependencies[[1]]$head |
| 83 | Output |
| 84 | [1] "<link href=\"https://fonts.googleapis.com/css2?family=Pacifico&display=swap\" rel=\"stylesheet\"/>" |
| 85 | |
| 86 | --- |
| 87 | |
| 88 | Code |
| 89 | tagz$html |
| 90 | Output |
| 91 | <style>body { |
| 92 | font-family: Pacifico; |
| 93 | } |
| 94 | </style> |
| 95 | |
| 96 | --- |
| 97 | |
| 98 | Code |
| 99 | tagz$dependencies[[1]]$head |
| 100 | Output |
| 101 | [1] "<link href=\"https://fonts.googleapis.com/css2?family=Pacifico&display=auto\" rel=\"stylesheet\"/>" |
| 102 | |
| 103 | --- |
| 104 | |
| 105 | Code |
| 106 | tagz$html |
| 107 | Output |
| 108 | <style>body { |
| 109 | font-family: "Crimson Pro"; |
| 110 | } |
| 111 | </style> |
| 112 | |
| 113 | --- |
| 114 | |
| 115 | Code |
| 116 | tagz$dependencies[[1]]$head |
| 117 | Output |
| 118 | [1] "<link href=\"https://fonts.googleapis.com/css2?family=Crimson%20Pro:[email protected]&display=swap\" rel=\"stylesheet\"/>" |
| 119 | |
| 120 | --- |
| 121 | |
| 122 | Code |
| 123 | tagz$html |
| 124 | Output |
| 125 | <style>body { |
| 126 | font-family: "Crimson Pro"; |
| 127 | } |
| 128 | </style> |
| 129 | |
| 130 | --- |
| 131 | |
| 132 | Code |
| 133 | tagz$dependencies[[1]]$head |
| 134 | Output |
| 135 | [1] "<link href=\"https://fonts.googleapis.com/css2?family=Crimson%20Pro:ital,wght@1,200..900&display=swap\" rel=\"stylesheet\"/>" |
| 136 | |
| 137 | --- |
| 138 | |
| 139 | Code |
| 140 | tagz$html |
| 141 | Output |
| 142 | <style>body { |
| 143 | font-family: "Crimson Pro"; |
| 144 | } |
| 145 | </style> |
| 146 | |
| 147 | --- |
| 148 | |
| 149 | Code |
| 150 | tagz$dependencies[[1]]$head |
| 151 | Output |
| 152 | [1] "<link href=\"https://fonts.googleapis.com/css2?family=Crimson%20Pro:ital,wght@1,400;1,500&display=swap\" rel=\"stylesheet\"/>" |
| 153 | |
| 154 | --- |
| 155 | |
| 156 | Code |
| 157 | tagz$html |
| 158 | Output |
| 159 | <style>body { |
| 160 | font-family: "Crimson Pro"; |
| 161 | } |
| 162 | </style> |
| 163 | |
| 164 | --- |
| 165 | |
| 166 | Code |
| 167 | tagz$dependencies[[1]]$head |
| 168 | Output |
| 169 | [1] "<link href=\"https://fonts.googleapis.com/css2?family=Crimson%20Pro:ital,wght@0,400;0,500;1,400;1,500&display=swap\" rel=\"stylesheet\"/>" |
| 170 | |
| 171 | --- |
| 172 | |
| 173 | Code |
| 174 | tagz$html |
| 175 | Output |
| 176 | <style>body { |
| 177 | font-family: "Crimson Pro"; |
| 178 | } |
| 179 | </style> |
| 180 | |
| 181 | --- |
| 182 | |
| 183 | Code |
| 184 | tagz$dependencies[[1]]$head |
| 185 | Output |
| 186 | [1] "<link href=\"https://fonts.googleapis.com/css2?family=Crimson%20Pro:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap\" rel=\"stylesheet\"/>" |
| 187 | |
| 188 | # font_google(local = TRUE) basically works |
| 189 | |
| 190 | Code |
| 191 | tagz <- renderTags(tags$style(sass(scss))) |
| 192 | Message |
| 193 | Downloading google font Pacifico to local cache (<temp-cache>) |
| 194 | |
| 195 | --- |
| 196 | |
| 197 | Code |
| 198 | tagz <- renderTags(tags$style(sass(scss))) |
| 199 | |
| 200 | --- |
| 201 | |
| 202 | Code |
| 203 | tagz$html |
| 204 | Output |
| 205 | <style>body { |
| 206 | font-family: Pacifico; |
| 207 | } |
| 208 | </style> |
| 209 | |
| 210 | # Special named args in font_collection |
| 211 | |
| 212 | Code |
| 213 | tagz$html |
| 214 | Output |
| 215 | <style>body { |
| 216 | font-family: foo; |
| 217 | } |
| 218 | </style> |
| 219 | |
| 220 | --- |
| 221 | |
| 222 | Code |
| 223 | tagz$dependencies[[1]]$head |
| 224 | Output |
| 225 | [1] "<link href=\"https://fonts.googleapis.com/css2?family=foo&display=swap\" rel=\"stylesheet\"/>" |
| 226 | |
| 227 | --- |
| 228 | |
| 229 | Code |
| 230 | tagz$html |
| 231 | Output |
| 232 | <style>body { |
| 233 | font-family: foo; |
| 234 | } |
| 235 | </style> |
| 236 | |
| 237 | --- |
| 238 | |
| 239 | Code |
| 240 | tagz$dependencies[[1]]$head |
| 241 | Output |
| 242 | [1] "<link href=\"bar\" rel=\"stylesheet\"/>" |
| 243 | |
| 244 | --- |
| 245 | |
| 246 | Code |
| 247 | tagz$html |
| 248 | Output |
| 249 | <style>body { |
| 250 | font-family: foo; |
| 251 | } |
| 252 | </style> |
| 253 | |
| 254 | --- |
| 255 | |
| 256 | Code |
| 257 | tagz$dependencies[[1]]$head |
| 258 | Output |
| 259 | [1] "<link href=\"https://fonts.googleapis.com/css2?family=foo&display=swap\" rel=\"stylesheet\"/>" |
| 260 |