�
��g� � � � d Z ddlmZ ddlmZmZmZ ddlZddl m
Z
mZmZm
Z
ddlmZmZmZ ddlmZ dd�Zdd�Zdd�Zdd�Zd d�ZdS )!zFExtra methods for DesignSpaceDocument to generate its STAT table data.� )�annotations)�Dict�List�UnionN)�AxisLabelDescriptor�DesignSpaceDocument�DesignSpaceDocumentError�LocationLabelDescriptor)�Region�getVFUserRegion�locationInRegion)�TTFont�ttFontr �docr �vfName�str�return�Nonec � � |� � � D ]}|j |k r n�t d|� �� � �t ||� � }t d� t | � d� � dd� � D � � � � }t j j �
| t ||� � t ||� � |j
�|j
nd|�� � S ) a� Build the STAT table for the variable font identified by its name in
the given document.
Knowing which variable we're building STAT data for is needed to subset
the STAT locations to only include what the variable font actually ships.
.. versionadded:: 5.0
.. seealso::
- :func:`getStatAxes()`
- :func:`getStatLocations()`
- :func:`fontTools.otlLib.builder.buildStatTable()`
z&Cannot find the variable font by name c 3 �, K � | ]}|j d k V � �dS )� N)�
platformID)�.0�nrs �e/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/fontTools/varLib/stat.py� <genexpr>z#buildVFStatTable.<locals>.<genexpr>, s: � � � � � �!��
���� � � � � � �name�names� N� )�macNames)�getVariableFontsr r r �any�getattr�get� fontTools�otlLib�builder�buildStatTable�getStatAxes�getStatLocations�elidedFallbackName)r r r �vf�regionr"