October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Fix Hindi Text Rendering in Java Selenium Screenshots on Linux

A practical diagnosis for Hindi text that appears as boxes or malformed glyphs in Java Selenium screenshots on Linux, including CSS stacks and CI/container checks.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Hindi text appears as empty squares or broken glyphs in Java Selenium screenshots on Linux, first check that the Linux runtime launching Chrome has a Devanagari-capable font. Selenium drives the browser; it does not provide fonts. If you control the page, set a Devanagari-aware CSS font stack and verify the result in the same container or CI environment that produces the screenshot.

Why Hindi characters appear as boxes or malformed glyphs

A screenshot records what the browser rendered. When Chrome cannot find a font with the required Devanagari glyphs—or cannot resolve an available font through CSS and system fallback—the result may be missing or incorrect characters. This is a font availability and fallback issue to investigate, not something Selenium repairs by itself.

The cause can be specific to the environment: a developer workstation may have suitable fonts while the Linux container or CI image running Chrome does not. Chromium’s Linux font fallback test data uses mock fontconfig and test fonts, illustrating that resolution depends on both fontconfig configuration and the fonts present in the runtime. Its Hindi test sample resolves to Lohit Devanagari in that test setup; that is not a universal production recommendation. Chromium font fallback test data

Diagnose the actual browser runtime first

  1. Record the environment. Note the Linux distribution or base image, Chrome or Chromium version, Selenium version, ChromeDriver version, and whether the session is headed or headless.
  2. Inspect fonts where Chrome runs. Check the installed font inventory and fontconfig resolution inside the same container or CI runtime as the browser process—not just on the machine that builds the image.
  3. Reproduce with a small Hindi sample. Use text containing the Devanagari letters, punctuation, digits, marks, and conjuncts present in the affected page. Capture it at a fixed viewport.
  4. Separate a font problem from a page-style problem. If the sample renders but the real page does not, preserve and inspect the page’s CSS, loaded web fonts, and font-family rules.
  5. Change one variable at a time. After changing the font inventory, CSS, or image, capture the same text again and compare the output.

Do not assume one package-manager command applies to every Linux distribution. Identify the image and use its official package repository to install a Devanagari-capable font if one is missing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Lenovo IdeaPad Slim 3 Linux Laptop, 15.6" FHD Touchscreen Laptop, 8-Core AMD Ryzen 7 5825U, 16GB RAM, 512GB SSD, Keypad, SD Card Reader, Stylus Pen + External Portable SSD + USB Hub, Linux Ubuntu OS
  • Powerful Linux Laptop: This IdeaPad Slim 3 Laptop comes pre-installed with Ubuntu Linux, offering fast performance, robust security, and a clean, user-friendly experience. Enjoy full customization, seamless hardware compatibility, and access to thousands of open-source apps. Whether you're working, creating, or coding, it's built to keep up with everything you do.
  • A Multitasking Master: The latest AMD Ryzen 7 5825U processor (up to 4.5 GHz) delivers powerful performance with 8 cores and 16 threads for smooth multitasking. Integrated AMD Radeon Graphics provide crisp visuals for streaming, browsing, photo editing, and casual gaming. With smart machine intelligence, it adapts to your needs for a fast, responsive experience.
  • 15.6" Full HD Display: The IdeaPad Slim 3 boasts an 88% screen-to-body ratio for a floating, edge-to-edge visual experience. TÜV Low Blue Light certification reduces eye strain, making it perfect for long work or study sessions.
  • Military-Grade Durability: The smart IdeaPad Slim 3 combines portability and durability, letting you work, study, and play on the go. With a profile 10% slimmer than the previous generation, it's lightweight yet military-grade rugged, ready for anything, anywhere.
  • Versatile Connectivity: Enjoy the security of a built-in webcam with a privacy shutter. Connect effortlessly with multiple ports: 2x USB A, 1x USB C, 1x HDMI, 1x SD Card Reader, 1x Headphone/Microphone combo. Bundle comes with Stylus Pen, 256GB Portable SSD and 5-in-1 Docking Station.

Set a Devanagari-aware CSS font stack

