+
   E9Qkc                   s   ^ RI Ht ^ RI Ht ^ RI Ht ^ RI Ht ^ RI Ht ^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIHt ]! RR	4       ^ R
IHt ^ RIHt ]'       d   ^ RIHt ]P$                  ! R4      t]! ]R4      t]
P,                  ! ^R7      R R l4       t]
P,                  ! ^R7      R R l4       t]
P,                  ! ^R7      R R l4       t]
P,                  ! RR7      R R l4       t]
P,                  ! RR7      R R l4       t]
P,                  ! RR7      R R l4       t]
P,                  ! RR7      R R l4       tR R ltR.R R  lltR! R" lt R# R$ lt!R% R& lt" ! R' R(4      t#]$R)8X  d   ]PJ                  ! ]PL                  R*7      t']PQ                  ]PR                  4       ]PU                  ]'4       ^ RI+t+]+PX                  ! 4       w  t-t.]P_                  R+]Pa                  4       4       ]P_                  R,]Pa                  4       4       ]P_                  R-]Pa                  4       4       ]Pb                  ! ]-4       R# R# )/i    )List)Tuple)Dict)Any)TYPE_CHECKINGN)require_versionPangoz1.0)r   )Gtkzibus-typing-boosterattr_fallback_new)Zmaxsizec                8    V ^8  d   QhR\         P                  /#    returnr   ZLabelformat   "2/usr/share/ibus-typing-booster/engine/itb_pango.py__annotate__r   4   s      syy     c                  s,    \         P                  ! 4       # Nr    r   r   _get_global_gtk_labelr   3   s     99;r   c                r	   r
   )r   ZContextr   r   r   r   r   9   s     7 75== 7r   c                  s2    \        4       P                  4       # r   )r   Zget_pango_contextr   r   r   _get_global_pango_contextr   8   s     !"4466r   c                r	   r
   )r   Layoutr   r   r   r   r   >   s     5 5%,, 5r   c                  s>    \         P                  ! \        4       4      # r   )r   r   r   r   r   r   _get_global_pango_layoutr   =   s     <<1344r   c                0    V ^8  d   QhR\         R\         /# r   familyr   strr   r   r   r   r   L   s     " "# "# "r   c                 |   R p\         P                  ! R4      pV'       g   V#  V P                  RR4      p \        P                  ! W RR.\        P
                  RR7      pVP                  4       pV#   \         d7   p\        P                  RY$P                  P                  T4        R	p?T# R	p?i\        P                   d7   p\        P                  RY$P                  P                  T4        R	p?T# R	p?i\         d7   p\        P                  RY$P                  P                  T4        R	p?T# R	p?ii ; i)
 fc-match-\---formatz%{file}utf-8stderrZencoding!Exception when calling %s: %s: %sNshutilwhichreplace
