LibreOffice Module vcl (master) 1
|
#include <LogicalFontInstance.hxx>
Classes | |
struct | MapEntry |
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 |
hb_font_t * | InitHbFont () |
virtual void | ImplInitHbFont (hb_font_t *) |
![]() | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
Private Types | |
enum class | FontFamilyEnum { Unclassified , DFKaiSB } |
typedef ::std::unordered_map<::std::pair< sal_UCS4, FontWeight >, MapEntry > | UnicodeFallbackList |
Private Member Functions | |
hb_font_t * | GetHbFontUntransformed () const |
Private Attributes | |
UnicodeFallbackList | maUnicodeFallbackList |
ImplFontCache * | mpFontCache |
const vcl::font::FontSelectPattern | m_aFontSelData |
hb_font_t * | m_pHbFont |
hb_font_t * | m_pHbFontUntransformed = nullptr |
double | m_nAveWidthFactor |
rtl::Reference< vcl::font::PhysicalFontFace > | m_pFontFace |
std::optional< bool > | m_xbIsGraphiteFont |
std::optional< FontFamilyEnum > | m_xeFontFamilyEnum |
hb_draw_funcs_t * | m_pHbDrawFuncs = nullptr |
basegfx::B2DPolygon | m_aDrawPolygon |
Friends | |
class | vcl::font::PhysicalFontFace |
class | ImplFontCache |
Additional Inherited Members | |
![]() | |
static void * | operator new (std::size_t nSize) |
static void * | operator 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) |
![]() | |
oslInterlockedCount | m_nCount |
Definition at line 67 of file LogicalFontInstance.hxx.
|
private |
Definition at line 140 of file LogicalFontInstance.hxx.
|
strongprivate |
Enumerator | |
---|---|
Unclassified | |
DFKaiSB |
Definition at line 150 of file LogicalFontInstance.hxx.
|
overridevirtual |
Definition at line 45 of file LogicalFontInstance.cxx.
References m_pHbDrawFuncs, m_pHbFont, m_pHbFontUntransformed, maUnicodeFallbackList, mpFontCache, and mxFontMetric.
|
explicitprotected |
Definition at line 29 of file LogicalFontInstance.cxx.
void LogicalFontInstance::AddFallbackForUnicode | ( | sal_UCS4 | cChar, |
FontWeight | eWeight, | ||
const OUString & | rFontName, | ||
bool | bEmbolden, | ||
const ItalicMatrix & | rMatrix | ||
) |
Definition at line 131 of file LogicalFontInstance.cxx.
References LogicalFontInstance::MapEntry::aItalicMatrix, LogicalFontInstance::MapEntry::bEmbolden, maUnicodeFallbackList, and LogicalFontInstance::MapEntry::sFontName.
Referenced by vcl::font::PhysicalFontCollection::GetGlyphFallbackFont().
|
inline |
Definition at line 97 of file LogicalFontInstance.hxx.
bool LogicalFontInstance::GetFallbackForUnicode | ( | sal_UCS4 | cInChar, |
FontWeight | eInWeight, | ||
OUString * | pOutFontName, | ||
bool * | pOutEmbolden, | ||
ItalicMatrix * | pOutItalicMatrix | ||
) | const |
Definition at line 141 of file LogicalFontInstance.cxx.
References LogicalFontInstance::MapEntry::aItalicMatrix, LogicalFontInstance::MapEntry::bEmbolden, maUnicodeFallbackList, and LogicalFontInstance::MapEntry::sFontName.
Referenced by vcl::font::PhysicalFontCollection::GetGlyphFallbackFont().
|
inline |
Definition at line 102 of file LogicalFontInstance.hxx.
Referenced by ImplFontCache::CacheGlyphBoundRect(), and ImplFontCache::GetCachedGlyphBoundRect().
|
inline |
Definition at line 101 of file LogicalFontInstance.hxx.
|
inline |
Definition at line 100 of file LogicalFontInstance.hxx.
Referenced by vcl::PDFWriterImpl::createDefaultCheckBoxAppearance(), vcl::PDFWriterImpl::drawLayout(), WinFontInstance::GetFontFace(), OutputDevice::GetFontFeatures(), GetScale(), vcl::PDFWriterImpl::getSystemFont(), ImplFontMetricData::ImplCalcLineSpacing(), InitHbFont(), and NeedOffsetCorrection().
|
inline |
Definition at line 98 of file LogicalFontInstance.hxx.
Referenced by SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey(), vcl::PDFWriterImpl::drawLayout(), ImplFontCache::GetFontInstance(), GenericSalLayout::LayoutText(), and OutputDevice::SetFontOrientation().
bool LogicalFontInstance::GetGlyphBoundRect | ( | sal_GlyphId | nID, |
tools::Rectangle & | rRect, | ||
bool | bVertical | ||
) | const |
Definition at line 169 of file LogicalFontInstance.cxx.
References ImplFontCache::CacheGlyphBoundRect(), ImplFontCache::GetCachedGlyphBoundRect(), ImplGetGlyphBoundRect(), and mpFontCache.
Referenced by GlyphItem::GetGlyphBoundRect(), and GenericSalLayout::LayoutText().
sal_GlyphId LogicalFontInstance::GetGlyphIndex | ( | uint32_t | nUnicode, |
uint32_t | nVariationSelector = 0 |
||
) | const |
Definition at line 181 of file LogicalFontInstance.cxx.
References GetHbFont().
Referenced by GenericSalLayout::ApplyDXArray(), vcl::PDFWriterImpl::createDefaultCheckBoxAppearance(), vcl::PDFWriterImpl::emitSystemFont(), GetKashidaWidth(), and GenericSalLayout::HasVerticalAlternate().
|
pure virtual |
Implemented in vcl::pdf::BuildinFontInstance, QtFont, CoreTextFont, FreetypeFontInstance, and WinFontInstance.
Referenced by GlyphItem::GetGlyphOutline().
basegfx::B2DPolyPolygon LogicalFontInstance::GetGlyphOutlineUntransformed | ( | sal_GlyphId | nGlyph | ) | const |
Definition at line 292 of file LogicalFontInstance.cxx.
References GetHbFontUntransformed(), m_aDrawPolygon, and m_pHbDrawFuncs.
Referenced by vcl::PDFWriterImpl::registerGlyph().
double LogicalFontInstance::GetGlyphWidth | ( | sal_GlyphId | nGlyph, |
bool | bVertical = false , |
||
bool | bScale = true |
||
) | const |
Definition at line 190 of file LogicalFontInstance.cxx.
References GetHbFont(), and GetScale().
Referenced by vcl::PDFWriterImpl::createDefaultCheckBoxAppearance(), vcl::PDFWriterImpl::drawLayout(), vcl::PDFWriterImpl::emitSystemFont(), and GetKashidaWidth().
|
inline |
Definition at line 163 of file LogicalFontInstance.hxx.
References InitHbFont(), and m_pHbFont.
Referenced by GetGlyphIndex(), GetGlyphWidth(), GetHbFontUntransformed(), ImplFontMetricData::ImplCalcLineSpacing(), ImplFontMetricData::ImplInitBaselines(), ImplFontMetricData::ImplInitTextLineSizeHarfBuzz(), IsGraphiteFont(), and GenericSalLayout::LayoutText().
|
private |
Definition at line 86 of file LogicalFontInstance.cxx.
References GetHbFont(), m_pHbFontUntransformed, and NeedsArtificialItalic().
Referenced by GetGlyphOutlineUntransformed().
int LogicalFontInstance::GetKashidaWidth | ( | ) | const |
Definition at line 105 of file LogicalFontInstance.cxx.
References GetGlyphIndex(), and GetGlyphWidth().
Referenced by GenericSalLayout::ApplyDXArray().
void LogicalFontInstance::GetScale | ( | double * | nXScale, |
double * | nYScale | ||
) | const |
Definition at line 113 of file LogicalFontInstance.cxx.
References GetFontFace(), m_aFontSelData, m_nAveWidthFactor, vcl::font::FontSelectPattern::mnHeight, vcl::font::FontSelectPattern::mnWidth, and vcl::font::PhysicalFontFace::UnitsPerEm().
Referenced by SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey(), GenericSalLayout::GetCharWidths(), GetGlyphWidth(), ImplFontMetricData::ImplCalcLineSpacing(), ImplFontMetricData::ImplInitBaselines(), ImplFontMetricData::ImplInitTextLineSizeHarfBuzz(), and GenericSalLayout::LayoutText().
void LogicalFontInstance::IgnoreFallbackForUnicode | ( | sal_UCS4 | cChar, |
FontWeight | eWeight, | ||
std::u16string_view | rFontName | ||
) |
Definition at line 157 of file LogicalFontInstance.cxx.
References maUnicodeFallbackList, and LogicalFontInstance::MapEntry::sFontName.
Referenced by vcl::font::PhysicalFontCollection::GetGlyphFallbackFont().
|
protectedpure virtual |
Implemented in vcl::pdf::BuildinFontInstance, QtFont, CoreTextFont, FreetypeFontInstance, and WinFontInstance.
Referenced by GetGlyphBoundRect().
|
inlineprotectedvirtual |
Reimplemented in WinFontInstance.
Definition at line 126 of file LogicalFontInstance.hxx.
Referenced by InitHbFont().
|
protected |
Definition at line 61 of file LogicalFontInstance.cxx.
References ARTIFICIAL_ITALIC_SKEW, GetFontFace(), ImplInitHbFont(), and NeedsArtificialItalic().
Referenced by GetHbFont().
bool LogicalFontInstance::IsGraphiteFont | ( | ) |
Definition at line 207 of file LogicalFontInstance.cxx.
References GetHbFont(), and m_xbIsGraphiteFont.
Referenced by GenericSalLayout::LayoutText().
bool LogicalFontInstance::NeedOffsetCorrection | ( | sal_Int32 | nYOffset | ) |
Definition at line 217 of file LogicalFontInstance.cxx.
References DFKaiSB, GetFontFace(), GetName(), m_xeFontFamilyEnum, vcl::font::NAME_ID_FONT_FAMILY, and Unclassified.
bool LogicalFontInstance::NeedsArtificialBold | ( | ) | const |
Definition at line 247 of file LogicalFontInstance.cxx.
References FontAttributes::GetWeight(), m_aFontSelData, m_pFontFace, and WEIGHT_MEDIUM.
Referenced by SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey().
bool LogicalFontInstance::NeedsArtificialItalic | ( | ) | const |
Definition at line 252 of file LogicalFontInstance.cxx.
References FontAttributes::GetItalic(), ITALIC_NONE, m_aFontSelData, and m_pFontFace.
Referenced by SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey(), GetHbFontUntransformed(), and InitHbFont().
|
inline |
Definition at line 96 of file LogicalFontInstance.hxx.
|
friend |
Definition at line 72 of file LogicalFontInstance.hxx.
|
friend |
Definition at line 71 of file LogicalFontInstance.hxx.
|
private |
Definition at line 160 of file LogicalFontInstance.hxx.
Referenced by GetGlyphOutlineUntransformed().
|
private |
Definition at line 143 of file LogicalFontInstance.hxx.
Referenced by GetScale(), NeedsArtificialBold(), and NeedsArtificialItalic().
|
private |
Definition at line 146 of file LogicalFontInstance.hxx.
Referenced by GetScale().
|
private |
Definition at line 147 of file LogicalFontInstance.hxx.
Referenced by NeedsArtificialBold(), and NeedsArtificialItalic().
|
mutableprivate |
Definition at line 159 of file LogicalFontInstance.hxx.
Referenced by GetGlyphOutlineUntransformed(), and ~LogicalFontInstance().
|
private |
Definition at line 144 of file LogicalFontInstance.hxx.
Referenced by GetHbFont(), and ~LogicalFontInstance().
|
mutableprivate |
Definition at line 145 of file LogicalFontInstance.hxx.
Referenced by GetHbFontUntransformed(), and ~LogicalFontInstance().
|
private |
Definition at line 148 of file LogicalFontInstance.hxx.
Referenced by IsGraphiteFont().
|
private |
Definition at line 157 of file LogicalFontInstance.hxx.
Referenced by NeedOffsetCorrection().
|
private |
Definition at line 141 of file LogicalFontInstance.hxx.
Referenced by AddFallbackForUnicode(), GetFallbackForUnicode(), IgnoreFallbackForUnicode(), and ~LogicalFontInstance().
bool LogicalFontInstance::mbInit |
Definition at line 83 of file LogicalFontInstance.hxx.
Referenced by OutputDevice::ImplNewFont().
tools::Long LogicalFontInstance::mnLineHeight |
Definition at line 80 of file LogicalFontInstance.hxx.
Referenced by vcl::PDFWriterImpl::drawShadow(), and OutputDevice::ImplNewFont().
Degree10 LogicalFontInstance::mnOrientation |
Definition at line 82 of file LogicalFontInstance.hxx.
Referenced by vcl::PDFWriterImpl::drawLayout(), vcl::PDFWriterImpl::drawStrikeoutChar(), OutputDevice::ImplNewFont(), OutputDevice::SetFontOrientation(), and Printer::SetFontOrientation().
Degree10 LogicalFontInstance::mnOwnOrientation |
Definition at line 81 of file LogicalFontInstance.hxx.
Referenced by OutputDevice::GetFontMetric(), and OutputDevice::SetFontOrientation().
const ConvertChar* LogicalFontInstance::mpConversion |
Definition at line 78 of file LogicalFontInstance.hxx.
|
mutableprivate |
Definition at line 142 of file LogicalFontInstance.hxx.
Referenced by GetGlyphBoundRect(), ImplFontCache::Invalidate(), and ~LogicalFontInstance().
ImplFontMetricDataRef LogicalFontInstance::mxFontMetric |
Definition at line 77 of file LogicalFontInstance.hxx.
Referenced by vcl::PDFWriterImpl::drawStraightTextLine(), vcl::PDFWriterImpl::drawStrikeoutLine(), vcl::PDFWriterImpl::drawTextLine(), OutputDevice::DrawWaveLine(), vcl::PDFWriterImpl::drawWaveTextLine(), OutputDevice::GetFontMetric(), OutputDevice::ImplDrawStraightTextLine(), OutputDevice::ImplDrawStrikeoutLine(), OutputDevice::ImplDrawWaveTextLine(), OutputDevice::ImplNewFont(), OutputDevice::SetFontOrientation(), Printer::SetFontOrientation(), and ~LogicalFontInstance().