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 FONT_WEIGHT value) override;
    bool setDistance(const float value) override;
    bool setColor(const Color &value) override;
    bool setShadowShift(const PointF &value) override;
    bool setShadowRadius(const int value) override;
    bool setShadowColor(const 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 FreeResources() override;
    void Release() override;
    bool Copy(IFontProperties *src) override;

    CFont(); // Create without callbacks
    CFont(CFeedback::Callback before, CFeedback::Callback after, void *param); // Create with specified callbacks
    CFont(CFeedback::Callback before, CFeedback::Callback after, void *param, IFont *font); // Create with specified callbacks and copy properties from specified font        
    ~CFont() override;
};
Namespace: nitisa
Include: Nitisa/Core/Font.h