This file is indexed.

/usr/share/xml/xgridfit/utils/convert-ttx.xsl is in xgridfit 2.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

  <!--
     This script, called by ttx2xgf, converts a TTX file (an XML
     representation of a font) into an Xgridfit script *almost* ready
     to be compiled in TTX mode (final fixup is done in a Python
     script).
-->

  <xsl:output method="xml" encoding="UTF-8" indent="yes"/>

  <xsl:variable name="newline">
    <xsl:text>
</xsl:text>
  </xsl:variable>

  <xsl:variable name="newline-two">
    <xsl:text>
  </xsl:text>
  </xsl:variable>

  <xsl:variable name="newline-four">
    <xsl:text>
    </xsl:text>
  </xsl:variable>

  <xsl:variable name="newline-six">
    <xsl:text>
      </xsl:text>
  </xsl:variable>

  <xsl:variable name="two-space">
    <xsl:text>  </xsl:text>
  </xsl:variable>

  <xsl:variable name="four-space">
    <xsl:text>    </xsl:text>
  </xsl:variable>

  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="ttFont">
    <xsl:element name="xgridfit" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="default" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="type">max-twilight-points</xsl:attribute>
	<xsl:attribute name="value">
	  <xsl:value-of select="maxp/maxTwilightPoints/@value"/>
	</xsl:attribute>
      </xsl:element>
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="default" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="type">legacy-storage</xsl:attribute>
	<xsl:attribute name="value">
	  <xsl:value-of select="number(maxp/maxStorage/@value) + 64"/>
	</xsl:attribute>
      </xsl:element>
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="default" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="type">max-stack</xsl:attribute>
	<xsl:attribute name="value">
	  <xsl:value-of select="maxp/maxStackElements/@value"/>
	</xsl:attribute>
      </xsl:element>
      <!-- Here are some handy values thrown in for free -->
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="constant" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="name">left-sidebearing</xsl:attribute>
	<xsl:attribute name="value">last + 1</xsl:attribute>
      </xsl:element>
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="constant" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="name">right-sidebearing</xsl:attribute>
	<xsl:attribute name="value">last + 2</xsl:attribute>
      </xsl:element>
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="constant" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="name">vertical</xsl:attribute>
	<xsl:attribute name="value">0</xsl:attribute>
      </xsl:element>
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="constant" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="name">horizontal</xsl:attribute>
	<xsl:attribute name="value">1</xsl:attribute>
      </xsl:element>
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="constant" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="name">false</xsl:attribute>
	<xsl:attribute name="value">0</xsl:attribute>
      </xsl:element>
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="constant" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="name">true</xsl:attribute>
	<xsl:attribute name="value">1</xsl:attribute>
      </xsl:element>
      <xsl:apply-templates select="cvt"/>
      <xsl:value-of select="$newline"/>
      <xsl:apply-templates select="fpgm"/>
      <xsl:value-of select="$newline"/>
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="pre-program" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:value-of select="$newline"/>
	<xsl:apply-templates select="prep"/>
	<xsl:value-of select="$newline"/>
      </xsl:element>
      <xsl:value-of select="$newline"/>
      <xsl:apply-templates select="glyf"/>
    </xsl:element>
  </xsl:template>

  <xsl:template match="cvt">
    <xsl:value-of select="$two-space"/>
    <xsl:for-each select="cv">
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="control-value" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="name">
	  <xsl:value-of select="concat('cv-',@index)"/>
	</xsl:attribute>
	<xsl:attribute name="value">
	  <xsl:value-of select="@value"/>
	</xsl:attribute>
      </xsl:element>
    </xsl:for-each>
    <xsl:value-of select="$newline-two"/>
    <xsl:comment>
      <xsl:text>
	Do not add, subtract or reorder above this point.
	You may change the id but not the value of any of
	these control-value elements.
      </xsl:text>
    </xsl:comment>
    <xsl:value-of select="$newline-two"/>
  </xsl:template>

  <xsl:template match="fpgm">
    <xsl:if test="assembly">
      <xsl:value-of select="$newline-two"/>
      <xsl:element name="legacy-functions"  namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	<xsl:attribute name="max-function-defs">
	  <xsl:value-of select="/ttFont/maxp/maxFunctionDefs/@value"/>
	</xsl:attribute>
	<xsl:value-of select="$newline-six"/>
	<xsl:value-of select="assembly"/>
	<xsl:value-of select="$newline-two"/>
      </xsl:element>
      <xsl:value-of select="$newline"/>
      <xsl:value-of select="$newline"/>
    </xsl:if>
  </xsl:template>

  <xsl:template match="prep">
    <xsl:if test="assembly">
      <xsl:value-of select="$newline-two"/>
      <xsl:value-of select="assembly"/>
    </xsl:if>
    <xsl:value-of select="$newline"/>
  </xsl:template>

  <xsl:template match="glyf">
    <xsl:for-each select="TTGlyph">
      <xsl:if test="instructions/assembly and
		    string-length(normalize-space(instructions/assembly))">
	<xsl:value-of select="$newline-two"/>
	<xsl:variable name="n">
	  <xsl:value-of select="./@name"/>
	</xsl:variable>
	<xsl:element name="glyph" namespace="http://xgridfit.sourceforge.net/Xgridfit2">
	  <xsl:attribute name="ps-name">
	    <xsl:value-of select="$n"/>
	  </xsl:attribute>
	  <xsl:attribute name="xml:id">
	    <xsl:choose>
	      <xsl:when test="$n = '.notdef'">
		<xsl:text>notdef-glyph</xsl:text>
	      </xsl:when>
	      <xsl:otherwise>
		<xsl:value-of select="$n"/>
	      </xsl:otherwise>
	    </xsl:choose>
	  </xsl:attribute>
	  <xsl:attribute name="init-graphics">
	    <xsl:value-of select="'no'"/>
	  </xsl:attribute>
	  <xsl:value-of select="$newline-four"/>
	    <xsl:value-of select="instructions/assembly"/>
	  <xsl:value-of select="$newline-two"/>
	</xsl:element>
	<xsl:value-of select="$newline"/>
      </xsl:if>
    </xsl:for-each>
  </xsl:template>

</xsl:stylesheet>