bdf_to_c.awk revision d1e631af56641f21cde1f1efe3a9623ff9d6ee7c
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 1998-1999 by Sun Microsystems, Inc.
# All rights reserved.
#
BEGIN {
}
$1=="ENDCHAR" {
in_bitmap = 0;
next;
}
for (c = 0; c < byteswide; c++)
s="";
for (c = 0; c < byteswide*2; c++)
next;
}
$1=="STARTFONT" {
if ($2 != "2.1") {
exit 1;
}
in_bitmap = 0;
ignoring = 1;
first = 1;
offset = 0;
for (i = 0; i < 256; i++)
encoding[i] = -1;
next;
}
$1=="COMMENT" {
for (i = 2; i < NF; i++)
}
next;
}
$1=="FONT" {
font = $2;
next;
}
$1=="SIZE" {
next;
}
$1=="FONTBOUNDINGBOX" {
rows = $3;
bitswide = $2;
next;
}
$1=="STARTPROPERTIES" {
next;
}
$1=="FONTNAME_REGISTRY" {
next;
}
$1=="FOUNDRY" {
next;
}
$1=="FAMILY_NAME" {
next;
}
$1=="WEIGHT_NAME" {
next;
}
$1=="SLANT" {
next;
}
$1=="SETWIDTH_NAME" {
next;
}
$1=="ADD_STYLE_NAME" {
next;
}
$1=="PIXEL_SIZE" {
next;
}
$1=="POINT_SIZE" {
next;
}
$1=="RESOLUTION_X" {
next;
}
$1=="RESOLUTION_Y" {
next;
}
$1=="SPACING" {
next;
}
$1=="AVERAGE_WIDTH" {
next;
}
$1=="CHARSET_REGISTRY" {
next;
}
$1=="CHARSET_ENCODING" {
next;
}
$1=="DEFAULT_CHAR" {
default_char = $2;
next;
}
$1=="FONT_DESCENT" {
next;
}
$1=="FONT_ASCENT" {
next;
}
$1=="COPYRIGHT" {
next;
}
$1=="ENDPROPERTIES" {
next;
}
$1=="CHARS" {
next;
}
$1=="STARTCHAR" {
first = 0;
}
ignoring = 1;
row = 0;
next;
}
$1=="ENCODING" {
ignoring = 0;
got[$2] = 1;
next;
}
$1=="SWIDTH" {
next;
}
$1=="DWIDTH" {
next;
}
$1=="BBX" {
next;
}
$1=="BITMAP" {
in_bitmap = 1;
next;
}
$1=="ENDFONT" {
for (i = 0; i < 256; i++) {
}
next;
}
{
}