From ad0ad5af2263232d865306af7619eb5787af89da Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2002 16:22:53 +0000 Subject: [PATCH] Added 2 functions to retrieve the default system fonts: WMDefaultSystemFont(WMScreen *scr) and WMDefaultBoldSystemFont(WMScreen *scr) --- WINGs/ChangeLog | 2 ++ WINGs/WINGs/WINGs.h | 4 ++++ WINGs/wfont.c | 13 +++++++++++++ 3 files changed, 19 insertions(+) diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index d22292eb..7bfd13b2 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -15,6 +15,8 @@ Changes since wmaker 0.80.0: - Fixed textfields regarding interpretation of special keys with modifiers. - Fixed some functions that accept a boolean flag as a paramater, to set only 1 or 0 for the flag value, not the flag passed by the user. +- Added 2 functions to retrieve the default system fonts: + WMDefaultSystemFont(WMScreen *scr) and WMDefaultBoldSystemFont(WMScreen *scr) Changes since wmaker 0.70.0: diff --git a/WINGs/WINGs/WINGs.h b/WINGs/WINGs/WINGs.h index e069ff58..5fa83234 100644 --- a/WINGs/WINGs/WINGs.h +++ b/WINGs/WINGs/WINGs.h @@ -718,6 +718,10 @@ void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font); void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font); +WMFont* WMDefaultSystemFont(WMScreen *scrPtr); + +WMFont* WMDefaultBoldSystemFont(WMScreen *scrPtr); + WMFont* WMSystemFontOfSize(WMScreen *scrPtr, int size); WMFont* WMBoldSystemFontOfSize(WMScreen *scrPtr, int size); diff --git a/WINGs/wfont.c b/WINGs/wfont.c index 61151037..1636af1d 100644 --- a/WINGs/wfont.c +++ b/WINGs/wfont.c @@ -268,6 +268,19 @@ WMFontHeight(WMFont *font) } +WMFont* +WMDefaultSystemFont(WMScreen *scrPtr) +{ + return WMRetainFont(scrPtr->normalFont); +} + + +WMFont* +WMDefaultBoldSystemFont(WMScreen *scrPtr) +{ + return WMRetainFont(scrPtr->boldFont); +} + WMFont* WMSystemFontOfSize(WMScreen *scrPtr, int size)