PCL
pcl::Font Class Reference

Client-side interface to a PixInsight Font object. More...

#include <Font.h>

+ Inheritance diagram for pcl::Font:

Public Types

using family = FontFamily::value_type
 
using std_stretch = FontStretch::value_type
 
using std_weight = FontWeight::value_type
 

Public Member Functions

 Font (const Font &f)
 
 Font (const String &face, double size=12.0)
 
 Font (family f=FontFamily::Default, double size=12.0)
 
 Font (Font &&x)
 
 ~Font () override
 
int Ascent () const
 
StringList AvailableStyles () const
 
StringList AvailableWritingSystems () const
 
Rect BoundingRect (const String &) const
 
int Descent () const
 
void DisableKerning (bool=true)
 
void EnableKerning (bool=true)
 
String Face () const
 
int Height () const
 
bool IsBold () const
 
bool IsCharDefined (int) const
 
bool IsExactMatch () const
 
bool IsFixedPitch () const
 
bool IsFixedPitch (const String &style) const
 
bool IsItalic () const
 
bool IsItalic (const String &style) const
 
bool IsKerningEnabled () const
 
bool IsOverline () const
 
bool IsScalable (const String &style=String()) const
 
bool IsStrikeOut () const
 
bool IsUnderline () const
 
int LineSpacing () const
 
int MaxWidth () const
 
Fontoperator= (const Font &f)
 
Fontoperator= (Font &&x)
 
Array< double > OptimalPointSizes (const String &style=String()) const
 
int PixelSize () const
 
double PointSize () const
 
void SetBold (bool b=true)
 
void SetFace (const String &)
 
void SetFixedPitch (bool=true)
 
void SetItalic (bool=true)
 
void SetOverline (bool=true)
 
void SetPixelSize (int)
 
void SetPointSize (double)
 
void SetStretchFactor (int)
 
void SetStrikeOut (bool=true)
 
void SetUnderline (bool=true)
 
void SetWeight (int)
 
int StretchFactor () const
 
Rect TightBoundingRect (const String &) const
 
int Weight () const
 
int Weight (const String &style) const
 
int Width (const String &) const
 
int Width (int ch) const
 
- Public Member Functions inherited from pcl::UIObject
virtual ~UIObject () noexcept(false)
 
virtual void EnsureUnique ()
 
bool IsAlias () const
 
bool IsGarbage () const
 
bool IsNull () const
 
bool IsSameObject (const UIObject &o) const
 
bool IsUnique () const
 
String ObjectId () const
 
IsoString ObjectType () const
 
bool operator< (const UIObject &o) const
 
bool operator== (const UIObject &o) const
 
size_type RefCount () const
 
void SetObjectId (const String &id)
 

Static Public Member Functions

static StringList AvailableFonts (const String &writingSystem=String())
 
static StringList AvailableFontStyles (const String &font)
 
static StringList AvailableFontWritingSystems (const String &font)
 
static int FontWeight (const String &font, const String &style=String())
 
static bool IsFixedPitchFont (const String &font, const String &style=String())
 
static bool IsItalicFont (const String &font, const String &style=String())
 
static bool IsScalableFont (const String &font, const String &style=String())
 
static FontNull ()
 
static Array< double > OptimalFontPointSizes (const String &font, const String &style=String())
 
- Static Public Member Functions inherited from pcl::UIObject
static UIObjectNull ()
 

Additional Inherited Members

- Protected Member Functions inherited from pcl::UIObject
 UIObject ()=default
 
 UIObject (const UIObject &x)
 
 UIObject (UIObject &&x)
 
UIObjectoperator= (const UIObject &x)
 
UIObjectoperator= (UIObject &&x)
 

Detailed Description

TODO: Write a detailed description for Font.

Definition at line 206 of file Font.h.

Member Typedef Documentation

◆ family

using pcl::Font::family = FontFamily::value_type

Represents a standard font family.

Definition at line 213 of file Font.h.

◆ std_stretch

using pcl::Font::std_stretch = FontStretch::value_type

Represents a standard font stretch.

Definition at line 223 of file Font.h.

◆ std_weight

using pcl::Font::std_weight = FontWeight::value_type

Represents a standard font weight.

Definition at line 218 of file Font.h.

Constructor & Destructor Documentation

◆ Font() [1/4]

pcl::Font::Font ( family  f = FontFamily::Default,
double  size = 12.0 
)

Constructs a Font object with the specified family and size in points.

TODO: Elaborate on font families, font matching, etc.

◆ Font() [2/4]

pcl::Font::Font ( const String face,
double  size = 12.0 
)

Constructs a Font object with the specified font face and size in points.

TODO: Elaborate on font faces, font matching, etc.

◆ Font() [3/4]

pcl::Font::Font ( const Font f)
inline

Copy constructor. This object will reference the same server-side font as the specified instance f.

Definition at line 245 of file Font.h.

◆ Font() [4/4]

pcl::Font::Font ( Font &&  x)
inline

Move constructor.

Definition at line 252 of file Font.h.

◆ ~Font()

pcl::Font::~Font ( )
inlineoverride

Destroys a Font object. If this object references an existing font in the PixInsight core application, its reference count is decremented. If it becomes unreferenced, it will be garbage-collected.

Definition at line 261 of file Font.h.

Member Function Documentation

◆ Ascent()

int pcl::Font::Ascent ( ) const

#

◆ AvailableFonts()

static StringList pcl::Font::AvailableFonts ( const String writingSystem = String())
static

#

◆ AvailableFontStyles()

static StringList pcl::Font::AvailableFontStyles ( const String font)
static

