Ë
    £eh „  ã                   óâ  — d gZ 	 ddlmZmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlZdd	lmZ  ed–i d
d“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“ŽZ ed dddddddddddddd¬!«      Z ed"d¬#«      Z ed$dddddddd¬%«	      Z ed–i d
d “d&d“d'd“d(d“d)d“d*d“d+d“d,d“d-d“d.d“d/d“d0d“d1d“d2d“d3d“d4d“d5d“ŽZ ed–i d
d “d&d“d'd“d(d“d6d“d7d“d8d“d9d“d-d“d.d“d0d“d1d“d2d“d3d“d:d“d4d“d;d“ŽZ ed–i d<d“d=d“d>d“d?d“d@dA“dBdC“dDdE“dFdG“dHdI“dJdK“dLdM“dNdO“dPdQ“dRdS“dTdU“dVdW“dXdY“dZd[“d\d]“d^d_“d`da“dbdc“ddde“dfdg“dhdi“ŽZ e	«       Z ed–i dBd“djd“dkdl“dmdC“dndA“dod“dpd“dqd“drd“dsd“dtd“dud“dvd“dwd“dxd“dyd“dze“d{d“d|d“d}d“d~d“dd€“d�d“d‚d“dƒd“d„d“d…d“d†d“d‡d“dˆd“d‰d“dŠd“d‹d“dŒd“d�d“dŽd�“d�d“d‘d“d’d“ŽZ G d“„ d e«      Zd”„ Zd•„ Zy)—ÚFontBuilderé   )ÚTTFontÚnewTable)Úcmap_classes©Ú	flagCubic)ÚPanose)ÚtimestampNowé    N)ÚOrderedDictÚtableVersiong      ð?ÚfontRevisionÚcheckSumAdjustmentÚmagicNumberiõ<_Úflagsé   Ú
unitsPerEmiè  ÚcreatedÚmodifiedÚxMinÚyMinÚxMaxÚyMaxÚmacStyleÚlowestRecPPEMÚfontDirectionHinté   ÚindexToLocFormatÚglyphDataFormaté   )r   Ú	numGlyphsÚ	maxPointsÚmaxContoursÚmaxCompositePointsÚmaxCompositeContoursÚmaxZonesÚmaxTwilightPointsÚ
maxStorageÚmaxFunctionDefsÚmaxInstructionDefsÚmaxStackElementsÚmaxSizeOfInstructionsÚmaxComponentElementsÚmaxComponentDepthi P  )r   r!   ç      @)	Ú
formatTypeÚitalicAngleÚunderlinePositionÚunderlineThicknessÚisFixedPitchÚminMemType42ÚmaxMemType42ÚminMemType1ÚmaxMemType1ÚascentÚdescentÚlineGapÚadvanceWidthMaxÚminLeftSideBearingÚminRightSideBearingÚ
xMaxExtentÚcaretSlopeRiseÚcaretSlopeRunÚcaretOffsetÚ	reserved0Ú	reserved1Ú	reserved2Ú	reserved3ÚmetricDataFormatÚnumberOfHMetricsÚadvanceHeightMaxÚminTopSideBearingÚminBottomSideBearingÚ
yMaxExtentÚ	reserved4ÚnumberOfVMetricsÚ	copyrightÚ
familyNameÚ	styleNameÚuniqueFontIdentifierÚfullNameé   Úversioné   ÚpsNameé   Ú	trademarké   Úmanufactureré   Údesigneré	   Údescriptioné
   Ú	vendorURLé   ÚdesignerURLé   ÚlicenseDescriptioné   ÚlicenseInfoURLé   ÚtypographicFamilyé   ÚtypographicSubfamilyé   ÚcompatibleFullNameé   Ú
