Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →To make custom fonts render reliably in PDFs on Heroku, ensure the font files survive deployment, install or otherwise expose them where the deployed wkhtmltopdf process can use them, and make the PDF’s HTML and CSS reference assets that process can resolve. Then generate and inspect a PDF in the deployed environment. A font path that works on your computer—or the mere presence of a font file in the app—does not prove that the deployed renderer can use it.
How the font reaches the PDF
wicked_pdf is a Rails integration around the separate wkhtmltopdf executable. The Rails app prepares the HTML and invokes that executable; the executable renders the document. This distinction matters: a font that Rails can serve or a path that exists in a development environment may not be available to the deployed renderer in the same way.
Think of the deployment as three independent checks:
- The font is deployed. It is included in the app or added by a compatible build step, and is not excluded from the slug.
- The renderer can resolve it. The font installation or the HTML/CSS asset URL is accessible to the running
wkhtmltopdfprocess. - The output uses it. The generated PDF contains the expected typeface and glyphs rather than a substitute.
These checks help isolate a common false positive: successful Rails deployment does not establish that a PDF will use the intended font.
#1 Best Overall
Check the deployed stack and renderer first
Before changing font paths, identify the Heroku stack used by the app and the actual wkhtmltopdf binary and version available in its runtime. The binary must be installed and available to wicked_pdf. Buildpack examples are not universal: compatibility depends on the stack, build system, and binary distribution.
- Inspect the app’s configured Heroku stack and buildpack order.
- Confirm how
wkhtmltopdfis installed and which executable the app invokes. - Check the
wicked_pdfconfiguration for its executable path. Use the path appropriate to the deployed binary rather than assuming a local development path is valid in production. - Choose a font installation approach only after confirming it is compatible with that stack and buildpack composition.
The wicked_pdf project documentation covers the wrapper’s executable requirement, configuration, and asset handling. Heroku’s Slug Compiler documentation explains slug contents and inspection; its Managing Buildpacks documentation explains buildpack configuration and the support boundary for third-party buildpacks.
Choose how to provide the font
Include font assets with the app
For a small, controlled set of fonts, keeping the files with the application can make the dependency explicit. Put the font files in a deliberate app location, ensure the deployment includes them, and reference them in the PDF stylesheet using a URL or path the external renderer can resolve. Do not assume that a browser-oriented relative asset path will work when the HTML is handed to a separate process.
Heroku’s slug packaging rules are important here. Files excluded by .slugignore are removed before buildpacks run. Check that neither the font files nor any stylesheet or generated asset they depend on is filtered out. If needed, inspect the deployed slug or runtime to confirm the expected files are present.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Install fonts through a buildpack
A font buildpack may install fonts into the environment used by the renderer, but it is a third-party component unless otherwise stated. Heroku says third-party buildpacks are unsupported by Heroku; you are responsible for checking their source, stack compatibility, and ongoing maintenance. Font buildpack listings are examples, not a general Heroku recipe.
The same caution applies to wkhtmltopdf buildpacks. Heroku Elements has listings for notvad/wkhtmltopdf-buildpack, RohanDebroy/heroku-buildpack-wkhtmltopdf, and the example waggl/heroku-buildpack-system-fonts system-font buildpack. Treat their stated versions and stack support as specific to those projects and listings; verify that they match your app before deployment.
Rank #3
Compare the approaches against your deployment
| Check | App-managed font files | Font buildpack |
|---|---|---|
| Where font is provided | In the deployed app, referenced by a renderer-resolvable asset path or URL. | By a build step intended to expose fonts to the runtime. |
| Main deployment risk | Slug filtering or incorrect asset references leave the renderer without the files. | The buildpack may not support the current stack, or may not install fonts where the binary expects them. |
| Maintenance | The app team manages the font files and deployment layout. | The app team must evaluate and maintain the third-party buildpack; Heroku does not support third-party buildpacks. |
| What must be verified | Files exist in the deployed app and the PDF HTML resolves them. | Build succeeds on the selected stack, fonts are available at runtime, and the PDF renderer uses them. |
Make the PDF HTML reference assets the renderer can reach
Review the HTML and CSS that wkhtmltopdf receives, not only how the same template appears in a normal browser. The renderer runs outside the Rails application process. A relative URL, development-only filesystem path, or asset URL requiring an unavailable session can fail even when the page works in Rails.
Use the asset helpers and configuration documented by wicked_pdf, and choose asset references suitable for the deployed process. Depending on the app, that may mean absolute asset references or accessible CDN resources. Confirm that the stylesheets themselves load as well as the font files: a correct font URL has no effect if the stylesheet containing its @font-face rule never reaches the renderer.
Free tools Windows power users keep installed
One-click scans. No signup required.
For each custom font, verify the CSS family name matches the family requested by the PDF styles, and that the declared font file corresponds to that face and weight. A mismatch can lead to fallback fonts that look plausible at a glance. If only some characters are wrong, check whether the chosen font includes those glyphs before treating it as a deployment failure.
Deploy and verify the actual PDF
- Confirm inclusion. Check
.slugignoreand the build inputs. Heroku packages app and build output into a slug; verify the font and relevant assets are not removed or omitted. - Confirm the runtime binary. Verify the installed
wkhtmltopdfexecutable and the path configured forwicked_pdfagree. - Render from the deployed app. Generate a representative PDF in the target Heroku environment rather than relying on a local render.
- Inspect the result. Look at distinctive letterforms and non-ASCII glyphs where relevant. Compare against an expected sample or inspect font information with your normal PDF tooling.
- Change one layer at a time. If the PDF falls back, separately test file presence, stylesheet delivery, font URL resolution, and the renderer’s font environment.
A successful build, a visible font file, or a valid Rails asset URL is only evidence for one layer. The generated PDF is the final check that the complete chain worked.
Troubleshooting font substitution on Heroku
The PDF uses a default-looking font
- Likely cause: the font file or its CSS was not available to
wkhtmltopdf, or the CSS requests a different family name. - Fix: inspect the HTML/CSS sent for PDF rendering, confirm the font file is in the deployed runtime or reachable at its referenced URL, and match the CSS family and weight to the font.
The file exists locally but not after deployment
- Likely cause: the file was not included in the app inputs or was excluded by
.slugignore. - Fix: review slug filtering and inspect the deployed slug/runtime as Heroku documents. Do not infer deployment presence from the local checkout.
The app deploys, but PDF generation cannot find wkhtmltopdf
- Likely cause: the executable is absent, incompatible with the stack, or located somewhere other than the path configured in
wicked_pdf. - Fix: identify the actual runtime binary and reconcile its installation and configured executable path. Validate any buildpack against the stack rather than copying an example unchanged.
Some styles work but the custom face does not
- Likely cause: the stylesheet loads but its font URL does not resolve from the external renderer, or the specified family/weight does not match the available face.
- Fix: use renderer-resolvable absolute asset references or an accessible CDN resource, then check the family and face mapping.
A font buildpack works on one stack but fails after a stack change
- Likely cause: the third-party buildpack or binary targets a different stack or runtime layout.
- Fix: re-check the buildpack’s published compatibility and source, then verify the installed font and executable in the new runtime. No single buildpack or installation location is established for every Heroku stack.
Should I run a font-cache refresh command?
There is no universal fontconfig refresh command established for every stack and buildpack combination. Use only instructions that match the chosen buildpack and stack, then verify the rendered PDF. A command copied from another deployment can be ineffective or inappropriate for the runtime.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Reliability and maintenance considerations
For dependable production rendering, treat the fonts, stylesheet references, Heroku stack, buildpack sequence, and wkhtmltopdf distribution as a single deployment dependency. Record which font files and binary are expected, and repeat the PDF check when changing the stack, buildpack order, asset pipeline, or font package. Third-party buildpacks bring additional compatibility and maintenance responsibility; a listing alone does not guarantee current support for your app.
Best Value
- Used Book in Good Condition
Do not diagnose every substitution as a Rails asset-pipeline problem. Since the renderer is a separate executable, failures can occur at the boundary between Rails-produced HTML and the runtime environment where the executable runs. Testing from the deployed app distinguishes those cases more directly than repeated local CSS changes.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server, not a fix for wkhtmltopdf font installation or Rails PDF asset paths. If you also need clean screenshots of the rendered website, one GET request can return a PNG, JPEG, WebP, or PDF:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. It can accept cookie and consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. See ScreenshotNeo for product details, or sign up free for 1,000 screenshots a month, with no card.
Frequently Asked Questions
Does installing a font in the Rails app guarantee it will appear in the PDF?
No. The separate wkhtmltopdf process must be able to resolve the font or its asset reference, and the generated PDF must be checked.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Is there one Heroku buildpack or fontconfig command that works for every app?
No. Compatibility and installation details depend on the Heroku stack, buildpack, font, and wkhtmltopdf distribution.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




