Bug 170596 - Do not allow different font substitutions on different media
Summary: Do not allow different font substitutions on different media
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Substitution
  Show dependency treegraph
 
Reported: 2026-02-04 10:39 UTC by Mike Kaganski
Modified: 2026-02-04 21:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2026-02-04 10:39:12 UTC
Currently, it's possible to have different output of substituted glyphs on different media: on screen vs. on print vs. in exported PDF.

This is because we have per-output-device font lists (filtered by support claimed by fonts?); and for missing fonts (or missing glyphs), font substitution triggers individually for each media.

But that is completely wrong. The "support" claimed by font, in today's world, will not prevent *any* font to be rendered on *any* device. The "support" is rather a design choice, indicating that the font was created with this-or-that device in mind, so it's optimized for this medium, and looks best there, but not elsewhere. So this information could be ~reasonably taken into account *when we search for substitution* - exactly once (we could tweak the algorithm, if supported by the underlying technology like fontconfig, to prefer e.g. printer-ready fonts; or fonts without license restrictions; or any other things that may be present in font metadata).

But once we have chosen that this character uses this glyph of this font, when we applied the character properties to it - since this moment, *exactly this glyph of this font* must be used in all output: on screen, to any printer, to PDF, etc. This is called WYSIWYG, and our current behavior is simply breaking this principle.

It is especially bad, since the substitution is mostly out of user control (there is a way to define font substitution rules for missing fonts, which is for advanced users; but there is no way to control "missing glyph" substitution).

The immediate reason to file this bug was a discussion around bug 170590; but I remember seeing other similar-looking bugs in the tracker.
Comment 1 Buovjaga 2026-02-04 10:56:51 UTC
Sounds reasonable -> NEW.