If you can edit the page, specify script-aware families before generic fallback. Noto’s web guidance gives these stacks:

  • Sans serif: font-family: 'Noto Sans Devanagari', 'Noto Sans', sans-serif;
  • Serif: font-family: 'Noto Serif Devanagari', 'Noto Serif', serif;

The browser tries later family names when an earlier one lacks a needed character. The general-script Noto family can also supply punctuation and digits alongside the Devanagari-specific family. The fonts still need to be accessible to the browser—through the runtime’s installed fonts or fonts served by the page. Noto: Use Noto fonts on the web

Rank #2
HP 17 Business Laptop - Linux Mint Cinnamon - Intel Quad-Core i5-10210U, 32GB RAM, 1TB PCIe NVMe SSD + 1TB Storage HDD, 17.3" Inch HD+ (1600x900) Display
  • Intel Core i5-10210U (up to 4.2GHz) - 1TB PCIe NVMe + 1TB HDD - 32GB DDR4 SDRAM
  • 17.3" HD+ (1600x900) Display, Intel UHD Graphics 620
  • Built in HD 720p Webcam with Microphone - Bluetooth Version4.2
  • I/O Ports: 2x USB 3.1 (Data Only), 1x USB 2.0, 1x HDMI, 1x Headphone/Microphone Combo Jack
  • Linux Mint Cinnamon 64-Bit - 6-Row Keyboard w/ Full Numberpad

Choose serif or sans serif to match the design; neither is inherently a universal fix. If only some characters remain broken, check whether the fallback families cover those exact characters.

Check Chrome and ChromeDriver separately

Font availability and browser automation compatibility are different checks. Selenium’s Chrome documentation says Selenium 4 is compatible with Chrome 75 and greater by default, and that Chrome and ChromeDriver major versions should match. A mismatch can interfere with automation, but matching versions does not install Devanagari fonts. Selenium: Chrome specific functionality

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Lenovo Business Laptop - Linux Mint (Cinnamon) - Intel i5-1335U, 16GB RAM, 256GB SSD, 15.6" FHD 1920x1080 Display, Full Keyboard, Fast Charging
  • Intel Core i5-1335U Processor (12M Cache, 12 Threads, up to 4.6 GHz) - 256GB Solid State Drive - 16GB DDR4 SDRAM
  • 15.6" FHD (1920x1080) Non-Touch Anti-Glare Display - Intel UHD 620 Integrated Graphics - Stereo Speakers
  • 720p HD Webcam with Privacy Shutter. Integrated Microphone - Intel Dual Band Wireless-AC (2x2) 8265, Bluetooth Version 4.2
  • I/O Ports: 2x USB 3.0, 1x USB 3.1 Type-C 3.1, Headphone/Mic Combo Port, 4-in-1 Card Reader, HDMI, Kensington Mini-Lock Slot
  • Linux Mint (Cinnamon) 64-Bit - Keyboard with Full NumberPad - Fast Charging

For Java, Chrome options are the standard way to configure the Chrome session. For example, headless mode can be selected as follows:

ChromeOptions options = new ChromeOptions();
options.addArguments("--headless=new");
WebDriver driver = new ChromeDriver(options);

Use the mode appropriate to your test, but do not treat headless mode itself as the diagnosis. Chrome supports headless screenshot capture; a controlled comparison can help isolate a mode-specific difference. Chrome for Developers: New Headless in Selenium-WebDriver

Compare headed and headless captures fairly

If both modes are available, compare them using the same image, Chrome version, font inventory, page state, viewport, and sample text. If both show the same missing glyphs, investigate font availability and fallback first. If only one differs, investigate differences in browser configuration and page state. This is a diagnostic comparison, not evidence that headless Chrome intrinsically breaks Hindi rendering.

