SShortSingh.
Back to feed

Chromium PDF generation subsets embedded fonts, reducing file size significantly

0
·1 views

A developer tested PDF generation in Chromium 149 on an M4 Mac using different font sources. The system font produced a PDF with 39 Type3 fonts, while Google Fonts resulted in 15 Type0 subsets. When full TTF files were provided locally, Chromium loaded 13.9 MB of font data but created a PDF of only 71 KB by subsetting fonts. This subsetting process reduced a 3.27 MB font to 48 KB in the output. The developer created a script to inventory embedded fonts and report which CSS families were omitted from final PDFs.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Keyright's lease-based system fixes floating license seat leaks after client crashes

Floating software licenses track concurrent seats, but crashes can permanently lock seats if the client cannot send a check-in signal. Keyright's solution replaces simple check-in/check-out counters with time-limited leases that require client heartbeats. A seat automatically returns to the pool either when properly released or when its lease expires due to a client stop. This self-healing mechanism prevents the license pool from gradually becoming unusable after client failures.

0
ProgrammingDEV Community ·

Hackathon project WalkQuest AI uses local AI to suggest outdoor activities

WalkQuest AI is a project created for Hacktoberfest that generates personalized outdoor activity suggestions. The application uses the Gemma 3 1B model running locally via Ollama to create short quests based on user time, interests, and mood. It is built with Java and Spring Boot and features a browser-based frontend. Developers designed the tool to encourage screen breaks through activities like walking, gardening, and nature observation. The project emphasizes local AI inference for greater developer control and privacy compared to cloud-based services.

0
ProgrammingDEV Community ·

PDF generation fails due to font loading timing; document.fonts.ready offers fix

A developer encountered an issue where PDFs generated from a web page appeared blank or with incorrect fonts. The problem occurred because the script generated the PDF immediately after the page's 'load' event, which does not wait for web fonts to finish downloading. Testing revealed that both remote fonts from Google Fonts and locally bundled fonts were not fully loaded when the PDF was created. The developer resolved the issue by using the `document.fonts.ready` promise, which ensures all fonts are loaded before generating the PDF.

0
ProgrammingDEV Community ·

Open-source AI app CanopyRoute Pune offers screen-free audio trail running

A developer has created CanopyRoute Pune, an open-source AI application designed for trail runners in Pune, Maharashtra. The app uses local open-weight AI to provide audio guidance, allowing runners to keep their phones in their pockets instead of watching screens. It features a natural language interface where users describe their desired run, and an on-device model matches them with curated local trails. The project was submitted for the Hacktoberfest 2026 Open-Source AI Challenge with the theme of encouraging people to engage with the physical world. The app is available as a live web application and its code is hosted on GitHub.