sampleTexté   ÚpostScriptCIDFindfontNameé   ÚwwsFamilyNameé   ÚwwsSubfamilyNameé   ÚlightBackgroundPaletteé   ÚdarkBackgroundPaletteé   ÚvariationsPostScriptNamePrefixé   ÚxAvgCharWidthÚusWeightClassi�  ÚusWidthClassÚfsTypeÚySubscriptXSizeÚySubscriptYSizeÚySubscriptXOffsetÚySubscriptYOffsetÚySuperscriptXSizeÚySuperscriptYSizeÚySuperscriptXOffsetÚySuperscriptYOffsetÚyStrikeoutSizeÚyStrikeoutPositionÚsFamilyClassÚpanoseÚulUnicodeRange1ÚulUnicodeRange2ÚulUnicodeRange3ÚulUnicodeRange4Ú	achVendIDz????ÚfsSelectionÚusFirstCharIndexÚusLastCharIndexÚsTypoAscenderÚsTypoDescenderÚsTypoLineGapÚusWinAscentÚusWinDescentÚulCodePageRange1ÚulCodePageRange2ÚsxHeightÚ
sCapHeightÚusDefaultCharÚusBreakCharé    ÚusMaxContextÚusLowerOpticalPointSizeÚusUpperOpticalPointSizec                   óö   — e Zd Zd"d„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d#d	„Z
d$d
„Zd„ Zd„ Zd%d„Zd„ Zd$d„Zd„ Zd&d„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd&d„Zd'd„Zd„ Zd„ Zd(d„Zd)d„Z	 	 	 	 	 d*d„Z 	 	 	 d+d „Z!d,d!„Z"y)-r   Nc                 óÈ   — |€Lt        d¬«      | _        || _        t        «       }|€J ‚| j	                  ||||¬«       | j                  «        y|�J ‚|| _        d|v | _        y)aÖ  Initialize a FontBuilder instance.

        If the `font` argument is not given, a new `TTFont` will be
        constructed, and `unitsPerEm` must be given. If `isTTF` is True,
        the font will be a glyf-based TTF; if `isTTF` is False it will be
        a CFF-based OTF.

        The `glyphDataFormat` argument corresponds to the `head` table field
        that defines the format of the TrueType `glyf` table (default=0).
        TrueType glyphs historically can only contain quadratic splines and static
        components, but there's a proposal to add support for cubic Bezier curves as well
        as variable composites/components at
        https://github.com/harfbuzz/boring-expansion-spec/blob/main/glyf1.md
        You can experiment with the new features by setting `glyphDataFormat` to 1.
        A ValueError is raised if `glyphDataFormat` is left at 0 but glyphs are added
        that contain cubic splines or varcomposites. This is to prevent accidentally
        creating fonts that are incompatible with existing TrueType implementations.

        If `font` is given, it must be a `TTFont` instance and `unitsPerEm`
        must _not_ be given. The `isTTF` and `glyphDataFormat` arguments will be ignored.
        NF)ÚrecalcTimestamp)r   r   r   r   Úglyf)r   ÚfontÚisTTFr
   Ú	setupHeadÚ	setupMaxp)Úselfr   r¨   r©   r   Únows         úS/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/fontTools/fontBuilder.pyÚ__init__zFontBuilder.__init__9  sv   € ð, ˆ<Ü¨uÔ5ˆDŒIØˆDŒJÜ“.ˆCØÐ)Ð)Ð)Ø�N‰NØ%ØØØ /ð	 ô ð �N‰NÕàÐ%Ð%Ð%ØˆDŒIØ 4˜ˆD�Jó    c                 ó:   — | j                   j                  |«       y)zgSave the font. The 'file' argument can be either a pathname or a
        writable file object.
        N)r¨   Úsave)r¬   Úfiles     r®   r²   zFontBuilder.save`  s   € ð 	�	‰	�‰�tÕr°   c                 óÎ   — t        |«      x}| j                  |<   |j                  «       D ]  \  }}t        |||«       Œ |j                  «       D ]  \  }}t        |||«       Œ |S ©N)r   r¨   ÚitemsÚsetattr)r¬   ÚtableTagÚdefaultsÚvaluesÚtableÚkÚvs          r®   Ú_initTableWithValuesz FontBuilder._initTableWithValuesf  sj   € Ü&.¨xÓ&8Ð8ˆ�—	‘	˜(Ñ#Ø—N‘NÓ$ò 	!‰DˆAˆqÜ�E˜1˜aÕ ð	!à—L‘L“Nò 	!‰DˆAˆqÜ�E˜1˜aÕ ð	!àˆr°   c                 ól   — | j                   |   }|j                  «       D ]  \  }}t        |||«       Œ y rµ   )r¨   r¶   r·   )r¬   r¸   rº   r»   r¼   r½   s         r®   Ú_updateTableWithValuesz"FontBuilder._updateTableWithValuesn  s5   € Ø—	‘	˜(Ñ#ˆØ—L‘L“Nò 	!‰DˆAˆqÜ�E˜1˜aÕ ñ	!r°   c                 ó2   — | j                  dt        |«       y)zCreate a new `head` table and initialize it with default values,
        which can be overridden by keyword arguments.
        ÚheadN)r¾   Ú_headDefaults©r¬   rº   s     r®   rª   zFontBuilder.setupHeads  ó   € ð 	×!Ñ! &¬-¸Õ@r°   c                 ó(   — | j                  d|«       y)z^Update the head table with the fields and values passed as
        keyword arguments.
        rÂ   N)rÀ   rÄ   s     r®   Ú
updateHeadzFontBuilder.updateHeady  s   € ð 	×#Ñ# F¨FÕ3r°   c                 ó:   — | j                   j                  |«       y)z!Set the glyph order for the font.N)r¨   ÚsetGlyphOrder)r¬   Ú
glyphOrders     r®   ÚsetupGlyphOrderzFontBuilder.setupGlyphOrder  s   € à�	‰	×Ñ 
Õ+r°   c                 ó.  — g }|rt        |«      nd}|dkD  r@t        d„ |j                  «       D «       «      }t        |ddd«      }|j	                  |«       n|}d}t        ||dd«      }		 |	j                  | j                  «       |j	                  |	«       t        ||dd«      }
|j	                  |
«       |�hi }|D ];  \  }}}|j                  |«      |k(  rd
}||vrg ||<   ||   j	                  ||f«       Œ= t        i ddd«      }||_        |j	                  |«       t        d«      | j                  d<   d| j                  d   _        || j                  d   _        y
# t        j                  $ r! |st        d	«      ‚d}t        ||dd«      }	Y �Œw xY w)aµ  Build the `cmap` table for the font. The `cmapping` argument should
        be a dict mapping unicode code points as integers to glyph names.

        The `uvs` argument, when passed, must be a list of tuples, describing
        Unicode Variation Sequences. These tuples have three elements:
            (unicodeValue, variationSelector, glyphName)
        `unicodeValue` and `variationSelector` are integer code points.
        `glyphName` may be None, to indicate this is the default variation.
        Text processors will then use the cmap to find the glyph name.
        Each Unicode Variation Sequence should be an officially supported
        sequence, but this is not policed.
        r   iÿÿ  c              3   ó6   K  — | ]  \  }}|d k  sŒ||f–— Œ y­w)r    N© )Ú.0r¼   r½   s      r®   ú	<genexpr>z0FontBuilder.setupCharacterMap.<locals>.<genexpr>“  s   è ø€ ÒS©4¨1¨aÀqÈ7Ã{  A¤ÑSùs   ‚�	rd   r   r`   rT   r   zFcmap format 4 subtable overflowed; sort glyph order by unicode to fix.Nrh   rV   Úcmap)ÚmaxÚdictr¶   ÚbuildCmapSubTableÚappendÚcompiler¨   ÚstructÚerrorÚ
