aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/imdkern/imdfont.x
blob: 3117258bf627b8b7ba02d8c3c59d433cfbed5901 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	<gki.h>
include	<gset.h>
include	"imd.h"

# IMD_FONT -- Set the character font.  The roman font is normal.  Bold is
# implemented by increasing the vector line width; care must be taken to
# set IMD_WIDTH so that the other vector drawing procedures remember to
# change the width back.  The italic font is implemented in the character
# generator by a geometric transformation.

procedure imd_font (font)

int	font			# code for font to be set
int	pk2, width
include	"imd.com"

begin
	width = IMD_WIDTH(g_kt)
	pk2   = GKI_PACKREAL(2.0)

	if (font == GT_BOLD) {
	    if (width != pk2) {
		call idk_linewidth (g_out, 2)
		width = pk2
	    }
	} else
	    call idk_linewidth (g_out, nint (GKI_UNPACKREAL(width)))

	IMD_WIDTH(g_kt) = width
end