ScreenshotNeo

BlogHow-to

How to Set Up Chromium Fonts and Packages for Website Screenshots in India

Install Chromium and Indian language fonts on Ubuntu 24.04, capture pages, and troubleshoot missing glyphs in production.

By the ScreenshotNeo team4 October 20266 min read

For reliable website screenshots on Linux, install Chromium and the font packages that cover the scripts used on your pages, then capture with Chrome Headless using an explicit viewport. This guide uses Ubuntu 24.04 LTS (Noble) for its font package commands. Package names vary by distribution and release, so verify them for your deployment image and inspect screenshots from that same image.

A browser language pack and a glyph font solve different problems: localization changes the browser interface language, while installed fonts provide characters for page content. For Indian language text, check the scripts and glyphs on your pages rather than relying on a package label alone.

1. Choose the target system and scripts

Use the same operating system image in development, CI, and production where possible. The package examples below are verified for Ubuntu 24.04. They are not universal commands for Debian, Fedora, Alpine, Kali, or other Ubuntu releases.

List the scripts your pages need: for example, Devanagari for Hindi, Bengali, Gujarati, Gurmukhi, Kannada, Malayalam, Tamil, or Telugu. A site may also mix scripts, punctuation, Latin text, and symbols. Test representative pages, including conjuncts and vowel marks, after installation.

2. Install Chromium and fonts on Ubuntu 24.04

Install Chromium from the supported package source for your Ubuntu image. Then install the Noto core font package as a broad Unicode starting point:

sudo apt update
sudo apt install -y chromium-browser fonts-noto-core

Ubuntu Noble provides fonts-noto-core for broad Unicode coverage. Package availability and Chromium packaging can depend on how Ubuntu is configured; if the package name is unavailable, check the package source enabled for that image and follow its current Ubuntu instructions. Do not substitute package names from another distribution without checking them.

fonts-noto-extra is a separate, larger package. Consider it only after checking the needed scripts and the package contents for your release. The core package is not a guarantee that every glyph or shaping behavior required by every page will be correct.

Chromium source-build instructions include compiler and development dependencies and may describe web-test fonts. A screenshot runner generally needs the browser runtime dependencies and page fonts, not a Chromium build toolchain. Kali documents chromium-headless-shell and runtime dependencies such as fontconfig and freetype for that distribution; treat that as a Kali-specific example, not an Ubuntu install recipe.

3. Capture a page with Chrome Headless

Run this from a directory where the process can write files. Chrome Headless saves screenshot.png in the current working directory:

chromium --headless --screenshot --window-size=1365,900 https://example.com/

Some installations expose the browser command as google-chrome, chromium-browser, or another executable. Use the command provided by the installed package. The Chrome Headless command-line reference documents --screenshot and recommends setting --window-size. Choose dimensions that reflect the page layout you need to capture.

To bound how long the command waits, add a timeout in milliseconds:

chromium --headless --screenshot --window-size=1365,900 --timeout=5000 https://example.com/

A timeout is a maximum wait, not proof that a page has finished loading its content or web fonts. A slow page may still be captured before its fonts arrive. For pages where timing matters, inspect the output and adjust the wait or use a capture workflow that can wait for a meaningful page condition.

4. Verify the fonts in the production image

  1. Build or start the exact container or server image used for captures.
  2. Capture pages that contain each required script, including mixed-script text and punctuation.
  3. Inspect the PNG for missing-glyph boxes, fallback changes, misplaced marks, and broken conjuncts.
  4. If you install fonts or change the image, capture again in that image and compare the result.

Font package installation addresses system fonts. Pages can also load web fonts from their own CSS and network requests. Test network access and font readiness in the target environment; an installed system font does not prove that a remote web font loaded.

5. Package choices and configuration

Choice When it fits What to verify
Ubuntu 24.04 fonts-noto-core A broad Unicode baseline for a Noble screenshot image Required scripts and actual rendering in your image
Ubuntu 24.04 fonts-noto-extra Only if the needed coverage is absent from the selected baseline Repository availability, package contents, and larger installed size
Distribution browser package When you want a browser maintained for the target OS Executable name, runtime dependencies, and headless options
Kali chromium-headless-shell A Kali-specific headless package option Current Kali package docs and dependencies such as fontconfig and freetype

Pin the base image and package versions if reproducible output matters to your workflow. Package versions change across releases and updates. Ubuntu Noble package details are release-specific; script-named files shown in a newer Ubuntu suite are useful clues about Noto families, not a promise that those exact files exist in Noble.

6. Troubleshooting

Symptom Likely cause Fix
Boxes or blank glyphs appear No installed font covers a character, or the browser cannot see the font environment Check the target image’s installed font packages; add coverage for the actual script and recapture there.
Hindi text appears, but marks or conjuncts look wrong Font fallback or shaping differs from what the page expects Inspect the page’s chosen web font and system fallback; test representative text in the deployed image.
Text differs between local and CI screenshots Different OS releases, font packages, browser builds, or web-font network access Use a consistent image and package set; verify network access and recapture after changes.
Screenshot is blank or incomplete The page had not rendered useful content before capture, or navigation failed Check the URL and network access, allow adequate time, and verify the page in the same runtime.
--screenshot is reported as unknown The executable may not be Chrome/Chromium or the installed build may expose different flags Check the installed browser and its command-line help; use the headless options supported by that package.
PNG cannot be written The working directory is not writable or the process has a path/permission issue Run from a writable directory and confirm the output file path.
Font package cannot be located The command targets a different OS release, repository configuration, or package name Check the package catalogue for the exact target release and enable only the appropriate supported source.

7. Performance, reliability, and cost

Installed fonts add image size and package installation work. Start with the coverage you need, then add larger font packages only when a representative capture shows a gap. A fixed timeout makes capture duration more predictable, but can trade completeness for speed on slow pages. Keep the browser, fonts, and base image consistent to reduce rendering differences across runs.

For a self-hosted workflow, account for the compute and maintenance needed to run Chromium, keep runtime packages current, and reproduce the same environment in CI and production. The cited package and browser documentation does not establish a universal package size, capture speed, or guarantee of correct shaping, so measure the behavior that matters in your own image.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server from ScreenshotNeo. One GET request returns an image or PDF; its capture flow removes known consent banners, newsletter popups, and chat widgets before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. AI agents can use its MCP server tools to take screenshots, get page information, and capture PDFs.

For API parameters and options, see the ScreenshotNeo documentation. This runnable Python example saves a screenshot response:

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://example.com"},
    timeout=90,
)
open("shot.webp", "wb").write(r.content)

ScreenshotNeo includes 1,000 screenshots a month free with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account to get started.

FAQ

Does installing a Hindi language pack add Hindi glyphs to screenshots?

Not necessarily. Browser localization and page-text font coverage are separate. Install fonts for the scripts your page uses and verify the rendered image.

Should I install every Noto package?

No. Begin with the package supported by your target release and expand only when testing shows missing coverage. Larger packages consume more image space.

Will system fonts replace a site’s web fonts?

They can act as fallbacks, but pages may request their own fonts over the network. Verify those requests and the final rendering in the capture environment.

Can I use these Ubuntu commands on Kali?

Use Kali’s package documentation for Kali. Package names and dependencies differ across distributions and releases.

Sources