ISO/IEC JTC1/SC18/WG8 **N1880**

ISO/IEC JTC1/SC18/WG8\
Document Processing and Related Communication---\
Document Description and Processing Languages

  -------------------- --------------------------------------------------
  **Title:**           Font Services: Part 1, Abstract Service Definition

  **Source:**          Toru Takasawa, Yushi Komachi

  **Project:**         JTC1.18.33

  **Project editor:**  Toru Takasawa, Yushi Komachi

  **Status of          5th Working Draft
  document:**          

  **Requested          For comment
  action:**            

  **Date**             08 November 1996

  **Distribution:**    WG8 and liaisons

  **References:**      WG8 N1100, 1126, 1360

  **Supersedes:**      WG8 N1818
  -------------------- --------------------------------------------------

Font Services \-- Part 1, Abstract Service Definition

Introduction

The technology to access large font libraries has become an increasingly
important concern of document processing, electronic publishing, and
application support facilities such as printing and display services.

This International Standard specifies a system-independent interface to
font services that provides for distribution, management and use of font
resources.

This International Standard is organized as follows:

The general model of font services and its relationship to other parts
of the document processing model are specified.

The Abstract Font Service Interface (AFSI), which defines the facilities
to access font resources in a system-independent way, is specified.

Statements covering the conformance of font service systems are
provided.

1 Scope and Field of Application

### 1.1 Scope

This International Standard provides the access facilities which can be
used for creation, distribution, management, and use of font resources
conforming to the architecture of ISO/IEC 9541.

This International Standard is intended to be used in a variety of
configurations meeting a variety of connectivity needs, including
communication protocols, application programming interfaces, and
application services.

This part of this International Standard defines an abstract interface
to the font access facilities. This part of this International Standard
will not specify the concrete syntax for a language binding of font
service facilities, nor the concrete protocol used to communicate
between the systems that provides or uses the font service facilities.

### 1.2 Field of Application

This International Standard is intended for use in a wide variety of
document processing environments, including:

authoring;

formatting and page layout;

printing and display services;

electronic publishing via removable media and/or information network.

\[Expand to include font providers and font managers.\]

2 Normative References

The following standards contain provisions that, through reference in
this text, constitute provisions of this International Standard. At the
time of publication, the editions indicated are valid. All standards are
subject to revision, and parties to agreements based on this
International Standard are encouraged to investigate the possibility of
applying the most recent editions of the standards indicated below.
Members of IEC and ISO maintain registers of currently valid
International Standards.

ISO 646:1992, Information processing \-- ISO 7-bit coded character set
for an information interchange.

ISO/IEC 8824:1990, Information processing systems \-- Open Systems
Interconnection \-- Specification of Abstract Syntax Notation One
(ASN.1).

ISO/IEC 8825:1990, Information processing systems \-- Open Systems
Interconnection \-- Basic encoding rules for Abstract Syntax Notation
One (ASN.1).

ISO/IEC 9541-1:1991, Information technology \-- Font information
interchange \-- Part 1: Architecture.

ISO/IEC 9541-2:1991, Information technology \-- Font information
interchange \-- Part 2: Interchange Format.

ISO/IEC 9541-3:1994, Information technology \-- Font information
interchange \-- Part 3: Glyph Shape Representation.

ISO/IEC 9541-4, Information technology \-- Font information interchange
\-- Part 4: Application Specific Extensions.

ISO/IEC 10036:1993, Information technology \-- Procedure for
registration of glyph and glyph collection identifiers.

ISO/IEC 10175:1995, Information technology \-- Text and Office Systems
\-- Document Printing Application.

ISO/IEC 10179, Information technology \-- Text and Office Systems \--
Document Style Semantics and Specification Language (DSSSL).

ISO/IEC 10180:1995, Information technology \-- Text Communication \--
Standard Page Description Language (SPDL)

3 Definitions

For the purposes of this International Standard, the following
definitions apply.

**3.1 font manager:** A font service user that installs font resources
into a system environment, manages the font usage and administers
associated contracts (regarding access, royalties, etc.).

**3.2 font property**: A property as defined in ISO/IEC 9541-1.

**3.3 font provider**: A font service user that designs typefaces,
creates new font resources for sale and distribution (Design Source) or
acquires font resources on consignment or for re-marketing with or
without intervening modification (Data Source).

**3.4 font query**: A query which is sent from a font service user to a
font service entity to get or modify some font resource information.

**3.5 font requester**: A font service user that requests font resource
information to create format, print, or display documents in a single or
multi-system environment.

**3.6 font resource information**: A block of information about a font
resource or some font resources which is returned from a font service
entity to a font service user as the result of a font query.

