Skip to content

Commit 82ba0b5

Browse files
authored
Browser rendering custom fonts docs (#26993)
* Add changelog entry for Bot Management allowlist guidance * Add cross-references to custom fonts documentation in Browser Rendering * Delete src/content/release-notes/browser-rendering.yaml * Restore browser-rendering.yaml changelog
1 parent 6a4e6f8 commit 82ba0b5

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/content/docs/browser-rendering/faq.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ No. Browser Rendering requests originate from Cloudflare's global network and yo
5757

5858
There is no fixed limit on the number of requests per browser session. A single browser can handle multiple requests as long as it stays within available compute and memory limits.
5959

60+
### Can I use custom fonts in Browser Rendering?
61+
62+
Yes. If your webpage or PDF requires a font that is not pre-installed, you can load custom fonts at render time using `addStyleTag`. This works with both the [REST API](/browser-rendering/rest-api/) and [Workers Bindings](/browser-rendering/workers-bindings/). For instructions and examples, refer to [Use your own custom font](/browser-rendering/reference/supported-fonts/#use-your-own-custom-font).
63+
6064
<Render
6165
file="manage-concurrency-faq"
6266
product="browser-rendering"

src/content/docs/browser-rendering/how-to/pdf-generation.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,4 +269,12 @@ With your script now running, you can pass in a `?name` parameter to the local U
269269

270270
---
271271

272+
## Custom fonts
273+
274+
If your PDF requires a specific font that is not pre-installed in the Browser Rendering environment, you can load custom fonts using `addStyleTag`. This allows you to inject fonts from a CDN or embed them as Base64 strings before generating your PDF.
275+
276+
For detailed instructions and examples, refer to [Use your own custom font](/browser-rendering/reference/supported-fonts/#use-your-own-custom-font).
277+
278+
---
279+
272280
Dynamically generating PDF documents solves a number of common use-cases, from invoicing customers to archiving documents to creating dynamic certificates (as seen in the simple example here).

src/content/docs/browser-rendering/rest-api/pdf-endpoint.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
197197
--output "dynamic-header-footer.pdf"
198198
```
199199

200+
### Use custom fonts
201+
202+
If your PDF requires a font that is not pre-installed in the Browser Rendering environment, you can load custom fonts using the `addStyleTag` parameter. For instructions and examples, refer to [Use your own custom font](/browser-rendering/reference/supported-fonts/#rest-api).
203+
200204
<Render
201205
file="setting-custom-user-agent"
202206
product="browser-rendering"

0 commit comments

Comments
 (0)