https://bugs.documentfoundation.org/show_bug.cgi?id=165396
Bug ID: 165396
Summary: PDF Import: When font face is missing, respect box
dimensions rather than font x-height
Product: LibreOffice
Version: 25.8.0.0 alpha0+
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: filters and storage
Assignee: [email protected]
Reporter: [email protected]
Consider the PDF document in attachment 199370 - page 1.
That document has a black bar across the page, text above it aligned to its
left, and text below it aligned to its right. The text below ("Release 9.4")
uses the Computer Modern font face (serif, roman, size=x-height 10.9 pt). When
Computer Modern is unavailable, and the fallback for it is a wider font (say,
DejaVu Sans) - the text starts at the same horizontal line, but extends much
furter, past the end of the black bar, ruining the alignment effect.
No, I am guessing there is no explicit indication of the PDF of their being an
alignment. But I am also guessing, that the dimensions of the object with the
text in it are given explicitly.
Assuming that is the case, I believe it is better for LO to respect the box
dimensions, instead of respecting the nominal 10.9 pt size of the font.
The question of what to respect is of course a tradeoff - we can't do both. But
since the font used is not the right one anyways, the merit in maintaining the
exact size is very limited; while the keeping the same dimensions has clear
benefit, not just in this example, but in principle as well: Maintaining the
location, size and proportions of items on the page as intended.
How would the dimensions be respected? In one of several ways:
* Reduce or enlarge the font
* Scale the font horizontally (i.e. the character width setting we have in LO)
* Use narrower or wider inter-character and/or inter-word spacing
* Use a condensed variant of the fallback font.
... and perhaps there are other ways to do it. The first and second adjustments
combine, i.e. one could set the "best" size to fit within the box, then stretch
the dimension which is not an exact fit, to make it an exact fit. But this
again represents a trade-off: Perfect fit to the box vs. natural proportions of
the font. Other adjustments may also combine.
--
You are receiving this mail because:
You are the assignee for the bug.