mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-01 05:33:33 +00:00
Let poppler pick the font size when signing signature fields
Currently we use the default font sizes for NewSignatureData, which are 10 for fontSize and 20 for leftFontSize This can be too large for a small signature field, leasing to cut-off text When passing 0 poppler picks a suitable size depending on the size of the signature field CCBUG: 443403
This commit is contained in:
parent
ee58e07e0f
commit
465b9ff5ce
|
@ -463,5 +463,10 @@ bool PopplerFormFieldSignature::sign(const Okular::NewSignatureData &oData, cons
|
|||
{
|
||||
Poppler::PDFConverter::NewSignatureData pData;
|
||||
PDFGenerator::okularToPoppler(oData, &pData);
|
||||
#if POPPLER_VERSION_MACRO >= QT_VERSION_CHECK(24, 03, 0)
|
||||
// 0 means "Chose an appropriate size"
|
||||
pData.setFontSize(0);
|
||||
pData.setLeftFontSize(0);
|
||||
#endif
|
||||
return m_field->sign(newPath, pData) == Poppler::FormFieldSignature::SigningSuccess;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue