LibreOffice Module vcl (master) 1
|
abstract base class for physical font faces More...
#include <PhysicalFontFace.hxx>
Public Member Functions | |
~PhysicalFontFace () | |
virtual rtl::Reference< LogicalFontInstance > | CreateFontInstance (const vcl::font::FontSelectPattern &) const =0 |
virtual sal_IntPtr | GetFontId () const =0 |
virtual FontCharMapRef | GetFontCharMap () const |
virtual bool | GetFontCapabilities (vcl::FontCapabilities &) const |
RawFontData | GetRawFontData (uint32_t) const |
bool | IsBetterMatch (const vcl::font::FontSelectPattern &, FontMatchStatus &) const |
sal_Int32 | CompareIgnoreSize (const PhysicalFontFace &) const |
bool | CreateFontSubset (std::vector< sal_uInt8 > &, const sal_GlyphId *, const sal_uInt8 *, const int, FontSubsetInfo &) const |
bool | IsColorFont () const |
bool | HasColorLayers () const |
std::vector< ColorLayer > | GetGlyphColorLayers (sal_GlyphId) const |
const std::vector< ColorPalette > & | GetColorPalettes () const |
bool | HasColorBitmaps () const |
RawFontData | GetGlyphColorBitmap (sal_GlyphId, tools::Rectangle &) const |
OString | GetGlyphName (sal_GlyphId, bool=false) const |
uint32_t | UnitsPerEm () const |
OUString | GetName (NameID, const LanguageTag &) const |
OUString | GetName (NameID aNameID) const |
virtual hb_face_t * | GetHbFace () const |
virtual hb_blob_t * | GetHbTable (hb_tag_t) const |
virtual const std::vector< hb_variation_t > & | GetVariations (const LogicalFontInstance &) const |
Public Member Functions inherited from FontAttributes | |
FontAttributes () | |
const OUString & | GetFamilyName () const |
FontFamily | GetFamilyType () const |
const OUString & | GetStyleName () const |
FontWeight | GetWeight () const |
FontItalic | GetItalic () const |
FontPitch | GetPitch () const |
FontWidth | GetWidthType () const |
bool | IsMicrosoftSymbolEncoded () const |
void | SetFamilyName (const OUString &sFamilyName) |
void | SetStyleName (const OUString &sStyleName) |
void | SetFamilyType (const FontFamily eFontFamily) |
void | SetPitch (const FontPitch ePitch) |
void | SetItalic (const FontItalic eItalic) |
void | SetWeight (const FontWeight eWeight) |
void | SetWidthType (const FontWidth eWidthType) |
void | SetMicrosoftSymbolEncoded (const bool) |
bool | CompareDeviceIndependentFontAttributes (const FontAttributes &rOther) const |
int | GetQuality () const |
const OUString & | GetMapNames () const |
void | SetQuality (int nQuality) |
void | IncreaseQualityBy (int nQualityAmount) |
void | AddMapName (std::u16string_view) |
Public Member Functions inherited from salhelper::SimpleReferenceObject | |
SimpleReferenceObject () | |
void | acquire () |
void | release () |
Protected Member Functions | |
PhysicalFontFace (const FontAttributes &) | |
hb_font_t * | GetHbUnscaledFont () const |
Protected Member Functions inherited from salhelper::SimpleReferenceObject | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
Protected Attributes | |
hb_face_t * | mpHbFace |
hb_font_t * | mpHbUnscaledFont |
FontCharMapRef | mxCharMap |
std::optional< vcl::FontCapabilities > | mxFontCapabilities |
std::optional< std::vector< ColorPalette > > | mxColorPalettes |
std::optional< std::vector< hb_variation_t > > | mxVariations |
Protected Attributes inherited from salhelper::SimpleReferenceObject | |
oslInterlockedCount | m_nCount |
Additional Inherited Members | |
Static Public Member Functions inherited from salhelper::SimpleReferenceObject | |
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) |
abstract base class for physical font faces
It acts as a factory for its corresponding LogicalFontInstances and can be extended to cache device and font instance specific data.
Definition at line 143 of file PhysicalFontFace.hxx.
vcl::font::PhysicalFontFace::~PhysicalFontFace | ( | ) |
Definition at line 50 of file PhysicalFontFace.cxx.
References mpHbFace, and mpHbUnscaledFont.
|
explicitprotected |
Definition at line 43 of file PhysicalFontFace.cxx.
sal_Int32 vcl::font::PhysicalFontFace::CompareIgnoreSize | ( | const PhysicalFontFace & | rOther | ) | const |
Definition at line 58 of file PhysicalFontFace.cxx.
References FontAttributes::GetFamilyName(), FontAttributes::GetItalic(), FontAttributes::GetStyleName(), FontAttributes::GetWeight(), and FontAttributes::GetWidthType().
Referenced by vcl::font::PhysicalFontFamily::AddFontFace(), and vcl::font::PhysicalFontFamily::UpdateDevFontList().
|
pure virtual |
Implemented in CoreTextFontFace, FreetypeFontFace, WinFontFace, vcl::pdf::BuildinFontFace, and QtFontFace.
Referenced by ImplFontCache::GetFontInstance().
bool vcl::font::PhysicalFontFace::CreateFontSubset | ( | std::vector< sal_uInt8 > & | rOutBuffer, |
const sal_GlyphId * | pGlyphIds, | ||
const sal_uInt8 * | pEncoding, | ||
const int | nGlyphCount, | ||
FontSubsetInfo & | rInfo | ||
) | const |
Definition at line 357 of file PhysicalFontFace.cxx.
References vcl::CreateTTFfontSubset(), GetFontCharMap(), GetHbFace(), and vcl::Ok.
Referenced by vcl::PDFWriterImpl::emitSystemFont(), and vcl::PDFWriterImpl::emitType3Font().
const std::vector< ColorPalette > & vcl::font::PhysicalFontFace::GetColorPalettes | ( | ) | const |
Definition at line 376 of file PhysicalFontFace.cxx.
References a, GetHbFace(), mxColorPalettes, nCount, and u.
Referenced by vcl::PDFWriterImpl::emitType3Font().
|
virtual |
Reimplemented in vcl::pdf::BuildinFontFace.
Definition at line 283 of file PhysicalFontFace.cxx.
References aData, GetRawFontData(), vcl::getTTCoverage(), mxFontCapabilities, vcl::FontCapabilities::oCodePageRange, and vcl::FontCapabilities::oUnicodeRange.
|
virtual |
Reimplemented in vcl::pdf::BuildinFontFace.
Definition at line 247 of file PhysicalFontFace.cxx.
References aData, FontCharMap::GetDefaultMap(), GetHbFace(), GetRawFontData(), HasMicrosoftSymbolCmap(), tools::SvRef< typename T >::is(), FontAttributes::IsMicrosoftSymbolEncoded(), and mxCharMap.
Referenced by CreateFontSubset().
|
pure virtual |
Implemented in vcl::pdf::BuildinFontFace, QtFontFace, CoreTextFontFace, FreetypeFontFace, and WinFontFace.
RawFontData vcl::font::PhysicalFontFace::GetGlyphColorBitmap | ( | sal_GlyphId | nGlyphIndex, |
tools::Rectangle & | rRect | ||
) | const |
Definition at line 428 of file PhysicalFontFace.cxx.
References aData, GetHbUnscaledFont(), and HasColorBitmaps().
Referenced by vcl::PDFWriterImpl::registerGlyph().
std::vector< ColorLayer > vcl::font::PhysicalFontFace::GetGlyphColorLayers | ( | sal_GlyphId | nGlyphIndex | ) | const |
Definition at line 406 of file PhysicalFontFace.cxx.
References GetHbFace(), HasColorLayers(), nCount, and u.
Referenced by vcl::PDFWriterImpl::registerGlyph().
OString vcl::font::PhysicalFontFace::GetGlyphName | ( | sal_GlyphId | nGlyphIndex, |
bool | bValidate = false |
||
) | const |
Definition at line 450 of file PhysicalFontFace.cxx.
References aBuffer, GetHbUnscaledFont(), and p.
Referenced by vcl::PDFWriterImpl::emitType3Font().
|
virtual |
Reimplemented in FreetypeFontFace.
Definition at line 232 of file PhysicalFontFace.cxx.
References vcl::font::getTable(), and mpHbFace.
Referenced by CreateFontSubset(), GetColorPalettes(), GetFontCharMap(), GetGlyphColorLayers(), GetHbUnscaledFont(), GetName(), GetRawFontData(), HasColorBitmaps(), and HasColorLayers().
|
inlinevirtual |
Reimplemented in QtFontFace, CoreTextFontFace, FreetypeFontFace, and WinFontFace.
Definition at line 192 of file PhysicalFontFace.hxx.
|
protected |
Definition at line 240 of file PhysicalFontFace.cxx.
References GetHbFace(), and mpHbUnscaledFont.
Referenced by GetGlyphColorBitmap(), and GetGlyphName().
|
inline |
Definition at line 189 of file PhysicalFontFace.hxx.
References GetName(), and LANGUAGE_NONE.
Referenced by GetName().
OUString vcl::font::PhysicalFontFace::GetName | ( | NameID | aNameID, |
const LanguageTag & | rLanguageTag | ||
) | const |
Definition at line 469 of file PhysicalFontFace.cxx.
References aBuf, LanguageTag::getBcp47(), GetHbFace(), LanguageTag::getLanguageType(), LANGUAGE_NONE, and sName.
Referenced by vcl::font::FeatureCollector::collectForTable().
RawFontData vcl::font::PhysicalFontFace::GetRawFontData | ( | uint32_t | nTag | ) | const |
Definition at line 218 of file PhysicalFontFace.cxx.
References GetHbFace().
Referenced by GetFontCapabilities(), GetFontCharMap(), and vcl::PDFWriterImpl::registerGlyph().
|
virtual |
Reimplemented in CoreTextFontFace, FreetypeFontFace, and WinFontFace.
Definition at line 499 of file PhysicalFontFace.cxx.
References mxVariations, and SAL_WARN.
Referenced by vcl::PDFWriterImpl::registerGlyph().
bool vcl::font::PhysicalFontFace::HasColorBitmaps | ( | ) | const |
Definition at line 426 of file PhysicalFontFace.cxx.
References GetHbFace().
Referenced by GetGlyphColorBitmap().
bool vcl::font::PhysicalFontFace::HasColorLayers | ( | ) | const |
Definition at line 370 of file PhysicalFontFace.cxx.
References GetHbFace().
Referenced by GetGlyphColorLayers().
bool vcl::font::PhysicalFontFace::IsBetterMatch | ( | const vcl::font::FontSelectPattern & | rFSP, |
FontMatchStatus & | rStatus | ||
) | const |
Definition at line 189 of file PhysicalFontFace.cxx.
References vcl::font::FamilyNameMatchValue(), FontAttributes::GetFamilyName(), FontAttributes::GetItalic(), FontAttributes::GetPitch(), FontAttributes::GetStyleName(), FontAttributes::GetWeight(), FontAttributes::GetWidthType(), vcl::font::ItalicMatchValue(), vcl::font::FontMatchStatus::mnFaceMatch, vcl::font::FontSelectPattern::mnOrientation, vcl::font::FontSelectPattern::mnWidth, vcl::font::PitchMatchValue(), vcl::font::PreferNormalFontWidthMatchValue(), vcl::font::StyleNameMatchValue(), and vcl::font::WeightMatchValue().
Referenced by vcl::font::PhysicalFontFamily::FindBestFontFace().
|
inline |
Definition at line 174 of file PhysicalFontFace.hxx.
Referenced by vcl::PDFWriterImpl::registerGlyph().
|
inline |
Definition at line 186 of file PhysicalFontFace.hxx.
Referenced by vcl::PDFWriterImpl::emitSystemFont(), vcl::PDFWriterImpl::emitType3Font(), LogicalFontInstance::GetScale(), and vcl::PDFWriterImpl::registerSimpleGlyph().
|
mutableprotected |
Definition at line 201 of file PhysicalFontFace.hxx.
Referenced by GetHbFace(), and ~PhysicalFontFace().
|
mutableprotected |
Definition at line 202 of file PhysicalFontFace.hxx.
Referenced by GetHbUnscaledFont(), and ~PhysicalFontFace().
|
mutableprotected |
Definition at line 203 of file PhysicalFontFace.hxx.
Referenced by GetFontCharMap().
|
mutableprotected |
Definition at line 205 of file PhysicalFontFace.hxx.
Referenced by GetColorPalettes().
|
mutableprotected |
Definition at line 204 of file PhysicalFontFace.hxx.
Referenced by GetFontCapabilities().
|
mutableprotected |
Definition at line 206 of file PhysicalFontFace.hxx.
Referenced by GetVariations().