vcl/unx/generic/print/genpspgraphics.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 376588d3c6c8b83c663f350a7b2db499682e6a80
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Tue Mar 8 14:29:54 2022 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Thu Mar 10 11:00:43 2022 +0100

    Trust the family name in the font file if necessary in 
AddTempDevFontHelper()
    
    If the passed in font name is empty, use the one that has been read
    from the font file.
    
    Seems like a reasonable thing to do, and I have a use for this small
    improvement coming.
    
    Change-Id: I3598179bf85ba3acdaca6058982ba5bf81e68288
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131300
    Tested-by: Jenkins
    Reviewed-by: Tor Lillqvist <t...@collabora.com>

diff --git a/vcl/unx/generic/print/genpspgraphics.cxx 
b/vcl/unx/generic/print/genpspgraphics.cxx
index da0a406dea0b..f903b30c6204 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -253,7 +253,8 @@ bool GenPspGraphics::AddTempDevFontHelper( 
vcl::font::PhysicalFontCollection* pF
         // prepare font data
         psp::FastPrintFontInfo aInfo;
         rMgr.getFontFastInfo( elem, aInfo );
-        aInfo.m_aFamilyName = rFontName;
+        if (!rFontName.isEmpty())
+            aInfo.m_aFamilyName = rFontName;
 
         // inform glyph cache of new font
         FontAttributes aDFA = GenPspGraphics::Info2FontAttributes( aInfo );

Reply via email to