xref: /aosp_15_r20/external/fonttools/Tests/designspaceLib/data/test_v5.designspace (revision e1fe3e4ad2793916b15cccdc4a7da52a7e1dd0e9)
1<?xml version='1.0' encoding='UTF-8'?>
2<designspace format="5.0">
3  <axes elidedfallbackname="Regular">
4    <axis tag="wght" name="Weight" minimum="200" maximum="1000" default="200">
5      <labelname xml:lang="en">Wéíght</labelname>
6      <labelname xml:lang="fa-IR">قطر</labelname>
7      <map input="200" output="0"/>
8      <map input="300" output="100"/>
9      <map input="400" output="368"/>
10      <map input="600" output="600"/>
11      <map input="700" output="824"/>
12      <map input="900" output="1000"/>
13      <!-- All axes provide STAT information with the "labels" element. -->
14      <labels>
15        <label uservalue="200" userminimum="200" usermaximum="250" name="Extra Light">
16          <labelname xml:lang="de">Extraleicht</labelname>
17          <labelname xml:lang="fr">Extra léger</labelname>
18        </label>
19        <label uservalue="300" userminimum="250" usermaximum="350" name="Light"/>
20        <label uservalue="400" userminimum="350" usermaximum="450" name="Regular" elidable="true"/>
21        <label uservalue="600" userminimum="450" usermaximum="650" name="Semi Bold"/>
22        <label uservalue="700" userminimum="650" usermaximum="850" name="Bold"/>
23        <label uservalue="900" userminimum="850" usermaximum="900" name="Black"/>
24        <!--
25          Add "recursive" linked user values, see:
26          https://github.com/fonttools/fonttools/issues/2852
27          https://github.com/fonttools/fonttools/discussions/2790
28        -->
29        <label uservalue="400" name="Regular" elidable="true" linkeduservalue="700"/>
30        <label uservalue="700" name="Bold" linkeduservalue="400"/>
31      </labels>
32    </axis>
33
34    <axis tag="wdth" name="Width" minimum="50" maximum="150" default="100" hidden="1">
35      <labelname xml:lang="fr">Chasse</labelname>
36      <map input="50" output="10"/>
37      <map input="100" output="20"/>
38      <map input="125" output="66"/>
39      <map input="150" output="990"/>
40      <labels ordering="1">
41        <label uservalue="50" name="Condensed"/>
42        <label uservalue="100" name="Normal" elidable="true" oldersibling="true"/>
43        <label uservalue="125" name="Wide"/>
44        <!-- Allow specifying only one end of the range, the other is assumed to
45          be infinity as does otlLib buildStatTable -->
46        <label uservalue="150" userminimum="150" name="Extra Wide"/>
47      </labels>
48    </axis>
49
50    <!--
51      Discrete axes provide a list of discrete values.
52      No interpolation is allowed between these.
53    -->
54    <axis tag="ital" name="Italic" values="0 1" default="0">
55      <labels>
56        <!-- Discrete axes also provide STAT information. -->
57        <label uservalue="0" name="Roman" elidable="true" linkeduservalue="1"/>
58        <label uservalue="1" name="Italic"/>
59      </labels>
60    </axis>
61  </axes>
62
63  <!-- Freestanding labels are analogues of STAT format 4 entries.
64        They give names to freestyle locations. -->
65  <labels>
66    <label name="Some Style">
67      <labelname xml:lang="fr">Un Style</labelname>
68      <location>
69        <dimension name="Weight" uservalue="300"/>
70        <dimension name="Width" uservalue="50"/>
71        <dimension name="Italic" uservalue="0"/>
72      </location>
73    </label>
74    <label name="Other">
75      <location>
76        <dimension name="Weight" uservalue="700"/>
77        <dimension name="Width" uservalue="100"/>
78        <dimension name="Italic" uservalue="1"/>
79      </location>
80    </label>
81  </labels>
82
83  <rules processing="last">
84    <rule name="named.rule.1">
85      <conditionset>
86        <condition name="axisName_a" minimum="0" maximum="1"/>
87        <condition name="axisName_b" minimum="2" maximum="3"/>
88      </conditionset>
89      <sub name="a" with="a.alt"/>
90    </rule>
91  </rules>
92
93  <sources>
94    <source filename="masterTest1.ufo" name="master.ufo1" familyname="MasterFamilyName" stylename="MasterStyleNameOne">
95      <familyname xml:lang="fr">Montserrat</familyname>
96      <familyname xml:lang="ja">モンセラート</familyname>
97      <lib copy="1"/>
98      <features copy="1"/>
99      <info copy="1"/>
100      <glyph name="A" mute="1"/>
101      <glyph name="Z" mute="1"/>
102      <location>
103        <dimension name="Weight" xvalue="0"/>
104        <dimension name="Width" xvalue="20"/>
105        <dimension name="Italic" xvalue="0"/>
106      </location>
107    </source>
108    <source filename="masterTest2.ufo" name="master.ufo2" familyname="MasterFamilyName" stylename="MasterStyleNameTwo">
109      <kerning mute="1"/>
110      <location>
111        <dimension name="Weight" xvalue="1000"/>
112        <dimension name="Width" xvalue="20"/>
113        <dimension name="Italic" xvalue="0"/>
114      </location>
115    </source>
116    <source filename="masterTest2.ufo" name="master.ufo2" familyname="MasterFamilyName" stylename="Supports" layer="supports">
117      <location>
118        <dimension name="Weight" xvalue="1000"/>
119        <dimension name="Width" xvalue="20"/>
120        <dimension name="Italic" xvalue="0"/>
121      </location>
122    </source>
123    <source filename="masterTest2.ufo" name="master.ufo3" familyname="MasterFamilyName" stylename="FauxItalic">
124      <location>
125        <dimension name="Weight" xvalue="0"/>
126        <dimension name="Width" xvalue="100"/>
127        <dimension name="Italic" xvalue="1"/>
128      </location>
129    </source>
130  </sources>
131
132  <variable-fonts>
133    <!--
134      If this element is present, all output targets must be listed within it.
135      If it is not present, the full Designspace is the output, like in version 4.x.
136
137      Continuous axes can be included either:
138        * in full,
139        * or only on a reduced interval (different minimum-maximum),
140        * or only at 1 discrete location
141      Dicrete axes cannot be included in full, and we must specify a value
142      (or the compiler should assume the default value).
143    -->
144    <variable-font name="Test_WghtWdth" filename="Test_WghtWdth_different_from_name.ttf">
145      <!-- This one is the Roman (default location along ital),
146           with full range for the Weight axis. -->
147      <axis-subsets>
148        <axis-subset name="Weight"/>
149        <axis-subset name="Width"/>
150      </axis-subsets>
151      <lib>
152        <dict>
153          <key>com.vtt.source</key>
154          <string>sources/vtt/Test_WghtWdth.vtt</string>
155        </dict>
156      </lib>
157    </variable-font>
158    <variable-font name="Test_Wght">
159      <!-- This one is the Roman (default location along ital),
160           with full range for the Weight axis. -->
161      <axis-subsets>
162        <axis-subset name="Weight"/>
163      </axis-subsets>
164      <lib>
165        <dict>
166          <key>com.vtt.source</key>
167          <string>sources/vtt/Test_Wght.vtt</string>
168        </dict>
169      </lib>
170    </variable-font>
171    <variable-font name="TestCd_Wght">
172      <!-- This one is the Roman (default location along ital),
173           with full range for the Weight axis. -->
174      <axis-subsets>
175        <axis-subset name="Weight"/>
176        <axis-subset name="Width" uservalue="0"/>
177      </axis-subsets>
178    </variable-font>
179    <variable-font name="TestWd_Wght">
180      <!-- This one is the Roman (default location along ital),
181           with full range for the Weight axis. -->
182      <axis-subsets>
183        <axis-subset name="Weight"/>
184        <axis-subset name="Width" uservalue="1000"/>
185      </axis-subsets>
186    </variable-font>
187    <variable-font name="TestItalic_Wght">
188      <!-- This one is the Italic, with full range for the Weight axis. -->
189      <axis-subsets>
190        <axis-subset name="Weight"/>
191        <axis-subset name="Italic" uservalue="1"/>
192      </axis-subsets>
193    </variable-font>
194    <variable-font name="TestRB_Wght">
195      <!-- As an example, this would be the Roman with a reduced range. -->
196      <axis-subsets>
197        <axis-subset name="Weight" userminimum="400" usermaximum="700" userdefault="400"/>
198        <axis-subset name="Italic" uservalue="0"/>
199      </axis-subsets>
200    </variable-font>
201  </variable-fonts>
202
203  <instances>
204    <instance name="instance.ufo1" familyname="InstanceFamilyName" stylename="InstanceStyleName" filename="instances/instanceTest1.ufo" postscriptfontname="InstancePostscriptName" stylemapfamilyname="InstanceStyleMapFamilyName" stylemapstylename="InstanceStyleMapStyleName">
205      <stylename xml:lang="fr">Demigras</stylename>
206      <stylename xml:lang="ja">半ば</stylename>
207      <familyname xml:lang="fr">Montserrat</familyname>
208      <familyname xml:lang="ja">モンセラート</familyname>
209      <stylemapstylename xml:lang="de">Standard</stylemapstylename>
210      <stylemapfamilyname xml:lang="de">Montserrat Halbfett</stylemapfamilyname>
211      <stylemapfamilyname xml:lang="ja">モンセラート SemiBold</stylemapfamilyname>
212      <location>
213        <dimension name="Weight" xvalue="500"/>
214        <dimension name="Width" xvalue="20"/>
215      </location>
216
217      <!-- The following elements are deprecated in v5.0. They can still be
218           read, but they won't be written out again (they don't roundtrip). -->
219      <!-- ROUNDTRIP_TEST_REMOVE_ME_BEGIN -->
220      <glyphs>
221        <glyph mute="1" unicode="0x123 0x124 0x125" name="arrow"/>
222      </glyphs>
223      <kerning/>
224      <info/>
225      <!-- ROUNDTRIP_TEST_REMOVE_ME_END -->
226
227      <lib>
228        <dict>
229          <key>com.coolDesignspaceApp.binaryData</key>
230          <data>
231          PGJpbmFyeSBndW5rPg==
232          </data>
233          <key>com.coolDesignspaceApp.specimenText</key>
234          <string>Hamburgerwhatever</string>
235        </dict>
236      </lib>
237    </instance>
238    <instance name="instance.ufo2" familyname="InstanceFamilyName" stylename="InstanceStyleName" filename="instances/instanceTest2.ufo" postscriptfontname="InstancePostscriptName" stylemapfamilyname="InstanceStyleMapFamilyName" stylemapstylename="InstanceStyleMapStyleName">
239      <location>
240        <dimension name="Weight" xvalue="500"/>
241        <dimension name="Width" xvalue="400" yvalue="300"/>
242      </location>
243      <!-- ROUNDTRIP_TEST_REMOVE_ME_BEGIN -->
244      <glyphs>
245        <glyph unicode="0x65 0xc9 0x12d" name="arrow">
246          <location>
247            <dimension name="Weight" xvalue="120"/>
248            <dimension name="Width" xvalue="100"/>
249          </location>
250          <note>A note about this glyph</note>
251          <masters>
252            <master glyphname="BB" source="master.ufo1">
253              <location>
254                <dimension name="Weight" xvalue="20"/>
255                <dimension name="Width" xvalue="20"/>
256              </location>
257            </master>
258            <master glyphname="CC" source="master.ufo2">
259              <location>
260                <dimension name="Weight" xvalue="900"/>
261                <dimension name="Width" xvalue="900"/>
262              </location>
263            </master>
264          </masters>
265        </glyph>
266        <glyph name="arrow2"/>
267      </glyphs>
268      <kerning/>
269      <info/>
270      <!-- ROUNDTRIP_TEST_REMOVE_ME_END -->
271    </instance>
272
273    <!--
274      These instances will derive all their data from the data above.
275
276      Instances can specify their location either:
277        - using the name of a location label
278        - with design coordinates (xvalue="")
279        - with user coordinates (uservalue="")
280        - with a mix of both coordinate systems
281    -->
282    <instance location="Some Style"/>
283    <instance>
284      <location>
285        <dimension name="Weight" xvalue="600"/>
286        <dimension name="Width" xvalue="401" yvalue="420"/>
287      </location>
288    </instance>
289    <instance>
290      <location>
291        <dimension name="Weight" xvalue="10"/>
292        <dimension name="Width" uservalue="100"/>
293        <dimension name="Italic" xvalue="0"/>
294      </location>
295    </instance>
296    <instance>
297      <location>
298        <dimension name="Weight" uservalue="300"/>
299        <dimension name="Width" uservalue="130"/>
300        <dimension name="Italic" uservalue="1"/>
301      </location>
302    </instance>
303  </instances>
304
305  <lib>
306    <dict>
307      <key>com.coolDesignspaceApp.previewSize</key>
308      <integer>30</integer>
309    </dict>
310  </lib>
311</designspace>
312