aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Style.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Style.h')
-rw-r--r--src/Style.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/Style.h b/src/Style.h
index 071d752ca..769386359 100644
--- a/src/Style.h
+++ b/src/Style.h
@@ -29,20 +29,6 @@ struct FontSpecification {
bool operator<(const FontSpecification &other) const noexcept;
};
-// Just like Font but only has a copy of the FontID so should not delete it
-class FontAlias : public Font {
-public:
- FontAlias() noexcept;
- // FontAlias objects can be copy or move constructed but not be assigned
- FontAlias(const FontAlias &) noexcept;
- FontAlias(FontAlias &&) noexcept;
- FontAlias &operator=(const FontAlias &) = delete;
- FontAlias &operator=(FontAlias &&) = delete;
- ~FontAlias() override;
- void MakeAlias(const Font &fontOrigin) noexcept;
- void ClearFont() noexcept;
-};
-
struct FontMeasurements {
unsigned int ascent;
unsigned int descent;
@@ -68,7 +54,7 @@ public:
bool changeable;
bool hotspot;
- FontAlias font;
+ std::shared_ptr<Font> font;
Style();
Style(const Style &source) noexcept;
@@ -83,7 +69,7 @@ public:
bool underline_, ecaseForced caseForce_,
bool visible_, bool changeable_, bool hotspot_) noexcept;
void ClearTo(const Style &source) noexcept;
- void Copy(const Font &font_, const FontMeasurements &fm_) noexcept;
+ void Copy(std::shared_ptr<Font> font_, const FontMeasurements &fm_) noexcept;
bool IsProtected() const noexcept { return !(changeable && visible);}
};