diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2021-09-12 14:41:19 +1000 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-05 18:11:01 +0200 |
commit | c817a5a4958c323eb189e1374072998b8b13ba8c (patch) | |
tree | 0345dd9e4ae0b590a184b354e9fb183dbcd27f09 /vcl/unx | |
parent | 0e736b0c20e096c5daf59f141b4509cfcc159a79 (diff) |
vcl: test PhysicalFontFace and move to vcl::font namespace
- moved PhysicalFontFace.hxx to vcl/inc/font
- added PhysicalFontFace to vcl::font namespace
- had to regenerate precompiled_vcl.hxx
- tested PhysicalFontFace, with some extensive tests for
IsBetterMatch()
Change-Id: I860022ac244f8a827f6f9cb7ed9018c5d9c328cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121970
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/gdi/font.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/freetypetextrender.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/glyphcache.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 9 |
5 files changed, 15 insertions, 14 deletions
diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx index 36618829279c..bc56b56286c5 100644 --- a/vcl/unx/generic/gdi/font.cxx +++ b/vcl/unx/generic/gdi/font.cxx @@ -83,7 +83,7 @@ std::unique_ptr<GenericSalLayout> X11SalGraphics::GetTextLayout(int nFallbackLev bool X11SalGraphics::CreateFontSubset( const OUString& rToFile, - const PhysicalFontFace* pFont, + const vcl::font::PhysicalFontFace* pFont, const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncoding, sal_Int32* pWidths, @@ -95,7 +95,7 @@ bool X11SalGraphics::CreateFontSubset( pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo); } -const void* X11SalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen) +const void* X11SalGraphics::GetEmbedFontData(const vcl::font::PhysicalFontFace* pFont, tools::Long* pDataLen) { return mxTextRenderImpl->GetEmbedFontData(pFont, pDataLen); } @@ -105,7 +105,7 @@ void X11SalGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen ) mxTextRenderImpl->FreeEmbedFontData(pData, nLen); } -void X11SalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, +void X11SalGraphics::GetGlyphWidths( const vcl::font::PhysicalFontFace* pFont, bool bVertical, std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) diff --git a/vcl/unx/generic/gdi/freetypetextrender.cxx b/vcl/unx/generic/gdi/freetypetextrender.cxx index 9f66c5f5f536..2b39d8787605 100644 --- a/vcl/unx/generic/gdi/freetypetextrender.cxx +++ b/vcl/unx/generic/gdi/freetypetextrender.cxx @@ -33,7 +33,7 @@ #include <unx/glyphcache.hxx> #include <unx/fc_fontoptions.hxx> #include <unx/freetype_glyphcache.hxx> -#include <PhysicalFontFace.hxx> +#include <font/PhysicalFontFace.hxx> #include <impfontmetricdata.hxx> #include <sallayout.hxx> @@ -157,7 +157,7 @@ std::unique_ptr<GenericSalLayout> FreeTypeTextRenderImpl::GetTextLayout(int nFal bool FreeTypeTextRenderImpl::CreateFontSubset( const OUString& rToFile, - const PhysicalFontFace* pFont, + const vcl::font::PhysicalFontFace* pFont, const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncoding, sal_Int32* pWidths, @@ -183,7 +183,7 @@ bool FreeTypeTextRenderImpl::CreateFontSubset( return bSuccess; } -const void* FreeTypeTextRenderImpl::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen) +const void* FreeTypeTextRenderImpl::GetEmbedFontData(const vcl::font::PhysicalFontFace* pFont, tools::Long* pDataLen) { // in this context the pFont->GetFontId() is a valid PSP // font since they are the only ones left after the PDF @@ -199,7 +199,7 @@ void FreeTypeTextRenderImpl::FreeEmbedFontData( const void* pData, tools::Long n GenPspGraphics::DoFreeEmbedFontData( pData, nLen ); } -void FreeTypeTextRenderImpl::GetGlyphWidths( const PhysicalFontFace* pFont, +void FreeTypeTextRenderImpl::GetGlyphWidths( const vcl::font::PhysicalFontFace* pFont, bool bVertical, std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 77c1566727d4..645afddabc73 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -373,7 +373,7 @@ FreetypeFont* FreetypeManager::CreateFont(FreetypeFontInstance* pFontInstance) if (!pFontInstance) return nullptr; - const PhysicalFontFace* pFontFace = pFontInstance->GetFontFace(); + const vcl::font::PhysicalFontFace* pFontFace = pFontInstance->GetFontFace(); if (!pFontFace) return nullptr; @@ -387,7 +387,7 @@ FreetypeFont* FreetypeManager::CreateFont(FreetypeFontInstance* pFontInstance) } FreetypeFontFace::FreetypeFontFace( FreetypeFontInfo* pFI, const FontAttributes& rDFA ) -: PhysicalFontFace( rDFA ), +: vcl::font::PhysicalFontFace( rDFA ), mpFreetypeFontInfo( pFI ) { } diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx index ec2afc4db8f3..79db2d87bdb0 100644 --- a/vcl/unx/generic/glyphs/glyphcache.cxx +++ b/vcl/unx/generic/glyphs/glyphcache.cxx @@ -66,7 +66,7 @@ FreetypeFontFile* FreetypeManager::FindFontFile(const OString& rNativeFileName) return pFontFile; } -FreetypeFontInstance::FreetypeFontInstance(const PhysicalFontFace& rPFF, const vcl::font::FontSelectPattern& rFSP) +FreetypeFontInstance::FreetypeFontInstance(const vcl::font::PhysicalFontFace& rPFF, const vcl::font::FontSelectPattern& rFSP) : LogicalFontInstance(rPFF, rFSP) , mxFreetypeFont(FreetypeManager::get().CreateFont(this)) { diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index 48b5ca8af32b..3ae0e8fa40af 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -46,8 +46,9 @@ #include <fontinstance.hxx> #include <fontattributes.hxx> #include <impfontmetricdata.hxx> +#include <font/FontSelectPattern.hxx> #include <PhysicalFontCollection.hxx> -#include <PhysicalFontFace.hxx> +#include <font/PhysicalFontFace.hxx> #include <sallayout.hxx> using namespace psp; @@ -309,7 +310,7 @@ std::unique_ptr<GenericSalLayout> GenPspGraphics::GetTextLayout(int nFallbackLev bool GenPspGraphics::CreateFontSubset( const OUString& rToFile, - const PhysicalFontFace* pFont, + const vcl::font::PhysicalFontFace* pFont, const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncoding, sal_Int32* pWidths, @@ -335,7 +336,7 @@ bool GenPspGraphics::CreateFontSubset( return bSuccess; } -void GenPspGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, +void GenPspGraphics::GetGlyphWidths( const vcl::font::PhysicalFontFace* pFont, bool bVertical, std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) @@ -504,7 +505,7 @@ void GenPspGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen ) DoFreeEmbedFontData( pData, nLen ); } -const void* GenPspGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen) +const void* GenPspGraphics::GetEmbedFontData(const vcl::font::PhysicalFontFace* pFont, tools::Long* pDataLen) { // in this context the pFont->GetFontId() is a valid PSP // font since they are the only ones left after the PDF |