
    NYhf              
          d Z ddlZddlZ	 ddlmZ dZ ej                  e      j                  Z
e
dz  Z G d d      Z edd	d
      Z edd	d      Z eddd
      Z eddd      Z eddd      Z eddd
      Z eddd      Z eddd
      Z eddd
      Z eddd      Zeeeeeeeeeef
ZddedefdZy# e$ r dZY w xY w)a0  
Copyright 2020 Devon (Gorialis) R

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
    N)	ImageFont)OPENSANS_BOLDOPENSANS_BOLDITALICOPENSANS_EXTRABOLDOPENSANS_EXTRABOLDITALICOPENSANS_ITALICOPENSANS_LIGHTOPENSANS_LIGHTITALICOPENSANS_REGULAROPENSANS_SEMIBOLDOPENSANS_SEMIBOLDITALICFONTSopensansttfc                       e Zd ZdZdededefdZdefdZde	j                  fdZerdd
ededej                  fdZy	y	)TTFFontze
    Represents a vended TTF font.
    You should generally not instantiate this class yourself.
    	font_namefont_weight
italicizedc                 h    || _         t        |z  j                  d      | _        || _        || _        y )Nz.ttf)nameTTF_BIN_FOLDERwith_suffixpathweightitalic)selfr   r   r   s       T/var/www/feuerwehr-webapp/venv/lib/python3.12/site-packages/ttf_opensans/__init__.py__init__zTTFFont.__init__6   s.    	#i/<<VD	!     returnc                 8    dj                  | j                        S )Nz<TTFFont {0!r}>)formatr   r   s    r   __repr__zTTFFont.__repr__<   s     ''		22r    c                 0    t        | j                  d      S )Nrb)mode)openr   r$   s    r   r)   zTTFFont.open?   s    DIID))r    Nsizeencodingc                 Z    t        j                  t        | j                        |||      S )N)fontr*   r+   layout_engine)r   truetypestrr   )r   r*   r+   r.   s       r   	imagefontzTTFFont.imagefontC   s"    %%3tyy>xgtuur    )
   unicN)__name__
__module____qualname____doc__r0   intboolr   r%   typingBinaryIOr)   r   floatr1    r    r   r   r   0   sl    
!# !C !T !3# 3*foo * 	v% 	v 	v_h_r_r 	v r    r   zOpenSans-Boldi  FzOpenSans-BoldItalicTzOpenSans-ExtraBoldi   zOpenSans-ExtraBoldItaliczOpenSans-Italic  zOpenSans-Lighti,  zOpenSans-LightItaliczOpenSans-RegularzOpenSans-SemiBoldiX  zOpenSans-SemiBoldItalicr   r   c                 H     t        t        fdt               fd      S )z`
    Return a TTFFont that matches the chosen italic setting, with the closest font weight.
    c                 "    | j                   k(  S N)r   )fr   s    r   <lambda>zopensans.<locals>.<lambda>f   s    V+ r    c                 R    t        | j                  z
        | j                  k  fS rA   )absr   )rB   r   s    r   rC   zopensans.<locals>.<lambda>g   s#    s188k12AHH{4JK r    )key)minfilterr   )r   r   s   ``r   r   r   `   s     
 +U3K r    )r>   F)r7   pathlibr:   PILr   ImportError__all__Path__file__parentROOTr   r   r   r   r   r   r   r	   r
   r   r   r   r   r8   r9   r   r=   r    r   <module>rQ      s=     
  w||H$$v v. e43S$? 13> "#=sDI +S$7)365sDA -sE: /e< !";S$G  	# T Q  Is   B9 9CC