From 1b5dd62b71d8d9b657b0cd7c138c9dc523a07cc4 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Mar 2021 14:58:11 +1100 Subject: Change Font to an interface and stop using FontID. Fonts are shared and reference counted using std::shared_ptr. This optimizes memory and reduces potential for allocation bugs. --- src/LineMarker.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/LineMarker.h') diff --git a/src/LineMarker.h b/src/LineMarker.h index 4173f065e..468c53f13 100644 --- a/src/LineMarker.h +++ b/src/LineMarker.h @@ -13,7 +13,7 @@ namespace Scintilla { class XPM; class RGBAImage; -typedef void (*DrawLineMarkerFn)(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, int tFold, int marginStyle, const void *lineMarker); +typedef void (*DrawLineMarkerFn)(Surface *surface, PRectangle &rcWhole, const Font *fontForCharacter, int tFold, int marginStyle, const void *lineMarker); /** */ @@ -44,7 +44,7 @@ public: void SetXPM(const char *textForm); void SetXPM(const char *const *linesForm); void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage); - void Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, FoldPart part, int marginStyle) const; + void Draw(Surface *surface, PRectangle &rcWhole, const Font *fontForCharacter, FoldPart part, int marginStyle) const; }; } -- cgit v1.2.3