From 4e614216b26dffd551e56092fbcd489e73bfa366 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 22 Oct 2023 15:53:49 -0700 Subject: [PATCH] GRAPHICS: MACGUI: Add equality test for MacFontRun --- graphics/macgui/mactext.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/graphics/macgui/mactext.h b/graphics/macgui/mactext.h index 96d647a0cdc..ae158e36132 100644 --- a/graphics/macgui/mactext.h +++ b/graphics/macgui/mactext.h @@ -115,6 +115,17 @@ struct MacFontRun { Common::CodePage getEncoding(); bool plainByteMode(); Common::String getEncodedText(); + + bool equals(const MacFontRun *x, const MacFontRun *y) { + return (x->fontId == y->fontId && + x->textSlant == y->textSlant && + x->fontSize == y->fontSize && + x->palinfo1 == y->palinfo1 && + x->palinfo2 == y->palinfo2 && + x->palinfo3 == y->palinfo3 && + x->fgcolor == y->fgcolor); + } + }; struct MacTextLine;