
    h                     H     SS jr \S:X  a  S SKr\R                  " 5         gg)    Nc                    X;   a  X   $ Ub  Uc   eUb  Uc   eUcg  0 n0 nUR                  5        HO  u  pgUR                  S5      (       a  U H  nXdU'   M	     M*  UR                  S5      (       d  MB  U H  nXeU'   M	     MQ     U u  pS=pU	R                  S5      (       a  U	nSn	OUR                  U	5      nU
R                  S5      (       a  U
nSn
OUR                  U
5      nX4X4X4X4/nU H  n X;   d  M
  X   s  $    U$ )a%  
Note: This expects kerning to be a flat dictionary
of kerning pairs, not the nested structure used
in kerning.plist.

>>> groups = {
...     "public.kern1.O" : ["O", "D", "Q"],
...     "public.kern2.E" : ["E", "F"]
... }
>>> kerning = {
...     ("public.kern1.O", "public.kern2.E") : -100,
...     ("public.kern1.O", "F") : -200,
...     ("D", "F") : -300
... }
>>> lookupKerningValue(("D", "F"), kerning, groups)
-300
>>> lookupKerningValue(("O", "F"), kerning, groups)
-200
>>> lookupKerningValue(("O", "E"), kerning, groups)
-100
>>> lookupKerningValue(("O", "O"), kerning, groups)
0
>>> lookupKerningValue(("E", "E"), kerning, groups)
0
>>> lookupKerningValue(("E", "O"), kerning, groups)
0
>>> lookupKerningValue(("X", "X"), kerning, groups)
0
>>> lookupKerningValue(("public.kern1.O", "public.kern2.E"),
...     kerning, groups)
-100
>>> lookupKerningValue(("public.kern1.O", "F"), kerning, groups)
-200
>>> lookupKerningValue(("O", "public.kern2.E"), kerning, groups)
-100
>>> lookupKerningValue(("public.kern1.X", "public.kern2.X"), kerning, groups)
0
Nzpublic.kern1.zpublic.kern2.)items
startswithget)pairkerninggroupsfallbackglyphToFirstGroupglyphToSecondGroupgroupgroupMembersglyphfirstsecond
firstGroupsecondGrouppairss                 J/var/www/html/env/lib/python3.13/site-packages/fontTools/ufoLib/kerning.pylookupKerningValuer      sH   T }$!---% ,,, #)<<>E00)E/4e, *!!/22)E05u- * $2 ME##J((
&**51
))(,,V4 
			!	E ?=   O    __main__)r   NN)r   __name__doctesttestmod r   r   <module>r      s+   RVTn zOO r   