ValueErrorÚgetÚuvsDictr   r   Útables)r¬   ÚcmappingÚuvsÚallowFallbackÚ	subTablesÚhighestUnicodeÚcmapping_3_1ÚsubTable_3_10ÚformatÚsubTable_3_1ÚsubTable_0_3rÛ   ÚunicodeValueÚvariationSelectorÚ	glyphNameÚuvsSubTables                   r®   ÚsetupCharacterMapzFontBuilder.setupCharacterMapƒ  s¶  € ð ˆ	Ù*2œ˜Xœ¸ˆØ˜FÒ"ÜÑS°8·>±>Ó3CÔSÓSˆLÜ-¨h¸¸A¸rÓBˆMØ×Ñ˜]Õ+à#ˆLØˆÜ(¨°v¸qÀ!ÓDˆð		IØ× Ñ  §¡Ô+ð 	×Ñ˜Ô&Ü(¨°v¸qÀ!ÓDˆØ×Ñ˜Ô&àˆ?ØˆGØ>Aò MÑ:�Ð/°Ø—<‘< Ó-°Ò:à $�IØ$¨GÑ3Ø13�GÐ-Ñ.ØÐ)Ñ*×1Ñ1°<ÀÐ2KÕLðMô ,¨B°°A°qÓ9ˆKØ")ˆKÔØ×Ñ˜[Ô)ä$ VÓ,ˆ�	‰	�&ÑØ)*ˆ�	‰	�&ÑÔ&Ø#,ˆ�	‰	�&ÑÕ øô7 �|‰|ò 	Iá Ü Ø\óð ð ˆFÜ,¨\¸6À1ÀaÓH‹Lð	Iús   Á*E  Å 0FÆFc                 ó&  — t        d«      x}| j                  d<   g |_        |j                  «       D ]]  \  }}t	        |t
        «      r|}n	t        |   }t	        |t        «      rt        |¬«      }|j                  || j                  |||¬«       Œ_ y)aÞ  Create the `name` table for the font. The `nameStrings` argument must
        be a dict, mapping nameIDs or descriptive names for the nameIDs to name
        record values. A value is either a string, or a dict, mapping language codes
        to strings, to allow localized name table entries.

        By default, both Windows (platformID=3) and Macintosh (platformID=1) name
        records are added, unless any of `windows` or `mac` arguments is False.

        The following descriptive names are available for nameIDs:

            copyright (nameID 0)
            familyName (nameID 1)
            styleName (nameID 2)
            uniqueFontIdentifier (nameID 3)
            fullName (nameID 4)
            version (nameID 5)
            psName (nameID 6)
            trademark (nameID 7)
            manufacturer (nameID 8)
            designer (nameID 9)
            description (nameID 10)
            vendorURL (nameID 11)
            designerURL (nameID 12)
            licenseDescription (nameID 13)
            licenseInfoURL (nameID 14)
            typographicFamily (nameID 16)
            typographicSubfamily (nameID 17)
            compatibleFullName (nameID 18)
            sampleText (nameID 19)
            postScriptCIDFindfontName (nameID 20)
            wwsFamilyName (nameID 21)
            wwsSubfamilyName (nameID 22)
            lightBackgroundPalette (nameID 23)
            darkBackgroundPalette (nameID 24)
            variationsPostScriptNamePrefix (nameID 25)
        Úname©Úen)ÚttFontÚnameIDÚwindowsÚmacN)
r   r¨   Únamesr¶   Ú
isinstanceÚintÚ_nameIDsÚstrrÓ   ÚaddMultilingualName)r¬   ÚnameStringsrò   ró   Ú	nameTableÚnameNameÚ	nameValuerñ   s           r®   ÚsetupNameTablezFontBuilder.setupNameTable¹  s‘   € ôJ )1°Ó(8Ð8ˆ	�D—I‘I˜fÑ%Øˆ	Œà#.×#4Ñ#4Ó#6ò 		ÑˆH�iÜ˜(¤CÔ(Ø!‘ä! (Ñ+�Ü˜)¤SÔ)Ü  IÔ.�	Ø×)Ñ)Ø $§)¡)°FÀGÐQTð *õ ñ		r°   c                 óV  — | j                  dt        |«       d|vr=d| j                  v sJ d«       ‚| j                  d   j                  | j                  «       d|v sMd|v sHd|v sCd|v s>d| j                  v sJ d	«       ‚| j                  d   j	                  | j                  «       y
y
y
y
y
)zCreate a new `OS/2` table and initialize it with default values,
        which can be overridden by keyword arguments.
        zOS/2r}   Úhmtxz6the 'hmtx' table must be setup before the 'OS/2' tabler�   rŽ   r�   rÑ   z6the 'cmap' table must be setup before the 'OS/2' tableN)r¾   Ú_OS2Defaultsr¨   ÚrecalcAvgCharWidthÚrecalcUnicodeRangesrÄ   s     r®   ÚsetupOS2zFontBuilder.setupOS2ì  sÆ   € ð 	×!Ñ! &¬,¸Ô?Ø &Ñ(à˜$Ÿ)™)Ñ#ðHàGóHØ#à�I‰I�fÑ×0Ñ0°·±Ô;à Ñ'Ø  FÑ*Ø  FÑ*Ø  FÑ*ð ˜$Ÿ)™)Ñ#ðHàGóHØ#à�I‰I�fÑ×1Ñ1°$·)±)Õ<ð +ð +ð +ð (r°   c                 ó’  — ddl m}m}m}m}m}	m}
 | j                  rJ ‚d| j                  _	         |«       }d|_
        d|_        | j                  |_        |g|_         |«       |_         |	«       }||_         |