**3.7 font service**: An interchange facility between a font service
user and a server of font resources.

**3.8 font service API**: The interface between a font service user and
a font service entity.

**3.9 font service entity**: An entity (or set of connected entities)
which provides access facilities to resolve requests from font service
users.

**3.10 font service protocol**: The relationship between font service
entities to convey font service commands and responses.

**3.11 font substitution**: Substitution of an alternative font resource
for a specified font resource which is not available.

**3.12 font service user**: A person and/or application software that
provides requests, or manages font information in a computer system or
network.

**3.13 glyph association**: the mapping or association of character
codes (usually in an unformatted document data stream) to the glyph
information contained in a font resource.

**3.14 glyph substitution**: Substitution (usually in a formatted
document data stream) of an alternative glyph for a specified glyph
which is not available in a requested font resource.

4 Font Service Model

### 4.1 Font Service User Categories

Font service users are classified in the following three categories. In
this International Standard, the term "font service user" is used to
represent all kinds of people and application software in these
categories.

**Font Providers**

1.  People (and Application software) that design typefaces, create new
    font resources for sale and distribution (Design Source) or acquires
    font resources on consignment or for re-marketing with or without
    intervening modification (Data Source).

**Font Managers**

2.  People (and Application software) that installs font resources into
    a system environment, manages the font usage and administers
    associated contracts (regarding access, royalties, etc.).

**Font Requesters**

3.  People (and Application software) that requests font resource
    information to create format, print, or display documents in a
    single or multi-system environment.

### 4.2 Font Service Entity

Font service entity is an entity which provides facilities to access
font resource information for font service users. This entity will be
implemented as a program or component of a processing system which
receives the font queries from font service users and returns font
information.

Font service entity manages a set of font resources. Any information
retrieval and/or modification on one of those font resources shall be
done by this entity. In the case that a font service user sent a font
query to a font service entity to get some information from a font
resource which is not directly managed by the font service entity, the
entity may send a font query to get the information to another font
service entity. In such a case, a font service entity itself may act as
a font service user to another font service entity.

Figure 4-1 shows a simplified model of the relationship between a font
service entity and font service users.

Figure 4-1: relationship between font service entity and font service
users

Figure 4-2 shows the relationship between the font service entity and
the ISO/IEC JTC1/SC18 document processing architecture. This figure
shows Creation and Editing Process, Formatting and Layout Process, and
Presentation Process act as font requesters to the font service entity.

Figure 4-2: relationship between font service entity

and SC18 document processing architectures

The font resource information requested by these processes is different
process by process. Creation and Editing Process requests the
description information only. Formatting and Layout Process requests the
description and metrics information. Presentation Process requests all
the font resource information (description information, metrics
information, and glyph shape information).

There may be a process called Font Installation and Maintenance Process,
which provides new font resources to be managed by the font service
entity. This process also executes the usage monitoring and the access
control of each font resource.

### 4.3 Abstract Font Service Interface (AFSI)

This part of this International Standard defines the Abstract Font
Service Interface (AFSI), which specifies the abstract interface between
a font service user and a font service entity.

This part of this International Standard defines the AFSI as a set of
specifications of *"primitives".* A primitive is a unit of
communications between the font service entity and font service users.
In this part of this International Standard, each primitive is defined
as an abstract service which takes zero or more parameters, and returns
zero or more results. Some primitives modify the internal data objects
and/or the status of the font service entity as the side effect.

5 Data Types

This clause defines data types used in the definitions of the Abstract
Font Service Interface (AFSI).

Types used in AFSI are classified in two categories, base types and
composite types. Base types are simple, elemental types and values of
base types have no subordinate structures. Composite types are
structures constructed from base types and/or other composite types.

### 5.1 Base Types

### 5.1.1 Boolean

Boolean is a base type. The set of values of Boolean type consists of
two values, *true* and *false*. These values represent logical value
true and false, respectively.

### 5.1.2 Integer

Integer is a base type. Each value of type Integer represents an integer
number within the range -2^32^ to 2^32^ - 1 inclusive.

### 5.1.3 Cardinal

Cardinal is a base type. Each value of type Cardinal represents an
unsigned integer number within the range 0 to 2^32^ - 1 inclusive.

### 5.1.4 Octet

Octet is a base type. Each value of type Octet represents an 8-bit byte
data.

### 5.1.5 Handle

Handle is a base type. Each value of type Handle represents an unsigned
integer number within the range 0 to 2^32^ - 1 inclusive, which uniquely
identifies a data object exists in the font service entity. Font service
users can access these data objects through Handles. The value 0 (zero)
is reserved to indicate a NULL handle.

