<jupyter_start><jupyter_text>cvt Table   DescriptionThe cvt table is an optional table that is used in TrueType fonts with instruction sets.  The cvt table contains global variable values that can be referenced by instructions. Documentation- [Apple Specification](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6cvt.html)- [Microsoft Specification](https://docs.microsoft.com/en-us/typography/opentype/spec/cvt)  Source  SettingsChange the paths below to view the table in a different font.<jupyter_code>FONT_URL = "https://github.com/source-foundry/opentype-notes/raw/master/assets/fonts/roboto/Roboto-Regular-hinted.ttf"
FONT_PATH = "Roboto-Regular-hinted.ttf"<jupyter_output><empty_output><jupyter_text>Setup<jupyter_code>import os

try:
    import fontTools
except ImportError:
    !pip install fontTools

if not os.path.exists(FONT_PATH):
    !curl -L -O {FONT_URL}<jupyter_output><empty_output><jupyter_text>View Table<jupyter_code>!ttx -t cvt -o - {FONT_PATH}<jupyter_output><empty_output><jupyter_text>Read/Write Access to Table- [fontTools `_c_v_t.py` module](https://github.com/fonttools/fonttools/blob/master/Lib/fontTools/ttLib/tables/_c_v_t.py)<jupyter_code>import inspect
from fontTools.ttLib import TTFont

# instantiate table object
tt = TTFont(FONT_PATH)
table = tt["cvt "]

# print table methods
print("Printing methods of {}:".format(table))
methods = inspect.getmembers(table, predicate=inspect.ismethod)
methods_list = [method[0] for method in methods]
for x in sorted(methods_list):
    print(x)<jupyter_output><empty_output><jupyter_text>Cleanup<jupyter_code>!rm {FONT_PATH}<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11333333333333333, 'fraction_numerical': 0.0024242424242424242, 'mean_word_length': 6.504545454545455, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 4, '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}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '112648', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 590, 'n_tokens_neox': 562, 'n_words': 113, 'path': 'notebooks/tables/cvt.ipynb', 'repo_name': 'source-foundry/opentype-notes', 'size': '1650'}