«       }|j!                  «       D ]  \  }}t#        |||«       Œ d }d } |«       }| j                  j%                  «       |_        ||_        |j                  |_        |j!                  «       D ]  \  }}t#        |||«       Œ d|vr)d| j                  d   j*                  z  }|dd|ddg|_         |d |j&                  ||||«      }|j!                  «       D ]  \  }}||_        ||_        |||<   Œ ||_        |j                  j3                  |«       t5        d«      | j                  d<   || j                  d   _        y )Nr   )Ú
CFFFontSetÚTopDictIndexÚTopDictÚCharStringsÚGlobalSubrsIndexÚPrivateDictÚOTTOr   Ú
FontMatrixrÂ   zCFF )ÚcffLibr  r  r  r	  r
  r  r©   r¨   ÚsfntVersionÚmajorÚminorÚotFontÚ	fontNamesÚtopDictIndexÚGlobalSubrsr¶   r·   ÚgetGlyphOrderÚcharsetÚPrivater   r  ÚprivateÚglobalSubrsrÕ   r   Úcff)r¬   rW   ÚfontInfoÚcharStringsDictÚprivateDictr  r  r  r	  r
  r  ÚfontSetr  r  ÚkeyÚvalueÚfdSelectÚfdArrayÚtopDictÚscaleÚcharStringsré   Ú
charStrings                          r®   ÚsetupCFFzFontBuilder.setupCFF  sÅ  € ÷	
÷ 	
ð —:’:Ðˆ~Ø &ˆ�	‰	ÔÙ“,ˆØˆŒØˆŒØŸ™ˆŒØ#˜HˆÔÙ+›~ˆÔá&Ó(ˆØ)ˆÔÙ“-ˆØ%×+Ñ+Ó-ò 	)‰JˆC�Ü�G˜S %Õ(ð	)àˆØˆá“)ˆØŸ)™)×1Ñ1Ó3ˆŒØ!ˆŒØ%×1Ñ1ˆÔØ"Ÿ.™.Ó*ò 	)‰JˆC�Ü�G˜S %Õ(ð	)à˜xÑ'Ø˜Ÿ	™	 &Ñ)×4Ñ4Ñ4ˆEØ"'¨¨A¨u°a¸Ð!;ˆGÔá!Ø�'—/‘/ ;°¸À7ó
ˆð &5×%:Ñ%:Ó%<ò 	0Ñ!ˆI�zØ!(ˆJÔØ%0ˆJÔ"Ø%/ˆK˜	Ò"ð	0ð *ˆÔà×Ñ×#Ñ# GÔ,ä$ VÓ,ˆ�	‰	�&ÑØ 'ˆ�	‰	�&ÑÕr°   c                 óÆ  — ddl m}m}m}m}m}m}	m}
m} | j                  rJ ‚d| j                  _         |«       }d|_        d|_        | j                  j                  } |d |d «      |_         |«       }||_        |€i g}d } |
«       }d |_        ||_        |D ]^  } |«       }|j%                  d«        |	«       }|j'                  «       D ]  \  }}t)        |||«       Œ ||_        |j-                  |«       Œ`  |«       }||_        ||_        d| j                  d   j2                  z  }|dd|ddg|_        |d   j*                  } |d d ||||«      }|j'                  «       D ]  \  }}||_        ||_        |||<   Œ ||_        |j                  j-                  |«       t;        d«      | j                  d<   || j                  d   _        |r| j?                  |«       y y )	Nr   )r  r  r  r	  r
  r  ÚFDArrayIndexÚFontDictr  r   r   TrÂ   ÚCFF2) r  r  r  r  r	  r
  r  r*  r+  r©   r¨   r  r  r  r  r  r  ÚstringsÚsetCFF2r¶   r·   r  rÕ   Úcff2GetGlyphOrderÚFDArrayr   r  r  r  r   r  ÚsetupCFF2Regions)r¬   r  ÚfdArrayListÚregionsr  r  r  r	  r
  r  r*  r+  r  r/  r  r"  r#  r  ÚfontDictr  r   r!  r$  r%  r&  ré   r'  s                              r®   Ú	setupCFF2zFontBuilder.setupCFF24  sù  € ÷		
÷ 		
ó 		
ð —:’:Ðˆ~Ø &ˆ�	‰	ÔÙ“,ˆØˆŒØˆŒà ŸI™I×3Ñ3ÐÙ+¨DÐ2CÀTÓJˆÔá&Ó(ˆØ)ˆÔàÐØ˜$ˆKØˆÙ“.ˆØˆŒØ)ˆÔØ&ò 	%ˆKÙ“zˆHØ×Ñ˜TÔ"Ù!“mˆGØ)×/Ñ/Ó1ò -‘
��UÜ˜  eÕ,ð-à&ˆHÔØ�N‰N˜8Õ$ð	%ñ “)ˆØ$5ˆÔ!Ø!ˆŒØ�D—I‘I˜fÑ%×0Ñ0Ñ0ˆØ# Q¨¨5°!°QÐ7ˆÔà˜!‘*×$Ñ$ˆÙ! $¨¨k¸7ÀHÈgÓVˆØ%4×%:Ñ%:Ó%<ò 	0Ñ!ˆI�zØ!(ˆJÔØ%0ˆJÔ"Ø%/ˆK˜	Ò"ð	0ð *ˆÔà×Ñ×#Ñ# GÔ,ä$ VÓ,ˆ�	‰	�&ÑØ 'ˆ�	‰	�&ÑÔáØ×!Ñ! 'Õ*ð r°   c           	      ó  — ddl m}m}m} ddlm} d| j                  v sJ d«       ‚d| j                  v sJ d«       ‚| j                  d   j                  D �cg c]  }|j                  ‘Œ }} |||«      } |t        t        t        |«      «      «      d d¬	«      }	 |||	g«      }
 ||
