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
 
FontEmphasisMark GetEmphasisMarkStyle () 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)
 
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 SetFixKerning (const short nSpacing)
 
short GetFixKerning () const
 
bool IsFixKerning () 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 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 172 of file include/vcl/font.hxx.

Constructor & Destructor Documentation

◆ Font() [1/6]

Font::Font ( )
explicit

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

◆ Font() [2/6]

Font::Font ( const Font rFont)

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

◆ Font() [3/6]

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

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

◆ Font() [4/6]

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

Definition at line 71 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 81 of file font/font.cxx.

References mpImplFont.

◆ Font() [6/6]

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

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

References mpImplFont.

◆ ~Font()

Font::~Font ( )
virtual

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

Member Function Documentation

◆ DecreaseQualityBy()

void Font::DecreaseQualityBy ( int  nQualityAmount)

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

References mpImplFont.

◆ EqualIgnoreColor()

bool Font::EqualIgnoreColor ( const Font rFont) const

Definition at line 348 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 918 of file font/font.cxx.

References mpImplFont.

Referenced by GetEmphasisMarkStyle(), and IsUnderlineAbove().

◆ GetCJKContextLanguageTag()

const LanguageTag & Font::GetCJKContextLanguageTag ( ) const

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

References mpImplFont.

Referenced by Merge().

◆ GetColor()

const Color & Font::GetColor ( ) const

◆ GetEmphasisMark()

FontEmphasisMark Font::GetEmphasisMark ( ) const

◆ GetEmphasisMarkStyle()

FontEmphasisMark Font::GetEmphasisMarkStyle ( ) const

◆ GetFamilyName()

const OUString & Font::GetFamilyName ( ) const

◆ GetFamilyType() [1/2]

FontFamily Font::GetFamilyType ( )

◆ GetFamilyType() [2/2]

FontFamily Font::GetFamilyType ( ) const

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

References mpImplFont.

◆ GetFillColor()

const Color & Font::GetFillColor ( ) const

◆ GetFixKerning()

short Font::GetFixKerning ( ) const

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

References mpImplFont.

◆ GetFontAttributes()

void Font::GetFontAttributes ( FontAttributes rAttrs) const

◆ GetFontHeight()

tools::Long Font::GetFontHeight ( ) const

◆ GetFontSize()

const Size & Font::GetFontSize ( ) const

◆ GetHashValueIgnoreColor()

size_t Font::GetHashValueIgnoreColor ( ) const

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

References mpImplFont.

◆ GetItalic() [1/2]

FontItalic Font::GetItalic ( )

◆ GetItalic() [2/2]

FontItalic Font::GetItalic ( ) const

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

References mpImplFont.

◆ GetKerning()

FontKerning Font::GetKerning ( ) const

Definition at line 922 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 915 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 924 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 930 of file font/font.cxx.

References mpImplFont.

◆ GetQuality()

int Font::GetQuality ( ) const

Definition at line 936 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 905 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 931 of file font/font.cxx.

References mpImplFont.

◆ GetWidthType() [1/2]

FontWidth Font::GetWidthType ( )

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

References mpImplFont.

Referenced by Merge().

◆ GetWidthType() [2/2]

FontWidth Font::GetWidthType ( ) const

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

References mpImplFont.

◆ identifyFont()

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

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

◆ IncreaseQualityBy()

void Font::IncreaseQualityBy ( int  nQualityAmount)

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

References mpImplFont.

◆ IsFixKerning()

bool Font::IsFixKerning ( ) const

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

References mpImplFont.

Referenced by OutputDevice::ImplPrepareLayoutArgs().

◆ IsKerning()

bool Font::IsKerning ( ) const

Definition at line 215 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 949 of file font/font.cxx.

References mpImplFont.

Referenced by OutputDevice::SetFont().

◆ IsShadow()

bool Font::IsShadow ( ) const

◆ 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 948 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 302 of file font/font.cxx.

References mpImplFont.

◆ operator=() [2/2]

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

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

◆ operator==()

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

Definition at line 343 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 185 of file font/font.cxx.

References mpImplFont.

◆ SetCJKContextLanguageTag()

void Font::SetCJKContextLanguageTag ( const LanguageTag rLanguageTag)

Definition at line 173 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 290 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)

◆ SetFixKerning()

void Font::SetFixKerning ( const short  nSpacing)

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

References mpImplFont.

◆ 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 209 of file font/font.cxx.

References mpImplFont.

Referenced by CreateFont(), and Merge().

◆ SetLanguage()

void Font::SetLanguage ( LanguageType  eLanguage)

Definition at line 179 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 167 of file font/font.cxx.

Referenced by Merge().

◆ SetOrientation()

void Font::SetOrientation ( Degree10  nLineOrientation)

◆ SetOutline()

void Font::SetOutline ( bool  bOutline)

Definition at line 254 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 272 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 937 of file font/font.cxx.

References mpImplFont.

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

◆ SetRelief()

void Font::SetRelief ( FontRelief  eRelief)

Definition at line 284 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 278 of file font/font.cxx.

References mpImplFont.

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

◆ SetStyleName()

void Font::SetStyleName ( const OUString &  rStyleName)

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

References mpImplFont.

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

◆ SetTransparent()

void Font::SetTransparent ( bool  bTransparent)

◆ SetUnderline()

void Font::SetUnderline ( FontLineStyle  eUnderline)

◆ SetVertical()

void Font::SetVertical ( bool  bVertical)

Definition at line 203 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 242 of file font/font.cxx.

References mpImplFont.

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

◆ SetWordLineMode()

void Font::SetWordLineMode ( bool  bWordLine)

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

References mpImplFont.

Referenced by CreateFont(), and Merge().

Friends And Related Function Documentation

◆ ReadFont

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

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

◆ WriteFont

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

Definition at line 649 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: