Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SET TEXT REPRESENTATION(3P)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

SET TEXT REPRESENTATION − define a text attribute bundle on a workstation

SYNOPSIS

C Syntax

void
pset_text_rep ( ws, index, rep )
Pintws;workstation identifier
Pintindex;text bundle index
Ptext_bundle∗rep;text representation pointer

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

SET TEXT REPRESENTATION defines a bundle of text attributes for a specified entry in the workstation’s text bundle table.  Depending on the ASF for each of the text attributes, the bundled attributes may apply to the following primitives:

• TEXT

• TEXT 3

• ANNOTATION TEXT RELATIVE

• ANNOTATION TEXT RELATIVE 3

C Input Parameters

wsThe identifier of the workstation for which the text representation is being defined. 

indexThe text index of the entry being defined. 

repA pointer to a structure containing the attribute values defining the text representation, defined as follows:

typedef struct {
Pintfont;/∗ text font ∗/
Ptext_precprec;/∗ text precision ∗/
Pfloatchar_expan;/∗ character char_expansion factor ∗/
Pfloatchar_space;/∗ character spacing ∗/
Pintcolr_ind;/∗ text colour index ∗/
} Ptext_bundle;

rep->font is a text font index. 

rep->prec is a text precision enumeration value, one of:

PPREC_STRINGString Precision
PPREC_CHARCharacter Precision
PPREC_STROKEStroke Precision

rep->char_expan is the character expansion factor value. 

rep->char_space is the character spacing factor value. 

rep->colr_ind is the text colour, which selects a colour value from the workstation’s colour table. 

Execution

When SET TEXT REPRESENTATION is called, the text index entry in the table of defined text representations on the workstation is set to the text font index, text precision, character expansion factor, character spacing factor, and text colour values. 

When text output primitives are displayed, the text representation specified by the current text index entry in the traversal state list provides the text attributes for which the Aspect Source Flag (ASF) is BUNDLED.  For example, when the current text font ASF is set to BUNDLED, the effective text font is the text font attribute in the text representation selected by the current text index.  The current text index is set by SET TEXT INDEX structure elements. 

The text precision specifies the level of precision used to draw the text characters in relation to the font definition and applicable text attributes. 

The character expansion factor is used to scale the standard width of the characters established by the width-to-height ratio specified by the font design.  An expansion factor of less than one produces narrower characters;  an expansion factor of greater than one produces wider characters, relative to their height. 

The character spacing factor is specified as a fraction of the current character height.  A positive value inserts additional space between adjacent character bodies in the text string;  a negative value causes the adjacent character bodies to overlap.  The default value is 0.0, so the character bodies are placed adjacent to one another with no additional space beyond that already in the font’s design. 

The text bundle table is numbered from 1. 

ERRORS

003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)

054Ignoring function, the specified workstation is not open

059Ignoring function, the specified workstation does not have output capability (that is, the workstation category is neither OUTPUT, OUTIN, nor MO)

100Ignoring function, the bundle index value is less than one

103Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation bundle table

106Ignoring function, the specified font is not available for the requested text precision on the specified workstation

113Ignoring function, the colour index value is less than zero

SEE ALSO

SET TEXT INDEX (3P)
SET INDIVIDUAL ASF (3P)
INQUIRE TEXT REPRESENTATION (3P)
INQUIRE TEXT REPRESENTATION PLUS (3P+)
INQUIRE TEXT FACILITIES (3P)
SET TEXT FONT (3P)
SET TEXT PRECISION (3P)
SET CHARACTER EXPANSION FACTOR (3P)
SET CHARACTER SPACING (3P)
SET TEXT COLOUR (3P+)
SET TEXT COLOUR INDEX (3P)
SET TEXT REPRESENTATION PLUS (3P+)

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026