¬
«      }| j                  d   j                  j                  d   }||_        |j                  D ]  }||j                   _        Œ y c c}w )Nr   )ÚbuildVarRegionListÚbuildVarDataÚbuildVarStore)ÚVarStoreDataÚfvarzfvar must to be set up firstr,  zCFF2 must to be set up firstF)Úoptimize)Ú
otVarStorer   )ÚvarLib.builderr7  r8  r9  r  r:  r¨   ÚaxesÚaxisTagÚlistÚrangeÚlenr  r  ÚVarStorer0  r  Úvstore)r¬   r3  r7  r8  r9  r:  ÚaÚaxisTagsÚvarRegionListÚvarDataÚvarStorerE  r$  r4  s                 r®   r1  zFontBuilder.setupCFF2Regionsq  sî   € ßSÑSÝ(à˜Ÿ™Ñ"ÐBÐ$BÓBÐ"Ø˜Ÿ™Ñ"ÐBÐ$BÓBÐ"Ø'+§y¡y°Ñ'8×'=Ñ'=Ö> !�A—I“IÐ>ˆÐ>Ù*¨7°HÓ=ˆÙœt¤E¬#¨g«,Ó$7Ó8¸$ÈÔOˆÙ  °°	Ó:ˆÙ¨Ô2ˆØ—)‘)˜FÑ#×'Ñ'×4Ñ4°QÑ7ˆØ!ˆÔØŸ™ò 	-ˆHØ&,ˆH×ÑÕ#ñ	-ùò ?s   ÁC=c                 ó,  — | j                   sJ ‚|ro| j                  d   j                  dk(  rS|j                  «       D ]@  \  }}|j                  dkD  sŒt        d„ |j                  D «       «      sŒ3t        d|›d�«      ‚ t        d«      | j                  d<   t        d«      | j                  d<   || j                  d   _	        t        | j                  d«      r(| j                  j                  | j                  d   _        |r| j                  «        y	y	)
a­  Create the `glyf` table from a dict, that maps glyph names
        to `fontTools.ttLib.tables._g_l_y_f.Glyph` objects, for example
        as made by `fontTools.pens.ttGlyphPen.TTGlyphPen`.

        If `calcGlyphBounds` is True, the bounds of all glyphs will be
        calculated. Only pass False if your glyph objects already have
        their bounding box values set.

        If `validateGlyphFormat` is True, raise ValueError if any of the glyphs contains
        cubic curves or is a variable composite but head.glyphDataFormat=0.
        Set it to False to skip the check if you know in advance all the glyphs are
        compatible with the specified glyphDataFormat.
        rÂ   r   c              3   ó.   K  — | ]  }|t         z  –— Œ y ­wrµ   r   )rÏ   Úfs     r®   rÐ   z(FontBuilder.setupGlyf.<locals>.<genexpr>“  s   è ø€ Ò1QÀA°!´iµ-Ñ1Qùs   ‚zGlyph zt has cubic Bezier outlines, but glyphDataFormat=0; either convert to quadratics with cu2qu or set glyphDataFormat=1.Úlocar§   rÊ   N)r©   r¨   r   r¶   ÚnumberOfContoursÚanyr   rÙ   r   ÚglyphsÚhasattrrÊ   ÚcalcGlyphBounds)r¬   rQ  rS  ÚvalidateGlyphFormatrí   Úgs         r®   Ú	setupGlyfzFontBuilder.setupGlyf�  s÷   € ð �zŠzÐˆzá 4§9¡9¨VÑ#4×#DÑ#DÈÒ#IØ!Ÿ<™<›>ò ‘��aØ×%Ñ%¨Ó)¬cÑ1QÈÏÉÔ1QÕ.QÜ$Ø   ð )\ð \óð ðô % VÓ,ˆ�	‰	�&ÑÜ$ VÓ,ˆ�	‰	�&ÑØ#)ˆ�	‰	�&ÑÔ Ü�4—9‘9˜lÔ+Ø+/¯9©9×+?Ñ+?ˆD�I‰I�fÑÔ(ÙØ× Ñ Õ"ð r°   c                 ó2   — t        | j                  ||«       y)a¯  Adds an font variations table to the font.

        Args:
            axes (list): See below.
            instances (list): See below.

        ``axes`` should be a list of axes, with each axis either supplied as
        a py:class:`.designspaceLib.AxisDescriptor` object, or a tuple in the
        format ```tupletag, minValue, defaultValue, maxValue, name``.
        The ``name`` is either a string, or a dict, mapping language codes
        to strings, to allow localized name table entries.

        ```instances`` should be a list of instances, with each instance either
        supplied as a py:class:`.designspaceLib.InstanceDescriptor` object, or a
        dict with keys ``location`` (mapping of axis tags to float values),
        ``stylename`` and (optionally) ``postscriptfontname``.
        The ``stylename`` is either a string, or a dict, mapping language codes
        to strings, to allow localized name table entries.
        N)ÚaddFvarr¨   )r¬   r?  Ú	instancess      r®   Ú	setupFvarzFontBuilder.setupFvar¡  s   € ô* 	�—	‘	˜4 Õ+r°   c                 óþ   — ddl m} d| j                  vrt        d«      ‚| j                  d   j                  D �cg c]  }|j
                  ‘Œ }}t        t        |«      «      } || j                  |||«       yc c}w )z˜Adds an axis variations table to the font.

        Args:
            axes (list): A list of py:class:`.designspaceLib.AxisDescriptor` objects.
        r   )Ú	_add_avarr;  z*'fvar' table is missing; can't add 'avar'.N)ÚvarLibr\  r¨   ÚKeyErrorr?  r@  r   Ú	enumerate)r¬   r?  Úmappingsr\  ÚaxisrG  s         r®   Ú	setupAvarzFontBuilder.setupAvar¸  sk   € õ 	&à˜Ÿ™Ñ"ÜÐGÓHÐHà-1¯Y©Y°vÑ->×-CÑ-CÖD T�D—L“LÐDˆÐDÜœ9 T›?Ó+ˆÙ�$—)‘)˜T 8¨XÕ6ùò Es   »A:c                 ób   — t        d«      x}| j                  d<   d|_        d|_        ||_        y )NÚgvarr   r   )r   r¨   rU   ÚreservedÚ