\[More base types should be defined.\]

### 5.2 Composite Types

### 5.2.1 OctetString

OctetString is a composite type. A value of type OctetString is an
ordered sequence of octets.

### 5.2.2 Vector

Vector is a composite type. A value of type Vector is an ordered
sequence of values. Each value contained in a Vector may be a value of
any type defined in this International Standard.

### 5.2.3 PropertyList

PropertyList is a composite type. A value of type PropertyList
represents a corresponding value of the type property-list which is
defined in ISO/IEC 9541-1.

\[More composite types should be defined.\]

### 5.2.4 UserInformationList

UserInformationList is a composite type. A value of type
UserInformationList represents a corresponding value of the type
User-Information-list which is defined in detail, according to the
following structure:

\[Definitions of the user-information-list should be supplied.\]

### 5.2.5 LicenseInformationList

LicenseInformationList is a composite type. A value of type
LicenseInformationList represents a corresponding value of the type
license-information-list which is defined in defined in detail,
according to the following structure:

\[Definitions of the license-information-list should be supplied.\]

6 Notation

This clause defines the notation used to define each primitive in clause
7.

For each primitive in this International Standard, the primitive
description specifies:

the number and types of parameters required to invoke the primitive;

the number and types of results;

the relationship between the parameters and the results;

any other effects the execution of the primitive has upon the internal
data objects and/or the status of the font service entity.

7 Abstract Font Service Interface (AFSI)

### 7.1 Font Service Session Control Primitives

### 7.1.1 OpenSession

The **OpenSession** primitive takes no parameters and returns two
results

status: Boolean;

session-id: Handle.

The **OpenSession** primitive establishes a session between a font
service user and the font service entity for the purpose of accessing
the font resource information.

The result status represents the completion status of the primitive. It
takes one of the following values:

*true* \-- A session is opened successfully;

*false* \-- Failed to open a session.

The result session-id represents the unique identifier which identifies
the newly opened font service session. This result is void when the
value of the result status is other than OK.

The value of session-id must be specified as one of the parameters for
all other AFSI primitives.

\[This primitive may need some parameters to specify the font service
entity, user ID, etc.\]

### 7.1.2 CloseSession

The **CloseSession** primitive takes one parameter:

session-id: Handle;

and returns one result:

status: Cardinal.

The **CloseSession** primitive closes an opened session between a font
service user and the font service entity.

The parameter session-id specifies an open session to be closed. The
value of this parameter must be a value returned from the primitive
**OpenSession** as the result session-id.

The result status represents the completion status of the primitive. It
takes one of the following values:

1 \-- The specified session is closed successfully;

### 

2 \-- The parameter session-id is invalid;

3 \-- Failed to close the session (the parameter session-id is valid).

### 7.2 Font Reference Primitives

### 7.2.1 AssignFontReference

The **AssignFontReference** primitive takes three parameters:

session-id: Handle;

font-reference: Handle;

property-list: PropertyList;

and returns one result:

status: Cardinal.

The **AssignFontReference** primitive assigns the specified
font-reference to the specified property-list. After the successful
completion of this primitive, the assigned font-reference may be used as
a parameter for query primitives instead of the property-list itself.

If the specified font-reference-name is already assigned to a property
list, the assignment will be changed.

\[More explanation should be supplied.\]

### 7.2.2 ClearFontReference

The **ClearFontReference** primitive takes two parameters:

session-id: Handle;

font-reference: Handle;

and returns one result:

status: Cardinal.

The **ClearFontReferenceName** primitive cancels the assignment of the
specified font-reference to a property list.

\[More explanation should be supplied.\]

### 7.2.3 ListFontReferenceProperties

The **ListFontReferenceProperties** primitive takes two parameters:

session-id: Handle;

font-reference: Handle;

and returns two results:

status: Cardinal;

property-list: PropertyList.

The **ListFontReferenceProperties** primitive return the property list
which is associated with the specified font-reference by the
**AssignFontReference** primitive.

\[More explanation should be supplied.\]

### 7.2.4 ListAllFontReferences

The **ListAllFontReferences** primitive takes one parameter:

session-id: Handle;

and returns two results:

status: Cardinal;

font-reference-list: Vector of Handles.

The **ListAllFontReferences** primitive return the list of all font
references which are currently associated with property lists.

\[More explanation should be supplied.\]

### 7.3 Availability Check Primitives

### 7.3.1 FindFontResource

The **FindFontResource** primitive takes two parameters:

session-id: Handle;

font-reference: Handle or PropertyList.

and returns two results:

status: Cardinal;

font-resource-list: Vector of Handle.

