<?xml version="1.0" encoding="UTF-8"?>

<!--
Use the following public and system IDs for this DTD:
<!DOCTYPE axsl-font-config
    PUBLIC "-//aXSL//DTD Font Configuration V0.1//EN"
    "http://www.axsl.org/dtds/0.1/en/axsl-font-config.dtd">
-->

<!ELEMENT axsl-font-config (server?, glyph-list*, encoding*,
  autoregister-configuration*, autoregister-directory*,
  (font-family | font-group)*, font-family-alias*) >
<!ATTLIST axsl-font-config
  embed (all | subset | none) #IMPLIED
  xml:base CDATA #IMPLIED
>

<!ELEMENT server (parameter*) >
<!ATTLIST server
  setup-free-standing-fonts (true | false) #IMPLIED
  setup-system-fonts (true | false) #IMPLIED
>

<!ELEMENT parameter EMPTY >
<!ATTLIST parameter
  key CDATA #REQUIRED
  value CDATA #IMPLIED
  from-environment CDATA #IMPLIED
>

<!ELEMENT glyph-list EMPTY >
<!ATTLIST glyph-list
  name CDATA #REQUIRED
  file CDATA #REQUIRED
>

<!ELEMENT encoding EMPTY >
<!ATTLIST encoding
  name CDATA #REQUIRED
  glyph-lists CDATA #IMPLIED
  file CDATA #REQUIRED
  column-to-parse CDATA #REQUIRED
  radix CDATA #REQUIRED
>


<!--
The autoregister-configuration element describes a set of rules to be used
during autoregistration of fonts.
-->
<!ELEMENT autoregister-configuration EMPTY >
<!ATTLIST autoregister-configuration
  id ID #REQUIRED
>

<!--
The autoregister-directory element references a directory that should be read by
the system for the purpose of registering any font files found there in a
default manner.
Attributes:
* directory: The URL to the directory whose contents should be automatically
  registered. The directory name "System" (case is irrelevant), indicates that
  all standard system directories should be searched.
* configuration: The "id" of an autoregister-configuration element that should
  be used when registering the contents of this directory. If omitted, a default
  configuration will be used.
-->
<!ELEMENT autoregister-directory EMPTY>
<!ATTLIST autoregister-directory
  directory CDATA #REQUIRED
  configuration IDREF #IMPLIED
>

<!ELEMENT font-group (font-family | font-group)+ >
<!ATTLIST font-group
  label CDATA #IMPLIED
  embed (all | subset | none) #IMPLIED
  xml:base CDATA #IMPLIED
>

<!ELEMENT font-family (family-member+) >
<!ATTLIST font-family
  name CDATA #REQUIRED
  simulate-small-caps CDATA #IMPLIED
  encoding CDATA #IMPLIED
  embed (all | subset | none) #IMPLIED
  xml:base CDATA #IMPLIED
>

<!ELEMENT family-member (font) >
<!--
  The attributes style, weight, variant, and stretch correspond to the
  CSS/XSL-FO font properties derived from these names.
  For example, attribute "style" corresponds to the CSS/XSL-FO "font-style"
  property.

  Simulations for font-variant
  ****************************
  Attribute simulate-small-caps takes either a percentage or the value
  "native". If the value is a percentage, the "%" character should be included.

  Setting simulate-small-caps allows the font-description to be selected for
  requests of both font-variant="normal" and font-variant="small-caps".

  A percentage indicates the scaling factor that should be applied for the
  lowercase characters.
  For example, a value of "80%", when applied to a font-size of 12 points,
  will result in small-caps at 9.6 points.

  If "native" is specified, the font's internal metrics are used to compute an
  appropriate percentage. The computation attempts to make the height of the
  simulated small-caps glyphs the same as the lowercase glyphs in the font.

  Simulations for font-style
  **************************
  Attributes simulate-oblique and simulate-backslant take percentages, and the
  "%" character should be included.
  Note that there is no simulate-italic, as italic cannot be reasonably
  simulated.
  However oblique and italic are treated as equivalent in both CSS and XSL-FO
  font selection, so providing a simulate-oblique value has an equivalent
  effect.

  Setting simulate-oblique allows the font-description to be selected for
  requests of either font-style="normal" or font-style="italic"
  or font-style="oblique".
  Setting simulate-backslant allows the font-description to be selected for
  requests of either font-style="normal" or font-style="backslant".

  The percentage indicates the portion of 90 degrees that should be applied
  in simulating the slant.
  For example, a value of "10%" will result in a 9 degree forward slant.
  A value of "-5%" will result in a 4.5 degree backslant.
  Presumably simulate-oblique should be provided a positive value, and
  simulate-backslant should be provided a negative value.

  Simulations for font-stretch
  ****************************
  The attributes simulate-ultra-condensed, simulate-extra-condensed,
  simulate-condensed, simulate-semi-condensed, simulate-semi-expanded,
  simulate-expanded, simulate-extra-expanded, and simulate-ultra-expanded
  correspond to the CSS/XSL-FO "font-stretch" values from which these names
  are derived.
  For example "simulate-ultra-condensed" corresponds to a request for
  font-stretch="ultra-condensed".
  These attributes take percentages, and the "%" character should be included.

  Setting one of these attributes allows the font-description to be selected
  for requests of both font-stretch="normal" or font-stretch equal to the
  corresponding CSS/XSL-FO "font-stretch" value.
  For example, setting simulate-ultra-condensed will allow this
  font-description to be selected for requests of either font-stretch="normal"
  or font-stretch="ultra-condensed".

  The percentage indicates the effect on the width of the characters.
  For example, consider a glyph that is 600 text space units wide.
  Scaled to 12 points, this glyph is normally 7.2 points wide
  (600 * 12 / 1000).
  A stretch value of 125% will result in a width of 750 text space units, or
  9 points.
  A stretch value of 80% will result in a width of 480 text space units, or
  5.76 points.

-->
<!ATTLIST family-member
  style (normal | italic | oblique | backslant) #REQUIRED
  weight (normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800
      | 900) #REQUIRED
  variant (normal | small-caps) #IMPLIED
  stretch (ultra-condensed | extra-condensed | condensed | semi-condensed
      | normal | semi-expanded | expanded | extra-expanded
      | ultra-expanded) #IMPLIED
  simulate-small-caps CDATA #IMPLIED
  simulate-oblique CDATA #IMPLIED
  simulate-backslant CDATA #IMPLIED
  simulate-ultra-condensed CDATA #IMPLIED
  simulate-extra-condensed CDATA #IMPLIED
  simulate-condensed CDATA #IMPLIED
  simulate-semi-condensed CDATA #IMPLIED
  simulate-semi-expanded CDATA #IMPLIED
  simulate-expanded CDATA #IMPLIED
  simulate-extra-expanded CDATA #IMPLIED
  simulate-ultra-expanded CDATA #IMPLIED
  encoding CDATA #IMPLIED
>

<!ELEMENT font EMPTY >
<!--
  The IMPLIED value for the "embed" attribute is "none".
-->
<!ATTLIST font
  id ID #IMPLIED
  system-name CDATA #IMPLIED
  embed (all | subset | none) #IMPLIED
  font-file CDATA #IMPLIED
  collection-id CDATA #IMPLIED
  metrics-file CDATA #IMPLIED
  ref CDATA #IMPLIED
>

<!ELEMENT font-family-alias EMPTY >
<!ATTLIST font-family-alias
  alias CDATA #REQUIRED
  family CDATA #REQUIRED
>