variations)r¬   rf  rd  s      r®   Ú	setupGvarzFontBuilder.setupGvarÇ  s/   € Ü#+¨FÓ#3Ð3ˆˆt�y‰y˜Ñ ØˆŒØˆŒØ$ˆ�r°   c                 ó‚   — | j                   d   }|j                  j                  «       D ]  }|j                  |«       Œ y)z†Calculate the bounding boxes of all glyphs in the `glyf` table.
        This is usually not called explicitly by client code.
        r§   N)r¨   rQ  rº   ÚrecalcBounds)r¬   Ú
glyphTableÚglyphs      r®   rS  zFontBuilder.calcGlyphBoundsÍ  s>   € ð —Y‘Y˜vÑ&ˆ
Ø×&Ñ&×-Ñ-Ó/ò 	+ˆEØ×Ñ˜zÕ*ñ	+r°   c                 ó(   — | j                  d|«       y)z­Create a new `hmtx` table, for horizontal metrics.

        The `metrics` argument must be a dict, mapping glyph names to
        `(width, leftSidebearing)` tuples.
        r   N©ÚsetupMetrics©r¬   Úmetricss     r®   ÚsetupHorizontalMetricsz"FontBuilder.setupHorizontalMetricsÕ  ó   € ð 	×Ñ˜& 'Õ*r°   c                 ó(   — | j                  d|«       y)z­Create a new `vmtx` table, for horizontal metrics.

        The `metrics` argument must be a dict, mapping glyph names to
        `(height, topSidebearing)` tuples.
        ÚvmtxNrm  ro  s     r®   ÚsetupVerticalMetricsz FontBuilder.setupVerticalMetricsÝ  rr  r°   c                 óÊ   — |dv sJ ‚t        |«      x}| j                  |<   i }|D ]5  }||   \  }}t        t        |«      «      t        t        |«      «      f||<   Œ7 ||_        y)z<See `setupHorizontalMetrics()` and `setupVerticalMetrics()`.)r   rt  N)r   r¨   rö   Úroundrp  )r¬   r¸   rp  ÚmtxTableÚroundedMetricsÚgnÚwÚlsbs           r®   rn  zFontBuilder.setupMetricså  su   € àÐ+Ñ+Ð+Ð+Ü)1°(Ó);Ð;ˆ�4—9‘9˜XÑ&ØˆØò 	@ˆBØ˜R‘[‰FˆAˆsÜ!$¤U¨1£X£´´E¸#³J³Ð!?ˆN˜2Òð	@ð *ˆÕr°   c                 ó2   — | j                  dt        |«       y)z{Create a new `hhea` table initialize it with default values,
        which can be overridden by keyword arguments.
        ÚhheaN)r¾   Ú_hheaDefaultsrÄ   s     r®   ÚsetupHorizontalHeaderz!FontBuilder.setupHorizontalHeaderï  rÅ   r°   c                 ó2   — | j                  dt        |«       y)z{Create a new `vhea` table initialize it with default values,
        which can be overridden by keyword arguments.
        ÚvheaN)r¾   Ú_vheaDefaultsrÄ   s     r®   ÚsetupVerticalHeaderzFontBuilder.setupVerticalHeaderõ  rÅ   r°   c                 ó  ‡— |€9i Š|D ]  }||   }|‰vrd‰|<   Œ‰|xx   dz  cc<   Œ  t        ‰ˆfd„d¬«      d   }| j                  di t        i |¬«      «       | j                  d   }d|_        d|_        |D ]
  }||   ||<   Œ y)	aY  Create a new `VORG` table. The `verticalOrigins` argument must be
        a dict, mapping glyph names to vertical origin values.

        The `defaultVerticalOrigin` argument should be the most common vertical
        origin value. If omitted, this value will be derived from the actual
        values in the `verticalOrigins` argument.
        Nr   c                 ó   •— ‰|    S rµ   rÎ   )ÚvorgÚbags    €r®   ú<lambda>z2FontBuilder.setupVerticalOrigins.<locals>.<lambda>  s   ø€  c¨$¡i€ r°   T)r   Úreverser   ÚVORG)ÚVOriginRecordsÚdefaultVertOriginY)Úsortedr¾   rÓ   r¨   ÚmajorVersionÚminorVersion)r¬   ÚverticalOriginsÚdefaultVerticalOriginrz  r‡  Ú	vorgTablerˆ  s         @r®   ÚsetupVerticalOriginsz FontBuilder.setupVerticalOriginsû  sÁ   ø€ ð !Ð(àˆCØ%ò #�Ø& rÑ*�Ø˜s‘?Ø !�C˜’Ià˜“I ‘N”Ið#ô %+ØÓ/¸ô%àñ%Ð!ð 	×!Ñ!ØØÜ Ð7LÔMô	
ð
 —I‘I˜fÑ%ˆ	Ø!"ˆ	ÔØ!"ˆ	ÔØ!ò 	0ˆBØ+¨BÑ/ˆI�bŠMñ	0r°   c                 ó¨   — d| j                   v }| j                  dt        |«      }| j                  s|r|rd|_        g |_        i |_        yd|_        y)zCreate a new `post` table and initialize it with default values,
        which can be overridden by keyword arguments.
        r,  Úpostg       @r/   N)r¨   r¾   Ú_postDefaultsr©   r0   Ú
extraNamesÚmapping)r¬   ÚkeepGlyphNamesrº   ÚisCFF2Ú	postTables        r®   Ú	setupPostzFontBuilder.setupPost  sQ   € ð ˜4Ÿ9™9Ð$ˆØ×-Ñ-¨f´mÀVÓLˆ	Ø�JŠJ™&¡nØ#&ˆIÔ Ø#%ˆIÔ Ø "ˆIÕà#&ˆIÕ r°   c                 ó\   — | j                   rt        }nt        }| j                  d|i «       y)z…Create a new `maxp` table. This is called implicitly by FontBuilder
        itself and is usually not called by client code.
        ÚmaxpN)r©   Ú_maxpDefaultsTTFÚ_maxpDefaultsOTFr¾   )r¬   r¹   s     r®   r«   zFontBuilder.setupMaxp'  s'   € ð �:Š:Ü'‰Hä'ˆHØ×!Ñ! &¨(°BÕ7r°   c                 óH   — t        dddg ¬«      }| j                  di |«       y)z„This adds an empty DSIG table to the font to make some MS applications
        happy. This does not properly sign the font.
        r   r   )Ú	ulVersionÚusFlagÚ	usNumSigsÚsignatureRecordsÚDSIGN)rÓ   r¾   rÄ   s     r®   ÚsetupDummyDSIGzFontBuilder.setupDummyDSIG1  s.   € ô ØØØØô	
