12.6.11 Character Flow Object Class
A character flow object is atomic. Flow objects of this class can only be inlined. Flow objects of this class have the following characteristics:

•  char: is an object of type char specifying the character. This characteristic is not inherited.  If it is not specified, and there is a current node, and the current node has a char property, then the value of the char property shall be used as the value of this characteristic. If the value of the char-map: characteristic is not #f, then it is applied to the value of the char property, and the result is used as the value of the characteristic. This characteristic may be used to control hyphenation as well as possibly being used in the selection of the glyph.

•  char-map: is either #f or a procedure that is applied in the construction of the default value of the char: characteristic. The initial value is #f.

•  glyph-id: is an object of type glyph-id specifying the glyph that shall be imaged in the resulting area or #f if no image is associated with the resulting area. This characteristic is not inherited.  If this characteristic is not specified, it is computed using the value of the char: characteristic: if the blank? property of the character is true, then the value of the characteristic shall be #f; otherwise, the value of the characteristic shall be the value of the glyph-id property of the character, which shall not be #f in this case.

•  glyph-subst-table: is either #f or a glyph-subst-table or a list of glyph-subst-tables specifying substitutions to be performed on the glyph-id specified by the glyph-id: characteristic. If the value is a list, then the substitutions shall be performed in the specified order. The initial value is #f.

•  glyph-subst-method: is either #f or a string or a list of strings. Each string shall be a public identifier specifying a method for performing glyph substitution. The initial value is #f.

NOTE 79

This allows for context-dependent glyph substitution and for glyph substitutions that involve multiple glyphs.

•  glyph-reorder-method: is either #f or a string or a list of strings. Each string shall be a public identifier specifying a method for reordering glyphs. The initial value is #f.

NOTE 80

This is typically used for Indic scripts.

•  writing-mode: is one of the symbols left-to-right, right-to-left, or top-to-bottom.  The direction determined by the writing-mode shall be perpendicular to the placement direction.  The initial value is left-to-right. This controls which writing-mode of the font resource is used for the metrics of the glyph.

•  font-family-name: is either #f, indicating that any font family is acceptable, or a string giving the font family name property of the desired font resource. The initial value is iso-serif.

NOTE 81

ISO/IEC 10180 defines a mandatory font set for interchange comprising the font families iso-serif, iso-sanserif, and iso-monospace.

•  font-weight: is either #f, indicating that any font weight is acceptable, or one of the symbols not-applicable, ultra-light, extra-light, light, semi-light, medium, semi-bold, bold, extra-bold, or ultra-bold, giving the weight property of the desired font resource.  The initial value is medium.

•  font-posture: is either #f, indicating that any posture is acceptable, or one of the symbols not-applicable, upright, oblique, back-slanted-oblique, italic, or back-slanted-italic, giving the posture property of the desired font resource.  The initial value is upright. In addition, the value math is allowed specifying that the font posture shall be the value of the math-font-posture: characteristic.

•  math-font-posture: specifies the posture property of the desired font resource to be used when the font-posture: characteristic has the value math.  It shall have the value #f or one of the symbols not-applicable, upright, oblique, back-slanted-oblique, italic, or back-slanted-italic.  This characteristic is not inherited. The default value is the value of the math-font-posture character property of the char: characteristic.

•  font-structure: is either #f, indicating that any structure is applicable, or one of the symbols not-applicable, solid, or outline.  The initial value is solid.

•  font-proportionate-width: is either #f, indicating that any proportionate width is acceptable, or one of the symbols not-applicable, ultra-condensed, extra-condensed, condensed, semi-condensed, medium, semi-expanded, expanded, extra-expanded, or ultra-expanded.  The initial value is medium.

•  font-name: is either #f, indicating that any font name is acceptable, or a string which is the public identifier for the font name property of the desired font resource. When the value is a string, the values of the font-family-name:, font-weight:, font-posture:, font-structure:, and font-proportionate-width: characteristics are not used in font selection. The initial value is #f.

•  font-size: is a length specifying the body size to which the font resource should be scaled. The initial value is 10pt.

