Content


NTL
Core
CFont

CFont



Implementation of Font. Use it to store font parameters. Don't forget to call FreeResources() to release platform font associated with it when it should be released.

You can find more information in comments below. Overrided methods can be found in corresponding base classes or interface.

class CFont :public virtual IFont, public CFeedbackEx, public CFontProperties
{
public:
    IPlatformFont *getPlatformFont(IRenderer *renderer) override;

    bool setFontName(const String &value) override;
    bool setHeight(const int value) override;
    bool setWeight(const FontWeight value) override;
    bool setDistance(const float value) override;
    bool setColor(const nitisa::Color &value) override;
    bool setShadowShift(const PointF &value) override;
    bool setShadowRadius(const int value) override;
    bool setShadowColor(const nitisa::Color &value) override;
    bool setItalic(const bool value) override;
    bool setUnderline(const bool value) override;
    bool setStrikeOut(const bool value) override;
    bool setMonospace(const bool value) override;

    void Release() override;
    bool Copy(IFontProperties *src) override;

    void NotifyOnFreeResources() override;

    CFont(); // Create without listener 
    CFont(IFeedbackExListener *listener); // Create with specified listener 
    CFont(IFeedbackExListener *listener, IFont *font); // Create with specified listener and copy properties from specified font 
    ~CFont() override;
};
Namespace: nitisa
Include: Nitisa/Core/Font.h