File: //usr/lib/python3/dist-packages/pdfminer/__pycache__/encodingdb.cpython-38.pyc
U
�R�]�
� @ st d dl Z d dlZd dlZddlmZ ddlmZ ddlmZ e� d�Z
e �e�Z
dd� Zd d
� ZG dd� de�ZdS )
� N� )�glyphname2unicode)�ENCODING)� PSLiteralz[0-9a-fA-F]+c s* | � d�d } | � d�}t|�dkr4d�tt|��S | tkrFt�| �S | �d�r�| �d�� t �
� �r�t� �d dkr�� fdd �tdt� �d�D �}|D ]}t|� q�tt
j|�}d�|�S n^| �d
��r| �d
�}t �
|��rdt|� kr�dk�rn nt|dd
�}t|� t
�|�S td| ��dS )a� Converts Adobe glyph names to Unicode numbers.
In contrast to the specification, this raises a KeyError instead of return an empty string when the key is unknown.
This way the caller must explicitly define what to do when there is not a match.
Reference: https://github.com/adobe-type-tools/agl-specification#2-the-mapping
:returns unicode character if name resembles something, otherwise a KeyError
�.r �_r � Zuni� c s$ g | ]}t � ||d � dd��qS )r � ��base)�int)�.0�i�Zname_without_uni� �5/usr/lib/python3/dist-packages/pdfminer/encodingdb.py�
<listcomp>'