| 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/matplotlib/__pycache__/ |
Upload File : |
�
G8�c2� � � � d Z ddlmZ ddlZddlmZmZmZ ddlZddl Z ddl
mZ ddlZddl
Z
ddlZddlZddlZddlmZmZ ej* e� Z ej0 dd� Z ed d
� Z edd� Z G d
� d edd� � Zd� Zd� Zd� Zd� Z d� Z!d� Z" e#e eedd� eedd� eedd� ee"e e!�� Z$dOd�Z% G d� d� Z& G d� d� Z' G d � d!e&� Z(d"� Z) G d#� d$� Z* ed%d&� Z+ G d'� d(� Z,d)� Z- G d*� d+� Z. e� ej^ d,d-� dPd.�� � Z0 ej^ d,d-� dPd/�� Z1e0j e1_ e� d0� � Z2 ee2e*d1� Z3 ee2e(d2� Z4ed3k( �r�dd4l5m6Z6 ddl7Z7 e6� Z8e8js d5� e8js d6d7e:d�8� e8jw � Z< e&e<jz e<j| � 5 Z? e, e0d9� � Z@e?D �]n ZA eBd:eAj� � d;eAj� � d<eAj� � d=�� e7j� eAj� d>� � D ]� \ ZHZI eBd?eHj� j� d@� �dAeHj� dBz � �� eBdCdDdEdFdGdHdI�J� eID ]j ZG eBeGj� eGj� eGj� ePeGj� � j� � r ePeGj� � ndKeGj� dI�J� �l �� eAj� s�� eBdCdDdLdGdMdNdI�J� eAj� D ]7 ZS eBeSj� eSj� eSj� eSj� dI�J� �9 ��q ddd� yy# 1 sw Y yxY w)QaC
A module for reading dvi files output by TeX. Several limitations make
this not (currently) useful as a general-purpose dvi preprocessor, but
it is currently used by the pdf backend for processing usetex text.
Interface::
with Dvi(filename, 72) as dvi:
# iterate over pages:
for page in dvi:
w, h, d = page.width, page.height, page.descent
for x, y, font, glyph, width in page.text:
fontname = font.texname
pointsize = font.size
...
for x, y, height, width in page.boxes:
...
� )�
namedtupleN)� lru_cache�partial�wraps)�Path)�_api�cbook�DviStatez!pre outer inpage post_post finale�Pageztext boxes height width descent�Boxzx y height widthc �V � e Zd ZdZd� Zed� � Zed� � Zed� � Zed� � Z y)�Texta�
A glyph in the dvi file.
The *x* and *y* attributes directly position the glyph. The *font*,
*glyph*, and *width* attributes are kept public for back-compatibility,
but users wanting to draw the glyph themselves are encouraged to instead
load the font specified by `font_path` at `font_size`, warp it with the
effects specified by `font_effects`, and load the glyph specified by
`glyph_name_or_index`.
c �X � t t d� � | j j S )N�
pdftex.map)�
PsfontsMap�
find_tex_file�font�texname��selfs �4/usr/lib/python3/dist-packages/matplotlib/dviread.py�_get_pdftexmap_entryzText._get_pdftexmap_entryM s! � ��-��5�6�t�y�y�7H�7H�I�I� c � � | j � }|j �Mt dj |j j d� |j j d� � � �t |j � S )z/The `~pathlib.Path` to the font for this glyph.zINo usable font file found for {} ({}); the font may lack a Type-1 version�ascii)r �filename�
ValueError�format�psname�decoder r )r �psfonts r � font_pathzText.font_pathP sp � � �*�*�,���?�?�"�� B�$�f�V�]�]�%9�%9�'�%B�%+�^�^�%:�%:�7�%C�E�F�
F� �F�O�O�$�$r c �. � | j j S )zThe font size.)r �sizer s r � font_sizezText.font_size[ s � � �y�y�~�~�r c �6 � | j � j S )z�
The "font effects" dict for this glyph.
This dict contains the values for this glyph of SlantFont and
ExtendFont (if any), read off :file:`pdftex.map`.
)r �effectsr s r �font_effectszText.font_effects` s � � �(�(�*�2�2�2r c � � | j � }|j �"t |j � | j S | j S )a�
Either the glyph name or the native charmap glyph index.
If :file:`pdftex.map` specifies an encoding for this glyph's font, that
is a mapping of glyph indices to Adobe glyph names; use it to convert
dvi indices to glyph names. Callers can then convert glyph names to
glyph indices (with FT_Get_Name_Index/get_name_index), and load the
glyph using FT_Load_Glyph/load_glyph.
If :file:`pdftex.map` specifies no encoding, the indices directly map
to the font's "native" charmap; glyphs should directly load using
FT_Load_Char/load_char after selecting the native charmap.
)r �encoding�
_parse_enc�glyph)r �entrys r �glyph_name_or_indexzText.glyph_name_or_indexj sD � � �)�)�+���>�>�-� �5�>�>�*�4�:�:�6� ?�37�:�:� ?r N)
�__name__�
__module__�__qualname__�__doc__r �propertyr"