dtstyle: Coverity 89011
[oweals/cde.git] / cde / util / scripts / fontprop.sh
1 #!/bin/sh
2 # $XConsortium: fontprop.sh /main/2 1995/07/19 18:05:43 drk $
3
4 #
5 # This script is used to generate the various XLFD font properties given an
6 # XLFD-style font name:
7 #
8 #    -FOUNDRY-FAMILY_NAME-WEIGHT_NAME-SLANT-SETWIDTH_NAME-ADD_STYLE_NAME- ...
9 #        ... PIXEL_SIZE-POINT_SIZE-RESOLUTION_X-RESOLUTION_Y-SPACING- ...
10 #        ... AVERAGE_WIDTH-CHARSET_REGISTRY-CHARSET_ENCODING
11 #
12
13 awk -F- '
14 {
15     printf "FONTNAME_REGISTRY \"%s\"\n", $1;
16     printf "FOUNDRY \"%s\"\n", $2;
17     printf "FAMILY_NAME \"%s\"\n", $3;
18     printf "WEIGHT_NAME \"%s\"\n", $4;
19     printf "SLANT \"%s\"\n", $5;
20     printf "SETWIDTH_NAME \"%s\"\n", $6;
21     printf "ADD_STYLE_NAME \"%s\"\n", $7;
22     printf "PIXEL_SIZE %d\n", $8;
23     printf "POINT_SIZE %d\n", $9;
24     printf "RESOLUTION_X %d\n", $10;
25     printf "RESOLUTION_Y %d\n", $11;
26     printf "SPACING \"%s\"\n", $12;
27     printf "AVERAGE_WIDTH %d\n", $13;
28     printf "CHARSET_REGISTRY \"%s\"\n", $14;
29     printf "CHARSET_ENCODING \"%s\"\n", $15;
30 }' $*