diff options
author | Tor Lillqvist <tml@collabora.com> | 2022-03-08 14:29:54 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2022-03-10 11:00:43 +0100 |
commit | 376588d3c6c8b83c663f350a7b2db499682e6a80 (patch) | |
tree | 5aa54d8538c13779c3600adf123e0d20f85af6e9 /vcl/unx/generic | |
parent | 14e550c5963dcd0d0a75666c659b4b91de4b98bd (diff) |
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 <tml@collabora.com>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 ); |