The **FindFontResource** primitive finds font resources which satisfy
the conditions specified by the parameter font-reference, and returns
the list of Handles of such font resources. The parameter font-reference
may be specified as a Handle (font reference) or a PropertyList.

\[The matching rules for the interpretation of the specified
font-reference should be supplied.\]

\[More explanation should be supplied.\]

### 7.4 Font Properties Query Primitives

### 7.4.1 GetFontProperty

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

### 

The **GetFontProperty** primitive takes three parameters:

session-id: Handle;

font-resource: Handle;

property-list-specification: PropertyList;

and returns two results:

status: Cardinal;

required-property: PropertyList.

The **GetFontProperty** primitive retrieves the required properties from
the font resource. The specification of the required properties is given
by a PropertyList which contains property name and other conditions (if
any). The list of all properties which satisfies the specification will
be returned.

**NOTE**: Since any property name defined in ISO/IEC 9541-1 can be
specified in the parameter propety-list-specification, this single
primitive may be used to get any property contained in the font
resource.

\[More explanation should be supplied.\]

### 7.5 Font Resource Management Primitives

### 7.5.1 PutFontProperty

The **PutFontProperty** primitive takes four parameters:

session-id: Handle;

font-resource: Handle;

property-list-specification: PropertyList;

new-property: PropertyList;

and returns one result:

status: Cardinal.

The **PutFontProperty** primitive replaces all of the specified
properties in the font resource with the new property. The specification
of the properties which are the subject to replacement is given by a
PropertyList which contains the property name and other conditions (if
any). All the properties which satisfies the specification will be
replaced.

**NOTE**: Since any property name defined in ISO/IEC 9541-1 can be
specified in the parameter propety-list-specification, this single
primitive may be used to replace any property contained in the font
resource.

\[More explanation should be supplied.\]

### 7.5.2 GetFontResource 

The **GetFontResource** primitive takes two parameters:

session-id: Handle;

property-list-specification: PropertyList;

and returns two results:

status: Cardinal;

required-font-resource-list: Vector of Handle.

The **GetFontResource** primitive retrieves the required font resources
which satisfy the property is given by a PropertyList which contains the
property name and other conditions (if any). The required font resources
which satisfy the specification will be returned.

### 7.5.3 PutFontResource

The **PutFontResource** primitive takes one parameter:

session-id: Handle;

and returns two results:

status: Cardinal;

new-font-resource: Handle.

The **PutFontResource** primitive installs the new font resource into
the font resource file with the font-property.

### 7.6 Font Service User Manegement Primitives

### 7.6.1 GetUserInformation

The **GetUserInformation** primitive takes three parameters:

session-id: Handle;

font-resource: Handle;

user-information-list-specification: UserInformationList

and returns two results:

status: Cardinal;

required-user-information-list: UserInformationList.

The **GetUserInformation** primitive retrieves the
required-user-information-list of the font-resource. The specification
of the required user information is given by UserInformationList which
contains the user names and other user information. The list of all user
information which satisfy the specification will be returned.

### 7.6.2 GetLisenceInformation

The **GetLicenseInformation** primitive takes three parameters:

session-id: Handle;

font-resource: Handle;

license-information-list-specification: LicenseInformationList;

and returns two results:

status: Cardinal;

required-license-information-list: LicenseInformationList;

The **GetLicenseInformation** primitive retrieves the
required-license-information-list of the font-resource. The
specification of the required license information is given by
LicenseInformationList which contains the license owner names and other
license information. The list of all license information which satisfy
the specification will be returned.

### 7.6.3 PutUserInformation

The **PutUserInformation** primitive takes four parameters:

session-id: Handle;

font-resource: Handle;

user-information-list-specification: UserInformationList;

new-user-information-list: UserInformationList;

and returns one result:

status: Cardinal.

The **PutUserInformation** primitive replaces all of the specified
user-information-list in the font resource with the new
user-information-list. The specification of the user-information-list
which are the subject to replacement is given by user-information-list
which contains the user name and other user information. All
user-information which satisfies the specification will be replaced.

### 7.6.4 PutLicenseInformation

The **PutLicenseInformation** primitive takes four parameters:

session-id: Handle;

font-resource: Handle;

license-information-list-specification: LicenseInformationList;

new-license-information-list : LicenseInformationList;

and returns one result:

status : Cardinal.

The **PutLicenseInformation** primitive replaces all of the specified
license-information-list in the font resource with the new
license-information-list. The specification of the
license-information-list which are the subject to replacement is given
by license-information-list-specification which contains the license
owner names and other license information. All license-information which
satisfies the specification will be replaced.