LibreOffice Module vcl (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
vcl::Font Class Reference

#include <font.hxx>

Inheritance diagram for vcl::Font:
[legend]
Collaboration diagram for vcl::Font:
[legend]

Public Types

typedef o3tl::cow_wrapper< ImplFontImplType
 

Public Member Functions

 Font ()
 
 Font (const Font &)
 
 Font (Font &&) noexcept
 
 Font (const OUString &rFamilyName, const Size &)
 
 Font (const OUString &rFamilyName, const OUString &rStyleName, const Size &)
 
 Font (FontFamily eFamily, const Size &)
 
virtual ~Font ()
 
const OUString & GetFamilyName () const
 
FontFamily GetFamilyType ()
 
FontFamily GetFamilyType () const
 
const OUString & GetStyleName () const
 
FontWeight GetWeight ()
 
FontWeight GetWeight () const
 
FontItalic GetItalic ()
 
FontItalic GetItalic () const
 
FontPitch GetPitch ()
 
FontPitch GetPitch () const
 
FontWidth GetWidthType ()
 
FontWidth GetWidthType () const
 
TextAlign GetAlignment () const
 
rtl_TextEncoding GetCharSet () const
 
bool IsSymbolFont () const
 
void SetFamilyName (const OUString &rFamilyName)
 
void SetStyleName (const OUString &rStyleName)
 
void SetFamily (FontFamily)
 
void SetPitch (FontPitch ePitch)
 
void SetItalic (FontItalic)
 
void SetWeight (FontWeight)
 
void SetWidthType (FontWidth)
 
void SetAlignment (TextAlign)
 
void SetCharSet (rtl_TextEncoding)
 
void SetSymbolFlag (bool)
 
int GetQuality () const
 
void SetQuality (int)
 
void IncreaseQualityBy (int)
 
void DecreaseQualityBy (int)
 
const ColorGetColor () const
 
const ColorGetFillColor () const
 
bool IsTransparent () const
 
void SetColor (const Color &)
 
void SetFillColor (const Color &)
 
void SetTransparent (bool bTransparent)
 
void SetFontSize (const Size &)
 
const SizeGetFontSize () const
 
void SetFontHeight (tools::Long nHeight)
 
tools::Long GetFontHeight () const
 
void SetAverageFontWidth (tools::Long nWidth)
 
tools::Long GetAverageFontWidth () const
 
tools::Long GetOrCalculateAverageFontWidth () const
 
void SetLanguageTag (const LanguageTag &)
 
const LanguageTagGetLanguageTag () const
 
void SetCJKContextLanguageTag (const LanguageTag &)
 
const LanguageTagGetCJKContextLanguageTag () const
 
void SetLanguage (LanguageType)
 
LanguageType GetLanguage () const
 
void SetCJKContextLanguage (LanguageType)
 
LanguageType GetCJKContextLanguage () const
 
void SetOrientation (Degree10 nLineOrientation)
 
Degree10 GetOrientation () const
 
void SetVertical (bool bVertical)
 
bool IsVertical () const
 
void SetKerning (FontKerning nKerning)
 
FontKerning GetKerning () const
 
bool IsKerning () const
 
void SetOutline (bool bOutline)
 
bool IsOutline () const
 
void SetShadow (bool bShadow)
 
bool IsShadow () const
 
void SetRelief (FontRelief)
 
FontRelief GetRelief () const
 
void SetUnderline (FontLineStyle)
 
FontLineStyle GetUnderline () const
 
void SetOverline (FontLineStyle)
 
FontLineStyle GetOverline () const
 
void SetStrikeout (FontStrikeout)
 
FontStrikeout GetStrikeout () const
 
void SetEmphasisMark (FontEmphasisMark)
 
FontEmphasisMark GetEmphasisMark () const
 
void SetWordLineMode (bool bWordLine)
 
bool IsWordLineMode () const
 
void Merge (const Font &rFont)
 
void GetFontAttributes (FontAttributes &rAttrs) const
 
Fontoperator= (const Font &)
 
Fontoperator= (Font &&) noexcept
 
bool operator== (const Font &) const
 
bool operator!= (const Font &rFont) const
 
bool IsSameInstance (const Font &) const
 
bool EqualIgnoreColor (const Font &) const
 
size_t GetHashValue () const
 
size_t GetHashValueIgnoreColor () const
 
bool IsUnderlineAbove () const
 

Static Public Member Functions

static Font identifyFont (const void *pBuffer, sal_uInt32 nLen)
 

Private Attributes

ImplType mpImplFont
 

Friends

VCL_DLLPUBLIC SvStreamReadFont (SvStream &rIStm, vcl::Font &)
 
VCL_DLLPUBLIC SvStreamWriteFont (SvStream &rOStm, const vcl::Font &)
 

Detailed Description

Definition at line 47 of file include/vcl/font.hxx.

Member Typedef Documentation

◆ ImplType

Definition at line 173 of file include/vcl/font.hxx.

Constructor & Destructor Documentation

◆ Font() [1/6]

Font::Font ( )
explicit

Definition at line 58 of file font/font.cxx.

◆ Font() [2/6]

Font::Font ( const Font rFont)

Definition at line 62 of file font/font.cxx.

◆ Font() [3/6]

Font::Font ( vcl::Font &&  rFont)
noexcept

Definition at line 66 of file font/font.cxx.

◆ Font() [4/6]

Font::Font ( const OUString &  rFamilyName,
const Size rSize 
)
explicit

Definition at line 70 of file font/font.cxx.

References mpImplFont.

◆ Font() [5/6]

Font::Font ( const OUString &  rFamilyName,
const OUString &  rStyleName,
const Size rSize 
)
explicit

Definition at line 80 of file font/font.cxx.

References mpImplFont.

◆ Font() [6/6]

Font::Font ( FontFamily  eFamily,
const Size rSize 
)
explicit

Definition at line 92 of file font/font.cxx.

References mpImplFont.

◆ ~Font()

Font::~Font ( )
virtual

Definition at line 102 of file font/font.cxx.

Member Function Documentation

◆ DecreaseQualityBy()

void Font::DecreaseQualityBy ( int  nQualityAmount)

Definition at line 913 of file font/font.cxx.

References mpImplFont.

◆ EqualIgnoreColor()

bool Font::EqualIgnoreColor ( const Font rFont) const

Definition at line 332 of file font/font.cxx.

References mpImplFont.

◆ GetAlignment()

TextAlign Font::GetAlignment ( ) const

◆ GetAverageFontWidth()

tools::Long Font::GetAverageFontWidth ( ) const

◆ GetCharSet()

rtl_TextEncoding Font::GetCharSet ( ) const

◆ GetCJKContextLanguage()

LanguageType Font::GetCJKContextLanguage ( ) const

Definition at line 892 of file font/font.cxx.

References mpImplFont.

Referenced by OutputDevice::ImplGetEmphasisMarkStyle(), and IsUnderlineAbove().

◆ GetCJKContextLanguageTag()

const LanguageTag & Font::GetCJKContextLanguageTag ( ) const

Definition at line 890 of file font/font.cxx.

References mpImplFont.

Referenced by Merge().

◆ GetColor()

const Color & Font::GetColor ( ) const

◆ GetEmphasisMark()

FontEmphasisMark Font::GetEmphasisMark ( ) const

◆ GetFamilyName()

const OUString & Font::GetFamilyName ( ) const

◆ GetFamilyType() [1/2]

FontFamily Font::GetFamilyType ( )

◆ GetFamilyType() [2/2]

FontFamily Font::GetFamilyType ( ) const

Definition at line 908 of file font/font.cxx.

References mpImplFont.

◆ GetFillColor()

const Color & Font::GetFillColor ( ) const

◆ GetFontAttributes()

void Font::GetFontAttributes ( FontAttributes rAttrs) const

◆ GetFontHeight()

tools::Long Font::GetFontHeight ( ) const

◆ GetFontSize()

const Size & Font::GetFontSize ( ) const

◆ GetHashValue()

size_t Font::GetHashValue ( ) const

Definition at line 337 of file font/font.cxx.

References mpImplFont.

◆ GetHashValueIgnoreColor()

size_t Font::GetHashValueIgnoreColor ( ) const

Definition at line 342 of file font/font.cxx.

References mpImplFont.

◆ GetItalic() [1/2]

FontItalic Font::GetItalic ( )

◆ GetItalic() [2/2]

FontItalic Font::GetItalic ( ) const

Definition at line 907 of file font/font.cxx.

References mpImplFont.

◆ GetKerning()

FontKerning Font::GetKerning ( ) const

Definition at line 896 of file font/font.cxx.

References mpImplFont.

Referenced by OutputDevice::ImplPrepareLayoutArgs().

◆ GetLanguage()

LanguageType Font::GetLanguage ( ) const

◆ GetLanguageTag()

const LanguageTag & Font::GetLanguageTag ( ) const

Definition at line 889 of file font/font.cxx.

References mpImplFont.

Referenced by OutputDevice::ImplPrepareLayoutArgs(), and Merge().

◆ GetOrCalculateAverageFontWidth()

tools::Long Font::GetOrCalculateAverageFontWidth ( ) const

◆ GetOrientation()

Degree10 Font::GetOrientation ( ) const

◆ GetOverline()

FontLineStyle Font::GetOverline ( ) const

◆ GetPitch() [1/2]

FontPitch Font::GetPitch ( )

Definition at line 898 of file font/font.cxx.

References mpImplFont.

Referenced by EMFWriter::ImplCheckTextAttr(), and WMFWriter::WMFRecord_CreateFontIndirect().

◆ GetPitch() [2/2]

FontPitch Font::GetPitch ( ) const

Definition at line 904 of file font/font.cxx.

References mpImplFont.

◆ GetQuality()

int Font::GetQuality ( ) const

Definition at line 910 of file font/font.cxx.

References mpImplFont.

◆ GetRelief()

FontRelief Font::GetRelief ( ) const

◆ GetStrikeout()

FontStrikeout Font::GetStrikeout ( ) const

◆ GetStyleName()

const OUString & Font::GetStyleName ( ) const

Definition at line 879 of file font/font.cxx.

References mpImplFont.

Referenced by Merge(), TrackFontMappingUse(), and MetafileXmlDump::writeXml().

◆ GetUnderline()

FontLineStyle Font::GetUnderline ( ) const

◆ GetWeight() [1/2]

FontWeight Font::GetWeight ( )

◆ GetWeight() [2/2]

FontWeight Font::GetWeight ( ) const

Definition at line 905 of file font/font.cxx.

References mpImplFont.

◆ GetWidthType() [1/2]

FontWidth Font::GetWidthType ( )

Definition at line 900 of file font/font.cxx.

References mpImplFont.

Referenced by Merge().

◆ GetWidthType() [2/2]

FontWidth Font::GetWidthType ( ) const

Definition at line 906 of file font/font.cxx.

References mpImplFont.

◆ identifyFont()

Font Font::identifyFont ( const void *  pBuffer,
sal_uInt32  nLen 
)
static

Definition at line 855 of file font/font.cxx.

◆ IncreaseQualityBy()

void Font::IncreaseQualityBy ( int  nQualityAmount)

Definition at line 912 of file font/font.cxx.

References mpImplFont.

◆ IsKerning()

bool Font::IsKerning ( ) const

Definition at line 244 of file font/font.cxx.

References mpImplFont, and NONE.

Referenced by OutputDevice::ImplPrepareLayoutArgs(), and Merge().

◆ IsOutline()

bool Font::IsOutline ( ) const

◆ IsSameInstance()

bool Font::IsSameInstance ( const Font rFont) const

Definition at line 923 of file font/font.cxx.

References mpImplFont.

Referenced by OutputDevice::SetFont().

◆ IsShadow()

bool Font::IsShadow ( ) const

◆ IsSymbolFont()

bool Font::IsSymbolFont ( ) const

Definition at line 173 of file font/font.cxx.

References mpImplFont.

Referenced by SetSymbolFlag().

◆ IsTransparent()

bool Font::IsTransparent ( ) const

◆ IsUnderlineAbove()

bool vcl::Font::IsUnderlineAbove ( ) const
inline

◆ IsVertical()

bool Font::IsVertical ( ) const

◆ IsWordLineMode()

bool Font::IsWordLineMode ( ) const

Definition at line 922 of file font/font.cxx.

References mpImplFont.

Referenced by vcl::PDFWriterImpl::drawLayout(), OutputDevice::ImplDrawTextDirect(), and Merge().

◆ Merge()

void Font::Merge ( const Font rFont)

◆ operator!=()

bool vcl::Font::operator!= ( const Font rFont) const
inline

Definition at line 159 of file include/vcl/font.hxx.

References operator==().

◆ operator=() [1/2]

Font & Font::operator= ( const Font rFont)

Definition at line 315 of file font/font.cxx.

References mpImplFont.

◆ operator=() [2/2]

Font & Font::operator= ( vcl::Font &&  rFont)
noexcept

Definition at line 321 of file font/font.cxx.

◆ operator==()

bool Font::operator== ( const Font rFont) const

Definition at line 327 of file font/font.cxx.

References mpImplFont.

Referenced by operator!=(), and FontMetric::operator!=().

◆ SetAlignment()

void Font::SetAlignment ( TextAlign  eAlign)

◆ SetAverageFontWidth()

void Font::SetAverageFontWidth ( tools::Long  nWidth)

◆ SetCharSet()

void Font::SetCharSet ( rtl_TextEncoding  eCharSet)

◆ SetCJKContextLanguage()

void Font::SetCJKContextLanguage ( LanguageType  eLanguage)

Definition at line 214 of file font/font.cxx.

References mpImplFont.

◆ SetCJKContextLanguageTag()

void Font::SetCJKContextLanguageTag ( const LanguageTag rLanguageTag)

Definition at line 202 of file font/font.cxx.

References mpImplFont.

Referenced by Merge().

◆ SetColor()

void Font::SetColor ( const Color rColor)

◆ SetEmphasisMark()

void Font::SetEmphasisMark ( FontEmphasisMark  eEmphasisMark)

Definition at line 303 of file font/font.cxx.

References mpImplFont.

Referenced by Merge().

◆ SetFamily()

void Font::SetFamily ( FontFamily  eFamily)

◆ SetFamilyName()

void Font::SetFamilyName ( const OUString &  rFamilyName)

◆ SetFillColor()

void Font::SetFillColor ( const Color rColor)

◆ SetFontHeight()

void Font::SetFontHeight ( tools::Long  nHeight)

◆ SetFontSize()

void Font::SetFontSize ( const Size rSize)

◆ SetItalic()

void Font::SetItalic ( FontItalic  eItalic)

◆ SetKerning()

void Font::SetKerning ( FontKerning  nKerning)

Definition at line 238 of file font/font.cxx.

References mpImplFont.

Referenced by Merge().

◆ SetLanguage()

void Font::SetLanguage ( LanguageType  eLanguage)

Definition at line 208 of file font/font.cxx.

References LanguageTag::getLanguageType(), maLanguageTag, and mpImplFont.

Referenced by OutputDevice::GetDefaultFont().

◆ SetLanguageTag()

void Font::SetLanguageTag ( const LanguageTag rLanguageTag)

Definition at line 196 of file font/font.cxx.

References maLanguageTag, and mpImplFont.

Referenced by Merge().

◆ SetOrientation()

void Font::SetOrientation ( Degree10  nLineOrientation)

◆ SetOutline()

void Font::SetOutline ( bool  bOutline)

Definition at line 267 of file font/font.cxx.

References mpImplFont.

Referenced by vcl::PDFWriterImpl::drawShadow(), SVMConverter::ImplConvertFromSVM1(), and Merge().

◆ SetOverline()

void Font::SetOverline ( FontLineStyle  eOverline)

Definition at line 285 of file font/font.cxx.

References mpImplFont.

Referenced by Merge().

◆ SetPitch()

void Font::SetPitch ( FontPitch  ePitch)

◆ SetQuality()

void Font::SetQuality ( int  nQuality)

Definition at line 911 of file font/font.cxx.

References mpImplFont.

Referenced by FontMetric::FontMetric(), and OutputDevice::GetFontMetric().

◆ SetRelief()

void Font::SetRelief ( FontRelief  eRelief)

Definition at line 297 of file font/font.cxx.

References mpImplFont.

Referenced by vcl::PDFWriterImpl::drawRelief(), and Merge().

◆ SetShadow()

void Font::SetShadow ( bool  bShadow)

◆ SetStrikeout()

void Font::SetStrikeout ( FontStrikeout  eStrikeout)

Definition at line 291 of file font/font.cxx.

References mpImplFont.

Referenced by SVMConverter::ImplConvertFromSVM1(), and Merge().

◆ SetStyleName()

void Font::SetStyleName ( const OUString &  rStyleName)

Definition at line 142 of file font/font.cxx.

References mpImplFont.

Referenced by FontMetric::FontMetric(), OutputDevice::GetFontMetric(), and Merge().

◆ SetSymbolFlag()

void Font::SetSymbolFlag ( bool  bSymbol)

Definition at line 178 of file font/font.cxx.

References GetCharSet(), IsSymbolFont(), and mpImplFont.

◆ SetTransparent()

void Font::SetTransparent ( bool  bTransparent)

◆ SetUnderline()

void Font::SetUnderline ( FontLineStyle  eUnderline)

◆ SetVertical()

void Font::SetVertical ( bool  bVertical)

Definition at line 232 of file font/font.cxx.

References mpImplFont.

Referenced by Merge().

◆ SetWeight()

void Font::SetWeight ( FontWeight  eWeight)

◆ SetWidthType()

void Font::SetWidthType ( FontWidth  eWidth)

Definition at line 255 of file font/font.cxx.

References mpImplFont.

Referenced by FontMetric::FontMetric(), OutputDevice::GetFontMetric(), and Merge().

◆ SetWordLineMode()

void Font::SetWordLineMode ( bool  bWordLine)

Definition at line 309 of file font/font.cxx.

References mpImplFont.

Referenced by Merge().

Friends And Related Function Documentation

◆ ReadFont

VCL_DLLPUBLIC SvStream & ReadFont ( SvStream rIStm,
vcl::Font  
)
friend

Definition at line 565 of file font/font.cxx.

◆ WriteFont

VCL_DLLPUBLIC SvStream & WriteFont ( SvStream rOStm,
const vcl::Font  
)
friend

Definition at line 623 of file font/font.cxx.

Member Data Documentation

◆ mpImplFont

ImplType vcl::Font::mpImplFont
private

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