ˆð 	×!Ñ! &¨"¨fÕ5r°   c                 ó>   — ddl m}  || j                  ||||¬«       y)a  Add OpenType features to the font from a string containing
        Feature File syntax.

        The `filename` argument is used in error messages and to determine
        where to look for "include" files.

        The optional `tables` argument can be a list of OTL tables tags to
        build, allowing the caller to only build selected OTL tables. See
        `fontTools.feaLib` for details.

        The optional `debug` argument controls whether to add source debugging
        information to the font in the `Debg` table.
        r   )ÚaddOpenTypeFeaturesFromString)ÚfilenamerÜ   ÚdebugN)ÚfeaLib.builderrª  r¨   )r¬   Úfeaturesr«  rÜ   r¬  rª  s         r®   ÚaddOpenTypeFeatureszFontBuilder.addOpenTypeFeatures=  s   € õ 	Bá%Ø�I‰I�x¨(¸6Èö	
r°   c                 ó~   — ddl m} d| j                  vrt        d«      ‚|j	                  | j                  ||¬«       y)z|Add conditional substitutions to a Variable Font.

        See `fontTools.varLib.featureVars.addFeatureVariations`.
        r   )ÚfeatureVarsr;  z5'fvar' table is missing; can't add FeatureVariations.)Ú
featureTagN)r]  r±  r¨   r^  ÚaddFeatureVariations)r¬   ÚconditionalSubstitutionsr²  r±  s       r®   r³  z FontBuilder.addFeatureVariationsQ  s>   € õ
 	(à˜Ÿ™Ñ"ÜÐRÓSÐSà×(Ñ(Ø�I‰IÐ/¸Jð 	)õ 	
r°   c           	      ó|   — ddl m} | j                  j                  «       } ||||||||¬«      | j                  d<   y)zqBuild new COLR table using color layers dictionary.

        Cf. `fontTools.colorLib.builder.buildCOLR`.
        r   )Ú	buildCOLR)rU   ÚglyphMaprJ  ÚvarIndexMapÚ	clipBoxesÚallowLayerReuseÚCOLRN)ÚfontTools.colorLib.builderr¶  r¨   ÚgetReverseGlyphMap)	r¬   ÚcolorLayersrU   rJ  r¸  r¹  rº  r¶  r·  s	            r®   Ú	setupCOLRzFontBuilder.setupCOLR_  sA   € õ 	9à—9‘9×/Ñ/Ó1ˆÙ%ØØØØØ#ØØ+ô
ˆ�	‰	�&Òr°   c           	      óv   — ddl m}  |||||| j                  j                  d«      ¬«      | j                  d<   y)zÔBuild new CPAL table using list of palettes.

        Optionally build CPAL v1 table using paletteTypes, paletteLabels and
        paletteEntryLabels.

        Cf. `fontTools.colorLib.builder.buildCPAL`.
        r   )Ú	buildCPALrí   )ÚpaletteTypesÚpaletteLabelsÚpaletteEntryLabelsrû   ÚCPALN)r¼  rÁ  r¨   rÚ   )r¬   ÚpalettesrÂ  rÃ  rÄ  rÁ  s         r®   Ú	setupCPALzFontBuilder.setupCPALy  s6   € õ 	9á%ØØ%Ø'Ø1Ø—i‘i—m‘m FÓ+ô
ˆ�	‰	�&Òr°   c                 ó¶   — ddl m} d| j                  v sJ d«       ‚ || j                  |||t        d„ | j                  d   j                  D «       «      ¬«       y)z‚Build a new 'STAT' table.

        See `fontTools.otlLib.builder.buildStatTable` for details about
        the arguments.
        r   )ÚbuildStatTablerí   zname must to be set up firstc              3   ó:   K  — | ]  }|j                   d k(  –— Œ y­w©r   N©Ú
platformID©rÏ   Únrs     r®   rÐ   z(FontBuilder.setupStat.<locals>.<genexpr>   s   è ø€ ÒN°˜Ÿ™¨!Õ+ÑNùó   ‚)ÚmacNamesN)ÚotlLib.builderrÉ  r¨   rP  rô   )r¬   r?  Ú	locationsÚelidedFallbackNamerÉ  s        r®   Ú	setupStatzFontBuilder.setupStat‘  sT   € õ 	3à˜Ÿ™Ñ"ÐBÐ$BÓBÐ"áØ�I‰IØØØÜÑN°d·i±iÀÑ6G×6MÑ6MÔNÓNö	
r°   )NNTr   )NF)TT)NNrµ   )T)NNF)Úrvrn)NNNNT)NNN)Nr   )#Ú__name__Ú
__module__Ú__qualname__r¯   r²   r¾   rÀ   rª   rÇ   rË   rë   rþ   r  r(  r5  r1  rV  rZ  rb  rg  rS  rq  ru  rn  r€  r„  r”  r�  r«   r¨  r¯  r³  r¿  rÇ  rÕ  rÎ   r°   r®   r   r   8  sÇ   „ ó%(òNòò!ò
Aò4ò,ó4-ól1òf=ò*1(óf;+òz-ó #ò@,ó.7ò%ò+ò+ò+ò*òAòAó0ó>'ò8ò
6ó
ó(
ð" ØØØØó
ð: ØØó
ô0
r°   c                 óZ   — t        |   |«      }| |_        ||_        ||_        d|_        |S )Nr   )r   rÑ   rÍ  Ú	platEncIDÚlanguage)rÝ   rä   rÍ  rÛ  ÚsubTables        r®   rÔ   rÔ   ¤  s5   € Ü˜FÑ# FÓ+€HØ€H„MØ$€HÔØ"€HÔØ€HÔØ€Or°   c                 ó.  — ddl m}m} |sJ ‚t        d«      }| d   }t	        d„ t        |dd«      D «       «      }d}|rd	|z   }|D ]ì  }	 |«       }
t        |	t        «      r|	\  |
_        |
_	        |
_
        |
