LibreOffice Module vcl (master)  1
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
LogicalFontInstance Class Referenceabstract

#include <fontinstance.hxx>

Inheritance diagram for LogicalFontInstance:
[legend]
Collaboration diagram for LogicalFontInstance:
[legend]

Classes

struct  MapEntry
 

Public Member Functions

virtual ~LogicalFontInstance () override
 
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)
 
hb_font_t * GetHbFont ()
 
bool IsGraphiteFont ()
 
bool NeedOffsetCorrection (sal_Int32 nYOffset)
 
void SetAverageWidthFactor (double nFactor)
 
double GetAverageWidthFactor () const
 
const vcl::font::FontSelectPatternGetFontSelectPattern () const
 
const vcl::font::PhysicalFontFaceGetFontFace () const
 
vcl::font::PhysicalFontFaceGetFontFace ()
 
const ImplFontCacheGetFontCache () const
 
bool GetGlyphBoundRect (sal_GlyphId, tools::Rectangle &, bool) const
 
virtual bool GetGlyphOutline (sal_GlyphId, basegfx::B2DPolyPolygon &, bool) const =0
 
int GetKashidaWidth () const
 
void GetScale (double *nXScale, double *nYScale) const
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Static Public Member Functions

static void DecodeOpenTypeTag (const uint32_t nTableTag, char *pTagName)
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static voidoperator new (std::size_t nSize)
 
static voidoperator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 

Public Attributes

ImplFontMetricDataRef mxFontMetric
 
const ConvertChar * mpConversion
 
tools::Long mnLineHeight
 
Degree10 mnOwnOrientation
 
Degree10 mnOrientation
 
bool mbInit
 

Protected Member Functions

 LogicalFontInstance (const vcl::font::PhysicalFontFace &, const vcl::font::FontSelectPattern &)
 
virtual bool ImplGetGlyphBoundRect (sal_GlyphId, tools::Rectangle &, bool) const =0
 
virtual hb_font_t * ImplInitHbFont ()
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 

Static Protected Member Functions

static hb_font_t * InitHbFont (hb_face_t *pHbFace)
 

Private Types

enum  FontFamilyEnum {
  FontFamilyEnum::Unclassified,
  FontFamilyEnum::DFKaiSB
}
 
typedef ::std::unordered_map< ::std::pair< sal_UCS4, FontWeight >, MapEntryUnicodeFallbackList
 

Private Attributes

UnicodeFallbackList maUnicodeFallbackList
 
ImplFontCachempFontCache
 
const vcl::font::FontSelectPattern m_aFontSelData
 
hb_font_t * m_pHbFont
 
double m_nAveWidthFactor
 
rtl::Reference< vcl::font::PhysicalFontFacem_pFontFace
 
std::optional< bool > m_xbIsGraphiteFont
 
std::optional< FontFamilyEnumm_xeFontFamilyEnum
 

Friends

class vcl::font::PhysicalFontFace
 
class ImplFontCache
 

Additional Inherited Members

- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Definition at line 63 of file fontinstance.hxx.

Member Typedef Documentation

typedef ::std::unordered_map< ::std::pair<sal_UCS4,FontWeight>, MapEntry > LogicalFontInstance::UnicodeFallbackList
private

Definition at line 127 of file fontinstance.hxx.

Member Enumeration Documentation

Enumerator
Unclassified 
DFKaiSB 

Definition at line 136 of file fontinstance.hxx.

Constructor & Destructor Documentation

LogicalFontInstance::~LogicalFontInstance ( )
overridevirtual

Definition at line 44 of file fontinstance.cxx.

References m_pHbFont, maUnicodeFallbackList, mpFontCache, and mxFontMetric.

LogicalFontInstance::LogicalFontInstance ( const vcl::font::PhysicalFontFace rFontFace,
const vcl::font::FontSelectPattern rFontSelData 
)
explicitprotected

Definition at line 29 of file fontinstance.cxx.

References false.

Member Function Documentation

void LogicalFontInstance::AddFallbackForUnicode ( sal_UCS4  cChar,
FontWeight  eWeight,
const OUString &  rFontName,
bool  bEmbolden,
const ItalicMatrix rMatrix 
)
void LogicalFontInstance::DecodeOpenTypeTag ( const uint32_t  nTableTag,
char *  pTagName 
)
inlinestatic

Definition at line 149 of file fontinstance.hxx.

double LogicalFontInstance::GetAverageWidthFactor ( ) const
inline

Definition at line 93 of file fontinstance.hxx.

