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; +} +