summaryrefslogtreecommitdiff
path: root/vcl/inc/font
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-03-14 12:22:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-03-14 19:17:08 +0100
commitacd40306b3737d50cf24462b2d3e451092543e64 (patch)
tree5b27738137ce38751208f2023827e7b5443ccca1 /vcl/inc/font
parentc8400f5acc36d2cf0c007260bdc94534a53bba90 (diff)
reduce symbol visibility in vcl
Change-Id: Ifaa37246e79678aa0c548b9ca8a9faf8036b9195 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164804 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc/font')
-rw-r--r--vcl/inc/font/FontMetricData.hxx14
-rw-r--r--vcl/inc/font/LogicalFontInstance.hxx27
-rw-r--r--vcl/inc/font/PhysicalFontCollection.hxx24
-rw-r--r--vcl/inc/font/PhysicalFontFace.hxx14
-rw-r--r--vcl/inc/font/PhysicalFontFamily.hxx15
5 files changed, 50 insertions, 44 deletions
diff --git a/vcl/inc/font/FontMetricData.hxx b/vcl/inc/font/FontMetricData.hxx
index 83eb77d54c6a..636d2f3f718d 100644
--- a/vcl/inc/font/FontMetricData.hxx
+++ b/vcl/inc/font/FontMetricData.hxx
@@ -40,7 +40,7 @@ class LogicalFontInstance;
class VCL_DLLPUBLIC FontMetricData final : public FontAttributes, public SvRefBase
{
public:
- explicit FontMetricData( const vcl::font::FontSelectPattern& );
+ SAL_DLLPRIVATE explicit FontMetricData( const vcl::font::FontSelectPattern& );
// font instance attributes from the font request
tools::Long GetWidth() const { return mnWidth; }
@@ -94,16 +94,16 @@ public:
tools::Long GetDoubleStrikeoutOffset1() const { return mnDStrikeoutOffset1; }
tools::Long GetDoubleStrikeoutOffset2() const { return mnDStrikeoutOffset2; }
- void ImplInitTextLineSize( const OutputDevice* pDev );
- void ImplInitAboveTextLineSize( const OutputDevice* pDev );
- void ImplInitFlags( const OutputDevice* pDev );
+ SAL_DLLPRIVATE void ImplInitTextLineSize( const OutputDevice* pDev );
+ SAL_DLLPRIVATE void ImplInitAboveTextLineSize( const OutputDevice* pDev );
+ SAL_DLLPRIVATE void ImplInitFlags( const OutputDevice* pDev );
void ImplCalcLineSpacing(LogicalFontInstance *pFontInstance);
void ImplInitBaselines(LogicalFontInstance *pFontInstance);
private:
- bool ShouldNotUseUnderlineMetrics() const;
- bool ImplInitTextLineSizeHarfBuzz(LogicalFontInstance *pFontInstance);
- bool ShouldUseWinMetrics(int, int, int, int, int, int) const;
+ SAL_DLLPRIVATE bool ShouldNotUseUnderlineMetrics() const;
+ SAL_DLLPRIVATE bool ImplInitTextLineSizeHarfBuzz(LogicalFontInstance *pFontInstance);
+ SAL_DLLPRIVATE bool ShouldUseWinMetrics(int, int, int, int, int, int) const;
// font instance attributes from the font request
tools::Long mnHeight; // Font size
diff --git a/vcl/inc/font/LogicalFontInstance.hxx b/vcl/inc/font/LogicalFontInstance.hxx
index 40d3c57c4e67..76c675262adc 100644
--- a/vcl/inc/font/LogicalFontInstance.hxx
+++ b/vcl/inc/font/LogicalFontInstance.hxx
@@ -81,17 +81,20 @@ public: // TODO: make data members private
Degree10 mnOrientation; // text angle in 3600 system
bool mbInit; // true if maFontMetric member is valid
- void AddFallbackForUnicode(sal_UCS4 cChar, FontWeight eWeight, const OUString& rFontName,
- bool bEmbolden, const ItalicMatrix& rMatrix);
- bool GetFallbackForUnicode(sal_UCS4 cInChar, FontWeight eInWeight, OUString* pOutFontName,
- bool* pOutEmbolden, ItalicMatrix* pOutItalicMatrix) const;
- void IgnoreFallbackForUnicode(sal_UCS4, FontWeight eWeight, std::u16string_view rFontName);
+ SAL_DLLPRIVATE void AddFallbackForUnicode(sal_UCS4 cChar, FontWeight eWeight,
+ const OUString& rFontName, bool bEmbolden,
+ const ItalicMatrix& rMatrix);
+ SAL_DLLPRIVATE bool GetFallbackForUnicode(sal_UCS4 cInChar, FontWeight eInWeight,
+ OUString* pOutFontName, bool* pOutEmbolden,
+ ItalicMatrix* pOutItalicMatrix) const;
+ SAL_DLLPRIVATE void IgnoreFallbackForUnicode(sal_UCS4, FontWeight eWeight,
+ std::u16string_view rFontName);
inline hb_font_t* GetHbFont();
- bool IsGraphiteFont();
+ SAL_DLLPRIVATE bool IsGraphiteFont();
// NeedOffsetCorrection: Return if the font need offset correction in TTB direction.
// nYOffset is the original offset. It is used to check if the correction is necessary.
- bool NeedOffsetCorrection(sal_Int32 nYOffset);
+ SAL_DLLPRIVATE bool NeedOffsetCorrection(sal_Int32 nYOffset);
void SetAverageWidthFactor(double nFactor) { m_nAveWidthFactor = std::abs(nFactor); }
double GetAverageWidthFactor() const { return m_nAveWidthFactor; }
const vcl::font::FontSelectPattern& GetFontSelectPattern() const { return m_aFontSelData; }
@@ -102,15 +105,15 @@ public: // TODO: make data members private
bool GetGlyphBoundRect(sal_GlyphId, tools::Rectangle&, bool) const;
virtual bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon&, bool) const = 0;
- basegfx::B2DPolyPolygon GetGlyphOutlineUntransformed(sal_GlyphId) const;
+ SAL_DLLPRIVATE basegfx::B2DPolyPolygon GetGlyphOutlineUntransformed(sal_GlyphId) const;
sal_GlyphId GetGlyphIndex(uint32_t, uint32_t = 0) const;
- double GetGlyphWidth(sal_GlyphId, bool = false, bool = true) const;
+ SAL_DLLPRIVATE double GetGlyphWidth(sal_GlyphId, bool = false, bool = true) const;
double GetKashidaWidth() const;
- void GetScale(double* nXScale, double* nYScale) const;
+ SAL_DLLPRIVATE void GetScale(double* nXScale, double* nYScale) const;
bool NeedsArtificialItalic() const;
bool NeedsArtificialBold() const;
@@ -119,11 +122,11 @@ protected:
explicit LogicalFontInstance(const vcl::font::PhysicalFontFace&,
const vcl::font::FontSelectPattern&);
- hb_font_t* InitHbFont();
+ SAL_DLLPRIVATE hb_font_t* InitHbFont();
virtual void ImplInitHbFont(hb_font_t*) {}
private:
- hb_font_t* GetHbFontUntransformed() const;
+ SAL_DLLPRIVATE hb_font_t* GetHbFontUntransformed() const;
struct MapEntry
{
diff --git a/vcl/inc/font/PhysicalFontCollection.hxx b/vcl/inc/font/PhysicalFontCollection.hxx
index d791f7b6927f..56a8de7bc34e 100644
--- a/vcl/inc/font/PhysicalFontCollection.hxx
+++ b/vcl/inc/font/PhysicalFontCollection.hxx
@@ -52,29 +52,29 @@ public:
// fill the list with device font faces
void Add( vcl::font::PhysicalFontFace* );
- void Clear();
+ SAL_DLLPRIVATE void Clear();
int Count() const { return maPhysicalFontFamilies.size(); }
// find the device font family
vcl::font::PhysicalFontFamily* FindFontFamily( std::u16string_view rFontName ) const;
vcl::font::PhysicalFontFamily* FindOrCreateFontFamily( const OUString &rFamilyName );
- vcl::font::PhysicalFontFamily* FindFontFamily( vcl::font::FontSelectPattern& ) const;
+ SAL_DLLPRIVATE vcl::font::PhysicalFontFamily* FindFontFamily( vcl::font::FontSelectPattern& ) const;
vcl::font::PhysicalFontFamily* FindFontFamilyByTokenNames(std::u16string_view rTokenStr) const;
vcl::font::PhysicalFontFamily* FindFontFamilyByAttributes(ImplFontAttrs nSearchType, FontWeight, FontWidth,
FontItalic, std::u16string_view rSearchFamily) const;
// suggest fonts for glyph fallback
- vcl::font::PhysicalFontFamily* GetGlyphFallbackFont( vcl::font::FontSelectPattern&,
+ SAL_DLLPRIVATE vcl::font::PhysicalFontFamily* GetGlyphFallbackFont( vcl::font::FontSelectPattern&,
LogicalFontInstance* pLogicalFont,
OUString& rMissingCodes, int nFallbackLevel ) const;
// prepare platform specific font substitutions
- void SetPreMatchHook( vcl::font::PreMatchFontSubstitution* );
- void SetFallbackHook( vcl::font::GlyphFallbackFontSubstitution* );
+ SAL_DLLPRIVATE void SetPreMatchHook( vcl::font::PreMatchFontSubstitution* );
+ void SetFallbackHook( vcl::font::GlyphFallbackFontSubstitution* );
// misc utilities
- std::shared_ptr<PhysicalFontCollection> Clone() const;
- std::unique_ptr<vcl::font::PhysicalFontFaceCollection> GetFontFaceCollection() const;
+ SAL_DLLPRIVATE std::shared_ptr<PhysicalFontCollection> Clone() const;
+ SAL_DLLPRIVATE std::unique_ptr<vcl::font::PhysicalFontFaceCollection> GetFontFaceCollection() const;
private:
mutable bool mbMatchData; // true if matching attributes are initialized
@@ -88,13 +88,13 @@ private:
mutable std::unique_ptr<std::array<vcl::font::PhysicalFontFamily*,MAX_GLYPHFALLBACK>> mpFallbackList;
mutable int mnFallbackCount;
- void ImplInitMatchData() const;
- void ImplInitGenericGlyphFallback() const;
+ SAL_DLLPRIVATE void ImplInitMatchData() const;
+ SAL_DLLPRIVATE void ImplInitGenericGlyphFallback() const;
- vcl::font::PhysicalFontFamily* ImplFindFontFamilyBySearchName( const OUString& ) const;
- vcl::font::PhysicalFontFamily* ImplFindFontFamilyBySubstFontAttr( const utl::FontNameAttr& ) const;
+ SAL_DLLPRIVATE vcl::font::PhysicalFontFamily* ImplFindFontFamilyBySearchName( const OUString& ) const;
+ SAL_DLLPRIVATE vcl::font::PhysicalFontFamily* ImplFindFontFamilyBySubstFontAttr( const utl::FontNameAttr& ) const;
- vcl::font::PhysicalFontFamily* ImplFindFontFamilyOfDefaultFont() const;
+ SAL_DLLPRIVATE vcl::font::PhysicalFontFamily* ImplFindFontFamilyOfDefaultFont() const;
};
diff --git a/vcl/inc/font/PhysicalFontFace.hxx b/vcl/inc/font/PhysicalFontFace.hxx
index 1fce6a6cbab1..0469f55a7770 100644
--- a/vcl/inc/font/PhysicalFontFace.hxx
+++ b/vcl/inc/font/PhysicalFontFace.hxx
@@ -152,7 +152,7 @@ public:
virtual FontCharMapRef GetFontCharMap() const;
virtual bool GetFontCapabilities(vcl::FontCapabilities&) const;
- RawFontData GetRawFontData(uint32_t) const;
+ SAL_DLLPRIVATE RawFontData GetRawFontData(uint32_t) const;
bool IsBetterMatch(const vcl::font::FontSelectPattern&, FontMatchStatus&) const;
sal_Int32 CompareIgnoreSize(const PhysicalFontFace&) const;
@@ -167,18 +167,18 @@ public:
// rInfo: additional outgoing information
// implementation note: encoding 0 with glyph id 0 should be added implicitly
// as "undefined character"
- bool CreateFontSubset(std::vector<sal_uInt8>&, const sal_GlyphId*, const sal_uInt8*, const int,
- FontSubsetInfo&) const;
+ SAL_DLLPRIVATE bool CreateFontSubset(std::vector<sal_uInt8>&, const sal_GlyphId*,
+ const sal_uInt8*, const int, FontSubsetInfo&) const;
bool IsColorFont() const { return HasColorLayers() || HasColorBitmaps(); }
bool HasColorLayers() const;
- std::vector<ColorLayer> GetGlyphColorLayers(sal_GlyphId) const;
+ SAL_DLLPRIVATE std::vector<ColorLayer> GetGlyphColorLayers(sal_GlyphId) const;
- const std::vector<ColorPalette>& GetColorPalettes() const;
+ SAL_DLLPRIVATE const std::vector<ColorPalette>& GetColorPalettes() const;
bool HasColorBitmaps() const;
- RawFontData GetGlyphColorBitmap(sal_GlyphId, tools::Rectangle&) const;
+ SAL_DLLPRIVATE RawFontData GetGlyphColorBitmap(sal_GlyphId, tools::Rectangle&) const;
OString GetGlyphName(sal_GlyphId, bool = false) const;
@@ -206,7 +206,7 @@ protected:
explicit PhysicalFontFace(const FontAttributes&);
- hb_font_t* GetHbUnscaledFont() const;
+ SAL_DLLPRIVATE hb_font_t* GetHbUnscaledFont() const;
};
}
diff --git a/vcl/inc/font/PhysicalFontFamily.hxx b/vcl/inc/font/PhysicalFontFamily.hxx
index a944ed72fee3..cd74866f1e77 100644
--- a/vcl/inc/font/PhysicalFontFamily.hxx
+++ b/vcl/inc/font/PhysicalFontFamily.hxx
@@ -79,17 +79,20 @@ public:
ImplFontAttrs GetMatchType() const { return mnMatchType; }
FontWeight GetMatchWeight() const { return meMatchWeight; }
FontWidth GetMatchWidth() const { return meMatchWidth; }
- void InitMatchData(const utl::FontSubstConfiguration&, const OUString& rSearchName);
+ SAL_DLLPRIVATE void InitMatchData(const utl::FontSubstConfiguration&,
+ const OUString& rSearchName);
void AddFontFace(PhysicalFontFace*);
- PhysicalFontFace* FindBestFontFace(const vcl::font::FontSelectPattern& rFSD) const;
+ SAL_DLLPRIVATE PhysicalFontFace*
+ FindBestFontFace(const vcl::font::FontSelectPattern& rFSD) const;
- void UpdateDevFontList(PhysicalFontFaceCollection&) const;
- void UpdateCloneFontList(PhysicalFontCollection&) const;
+ SAL_DLLPRIVATE void UpdateDevFontList(PhysicalFontFaceCollection&) const;
+ SAL_DLLPRIVATE void UpdateCloneFontList(PhysicalFontCollection&) const;
- static void CalcType(ImplFontAttrs& rType, FontWeight& rWeight, FontWidth& rWidth,
- FontFamily eFamily, const utl::FontNameAttr* pFontAttr);
+ SAL_DLLPRIVATE static void CalcType(ImplFontAttrs& rType, FontWeight& rWeight,
+ FontWidth& rWidth, FontFamily eFamily,
+ const utl::FontNameAttr* pFontAttr);
private:
std::vector<rtl::Reference<PhysicalFontFace>> maFontFaces;