rename Font to FontRef

for consistency with SymbolFontRef
This commit is contained in:
GenevensiS
2026-02-07 02:45:41 +01:00
parent d2dce6617d
commit 42b9c241f3
16 changed files with 33 additions and 33 deletions
+2 -2
View File
@@ -218,7 +218,7 @@ void RotatedDC::DrawText(const String& text, const RealPoint& pos, Color color,
}
}
void RotatedDC::DrawTextWithShadowOrStroke(const String& text, const Font& font, const RealPoint& pos, double scale, double stretch) {
void RotatedDC::DrawTextWithShadowOrStroke(const String& text, const FontRef& font, const RealPoint& pos, double scale, double stretch) {
double s_scale = scale * dc.GetFont().GetPointSize() / text_scaling / 15.;
if (font.hasShadow() && !font.hasStroke()) {
RealSize shadow_displacement = trInvS(RealSize(font.shadow_displacement_x, font.shadow_displacement_y) * s_scale);
@@ -326,7 +326,7 @@ void RotatedDC::SetFont(const wxFont& font) {
dc.SetFont(scaled);
}
}
void RotatedDC::SetFont(const Font& font, double scale) {
void RotatedDC::SetFont(const FontRef& font, double scale) {
dc.SetFont(font.toWxFont(trS(scale) * (quality == QUALITY_LOW ? 1 : text_scaling)));
}
+3 -3
View File
@@ -12,7 +12,7 @@
#include <util/real_point.hpp>
#include <gfx/gfx.hpp>
class Font;
class FontRef;
// ----------------------------------------------------------------------------- : Rotation
@@ -160,7 +160,7 @@ public:
void DrawText (const String& text, const RealPoint& pos, int blur_radius = 0, Color stroke_color = Color(0,0,0), int stroke_radius = 0, double stretch = 1.0);
void DrawText (const String& text, const RealPoint& pos, Color color, int blur_radius = 0, Color stroke_color = Color(0,0,0), int stroke_radius = 0, double stretch = 1.0);
/// Draw text with a shadow or stroke, and color settings of the given font
void DrawTextWithShadowOrStroke(const String& text, const Font& font, const RealPoint& pos, double scale = 1.0, double stretch = 1.0);
void DrawTextWithShadowOrStroke(const String& text, const FontRef& font, const RealPoint& pos, double scale = 1.0, double stretch = 1.0);
/// Draw abitmap, it must already be zoomed!
void DrawBitmap(const Bitmap& bitmap, const RealPoint& pos);
/// Draw an image using the given combining mode, the image must already be zoomed!
@@ -194,7 +194,7 @@ public:
void SetFont(const wxFont& font);
/// Set the font, scales for zoom and high_quality
/** The font size will be multiplied by 'scale' */
void SetFont(const Font& font, double scale);
void SetFont(const FontRef& font, double scale);
/// Steps to use when decrementing font size
double getFontSizeStep() const;