_        }nf|	j                  |	j                  |	j                  |	j                  |	j                   f\  |
_        |
_	        |
_
        |
_        }|	j"                  rd|
_        t        |t&        «      rt)        |¬
«      }|j+                  || |¬«      |
_        |j.                  j1                  |
«       Œî |D ]Ø  }t        |t(        «      r|d   }|d   }|j3                  d«      }n2|j4                  }|j6                  xs |j8                  }|j:                  }t        |t&        «      rt)        |¬
«      } |«       }|j+                  || |¬«      |_        |�|j?                  ||¬«      |_         ||_!        |jD                  j1                  |«       ŒÚ || d<   y )Nr   )ÚAxisÚNamedInstancer;  rí   c              3   ó:   K  — | ]  }|j                   d k(  –— Œ y­wrË  rÌ  rÎ  s     r®   rÐ   zaddFvar.<locals>.<genexpr>·  s   è ø€ ÒP¨"�2—=‘= AÕ%ÑPùrÐ  rô   rÎ   ))r   r   i	  ))r   r   r   rî   )rð   ró   ÚlocationÚ	stylenameÚpostscriptfontname)Ú	platforms)#ÚttLib.tables._f_v_a_rrß  rà  r   rP  Úgetattrrõ   Útupler@  ÚminValueÚdefaultValueÚmaxValueÚtagÚminimumÚdefaultÚmaximumrí   Úhiddenr   rø   rÓ   rù   Ú
axisNameIDr?  rÕ   rÚ   râ  ÚlocalisedStyleNamerQ   ÚpostScriptFontNameÚsubfamilyNameIDÚaddNameÚpostscriptNameIDÚcoordinatesrY  )r¨   r?  rY  rß  rà  r;  rû   rÑ  rå  Úaxis_defra  rí   Úinstancer÷  ÚpsnameÚinsts                   r®   rX  rX  ­  s  € ß:á€Kˆ4ä�FÓ€DØ�V‘€Iô ÑP´¸	À7ÈBÓ0OÔPÓP€Hð !€IÙØ  9Ñ,ˆ	àò ˆÙ‹vˆä�h¤Ô&ð ñØ”Ø”ØÔ!Ø”Ùð —‘Ø× Ñ Ø× Ñ Ø× Ñ Ø—‘ðUÑQˆTŒ\˜4œ=¨$Ô*;¸T¼]ÈDð �ŠØ#�”
ä�dœCÔ Ü˜4”=ˆDà#×7Ñ7¸ÀTÈxÐ7ÓXˆŒØ�	‰	×Ñ˜Õð5ð8 ò $ˆÜ�h¤Ô%Ø" :Ñ.ˆKØ˜KÑ(ˆDØ—\‘\Ð"6Ó7‰Fà"×+Ñ+ˆKØ×.Ñ.ÒD°(×2DÑ2DˆDØ×0Ñ0ˆFä�dœCÔ Ü˜4”=ˆDá‹ˆØ(×<Ñ<Ø˜ 8ð  =ó  
ˆÔð ÐØ$-×$5Ñ$5°fÈ	Ð$5Ó$RˆDÔ!Ø&ˆÔØ�‰×Ñ˜dÕ#ð)$ð, €Dˆ‚Lr°   rÎ   )Ú__all__ÚttLibr   r   ÚttLib.tables._c_m_a_pr   ÚttLib.tables._g_l_y_fr   ÚttLib.tables.O_S_2f_2r	   Úmisc.timeToolsr
   r×   Úcollectionsr   rÓ   rÃ   r   r¡  r—  r  rƒ  r÷   Ú_panoseDefaultsr  Úobjectr   rÔ   rX  rÎ   r°   r®   ú<module>r     sw  ðØˆ/€ð÷B $Ý /Ý ,Ý )Ý (Û Ý #ñ ò Ùðáðñ ðñ ð	ñ
 ðñ ðñ ðñ ðñ 
ðñ 
ðñ 
ðñ 
ðñ ðñ ðñ ðñ  ð!ñ" ð#€ñ( ØØØØØØØØØØØØØØØôÐ ñ" ØØôÐ ñ
 ØØØØØØØØØô
€ñ ò Ùðáðñ ðñ ð	ñ
 ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ  ð!ñ" ð#€ñ( ò Ùðáðñ ðñ ð	ñ
 ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ  ð!ñ" ð#€ñ( ò Ùðáðñ ðñ ð	ñ
 ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ ðñ" ð#ñ$ ð%ñ& ð'ñ( ð)ñ* !ð+ñ, ð-ñ. ð/ñ0 ð1ñ2 ð3ñ4 $&ð5€ñ@ “(€áò (Ùð(áð(ñ ð(ñ ð	(ñ
 ð(ñ ð(ñ ð(ñ ð(ñ ð(ñ ð(ñ ð(ñ ð(ñ ð(ñ ð(ñ ð(ñ  ð!(ñ" ð#(ñ$ ð%(ñ& ð'(ñ( ð)(ñ* ð+(ñ, ð-(ñ. ð/(ñ0 ð1(ñ2 ð3(ñ4 ð5(ñ6 ð7(ñ8 ð9(ñ: ð;(ñ< ð=(ñ> ð?(ñ@ ðA(ñB ðC(ñD ðE(ñF ðG(ñH ðI(ñJ ðK(ñL ðM(ñN ðO(€ôVi	
�&ô i	
òXóCr°   