#

◆ AvailableFontWritingSystems()

static StringList pcl::Font::AvailableFontWritingSystems ( const String font)
static

#

◆ AvailableStyles()

StringList pcl::Font::AvailableStyles ( ) const
inline

#

Definition at line 314 of file Font.h.

◆ AvailableWritingSystems()

StringList pcl::Font::AvailableWritingSystems ( ) const
inline

#

Definition at line 307 of file Font.h.

◆ BoundingRect()

Rect pcl::Font::BoundingRect ( const String ) const

#

◆ Descent()

int pcl::Font::Descent ( ) const

#

◆ DisableKerning()

void pcl::Font::DisableKerning ( bool  = true)

#

◆ EnableKerning()

void pcl::Font::EnableKerning ( bool  = true)

#

◆ Face()

String pcl::Font::Face ( ) const

◆ FontWeight()

static int pcl::Font::FontWeight ( const String font,
const String style = String() 
)
static

#

◆ Height()

int pcl::Font::Height ( ) const

#

◆ IsBold()

bool pcl::Font::IsBold ( ) const
inline

#

Definition at line 401 of file Font.h.

◆ IsCharDefined()

bool pcl::Font::IsCharDefined ( int  ) const

#

◆ IsExactMatch()

bool pcl::Font::IsExactMatch ( ) const

#

◆ IsFixedPitch() [1/2]

bool pcl::Font::IsFixedPitch ( ) const

#

◆ IsFixedPitch() [2/2]

bool pcl::Font::IsFixedPitch ( const String style) const
inline

#

Definition at line 355 of file Font.h.

◆ IsFixedPitchFont()

static bool pcl::Font::IsFixedPitchFont ( const String font,
const String style = String() 
)
static

#

◆ IsItalic() [1/2]

bool pcl::Font::IsItalic ( ) const

#

◆ IsItalic() [2/2]

bool pcl::Font::IsItalic ( const String style) const
inline

#

Definition at line 419 of file Font.h.

◆ IsItalicFont()

static bool pcl::Font::IsItalicFont ( const String font,
const String style = String() 
)
static

#

◆ IsKerningEnabled()

bool pcl::Font::IsKerningEnabled ( ) const

#

◆ IsOverline()

bool pcl::Font::IsOverline ( ) const

#

◆ IsScalable()

bool pcl::Font::IsScalable ( const String style = String()) const
inline

#

Definition at line 321 of file Font.h.

◆ IsScalableFont()

static bool pcl::Font::IsScalableFont ( const String font,
const String style = String() 
)
static

#

◆ IsStrikeOut()

bool pcl::Font::IsStrikeOut ( ) const

#

◆ IsUnderline()

bool pcl::Font::IsUnderline ( ) const

#

◆ LineSpacing()

int pcl::Font::LineSpacing ( ) const

#

◆ MaxWidth()

int pcl::Font::MaxWidth ( ) const

#

◆ Null()

static Font& pcl::Font::Null ( )
static

Returns a reference to a null font. A null Font object does not correspond to an existing font object in the PixInsight core application.

◆ operator=() [1/2]

Font& pcl::Font::operator= ( const Font f)
inline

Copy assignment operator. Returns a reference to this object.

Makes this object reference the same server-side font as the specified instance f. If the previous font becomes unreferenced, it will be garbage-collected by the PixInsight core application.

Definition at line 272 of file Font.h.

◆ operator=() [2/2]

Font& pcl::Font::operator= ( Font &&  x)
inline

Move assignment operator. Returns a reference to this object.

Definition at line 281 of file Font.h.

◆ OptimalFontPointSizes()

static Array<double> pcl::Font::OptimalFontPointSizes ( const String font,
const String style = String() 
)
static

#

◆ OptimalPointSizes()

Array<double> pcl::Font::OptimalPointSizes ( const String style = String()) const
inline

#

Definition at line 328 of file Font.h.

◆ PixelSize()

int pcl::Font::PixelSize ( ) const

#

◆ PointSize()

double pcl::Font::PointSize ( ) const

#

◆ SetBold()

void pcl::Font::SetBold ( bool  b = true)
inline

#

Definition at line 408 of file Font.h.

◆ SetFace()

void pcl::Font::SetFace ( const String )

#

◆ SetFixedPitch()

void pcl::Font::SetFixedPitch ( bool  = true)

#

◆ SetItalic()

void pcl::Font::SetItalic ( bool  = true)

#

◆ SetOverline()

void pcl::Font::SetOverline ( bool  = true)

#

◆ SetPixelSize()

void pcl::Font::SetPixelSize ( int  )

#

◆ SetPointSize()

void pcl::Font::SetPointSize ( double  )

#

◆ SetStretchFactor()

void pcl::Font::SetStretchFactor ( int  )

#

◆ SetStrikeOut()

void pcl::Font::SetStrikeOut ( bool  = true)

#

◆ SetUnderline()

void pcl::Font::SetUnderline ( bool  = true)

#

◆ SetWeight()

void pcl::Font::SetWeight ( int  )

#

◆ StretchFactor()

int pcl::Font::StretchFactor ( ) const

#

◆ TightBoundingRect()

Rect pcl::Font::TightBoundingRect ( const String ) const

#

◆ Weight() [1/2]

int pcl::Font::Weight ( ) const

#

◆ Weight() [2/2]

int pcl::Font::Weight ( const String style) const
inline

#

Definition at line 390 of file Font.h.

◆ Width() [1/2]

int pcl::Font::Width ( const String ) const

#

◆ Width() [2/2]

int pcl::Font::Width ( int  ch) const

#


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