summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixRFont.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-01-02 15:43:51 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-01-02 15:43:51 (GMT)
commit62396a6287c6c5db14a735844cf11a0b9cc9dbd3 (patch)
tree87684d2091f356d299ec8535a9a56498b29fba99 /unix/tkUnixRFont.c
parent8a3e46aada6943f89dfdb746116c20fe332535eb (diff)
downloadtk-62396a6287c6c5db14a735844cf11a0b9cc9dbd3.zip
tk-62396a6287c6c5db14a735844cf11a0b9cc9dbd3.tar.gz
tk-62396a6287c6c5db14a735844cf11a0b9cc9dbd3.tar.bz2
Added point-size conversion, from Ubuntu port.
Diffstat (limited to 'unix/tkUnixRFont.c')
-rw-r--r--unix/tkUnixRFont.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 5e62ffa..081e6fd 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixRFont.c,v 1.30 2009/10/10 17:42:50 dkf Exp $
+ * RCS: @(#) $Id: tkUnixRFont.c,v 1.31 2010/01/02 15:43:51 dkf Exp $
*/
#include "tkUnixInt.h"
@@ -286,6 +286,7 @@ InitFont(
ftFont = GetFont(fontPtr, 0, 0.0);
fontPtr->font.fid = XLoadFont(Tk_Display(tkwin), "fixed");
+ fontPtr->font.fa.size = TkFontGetPoints(tkwin, fontPtr->font.fa.size);
GetTkFontAttributes(ftFont, &fontPtr->font.fa);
GetTkFontMetrics(ftFont, &fontPtr->font.fm);
@@ -605,6 +606,7 @@ TkpGetFontAttrsForChar(
/* Actual font used to render the character */
GetTkFontAttributes(ftFont, faPtr);
+ faPtr->size = TkFontGetPoints(tkwin, faPtr->size);
faPtr->underline = fontPtr->font.fa.underline;
faPtr->overstrike = fontPtr->font.fa.overstrike;
}