o
    h	                     @   st   G d d de ZG dd deZG dd deZG dd deZG dd	 d	eZG d
d deZG dd deZdS )c                   @   s   e Zd ZdZdS )Errorz0Base Cu2Qu exception class for all other errors.N)__name__
__module____qualname____doc__ r   r   j/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/fontTools/cu2qu/errors.pyr      s    r   c                       s   e Zd Z fddZ  ZS )ApproxNotFoundErrorc                    s   d| }t  | || _d S )Nzno approximation found: %s)super__init__curve)selfr   message	__class__r   r   r
      s   
zApproxNotFoundError.__init__)r   r   r   r
   __classcell__r   r   r   r   r      s    r   c                   @   s   e Zd ZdS )UnequalZipLengthsErrorN)r   r   r   r   r   r   r   r      s    r   c                   @      e Zd Zdd Zdd ZdS )IncompatibleGlyphsErrorc                 C   sZ   t |dksJ || _tdd |D }t |dkr&ddt| | _d S | | _d S )N   c                 s   s    | ]}t |jV  qd S N)reprname.0gr   r   r   	<genexpr>#   s    z3IncompatibleGlyphsError.__init__.<locals>.<genexpr>z{%s}, )lenglyphssetjoinsortedcombined_namepop)r   r   namesr   r   r   r
       s   z IncompatibleGlyphsError.__init__c                 C   s   dt | j| jf S )Nz<%s %s>)typer   r"   r   r   r   r   __repr__)   s   z IncompatibleGlyphsError.__repr__N)r   r   r   r
   r'   r   r   r   r   r      s    	r   c                   @   s   e Zd Zdd ZdS )IncompatibleSegmentNumberErrorc                 C   s
   d| j  S )Nz1Glyphs named %s have different number of segments)r"   r&   r   r   r   __str__.   s   z&IncompatibleSegmentNumberError.__str__N)r   r   r   r)   r   r   r   r   r(   -   s    r(   c                   @   r   )IncompatibleSegmentTypesErrorc                 C   s   t | | || _d S r   )r   r
   segments)r   r   r+   r   r   r   r
   5   s   
z&IncompatibleSegmentTypesError.__init__c              	   C   sn   g }t tt| j}t| j D ]\}}|dt||ddd |D f  qd| j	d|f S )Nz%s: (%s)r   c                 s       | ]}t |V  qd S r   r   )r   tr   r   r   r   >       z8IncompatibleSegmentTypesError.__str__.<locals>.<genexpr>z5Glyphs named %s have incompatible segment types:
  %sz
  )
r   strmaxr+   r!   itemsappendrjustr    r"   )r   linesndigitsitagsr   r   r   r)   9   s   $z%IncompatibleSegmentTypesError.__str__Nr   r   r   r
   r)   r   r   r   r   r*   4   s    r*   c                   @   r   )IncompatibleFontsErrorc                 C   s
   || _ d S r   )glyph_errors)r   r;   r   r   r   r
   G   s   
zIncompatibleFontsError.__init__c                 C   s"   dd dd t| j D  S )Nz&fonts contains incompatible glyphs: %sr   c                 s   r,   r   r-   r   r   r   r   r   L   r/   z1IncompatibleFontsError.__str__.<locals>.<genexpr>)r    r!   r;   keysr&   r   r   r   r)   J   s   zIncompatibleFontsError.__str__Nr9   r   r   r   r   r:   F   s    r:   N)	Exceptionr   r   r   r   r(   r*   r:   r   r   r   r   <module>   s   