From 4a60209dc7e156a4cbf75b593eab270b2e4d2af7 Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Mon, 15 Sep 2003 19:09:13 +0000 Subject: [PATCH] * added ServerFont::operator=(const ServerFont& font). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4689 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/server/ServerFont.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/servers/app/server/ServerFont.cpp b/src/servers/app/server/ServerFont.cpp index df67384d07..9aeadf8e16 100644 --- a/src/servers/app/server/ServerFont.cpp +++ b/src/servers/app/server/ServerFont.cpp @@ -85,6 +85,28 @@ ServerFont::~ServerFont(void) fstyle->RemoveDependent(); } +/*! + \brief Returns a copy of the specified font + \param The font to copy from. + \return A copy of the specified font +*/ +ServerFont& ServerFont::operator=(const ServerFont& font){ + fstyle = font.fstyle; + fsize = font.fsize; + frotation = font.frotation; + fshear = font.fshear; + fflags = font.fflags; + fspacing = font.fspacing; + fdirection = B_FONT_LEFT_TO_RIGHT; + fface = B_REGULAR_FACE; + ftruncate = B_TRUNCATE_END; + fencoding = B_UNICODE_UTF8; + fbounds.Set(0,0,0,0); + if(fstyle) + fstyle->AddDependent(); + return *this; +} + /*! \brief Returns the number of strikes in the font \return The number of strikes in the font @@ -126,4 +148,7 @@ void ServerFont::Height(font_height *fh) fh->descent=fheight.descent; fh->leading=fheight.leading; } - +/* + @log + * added ServerFont::operator=(const ServerFont& font). +*/