svx/source/svdraw/svdpdf.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 908e7a635cc7a29c12c618ce0f023d50bd33695c Author: Caolán McNamara <[email protected]> AuthorDate: Thu Oct 30 21:07:40 2025 +0000 Commit: Miklos Vajna <[email protected]> CommitDate: Fri Oct 31 13:54:00 2025 +0100 we dont know the 'family type' its certainly not whatever arbitrary FamilyType is set on the default font of the OutputDevice. DONTKNOW is better, that way at least the other properties that we do know will match during selection of a matching font when creating embedded font output. Especially on windows where the font in the pdf embedding test is detected as "FAMILY_MODERN" by the windows backend, while the default font is typically FAMILY_ROMAN and so doesn't match exactly, so the next best match was fairly arbitrary and equal weight given to family/weight/pitch so the non-bold font got used for the bold font. Change-Id: If16b2851cb9461969409fa58eb43430516ed0a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193231 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index 86b1172ca741..8a0dc3a10429 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -141,6 +141,7 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools: // Get TextBounds relative to baseline vcl::Font aFnt = mpVD->GetFont(); aFnt.SetAlignment(ALIGN_BASELINE); + aFnt.SetFamily(FAMILY_DONTKNOW); mpVD->SetFont(aFnt); } @@ -611,7 +612,7 @@ void ImpSdrPdfImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr) if (bText && mbFntDirty) { - vcl::Font aFnt(mpVD->GetFont()); + const vcl::Font aFnt(mpVD->GetFont()); const sal_uInt32 nHeight( basegfx::fround<sal_uInt32>(aFnt.GetFontSize().Height() * mfScaleY));
