<commit_before># Samsa-CLI

The only function currently is instantiation. Command-line arguments define the input font and control which instances will be generated as static fonts.

Run it using Node.js:

`node samsa-cli.js`  

The command line options are to declare the variable font being used:

`--input-font <variable-ttf-file>`  

This option creates a new non-variable font using the given axis settings:

`--variation-settings <axis1> <value1> [,<axis2> <value2>...]`  

This creates new non-variable fonts for all the named instances in the variable font:

`--named-instances`  

Initial tests show that it is much faster (approx. 42x) than fontTools at instantiation. Note that the fonts produced are not production ready, lacking support for several variation tables.<commit_msg>Better doc<commit_after># Samsa-CLI

Samsa-CLI (samsa-cli.js) is a Node.js command-line utility for performing operations on variable fonts (VFs). It wraps the [Samsa-Core](samsa-core.js) library, i.e. it depends on samsa-
core.js.

## Execution

Run it using Node.js:

`node samsa-cli.js`  

## Options

Define the input and output font files using `--input-font` and `--output-font`:

`--input-font <variable-ttf-file>`  
`--output-font <variable-ttf-file>`  

Define a variation to be instantiated:

`--variation-settings <axis1> <value1> [<axis2> <value2>...]`  

If you want all named instances to be instantiated as static fonts:

`--named-instances`  

## Examples

```
node samsa-cli.js --input-font Gingham.ttf --variation-settings wght 634 wdth 5
node samsa-cli.js --input-font Gingham.ttf --variation-settings wght 300 wdth 75 --named-instances
```

## Performance

Initial tests show that it is much faster (approx. 42x) than fontTools at instantiation.

## Limitations
The fonts produced are not production ready. Limitations include:

* no support for GSUB, GPOS, STAT tables.
* checksums are not performed
{'fraction_non_alphanumeric': 0.10151753008895865, 'fraction_numerical': 0.01098901098901099, 'mean_word_length': 3.9921671018276763, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1153829', 'n_tokens_mistral': 615, 'n_tokens_neox': 589, 'n_words': 235}