-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
In PDF/API2/Resource/CIDFont/TrueType/FontFile.pm, font metrics are scaled to 1000/upem.
However, underlineposition and underlinethickness are not scaled.
PDF/API2/Content.pm, lines 2043-2044 seem to assume 1000, not upem:
my $underlineposition = (-$self->{' font'}->underlineposition() * $self->{' fontsize'} / 1000 || 1);
my $underlinethickness = ($self->{' font'}->underlinethickness() * $self->{' fontsize'} / 1000 || 1);
This affects all fonts with a design size not equal to 1000, which includes all modern TTF/OTF fonts that have a design size 2048.
The result can be seen in the attached image: left is LibreOffice, right is PDF::API2. The font is DejaVuSerif.
It is probably too late to change but it should at least be documented somewhere.
Metadata
Metadata
Assignees
Labels
No labels
