| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 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/__pycache__/ |
Upload File : |
�
jke�7 � �: � d Z ddlmZ ddlmZmZmZ dZ ee� ZdZ de � d�Z
de
� d �Zde� d
�Zde� d�Z
ee
� Z ee� Z ee� Z ee
� ZdZg d
�Zg d�Zg d�ZdZdZdZdZdZdZdZdZdZdZdZ dZ! G d� de"� Z# G d� d� Z$e%dk( �rddl&Z& e$e&jN d � Z( e)djU d� de(jV � �de(jX � �de(jZ � �de(j\ � �de(j^ � �d e(j` � �d!e(jb � �d"e(jd � �d#e(jf � �d$e(jh � �d%e(jj � �d&e(jl � �d'e(jn � �d(e(jp � �fD � � � e)e(� yy))u1 Module for reading TFM (TeX Font Metrics) files.
The TFM format is described in the TFtoPL WEB source code, whose typeset form
can be found on `CTAN <http://mirrors.ctan.org/info/knuth-pdf/texware/tftopl.pdf>`_.
>>> from fontTools.tfmLib import TFM
>>> tfm = TFM("Tests/tfmLib/data/cmr10.tfm")
>>>
>>> # Accessing an attribute gets you metadata.
>>> tfm.checksum
1274110073
>>> tfm.designsize
10.0
>>> tfm.codingscheme
'TeX text'
>>> tfm.family
'CMR'
>>> tfm.seven_bit_safe_flag
False
>>> tfm.face
234
>>> tfm.extraheader
{}
>>> tfm.fontdimens
{'SLANT': 0.0, 'SPACE': 0.33333396911621094, 'STRETCH': 0.16666698455810547, 'SHRINK': 0.11111164093017578, 'XHEIGHT': 0.4305553436279297, 'QUAD': 1.0000028610229492, 'EXTRASPACE': 0.11111164093017578}
>>> # Accessing a character gets you its metrics.
>>> # “width” is always available, other metrics are available only when
>>> # applicable. All values are relative to “designsize”.
>>> tfm.chars[ord("g")]
{'width': 0.5000019073486328, 'height': 0.4305553436279297, 'depth': 0.1944446563720703, 'italic': 0.013888359069824219}
>>> # Kerning and ligature can be accessed as well.
>>> tfm.kerning[ord("c")]
{104: -0.02777862548828125, 107: -0.02777862548828125}
>>> tfm.ligatures[ord("f")]
{105: ('LIG', 12), 102: ('LIG', 11), 108: ('LIG', 13)}
� )�SimpleNamespace)�calcsize�unpack�unpack2a�
>
lf: h # length of the entire file, in words
lh: h # length of the header data, in words
bc: h # smallest character code in the font
ec: h # largest character code in the font
nw: h # number of words in the width table
nh: h # number of words in the height table
nd: h # number of words in the depth table
ni: h # number of words in the italic correction table
nl: h # number of words in the ligature/kern table
nk: h # number of words in the kern table
ne: h # number of words in the extensible character table
np: h # number of font parameter words
z12.20Fz;
>
checksum: L
designsize: �
z
z
codingscheme: 40p
z
family: 20p
zm
seven_bit_safe_flag: ?
ignored: x
ignored: x
face: B
zI
>
skip_byte: B
next_char: B
op_byte: B
remainder: B
)�SLANT�SPACE�STRETCH�SHRINK�XHEIGHT�QUAD�
EXTRASPACE)�NUM1�NUM2�NUM3�DENOM1�DENOM2�SUP1�SUP2�SUP3�SUB1�SUB2�SUPDROP�SUBDROP�DELIM1�DELIM2�
AXISHEIGHT)�DEFAULTRULETHICKNESS�
BIGOPSPACING1�
BIGOPSPACING2�
BIGOPSPACING3�
BIGOPSPACING4�
BIGOPSPACING5� � � � c � � � e Zd Z� fd�Z� xZS )�TFMExceptionc �$ �� t �| � |� y �N)�super�__init__)�self�message� __class__s ��2/usr/lib/python3/dist-packages/fontTools/tfmLib.pyr- zTFMException.__init__� s �� �
����!� )�__name__�
__module__�__qualname__r- �
__classcell__)r0 s @r1 r) r) � s
�� �"� "r2 r) c � � e Zd Zd� Zd� Zd� Zy)�TFMc �&