| 1 |
--- |
| 2 |
title: Awami Nastaliq Developer Documentation |
| 3 |
fontversion: 3.200 |
| 4 |
--- |
| 5 |
|
| 6 |
# Testing |
| 7 |
|
| 8 |
## FTML files |
| 9 |
|
| 10 |
FTML is a system for applying an XSL stylesheet to an XML file to display rendered text in a way useful for testing a font. See the [FTML GitHub repository](https://github.com/silnrsi/ftml/blob/master/README.md). |
| 11 |
|
| 12 |
A Python script called ftml_test_gen.py generates a suite of FTML files that can be used for testing the Awami font. This script is located in tests/scripts. Runing the script from the root directory of the project with no output argument supplied will put the results into tests/FTML_XSL: |
| 13 |
|
| 14 |
python3 tools/scripts/ftml_test_gen.py |
| 15 |
|
| 16 |
There is a set of files that can be generated that include different combinations of characters. The -mode argument indicates which is wanted. |
| 17 |
|
| 18 |
- **basicforms:** all contextual forms of the most basic shapes (beh, jeem, seen, etc.). |
| 19 |
- **allbasechars:** some contextual forms of all letters; this is useful to make sure that nuqtas an other inherent shapes are generated. |
| 20 |
- **basic_somediac:** this generates the same characters as basicforms, each with an upper and lower diac. |
| 21 |
- **basic_alldiac:** generates same characters as basicforms, with every diacritic. |
| 22 |
- **allbasecharforms:** all forms of all letters; this generates a *huge* file, so it is of limited usefulness. |
| 23 |
|
| 24 |
Running without specifying a mode will generate all five files. By default, the resulting files are named test_MODE.xml (e.g., test_basicforms.xml, test_allbasechars.xml, etc.) and are output to tests/FTML_XSL. |
| 25 |
|
| 26 |
The **ftml.xsl** file must be located in the same directory as the .XML files. When it is, opening the XML _in Firefox_ will use the XSL to generate a nice display of the various character combinations. Note that FTML files do not currently work in other browsers such as Chrome. Firefox is also needed because it supports Graphite which is necessary to handle Awami. |
| 27 |
|
| 28 |
Also note that the ftml.xsl file for the Awami project is somewhat different than that used by other SIL font projects. It creates a table with four rendered cells per row. Each row shows the letter combination in isolate, final, initial, and medial position. Somewhat arbitrarily, the preceding letter lam and the following letter feh are used to create the initial, medial and final contexts. |
| 29 |
|
| 30 |
 |
| 31 |
|
| 32 |
Irrelevant cells are colored gray. |
| 33 |
|
| 34 |
 |
| 35 |
|
| 36 |
### The ftml_test_gen.py program |
| 37 |
|
| 38 |
TO BE COMPLETED... |
| 39 |
|
| 40 |
------ |
| 41 |
|
| 42 |
<< Previous: [Short Finals](dev10_shortfinals.md) | [Introduction and Index](dev01_intro.md) |
| 43 |
|
| 44 |
<!-- PRODUCT SITE ONLY |
| 45 |
[font id='awami' face='AwamiNastaliq-Regular' size='150%' rtl=1] |
| 46 |
[font id='awamiL' face='AwamiNastaliq-Regular' size='150%' ltr=1] |
| 47 |
--> |