From 7605e77d219ac6c3c58ea5398faca7a1051546c3 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Sun, 23 Jan 2005 13:40:11 +0000 Subject: [PATCH] Added GetFamilyAndStyle git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10975 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/servers/app/ServerFont.h | 1 + src/servers/app/server/ServerFont.cpp | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/headers/private/servers/app/ServerFont.h b/headers/private/servers/app/ServerFont.h index e777af3162..9da13c6f15 100644 --- a/headers/private/servers/app/ServerFont.h +++ b/headers/private/servers/app/ServerFont.h @@ -76,6 +76,7 @@ public: const char *GetPath(void) const { return fStyle->GetPath(); } uint16 StyleID(void) const { return fStyle->GetID(); } uint16 FamilyID(void) const { return fStyle->Family()->GetID(); } + uint32 GetFamilyAndStyle(void); BRect BoundingBox(void); void Height(font_height *fh); diff --git a/src/servers/app/server/ServerFont.cpp b/src/servers/app/server/ServerFont.cpp index 14f0a69abd..3e2464f7a2 100644 --- a/src/servers/app/server/ServerFont.cpp +++ b/src/servers/app/server/ServerFont.cpp @@ -186,3 +186,18 @@ void ServerFont::SetFamilyAndStyle(const uint32 &fontID) if(sty) fStyle=sty; } + +/*! + \brief Gets the ID values for the ServerFont instance in one shot + \return the combination of family and style ID numbers +*/ +uint32 ServerFont::GetFamilyAndStyle(void) +{ + uint32 famsty=0; + + famsty|=FamilyID() << 16; + famsty|=StyleID(); + + return famsty; +} +