bool LogicalFontInstance::GetFallbackForUnicode ( sal_UCS4  cInChar,
FontWeight  eInWeight,
OUString *  pOutFontName,
bool *  pOutEmbolden,
ItalicMatrix pOutItalicMatrix 
) const
const ImplFontCache* LogicalFontInstance::GetFontCache ( ) const
inline
const vcl::font::PhysicalFontFace* LogicalFontInstance::GetFontFace ( ) const
inline
vcl::font::PhysicalFontFace* LogicalFontInstance::GetFontFace ( )
inline

Definition at line 97 of file fontinstance.hxx.

const vcl::font::FontSelectPattern& LogicalFontInstance::GetFontSelectPattern ( ) const
inline
bool LogicalFontInstance::GetGlyphBoundRect ( sal_GlyphId  nID,
tools::Rectangle rRect,
bool  bVertical 
) const
virtual bool LogicalFontInstance::GetGlyphOutline ( sal_GlyphId  ,
basegfx::B2DPolyPolygon ,
bool   
) const
pure virtual
hb_font_t * LogicalFontInstance::GetHbFont ( )
inline
int LogicalFontInstance::GetKashidaWidth ( ) const

Definition at line 66 of file fontinstance.cxx.

References GetHbFont(), GetScale(), and nIndex.

Referenced by GenericSalLayout::ApplyDXArray().

void LogicalFontInstance::GetScale ( double *  nXScale,
double *  nYScale 
) const
void LogicalFontInstance::IgnoreFallbackForUnicode ( sal_UCS4  cChar,
FontWeight  eWeight,
std::u16string_view  rFontName 
)
virtual bool LogicalFontInstance::ImplGetGlyphBoundRect ( sal_GlyphId  ,
tools::Rectangle ,
bool   
) const
protectedpure virtual
virtual hb_font_t* LogicalFontInstance::ImplInitHbFont ( )
inlineprotectedvirtual

Reimplemented in FreetypeFontInstance, CoreTextStyle, WinFontInstance, and QtFont.

Definition at line 115 of file fontinstance.hxx.

Referenced by GetHbFont().

hb_font_t * LogicalFontInstance::InitHbFont ( hb_face_t *  pHbFace)
staticprotected

Definition at line 54 of file fontinstance.cxx.

bool LogicalFontInstance::IsGraphiteFont ( )

Definition at line 146 of file fontinstance.cxx.

References GetHbFont(), and m_xbIsGraphiteFont.

Referenced by GenericSalLayout::LayoutText().

bool LogicalFontInstance::NeedOffsetCorrection ( sal_Int32  nYOffset)

Definition at line 155 of file fontinstance.cxx.

References DFKaiSB, GetHbFont(), m_xeFontFamilyEnum, and Unclassified.

void LogicalFontInstance::SetAverageWidthFactor ( double  nFactor)
inline

Definition at line 92 of file fontinstance.hxx.

Friends And Related Function Documentation

friend class ImplFontCache
friend

Definition at line 68 of file fontinstance.hxx.

friend class vcl::font::PhysicalFontFace
friend

Definition at line 67 of file fontinstance.hxx.

Member Data Documentation

const vcl::font::FontSelectPattern LogicalFontInstance::m_aFontSelData
private

Definition at line 130 of file fontinstance.hxx.

Referenced by GetScale().

double LogicalFontInstance::m_nAveWidthFactor
private

Definition at line 132 of file fontinstance.hxx.

Referenced by GetScale().

rtl::Reference<vcl::font::PhysicalFontFace> LogicalFontInstance::m_pFontFace
private

Definition at line 133 of file fontinstance.hxx.

hb_font_t* LogicalFontInstance::m_pHbFont
private

Definition at line 131 of file fontinstance.hxx.

Referenced by GetHbFont(), and ~LogicalFontInstance().

std::optional<bool> LogicalFontInstance::m_xbIsGraphiteFont
private

Definition at line 134 of file fontinstance.hxx.

Referenced by IsGraphiteFont().

std::optional<FontFamilyEnum> LogicalFontInstance::m_xeFontFamilyEnum
private

Definition at line 139 of file fontinstance.hxx.

Referenced by NeedOffsetCorrection().

UnicodeFallbackList LogicalFontInstance::maUnicodeFallbackList
private
bool LogicalFontInstance::mbInit

Definition at line 79 of file fontinstance.hxx.

Referenced by OutputDevice::ImplNewFont().

tools::Long LogicalFontInstance::mnLineHeight

Definition at line 76 of file fontinstance.hxx.

Referenced by OutputDevice::ImplNewFont().

Degree10 LogicalFontInstance::mnOrientation
Degree10 LogicalFontInstance::mnOwnOrientation
const ConvertChar* LogicalFontInstance::mpConversion

Definition at line 74 of file fontinstance.hxx.

ImplFontCache* LogicalFontInstance::mpFontCache
mutableprivate
ImplFontMetricDataRef LogicalFontInstance::mxFontMetric

The documentation for this class was generated from the following files: