r4493@vps: verhaegs | 2007-04-19 14:44:00 -0400
[AROS.git] / rom / graphics / setfont.c
blobf8a83def956319f575c307a2d940f6bc87ef16be
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$ $Log
5 Desc: Graphics function SetFont()
6 Lang: english
7 */
8 #include "graphics_intern.h"
9 #include <graphics/rastport.h>
10 #include <graphics/text.h>
12 /*****************************************************************************
14 NAME */
15 #include <graphics/rastport.h>
16 #include <graphics/text.h>
17 #include <proto/graphics.h>
19 AROS_LH2(void, SetFont,
21 /* SYNOPSIS */
22 AROS_LHA(struct RastPort *, rp, A1),
23 AROS_LHA(struct TextFont *, textFont, A0),
25 /* LOCATION */
26 struct GfxBase *, GfxBase, 11, Graphics)
28 /* FUNCTION
29 Select a new font for rendering strings in a RastPort.
31 INPUTS
32 rp - Change this RastPort
33 textFont - This is the new font
35 RESULT
36 None.
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
46 INTERNALS
48 HISTORY
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
53 AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
55 if (textFont)
57 rp->Font = textFont;
58 rp->TxWidth = textFont->tf_XSize;
59 rp->TxHeight = textFont->tf_YSize;
60 rp->TxBaseline = textFont->tf_Baseline;
63 AROS_LIBFUNC_EXIT
65 } /* SetFont */