aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/sgikern/sgifont.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/gio/sgikern/sgifont.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/sgikern/sgifont.x')
-rw-r--r--sys/gio/sgikern/sgifont.x42
1 files changed, 42 insertions, 0 deletions
diff --git a/sys/gio/sgikern/sgifont.x b/sys/gio/sgikern/sgifont.x
new file mode 100644
index 00000000..808c7f56
--- /dev/null
+++ b/sys/gio/sgikern/sgifont.x
@@ -0,0 +1,42 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <gki.h>
+include <gset.h>
+include "sgi.h"
+
+# SGI_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 SGI_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 sgi_font (font)
+
+int font # code for font to be set
+
+int normal, bold
+int pk1, pk2, width
+include "sgi.com"
+
+begin
+ width = SGI_WIDTH(g_kt)
+ normal = 0
+ bold = 1
+
+ pk1 = GKI_PACKREAL(real(normal))
+ pk2 = GKI_PACKREAL(real(bold))
+
+ if (font == GT_BOLD) {
+ if (width != pk2) {
+ call sgk_linewidth (g_out, bold)
+ width = pk2
+ }
+ } else {
+ if (width != pk1) {
+ call sgk_linewidth (g_out, normal)
+ width = pk1
+ }
+ }
+
+ SGI_WIDTH(g_kt) = width
+end