Bhadra Vaghela
08/04/2026, 3:37 AMABCDEE+ArialMT
• Map embedded/subset PDF fonts to the closest installed Windows font
• Render the extracted text in Compose using that mapped font
• Preserve bold, italic, size, color, rotation, and position
The text content is usually extracted correctly, but the visual font does not match the original PDF.
Has anyone implemented reliable PDF font mapping or system-font rendering in Compose Desktop?
I’d especially appreciate guidance on:
• Handling embedded or subsetted fonts
• Mapping PDF font names to installed Windows fonts
• Using system font families dynamically in Compose Desktop
• Whether extracting embedded fonts from PDF is practical or legally safe
• Better alternatives to PDFBox for this use case
Any sample code, architecture suggestions, or library recommendations would be very helpful.
Thank you.