•  stretch-factor: is a number specifying the factor by which the character should be stretched. This characteristic is not inherited. The default is 1.

It is implementation- and font-dependent how this is achieved.

This is designed primarily for math delimiters of various kinds. The size of the delimiter is determined by the product of the font-size and the stretch-factor, but the visual appearance is designed to be consistent with glyphs with that font-size.

•  hyphenate?: is a boolean specifying whether hyphenation is allowed. The initial value is #f.

•  hyphenation-method: is a string specifying a public identifier for a hyphenation method or #f. The initial value is #f.

•  kern?: is a boolean specifying whether kerning (escapement adjustment) is allowed.  If true, then kerning shall be performed as specified in 8.8.1.6 of ISO 9541-1 according to the kern-mode: characteristic.  Escapement adjustment is not performed for glyphs whose escapement adjustment indicator property has the value non-adjusting. The initial value is #f.

•  kern-mode: is one of the symbols loose, normal, kern, tight, or touch specifying the escapement adjustment mode.  The initial value is normal.

•  ligature?: is a boolean specifying whether ligatures are allowed. The initial value is #f.

•  allowed-ligatures: is a list of allowed ligatures.  Each member of the list shall be either a glyph-id or a char.  Only ligatures whose result is one of the glyph-ids in the list or is equal to the glyph-id property of one of the chars in the list shall be used. The initial value is the empty list.

•  space?: is a boolean specifying whether the flow object is a space.  This characteristic is not inherited.  This affects only whether the inline-space specified as the value of the inline-space-space: characteristic is applicable to this flow object.  The default value is the value of the space? character property of the char: characteristic.

•  inline-space-space: is an object of type inline-space which is applicable to the flow object if it is a space. This is in addition to any space from the escapement-space-before: and escapement-space-after: characteristics.

•  escapement-space-before: is an object of type inline-space specifying space to be added before the first result area in the escapement direction. The initial value is (inline-space 0pt).

•  escapement-space-after: is an object of type inline-space specifying space to be added after the last result area in the escapement direction. The initial value is (inline-space 0pt).

•  record-end?: is a boolean specifying whether the flow object is a record-end. Flow objects for which the record-end?: characteristic is true shall be treated differently by paragraphs for which the lines: characteristic has the value asis or for which the ignore-record-end?: characteristic is true. This characteristic is not inherited. The default value is the value of the record-end? character property of the char: characteristic.

•  input-tab?: is a boolean specifying whether the flow object is a tab on input. This characteristic is not inherited. Character flow objects that are tabs shall be treated differently by paragraphs for which the expand-tabs property is not #f. The default value is the value of the input-tab? character property of the char: characteristic if the char: characteristic was not explicitly specified, and otherwise #f.

•  input-whitespace-treatment: is one of the following symbols:

•  preserve specifying no special action.

•  collapse specifying that a character flow object for which the input-whitespace?: characteristic is true shall be ignored if the preceding flow object was a character flow object also with the input-whitespace?: characteristic true.

•  ignore specifying that any character flow object for which the input-whitespace?: characteristic is true shall be ignored.

The initial value is preserve.

•  input-whitespace?: is a boolean specifying whether the character shall be considered as whitespace on input.  This characteristic is not inherited.  The default value is the value of the input-whitespace? character property of the char: characteristic if the char: characteristic was not explicitly specified, and otherwise #f.

•  punct?: is a boolean specifying whether the character should be treated as punctuation for the purposes of formatting the paragraph with hanging punctuation.  This shall only take effect if the hanging-punct?: characteristic of the paragraph is true.  This characteristic is not inherited. The default value is the value of the punct? character property of the char: characteristic.

•  break-before-priority: is an integer that affects whether a break is allowed before this character.  The break priority of a potential breakpoint is the maximum of the break-after-priority of the character immediately preceding the potential breakpoint and the break-before-priorities of the character immediately following the potential breakpoint, and any characters immediately following that character for which the drop-after-line-break?: characteristic is true.  A break is allowed at a potential breakpoint only if the break priority is even.  This characteristic is not inherited.  The default value is the value of the break-before-priority character property of the char: characteristic.