Chrome’s command-line documentation demonstrates screenshot capture with --screenshot and a fixed --window-size. In Java Selenium, use the same viewport and wait for the page’s relevant content before taking the screenshot. Chrome headless screenshot guidance

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
GMKtec G3S Mini PC Intel N95 Processor (Up to 3.4GHz) 8GB RAM 256GB M.2 SSD
  • 12th Intel Alder Lake N95 Processor – The GMKtec G3 S Mini PC is powered by the 12th Gen Intel N95 processor with 4 cores, 4 threads, 6MB cache and a burst frequency up to 3.4GHz. Compared with N100/N5105/N5100/N5095, the N95 delivers up to 36% overall performance improvement. Perfect for routine tasks, office work, and home entertainment, this compact mini desktop is more convenient than traditional bulky PCs.
  • 8GB RAM & 256GB SSD Storage – Pre-installed with 8GB DDR4 memory and a fast 256GB M.2 2242 SSD, the G3 S mini desktop offers quicker startup, smoother multitasking, and faster file transfers. Enjoy seamless performance whether you’re working on multiple applications, browsing, or streaming content.
  • Rich Interfaces & Connectivity – The G3 S mini computer comes equipped with USB 3.2 (up to 10Gbps), dual HDMI 2.0 (4K@60Hz), and a 3.5mm audio jack. With support for WiFi 5, Bluetooth 5.0, and Gigabit Ethernet (RJ45 1000MbE), it connects easily with monitors, projectors, printers, office equipment, and other peripherals, making it versatile for both home and business use.
  • Dual 4K Display Support – Featuring upgraded Intel UHD Graphics (up to 1000MHz), the G3 S supports 4K video playback and AV1 decoding for a smooth viewing experience. With dual HDMI outputs, you can connect two 4K@60Hz displays simultaneously, enabling efficient multitasking for work and entertainment.
  • GMKtec WARRANTY - GMKtec offers a 1-year limited GMKtec's warranty for each mini PC, starting from the date of the purchase. All defects due to design and workmanship are covered. With a professional after sales team always ready to attend to your needs, you can simply relax and enjoy your mini PC.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the March 2026 Chromium change means

A Chromium source change dated March 4, 2026 added Linux default font-family mappings for Devanagari: Noto Sans Devanagari for standard and sans-serif mappings, Noto Serif Devanagari for serif, and Noto Sans Mono for fixed-width text. The change notes that Chromium had previously relied on generic system font resolution. This is a source-tree change at that revision; it does not establish that every Linux distribution, browser package, or older Chrome/Chromium build includes those defaults. Chromium: Devanagari default font mappings

Therefore, do not use the presence of a newer source mapping as a substitute for checking the deployed runtime. Confirm the actual browser build and available fonts in the image used for capture.

Common failures and fixes

Symptom Likely area to check Next step
Every Hindi character is a box No usable Devanagari font, or fallback cannot resolve one Inspect font availability and fontconfig inside the browser runtime; install a suitable font through the image’s distribution repository.
The minimal sample works, but the site does not Page CSS, font loading, or a more specific font-family rule Inspect the page’s computed font stack and confirm the intended web fonts have loaded; test an explicit Devanagari-aware stack.
Only punctuation, digits, or some glyphs fail Coverage differs among the selected and fallback families Check the exact affected characters and include an appropriate general-script fallback family.
The same page differs between machines or CI runs Different runtime images, installed fonts, fontconfig, or browser builds Compare the actual runtime font inventory and browser versions; make the capture image consistent.
WebDriver cannot start or behaves unreliably Chrome/ChromeDriver compatibility rather than glyph coverage Check that Chrome and ChromeDriver major versions match; then diagnose fonts independently.
Headed and headless outputs differ Mode-specific configuration or page state may differ Repeat with the same image, versions, fonts, viewport, and page state before attributing the difference to rendering mode.

Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server. One GET request captures a URL; consult the ScreenshotNeo API documentation for request options and response details.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of these steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify page verdict and billing status in headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents using Claude, Cursor, or another MCP client. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. See ScreenshotNeo for the service and plans. Sign up for 1,000 free screenshots a month, with no card required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Does Selenium provide Hindi or Devanagari fonts?

No. Selenium controls browser automation; the browser needs fonts available through the runtime or the page.

Does headless Chrome automatically cause missing Hindi glyphs?

The cited Chrome documentation supports headless screenshots but does not establish that headless mode inherently causes Devanagari rendering failures.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.