o
    i                     @   s&   d Z ddlmZmZ edddZdS )z
Text layouting utilities.
   )KERNING_DEFAULTLOAD_NO_HINTING)	kern_modec          	      c   sv    d}d}| D ]1}| t|}|dur||||ndd }||7 }|j|td}||fV  ||jd 7 }|}qdS )a  
    Render *string* with *font*.  For each character in *string*, yield a
    (glyph-index, x-position) pair.  When such a pair is yielded, the font's
    glyph is set to the corresponding character.

    Parameters
    ----------
    string : str
        The string to be rendered.
    font : FT2Font
        The font.
    kern_mode : int
        A FreeType kerning mode.

    Yields
    ------
    glyph_index : int
    x_position : float
        N@   )flagsi   )get_char_indexordget_kerning
load_glyphr   linearHoriAdvance)	stringfontr   xlast_glyph_idxchar	glyph_idxkernglyph r   R/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/matplotlib/_text_layout.pylayout   s   
r   N)__doc__ft2fontr   r   r   r   r   r   r   <module>   s    