�
��g'K � �< � d Z ddlmZ ddlZddlZddlZddlmZmZm Z m
Z
mZmZm
Z
ddlmZmZmZmZmZmZmZmZmZ ddlmZmZ ddlmZmZmZmZm Z m!Z!m"Z" ej# e$� � Z%eeeege&f Z'd-d�Z(dde(fd.d�Z)dde(fd/d�Z*d0d�Z+d1d!�Z,d2d%�Z-d3d)�Z.d4d,�Z/dS )5z�Allows building all the variable fonts of a DesignSpace version 5 by
splitting the document into interpolable sub-space, then into each VF.
� )�annotationsN)�Any�Callable�Dict�Iterator�List�Tuple�cast) �AxisDescriptor�AxisMappingDescriptor�DesignSpaceDocument�DiscreteAxisDescriptor�InstanceDescriptor�RuleDescriptor�SimpleLocationDict�SourceDescriptor�VariableFontDescriptor)� StatNames�getStatNames)�ConditionSet�Range�Region�getVFUserRegion�locationInRegion�regionInRegion�userRegionToDesignRegion�docr
�instancer � statNamesr �return�strc � � |j p|j � d� � }|j p|j � d� � }|� d|� d�S )z�Default callable to synthesize an instance filename
when makeNames=True, for instances that don't specify an instance name
in the designspace. This part of the name generation can be overriden
because it's not specified by the STAT table.
�en�-z.ttf)�
familyName�familyNames�get� styleName�
styleNames)r r r r% r( s �n/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/fontTools/designspaceLib/split.py�defaultMakeInstanceFilenamer+ ) sW � � �$�G� �(=�(A�(A�$�(G�(G�J��"�D�i�&:�&>�&>�t�&D�&D�I��*�*�9�*�*�*�*� T� makeNames�bool�expandLocations�makeInstanceFilename�MakeInstanceFilenameCallable�8Iterator[Tuple[SimpleLocationDict, DesignSpaceDocument]]c # �� K � g }i }| j D ]z}t |d� � r+t t |� � }|� |� � �=t t
|� � }t
|j |j |j � � ||j
<