summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXFont.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXFont.c')
-rw-r--r--macosx/tkMacOSXFont.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 54edb81..d413f0b 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -4,9 +4,9 @@
* Contains the Macintosh implementation of the platform-independent font
* package interface.
*
- * Copyright (c) 2002-2004 Benjamin Riefenstahl, Benjamin.Riefenstahl@epost.de
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2008-2009 Apple Inc.
+ * Copyright © 2002-2004 Benjamin Riefenstahl, Benjamin.Riefenstahl@epost.de
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2008-2009 Apple Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -47,7 +47,7 @@ typedef struct {
#define MENUITEMFONT_NAME "menu"
struct SystemFontMapEntry {
- const ThemeFontID id;
+ ThemeFontID id;
const char *systemName;
const char *tkName;
const char *tkName1;
@@ -74,7 +74,7 @@ static const struct SystemFontMapEntry systemFontMap[] = {
ThemeFont(MiniSystem, NULL, NULL),
{ kThemeSystemFontDetail, "systemDetailSystemFont", NULL, NULL },
{ kThemeSystemFontDetailEmphasized, "systemDetailEmphasizedSystemFont", NULL, NULL },
- { -1, NULL, NULL, NULL }
+ { (ThemeFontID)-1, NULL, NULL, NULL }
};
#undef ThemeFont
@@ -349,9 +349,9 @@ InitFont(
nsFont = [nsFont screenFontWithRenderingMode:renderingMode];
GetTkFontAttributesForNSFont(nsFont, faPtr);
fmPtr = &fontPtr->font.fm;
- fmPtr->ascent = floor([nsFont ascender] + [nsFont leading] + 0.5);
- fmPtr->descent = floor(-[nsFont descender] + 0.5);
- fmPtr->maxWidth = [nsFont maximumAdvancement].width;
+ fmPtr->ascent = (int)floor([nsFont ascender] + [nsFont leading] + 0.5);
+ fmPtr->descent = (int)floor(-[nsFont descender] + 0.5);
+ fmPtr->maxWidth = (int)[nsFont maximumAdvancement].width;
fmPtr->fixed = [nsFont isFixedPitch]; /* Does not work for all fonts */
/*
@@ -369,8 +369,8 @@ InitFont(
kern = [nsFont advancementForGlyph:glyphs[2]].width -
[fontPtr->nsFont advancementForGlyph:glyphs[2]].width;
}
- descent = floor(-bounds.origin.y + 0.5);
- ascent = floor(bounds.size.height + bounds.origin.y + 0.5);
+ descent = (int)floor(-bounds.origin.y + 0.5);
+ ascent = (int)floor(bounds.size.height + bounds.origin.y + 0.5);
if (ascent > fmPtr->ascent) {
fmPtr->ascent = ascent;
}