mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Add <font:$family> tag, closes #24
This commit is contained in:
+4
-1
@@ -50,7 +50,7 @@ void Font::initDependencies(Context& ctx, const Dependency& dep) const {
|
||||
shadow_color.initDependencies(ctx, dep);
|
||||
}
|
||||
|
||||
FontP Font::make(int add_flags, Color* other_color, double* other_size) const {
|
||||
FontP Font::make(int add_flags, String const* other_family, Color const* other_color, double const* other_size) const {
|
||||
FontP f(new Font(*this));
|
||||
f->flags |= add_flags;
|
||||
if (add_flags & FONT_CODE_STRING) {
|
||||
@@ -73,6 +73,9 @@ FontP Font::make(int add_flags, Color* other_color, double* other_size) const {
|
||||
if (other_size) {
|
||||
f->size = *other_size;
|
||||
}
|
||||
if (other_family && !other_family->empty()) {
|
||||
f->name = *other_family;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -59,8 +59,8 @@ public:
|
||||
return shadow_displacement.width != 0 || shadow_displacement.height != 0;
|
||||
}
|
||||
|
||||
/// Add style to a font, and optionally change the color and size
|
||||
FontP make(int add_flags, Color* other_color, double* other_size) const;
|
||||
/// Add style to a font, and optionally change the font family, color and size
|
||||
FontP make(int add_flags, String const* other_family, Color const* other_color, double const* other_size) const;
|
||||
|
||||
/// Convert this font to a wxFont
|
||||
wxFont toWxFont(double scale) const;
|
||||
|
||||
Reference in New Issue
Block a user