NOTE 82

For example, for ideographs, the break-before-priority: and break-after-priority: characteristics would typically be 0 and 0, for a Latin letter 1 and 1, and for a space character 2 and 3.

•  break-after-priority: is an integer that affects whether a break is allowed after this character as described in the specification of the break-before-priority: characteristic. This characteristic is not inherited.  The default value is the value of the break-after-priority character property of the char: characteristic.

•  drop-after-line-break?: is a boolean specifying whether this character should be discarded if it follows a line break.  This characteristic is not inherited.  The default value is the value of the drop-after-line-break? character property of the char: characteristic.

•  drop-unless-before-line-break?: is a boolean specifying whether this character shall be discarded unless it precedes a line break. This characteristic is not inherited.  The default value is the value of the drop-unless-before-line-break? character property of the char: characteristic.

•  math-class: is one of the symbols ordinary, operator, binary, relation, opening, closing, punctuation, inner, or space.  This is used by the flow object classes for mathematical formulae to adjust the spacing of the character.  A value of space is used for character flow objects that specify additional space; flow objects with this math-class should be ignored when adjusting the spacing of another character flow object.  This characteristic is not inherited. The default value is the value of the math-class character property of the char: characteristic.

•  script: is a string specifying a formal public identifier that identifies the character's script or #f if the character is not associated with any single script. This characteristic is not inherited. The default value is the value of the script character property of the char: characteristic.

•  position-point-shift: is a length-spec specifying a shift of the position point in the line-progression direction. The initial value is 0pt.

NOTE 83

Shifting the position point by a positive amount in the line-progression direction has the effect of shifting the areas produced by flow object in the opposite direction to the line-progression direction.

•  language: is #f or a symbol specifying the ISO 639 language code in upper-case. This affects line composition in a system-dependent way. The initial value is #f.

•  country: is #f or a symbol specifying the ISO 3166 country code in upper-case. This affects line composition in a system-dependent way. The initial value is #f.

•  color: is an object of type color that specifies the color in which the flow object's marks should be made. The initial value is the default color in the Device Gray color space.

•  layer: is an integer specifying the layer of the marks of the areas resulting from the flow object.  An area shall be imaged after any area whose layer has a lower value. The initial value is 0.

•  inhibit-line-breaks?: is a boolean specifying whether line breaks shall be inhibited before and after each area produced by this flow object. This applies only to line breaks introduced by the formatter to make lines fit in the available space. The initial value is #f.
A character flow object is formatted to produce a single inline area. This may be merged with adjacent inline areas if the ligature?: property is true.  The position point of the inline area is the position point property of the glyph specified in the font resource for the specified writing-mode.  The escapement direction is the direction between the position point and escapement points as specified in the font resource for the specified writing-mode.  The size of the area in the escapement direction is the distance between the position and escapement points.  The size of the area before and after the placement path in the line-progression direction is the smallest that will enclose the extent of the glyph in those directions as specified in the font resource for the specified writing-mode.  If the nominal alignment mode of the font resource for the character flow object's writing-mode is not the same as the paragraph's alignment mode, then the glyph area is automatically adjusted as specified by the alignment mode property in the font resource for the specified writing-mode.
12.6.11.1 Character Properties
Character properties are used to determine the default values of certain non-inherited characteristics of character flow objects.  In addition, character properties are accessible with the char-property procedure. The properties of a character do not affect how the flow objects are formatted.  They are only used during the construction of the flow object tree and may affect how the flow object tree is constructed.

NOTE 84

Character properties should not be confused with properties of nodes of class data-char.
The following character properties are pre-defined for the style language:

•  space? is a boolean specifying whether the character is a space.  The default value is #f.

•  record-end? is a boolean specifying whether the character is a record-end.  The default value is #f.  Both the space? and record-end? properties are usually true for a record-end character.

•  blank? is a boolean which is true if the character has no glyph associated with it.  The default value is #f.

•  input-tab? is a boolean specifying whether the character is a tab on input.  The default value is #f.

