summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2006-12-01 20:14:22 (GMT)
committerKevin B Kenny <kennykb@acm.org>2006-12-01 20:14:22 (GMT)
commitf3c61f906644a08ee6b019c51e6e1d7c67bab6b7 (patch)
tree489ea29c16233aae8944a6e2c553d6f40503fc20 /macosx
parent516e0720f0996e0e74a8af1e9c9ab7a58fa00451 (diff)
downloadtk-f3c61f906644a08ee6b019c51e6e1d7c67bab6b7.zip
tk-f3c61f906644a08ee6b019c51e6e1d7c67bab6b7.tar.gz
tk-f3c61f906644a08ee6b019c51e6e1d7c67bab6b7.tar.bz2
TIP 300 IMPLEMENTATION
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXFont.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 280e649..25689c5 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -35,7 +35,7 @@
* that such fonts can not be used for controls, because controls
* definitely require a family id (this assertion needs testing).
*
- * RCS: @(#) $Id: tkMacOSXFont.c,v 1.19 2006/07/20 06:25:19 das Exp $
+ * RCS: @(#) $Id: tkMacOSXFont.c,v 1.20 2006/12/01 20:14:23 kennykb Exp $
*/
#include "tkMacOSXInt.h"
@@ -465,6 +465,38 @@ TkpGetSubFonts(
}
/*
+ *----------------------------------------------------------------------
+ *
+ * TkpGetFontAttrsForChar --
+ *
+ * Retrieve the font attributes of the actual font used to render
+ * a given character.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The font attributes are stored in *faPtr.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TkpGetFontAttrsForChar(
+ Tk_Window tkwin, /* Window on the font's display */
+ Tk_Font tkfont, /* Font to query */
+ Tcl_UniChar c, /* Character of interest */
+ TkFontAttributes* faPtr) /* Output: Font attributes */
+{
+ /*
+ * Once again, we don't know what ATSU is doing for us. Simply
+ * return the attributes of the base font.
+ */
+ TkMacOSXFont* fontPtr = (TkMacOSXFont*) tkfont;
+ *faPtr = fontPtr->font.fa;
+}
+
+/*
*---------------------------------------------------------------------------
*
* Tk_MeasureChars --