| Server IP : 35.80.110.71 / Your IP : 216.73.216.52 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/fontTools/feaLib/__pycache__/ |
Upload File : |
�
jke@
� � � d dl mZ d dlmZmZmZmZ d dlmZ d dl m
Z
mZmZ d dl
mZ d dlmZ d dlmZ d dlmZ d d lmZ d d
lmZmZ d dlmZmZ d dlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- d d
l.m/Z/ d dl0m1Z1 d dl2m3Z3 d dl4m5Z5 d dl6m7Z7m8Z8 d dl9m:Z: d dl;Z;d dl<Z<d dl=m>Z> d dl?Z?d dl@Z@d dlAZA e?j� eC� ZDdd�ZE dd�ZF G d� deG� ZHy)� )�sstruct)�Tag�tostr�
binary2num�safeEval)�FeatureLibError)�LookupDebugInfo�LOOKUP_DEBUG_INFO_KEY�LOOKUP_DEBUG_ENV_VAR)�Parser)�FeatureFile)�VariableScalar)�builder)�
maxCtxFont)�newTable�getTableModule)�otBase�otTables)�AlternateSubstBuilder�ChainContextPosBuilder�ChainContextSubstBuilder�LigatureSubstBuilder�MultipleSubstBuilder�CursivePosBuilder�MarkBasePosBuilder�MarkLigPosBuilder�MarkMarkPosBuilder�ReverseChainSingleSubstBuilder�SingleSubstBuilder�ClassPairPosSubtableBuilder�PairPosBuilder�SinglePosBuilder�ChainContextualRule)�OpenTypeLibError)�OnlineVarStoreBuilder)�buildVarDevTable)�addFeatureVariationsRaw)�normalizeValue�piecewiseLinearMap)�defaultdictN)�StringIOc �B � t | |� }|j ||�� y)a� Add features from a file to a font. Note that this replaces any features
currently present.
Args:
font (feaLib.ttLib.TTFont): The font object.
featurefile: Either a path or file object (in which case we
parse it into an AST), or a pre-parsed AST instance.
tables: If passed, restrict the set of affected tables to those in the
list.
debug: Whether to add source debugging information to the font in the
``Debg`` table
��tables�debugN)�Builder�build)�font�featurefiler. r/ r s �:/usr/lib/python3/dist-packages/fontTools/feaLib/builder.py�addOpenTypeFeaturesr5 2 s � � �d�K�(�G��M�M��u�M�-� c �\ � t t |� � }|r||_ t | |||�� y)ae Add features from a string to a font. Note that this replaces any
features currently present.
Args:
font (feaLib.ttLib.TTFont): The font object.
features: A string containing feature code.
filename: The directory containing ``filename`` is used as the root of
relative ``include()`` paths; if ``None`` is provided, the current
directory is assumed.
tables: If passed, restrict the set of affected tables to those in the
list.
debug: Whether to add source debugging information to the font in the
``Debg`` table
r- N)r+ r �namer5 )r2 �features�filenamer. r/ r3 s r4 �addOpenTypeFeaturesFromStringr; D s+ � �&