vcl/win/gdi/salfont.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit dba873d20748bf4a7f3c067cb170c55ac45b798f
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Aug 4 18:47:40 2025 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Aug 4 19:04:46 2025 +0200

    Don't warn when the font was already there
    
    A font family that was already installed (on system, or embedded in
    a previous document) will not increase the font collection size.
    
    Change-Id: I13d208d7c488cb97a17f8d3ed4e879b1aca0b12d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188923
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index d6b9a0068e89..e1794d888e01 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1033,8 +1033,9 @@ bool 
WinSalGraphics::AddTempDevFont(vcl::font::PhysicalFontCollection* pFontColl
     EnumFontFamiliesExW(getHDC(), &aLogFont,
         SalEnumFontsProcExW, reinterpret_cast<LPARAM>(&aInfo), 0);
 
-    SAL_WARN_IF(nExpectedFontCount != pFontCollection->Count(), "vcl.fonts",
-        "temp font was registered but is not in enumeration: " << 
rFontFileURL);
+    SAL_WARN_IF(nExpectedFontCount != pFontCollection->Count() && 
!pFontCollection->FindFontFamily(aFontFamily),
+                "vcl.fonts",
+                "temp font was registered but is not in enumeration: " << 
rFontFileURL);
 
     return true;
 }

Reply via email to