•  input-whitespace? is a boolean specifying whether the character should be considered as whitespace on input. The default value is #f.

•  punct? is a boolean which is true if the character is treated as a punctuation character for the purposes of hanging punctuation. The default value is #f.

•  script is a string specifying a formal public identifier that identifies the character's script or #f if the character is not associated with any single script. The following script public identifiers are defined in this International Standard:

•  ISO/IEC 10179:1996//Script::Latin

•  ISO/IEC 10179:1996//Script::Greek

•  ISO/IEC 10179:1996//Script::Cyrillic

•  ISO/IEC 10179:1996//Script::Arabic

•  ISO/IEC 10179:1996//Script::Hebrew

•  ISO/IEC 10179:1996//Script::Armenian

•  ISO/IEC 10179:1996//Script::Georgian

•  ISO/IEC 10179:1996//Script::Devanagari

•  ISO/IEC 10179:1996//Script::Gujarati

•  ISO/IEC 10179:1996//Script::Gurmukhi

•  ISO/IEC 10179:1996//Script::Bengali

•  ISO/IEC 10179:1996//Script::Oriya

•  ISO/IEC 10179:1996//Script::Telugu

•  ISO/IEC 10179:1996//Script::Tamil

•  ISO/IEC 10179:1996//Script::Kannada

•  ISO/IEC 10179:1996//Script::Malayalam

•  ISO/IEC 10179:1996//Script::Thai

•  ISO/IEC 10179:1996//Script::Lao

•  ISO/IEC 10179:1996//Script::Han

•  ISO/IEC 10179:1996//Script::Bopomofo

•  ISO/IEC 10179:1996//Script::Hiragana

•  ISO/IEC 10179:1996//Script::Katakana

•  ISO/IEC 10179:1996//Script::Hangul

•  ISO/IEC 10179:1996//Script::Burmese

•  ISO/IEC 10179:1996//Script::Khmer

•  ISO/IEC 10179:1996//Script::Mongolian

•  ISO/IEC 10179:1996//Script::Ethiopian

•  ISO/IEC 10179:1996//Script::Sinhala

•  ISO/IEC 10179:1996//Script::Tibetan

•  ISO/IEC 10179:1996//Script::Punctuation

•  ISO/IEC 10179:1996//Script::Symbol

•  ISO/IEC 10179:1996//Script::Digit

NOTE 85

Characters representing punctuation and symbols typically have a script value of #f.

•  glyph-id is an object of type glyph-id representing the nominal glyph to be used for this character or #f if the character has no glyph. If the character was declared using the standard-chars architectural form, then the default value is the glyph-id for the nominal glyph for that character, if there is one, and otherwise #f. Otherwise, the default value is #f.

NOTE 86

The nominal glyph-id may be transformed using one or more glyph-substitution-tables.  This allows for selective mapping to, for example, small caps or old style glyphs.

•  drop-after-line-break? is a boolean specifying whether the character is dropped when it immediately follows a line break.  The default value is #f.

NOTE 87

This is usually true for a space character.

•  drop-unless-before-line-break?: is a boolean specifying whether this character shall be discarded unless it precedes a line break. The default value is #f.

NOTE 88

This is usually true for a soft hyphen.

•  break-before-priority is an integer that affects whether a break is allowed before this character in the manner described in the specification for the break-before-priority: characteristic of the character flow object. The default value is 0.

•  break-after-priority is an integer that affects whether a break is allowed after this character in the manner described in the specification for the break-after-priority: characteristic of the character flow object. The default value is 0.

•  math-class is one of the symbols ordinary, operator, binary, relation, opening, closing, punctuation, or inner.  The default value is ordinary.

•  math-font-posture is either #f, meaning that any posture is acceptable, or one of the symbols not-applicable, upright, oblique, back-slanted-oblique, italic, back-slanted-italic, or math giving the posture property of the font resource to be used when the font-posture: characteristic has the value math.

NOTE 89

This set of character properties is not exhaustive. Additional properties may be added using an added-char-properties-declaration.