Up to cover page | Back to ECMAScript | On to Appendices
This chapter and its sections are normative, unless otherwise indicated.
This section is informative (non-normative).
The WebCGM Application Configuration Items file (ACI) allows the user to improve font interchange by specifying a desired font mapping when WebCGM applications process WebCGM content.
The ACI file also provides a mechanism to specify default handling for certain CGM Version 3 elements that may not have a specific default treatment according to the rules of CGM:1999 or the WebCGM profile.
The ACI file is designed as a set of initialization directives for a viewer, and thus is intended to be associated with a viewer instance and processed once per viewer invocation. The normative specification of methods to associate an ACI file with a viewer is beyond the scope of this version of WebCGM. Some recommedations are given in this chapter.
The use cases and requirements for the default-setting functionality of the ACI include several scenarios that the ACI file should satisfy:
The WebCGM Application Configurable Items (ACI) file is an XML instance
specifying default values for various CGM Version 3 attribute and control
elements, font substitutions to be performed by WebCGM processors . It is
made up of a root element (<webcgmConfig>
) followed by an
optional font map (<fontMap>) element and an optional default
attributes (<defaultAttributes>
) element.
Public Identifier for WebCGM 2.1 ACI DTD:
PUBLIC "-//OASIS//DTD WebCGM 2.1 Config//EN"
System Identifier for the WebCGM 2.1 ACI DTD:
http://docs.oasis-open.org/webcgm/v2.1/webcgmConfig21.dtd
DOCTYPE example. he following is an example document type declaration for a WebCGM ACI document:
<!DOCTYPE webcgmConfig PUBLIC "-//OASIS//DTD WebCGM 2.1
Config//EN"
"http://docs.oasis-open.org/webcgm/v2.1/webcgmConfig21.dtd">
A file is a conforming WebCGM 2.1 ACI document if:
This subsection is informative (non-normative).
Methods to associate an ACI file with a viewer — being operating system, viewer, and application dependent — are considered to be beyond the scope of the normative specifications of this version of WebCGM. To improve interoperability between the various providers of WebCGM 2.1 viewers, the following recommendations for associating an ACI file with a WebCGM 2.1 viewer are included.
It is recommended ACI file have the extension ".aci" (all lowercase) on all platforms.
To convey to a WebCGM 2.1 viewer the location of an ACI file, an environment variable name WebCGM_ACI_File is defined. This environment variable could be set at the time of the viewer installation or modified by a user. On Windows this should be System environment variable that would apply to all users.
Example:
WebCGM_ACI_File=c:/Documents and Settings/All Users/Application Data/CGM Open/WebCGM.aci
If it is not feasible for a viewer to set an environment variable during viewer installation, or if users are prohibited from doing so due to security policies that are becoming commonplace in large organizations, then the viewer should provide and document an alternative method for users to specify the ACI file search path, for example in a viewer preferences or configuration menu.
An ACI file must have webcgmConfig
as its root element.
<!ELEMENT webcgmConfig ( fontMap?, defaultAttributes? ) > |
The fontMap
element is the ACI mechanism for font
substitution.
<!ELEMENT fontMap ( defaultFont?, mapList* ) > |
The defaultFont
element specifies, via its
useFont
attribute, a string defining the font to be used when a
requested mapping cannot be accomplished.
<!ELEMENT defaultFont EMPTY > <!ATTLIST defaultFont useFont CDATA #REQUIRED > |
Attribute definitions:
useFont="CDATA"
The default font to use when the specified font mapping cannot be
accomplished. If the font(s) of mapList
(substitutionList
) are not available, and if
defaultFont
(useFont
) is not available, then the
fontMap
element has no effect, and any viewer fallback action is
viewer dependent. The syntax and normalization rules of useFont
are the same as those of the substitutionList
attribute, except
that useFont
shall have exactly one font-family name or generic
name in its list.
The mapList
element specifies, via its cgmFont
and substitutionList
attributes, the font mapping to be
performed before rendering of the image. Subject to the value of the
forceSubstitution
attribute (see below), if the metafile uses a
font whose name matches cgmFont
(after normalization of both
font names as described below), then the viewer shall substitute the first
available font in the priority-ordered list of the
substitutionList
attribute.
<!ELEMENT mapList EMPTY >
<!ATTLIST mapList
forceSubstitution ( yes | no ) "yes"
cgmFont CDATA #REQUIRED
substitutionList CDATA #REQUIRED >
|
Attribute definitions:
forceSubstitution= { yes | no }
If 'yes', then the subsitution is unconditional — it is attempted
regardless of whether or not the viewer has the font specified by
cgmFont
available. If 'no', then the substitution is conditional
— the viewer only attempts the substitution if it does not have the
font specified by cgmFont
available.
cgmFont="CDATA"
The name of the font in the metafile for which font substitution is
requested. Before attempting to match a font used in the metafile to the
value (string) of cgmFont, both font names are normalized by a
WebCGM-specific normalization: convert to lower-case; and strip out all whitespace, UNDERSCORE, and HYPHEN
characters. Note: These normalization rules
are derived from and intended for the substantial volume of existing
metafiles that aim to invoke fonts from WebCGM's restricted core set of
thirteen specific fonts (see T.16.13 of section 6.5) and that contain
well-known and trivial deviations in the construction of those font names.
The rules may be less useful outside of that intended scope. The target
metafiles of these normalizations are most often, but not always, encoded in
WebCGM's default character encoding of ISO 8859-1. After this WebCGM-specific
normalization, correct and consistent results when comparing metafile font
names to the cgmFont
value — for font names outside of
WebCGM's restricted core set of thirteen specific fonts — may require
that WebCGM processors convert to a unicode normalization
form before performing the comparison.
substitutionList="CDATA"
A comma-separated, priority-ordered list of comprised of font-family names
(e.g., Arial) and generic names (e.g., san-serif). The processor shall use
the first name in the substitutionList
that it has available.
The list syntax and normalization are derived from the specifications of CSS
2.0 [CSS20]. The values and syntax of the substitutionList
attribute, as well as the normalization of that attribute, are derived from
the definition of the font-family
property in CSS 2.0 [CSS20]:
Example:
<mapList cgmFont="helvetica" substitutionList="Arial, 'FontCorp Swiss', sans-serif">
The defaultAttributes
element is the ACI mechanism to specify
default values for certain CGM attribute and control elements whose default
is otherwise under-specified in CGM:1999 and the WebCGM profile. This
element, when processed at initialization time, will set default values for
the applicable metafile elements. If the contents of the metafile, upon
interpretation, explicitly set the applicable metafile element (either via
METAFILE DEFAULTS REPLACEMENT or via the element itself in the body of the
picture), then that explicit intra-metafile setting supersedes the
defaultAttributes
setting
<!ELEMENT defaultAttributes ( lineCap | edgeCap | lineJoin | edgeJoin | lineTypeCont | edgeTypeCont | mitreLimit | restrTextType | lineEdgeTypeDef | hatchStyleDef )+ > |
It is possible to define the default values of the following Version 3 elements:
The parameter definition for each element is consistent with its associated ISO/IEC 8632:1999 CGM parameter definition.
The lineCap
element is an EMPTY element that specifies the
desired rendering of the end caps of lines and of dashes within lines.
<!ELEMENT lineCap EMPTY > <!ATTLIST lineCap lineCapInd ( 1 | 2 | 3 | 4 ) #REQUIRED lineDashInd ( 1 | 2 | 3 ) #REQUIRED > |
Attribute definitions:
lineCapInd="1|2|3|4"
The line cap indicator is restricted to values of 1-4. (Note that the ISO/IEC
8632:1999 value "5" is disallowed in the WebCGM profile.)
Note (informative): in the CGM:1999 specification, the default value for the corresponding 'line cap indicator' parameter of the LINE CAP Attribute element is "1 (unspecified)."
lineDashInd="1|2|3"
The line dash indicator is restricted to values of 1-3 as defined in ISO/IEC
8632:1999.
Note (informative): in the CGM:1999 specification, the default value for the corresponding 'dash cap indicator' parameter of the LINE CAP Attribute element is "1 (unspecified)."
The edgeCap
element is an EMPTY element that specifies the
desired rendering of the end caps of edges and of dashes within edges.
<!ELEMENT edgeCap EMPTY > <!ATTLIST edgeCap edgeCapInd ( 1 | 2 | 3 | 4 ) #REQUIRED edgeDashInd ( 1 | 2 | 3 ) #REQUIRED > |
Attribute definitions:
edgeCapInd="1|2|3|4"
The edge cap indicator is restricted to values of 1-4. (Note that the ISO/IEC
8632:1999 value "5" is disallowed in the WebCGM profile.)
Note (informative): in the CGM:1999 specification, the default value for the corresponding 'edge cap indicator' parameter of the EDGE CAP Attribute element is "1 (unspecified)."
edgeDashInd="1|2|3"
The edge dash indicator is restricted to values of 1-3 as defined in ISO/IEC
8632:1999.
Note (informative): in the CGM:1999 specification, the default value for the corresponding 'dash cap indicator' parameter of the EDGE CAP Attribute element is "1 (unspecified)."
The lineJoin
element is an EMPTY element that specifies the
desired rendering of the join characteristics at vertices of the line
element.
<!ELEMENT lineJoin EMPTY >
<!ATTLIST lineJoin
lineJoinInd ( 1 | 2 | 3 | 4 ) #REQUIRED
>
|
Attribute definitions:
lineJoinInd="1|2|3|4"
The line join indicator is restricted to values of 1-4 as defined in ISO/IEC
8632:1999.
Note (informative): in the CGM:1999 specification, the default value for the corresponding 'line join indicator' parameter of the LINE JOIN Attribute element is "1 (unspecified)."
The edgeJoin
element is an EMPTY element that specifies the
desired rendering of the join characteristics at vertices of the edge
element.
<!ELEMENT edgeJoin EMPTY >
<!ATTLIST edgeJoin
edgeJoinInd ( 1 | 2 | 3 | 4 ) #REQUIRED
>
|
Attribute definitions:
edgeJoinInd="1|2|3|4"
The edge join indicator is restricted to values of 1-4 as defined in ISO/IEC
8632:1999.
Note (informative): in the CGM:1999 specification, the default value for the corresponding 'edge join indicator' parameter of the EDGE JOIN Attribute element is "1 (unspecified)."
The mitreLimit
element is an EMPTY element that specifies how
line join at vertices are achieved.
<!ELEMENT mitreLimit EMPTY > <!ATTLIST mitreLimit limitVal CDATA #REQUIRED > |
Attribute definitions:
limitVal="CDATA"
The mitre limit value is defined as a scale factor applied to current line
and edge width. Valid values are non-negative real numbers. (See T.18.15 in section 6.7 for more particulars
about MITRE LIMIT values.)
The restrTextType
element is an EMPTY element that specifies
how text should fit within the restriction rectangle defined by the
RESTRICTED TEXT element of CGM:1999.
<!ELEMENT restrTextType EMPTY >
<!ATTLIST restrTextType
restrType ( 1 | 2 | 3 | 4 | 5 | 6 ) #REQUIRED
>
|
Attribute definitions:
restrType="1|2|3|4|5|6"
The restricted text type is restricted to value of 1-6 as defined in ISO/IEC
8632:1999.
Note (informative): in the CGM:1999 specification, the default value for the corresponding 'restriction type' parameter of the RESTRICTED TEXT TYPE Attribute element is "1 (basic)."
The lineEdgeTypeDef
element is an element that specifies the
desired rendering of the standard line type in ISO/IEC 8632:1999.
<!ELEMENT lineEdgeTypeDef EMPTY > <!ATTLIST lineEdgeTypeDef lineIndex ( 1 | 2 | 3 | 4 | 5 ) #REQUIRED dashLength CDATA #REQUIRED repeatLength CDATA #REQUIRED > |
Attribute definitions:
lineIndex="1|2|3|4|5"
The line type index is restricted to value of 1-5 as defined in ISO/IEC
8632:1999.
dashLength="CDATA"
The dashLength
attribute is a string that contains a list of
non-negative integers in the format of the WebCGMString List-of-number
subtype. The integers specify the lengths of each dash and gap in the
defined line pattern in abstract units, that are then normalized as a whole
pattern to the repeatLength
attribute of
lineEdgeTypeDef
. The first integer corresponds to solid, the
second to gap, the third to solid, etc.
repeatLength="CDATA"
The dash cycle repeat length defines the length of one complete repetition of
the dash pattern in NVDC units.
The complete WebCGM Application Configurable Items (ACI) file DTD follows.
<?xml version="1.0" encoding="UTF-8"?>
<!-- ================================================================ -->
<!-- This is the WebCGM Application Configurable Item file DTD -->
<!-- for use with WebCGM 2.1 -->
<!-- ================================================================ -->
<!-- Original issue: March 2008 -->
<!-- -->
<!-- Revision history: -->
<!-- June 2008 - modified for changes to CD02 ACI text. -->
<!-- March 2009 - changed 4 elements to attributes. -->
<!-- April 2009 - fixed mapList, dashLength to proper camel-case. -->
<!-- May 2009 - removed "5" from lineCapInd, edgeCapInd. -->
<!-- May 2009 - changed attributes to #REQUIRED in the elements -->
<!-- lineCap, edgeCap, lineJoin, edgeJoin, lineTypeCont, -->
<!-- edgeTypeCont, restrTextType. -->
<!-- November 2009 - removed lineTypeCont & edgeTypeCont elements -->
<!-- November 2009 - removed hatchStyleDef element -->
<!-- -->
<!-- ================================================================ -->
<!-- -->
<!ELEMENT webcgmConfig ( fontMap?, defaultAttributes? ) >
<!ELEMENT fontMap ( defaultFont?, mapList* ) >
<!ELEMENT defaultFont EMPTY >
<!ATTLIST defaultFont
useFont CDATA #REQUIRED >
<!ELEMENT mapList EMPTY >
<!ATTLIST mapList
forceSubstitution ( yes | no ) "yes"
cgmFont CDATA #REQUIRED
substitutionList CDATA #REQUIRED >
<!ELEMENT defaultAttributes ( lineCap | edgeCap | lineJoin | edgeJoin
| mitreLimit
| restrTextType | lineEdgeTypeDef )+ >
<!ELEMENT lineCap EMPTY > <!ATTLIST lineCap lineCapInd ( 1 | 2 | 3 | 4 ) #REQUIRED lineDashInd ( 1 | 2 | 3 ) #REQUIRED > <!ELEMENT edgeCap EMPTY > <!ATTLIST edgeCap edgeCapInd ( 1 | 2 | 3 | 4 ) #REQUIRED edgeDashInd ( 1 | 2 | 3 ) #REQUIRED > <!ELEMENT lineJoin EMPTY > <!ATTLIST lineJoin lineJoinInd ( 1 | 2 | 3 | 4 ) #REQUIRED > <!ELEMENT edgeJoin EMPTY > <!ATTLIST edgeJoin edgeJoinInd ( 1 | 2 | 3 | 4 ) #REQUIRED > <!ELEMENT mitreLimit EMPTY > <!ATTLIST mitreLimit limitVal CDATA #REQUIRED > <!ELEMENT restrTextType EMPTY > <!ATTLIST restrTextType restrType ( 1 | 2 | 3 | 4 | 5 | 6 ) #REQUIRED > <!ELEMENT lineEdgeTypeDef EMPTY > <!ATTLIST lineEdgeTypeDef lineIndex ( 1 | 2 | 3 | 4 | 5 ) #REQUIRED dashLength CDATA #REQUIRED repeatLength CDATA #REQUIRED >