subprocesscheck_outputSTDOUTstripFileNotFoundErrorLOGGERwarning	__class____name__CalledProcessError	Exception)r   pathfc_match_binaryoutputerror   &    r   get_font_filer=   K   s"     Dll:.OIU+((/:y)Y0:0A0A29; ||~ K  I:&(@(@%	I 	I K (( I:&(@(@%	I 	I
 K  I:&(@(@%	I 	IKI<   AA2 2D;=+B..D;D;+C77D;D;+D66D;c                r   r   r   r   r   r   r   r   q   s      # # r   c                 r   )
r    r!   r"   r#   r$   z%{lang}r%   r&   r(   Nr)   )r   langr9   r:   r;   r<   r   get_font_langr@   p   s"    Dll:.OIU+((/:y)Y0:0A0A29; ||~ K  I:&(@(@%	I 	I K (( I:&(@(@%	I 	I
 K  I:&(@(@%	I 	IKIr>   c                r   r   	font_filer   r   r   r   r   r   r      s            r   c                 sX   R p\         P                  ! R4      pV'       g   V#  \        P                  ! VRV .\        P                  RR7      pVP                  4       pV#   \         d7   p\        P                  RY$P                  P                  T4        Rp?T# Rp?i\        P                   d7   p\        P                  RY$P                  P                  T4        Rp?T# Rp?i\         d7   p\        P                  RY$P                  P                  T4        Rp?T# Rp?ii ; i)r    otfinfoz-vr%   r&   r(   N)r*   r+   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   )rB   versionotfinfo_binaryr:   r;   r<   r   get_font_versionrF      s    G\\),NH((.$	)J0:0A0A29; ,,. N  H:%'?'?	H 	H N (( H:%'?'?	H 	H
 N  H:%'?'?	H 	HNHs;   :A   D)++BD)3D)4+C%%D)2D)3+D$$D)c                sF    V ^8  d   QhR\         R\        \         ,          /# rA   )r   r    r   r   r   r   r      s     4 4s 4tCy 4r   c                 s\   . p\         P                  ! R 4      pV'       g   V#  \        P                  ! VRV .\        P                  RR7      p\
        P                  ! R4      pVP                  4        Fh  pVP                  VP                  4       4      pV'       g   K,  VP                  R4      pVP                  R4      pVR	9   g   KW  VP                  V4       Kj  	  V#   \         d7   p	\        P                  RY)P                  P                   T	4        Rp	?	T# Rp	?	i\        P"                   d7   p	\        P                  RY)P                  P                   T	4        Rp	?	T# Rp	?	i\$         d7   p	\        P                  RY)P                  P                   T	4        Rp	?	T# Rp	?	ii ; i)
rC   z-tr%   r&   z'\s*(?P<size>[0-9]+)\s+(?P<table>\S+)\s*Zsizetabler(   N)ZCBDTZCOLRZSVG)r*   r+   r-   r.   r/   reZcompileZ
splitlinesZmatchr0   Zgroupappendr1   r2   r3   r4   r5   r6   r7   )
rB   ZtablesrE   r:   ZpatternZlineZmatch_resultZ_sizerG   r;   s
   &         r   get_font_tablesrJ      sw   8 F\\),NH((.$	)J0:0A0A29; **GH%%'D"==6L|$**62$**7333MM%( (  M  H:%'?'?	H 	H M (( H:%'?'?	H 	H
 M  H:%'?'?	H 	HMHsH   A7C"  &C" C" "F+-+DF+5F+6+E''F+4F+5+F&&F+c                s:    V ^8  d   QhR\         \        ,          /# r
   )r    r   r   r   r   r   r      s     > >$s) >r   c                  s    \        4       P                  4       p \        V  Uu. uF  qP                  4       NK  	  up4      # u upi r   )r   Zlist_familiesZsortedZget_name)Zfamiliesr   s     r   get_available_font_namesrK      s7    0 *+99;H8<8??$8<==<s   Ac                s    V ^8  d   QhR\         R\         R\        R\        \        \         \        \         \
        3,          3,          ,          /# )r   fonttextfallbackr   )r   boolr    r   r   r   r   r   r   r   r     sJ     D DDD(,D8<U3SRUXCV=W8XDr   c                 s|   . p\         '       g   VR R/3.# VP                  RRR7      p\        4       p\        P                  ! V 4      pVP                  V4       \        P                  ! 4       p\        P                  ! V4      pVP                  V4       VP                  V4       VP                  V4       VP                  ^ 4      p	V	P                  p
V
 EF  pVP                  pVP                  pVP                  pVP                   pVP"                  pVP$                  pVP&                  pVP)                  4       pWMW,            P+                  RRR7      pVP-                  4       p\        4       pVP                  V4       VP                  V4       VP                  V4       VP                  ^ 4      pRpVP/                  4       w  ppVP0                  ^ 8  d   VP2                  ^ 8  d   RpR VRVRV/pV^8X  dE   \5        V4      ^8X  d5   \7        \        P8                  R	4      '       d   VP;                  V4      VR
&   \=        V4      pV'       dN   VVR&   \?        V4      pV'       d   VVR&   \A        V4      pV'       d   VVR&   \C        V4      pV'       d   VVR&   VPE                  VV34       EK  	  V# )rL   z/unknown: Pango broken on this platform (RHEL8?)zUTF-8r,   )ZerrorsFTglyph-countvisiblehas_charglyph-availableZfiler?   rD   zopentype-tables)#_HAS_ATTR_FALLBACKZencoder   r   Zfont_description_from_stringZset_font_descriptionZAttrListr   ZinsertZset_attributesZset_textZget_line_readonlyZrunsZitemoffsetlengthZglyphs
num_glyphsZanalysisrL   ZdescribeZdecodeZ
get_familyZget_pixel_extentsZwidthZheightlenhasattrZFontrR   r=   r@   rF   rJ   rI   ) rL   rM   rN   
fonts_usedZ	text_utf8Zpango_layoutZpango_font_descriptionZpango_attr_listZpango_attr_fallbackZpango_layout_lineZgs_listZ
glyph_itemZ
pango_itemrU   rV   Zpango_glyph_stringrW   Zpango_analysisZ
pango_fontZfont_description_usedZrun_textZ
run_familyZpango_layout_runZpango_layout_run_linerQ   Zink_rectZ_logical_rectresults_for_runr8   r?   rD   Zopen_type_tabless    &&&                             r   get_fonts_used_for_textr\     s   T 57J QRSTTGI6I+-L"??E%%&<=nn&O11(;./0$$66q9$$G
__
""""'..'22
#,,#((
 * 3 3 5FO4;;I < '*557
35--.DE''8!!(+ 0 B B1 E"7"I"I"K->>A(//A"5GJ:w  !OH"

J//1;1D1D2O-.Z(&*OF# ,D*.'&t,G-4	*.t45E 128_56W X r   c                s<    V ^8  d   QhR\         R\         R\        /# )r   rL   rM   r   )r   rO   r   r   r   r   r     s&     f fS f f fr   c                 s   V '       g   R # V'       g   R# \        WRR7      pV'       g   R# \        '       g   R# \        V4      ^8  d   R # V^ ,          ^,          pVR,          ^8  g&   VR,          '       d   RV9   d@   VR,          '       g1   TpR F  pVP                  VR4      pK  	  WA8X  d   R # \	        W4      # R# )TF)rN   rP   rQ   rS   r    )u   ︎u   ️)r\   rT   rX   r,   emoji_font_fallback_needed)rL   rM   rZ   r[   Ztext_newZchars   &&    r   r]   r]     s    j (eDJ
:
  mA&O&*y))0#$566(D*  ''b1H+ ),  )$99r   c                    V ^8  d   QhRR/# r   r   Nr   r   r   r   r   r   1  s      t r   c                      R # r   r   r   r   r   _initra   1      
r   c                r^   r_   r   r   r   r   r   r   5  s      d r   c                  r`   r   r   r   r   r   _delrc   5  rb   r   c                   sD   a  ] tR tRt o V 3R lR ltV 3R lR ltRtV tR# )__ModuleInitializeri9  c                   < V ^8  d   QhRR/# r_   r   r   __classdict__   "r   r    __ModuleInitializer.__annotate__:  s      $ r   c                s    \        4        R # r   )ra   Zself   &r   __init__Z__ModuleInitializer.__init__:  s    r   c                re   r_   r   rf   rh   r   r   ri   =  s       r   c                r`   r   r   rj   rk   r   __del__Z__ModuleInitializer.__del__=  s    r   r   N)r5   Z
__module__Z__qualname__Z__firstlineno__rl   rm   Z__static_attributes__Z__classdictcell__)rg   s   @r   rd   rd   9  s       r   rd   Z__main__)Zstreamzget_font_file() cache info: %sz!get_font_version() cache info: %sz get_font_tables() cache info: %s)T)2Ztypingr    r   r   r   r   ZsysrH   r-   r*   Z	functoolsZloggingZgir   Zgi.repositoryr   Zitb_gtkr   Z	getLoggerr2   rY   rT   Z	lru_cacher   r   r   r=   r@   rF   rJ   rK   r\   r]   ra   rc   rd   r5   ZStreamHandlerr'   ZLOG_HANDLERZsetLevelZDEBUGZ
addHandlerZdoctestZtestmodZFAILEDZ
_ATTEMPTEDZinfoZ
cache_infoZexitr   r   r   <module>rn      s  .       
 	          " 
		0	1U$78 
Q   Q7  7 Q5  5 T"" #"H T" #: T"  # D T"4 #4l>6DLfP  z''szz:K
OOGMM"
k""??,VZ
KK0-2J2J2LM
KK35E5P5P5RS
KK2O4N4N4PQHHV r   