Ejemplo n.º 1
0
    def find(self, pair, default=None):
        """
        Returns the value for the kerning pair.
        **pair** is a ``tuple`` of two :ref:`type-string`\s, and the returned
        values will either be :ref:`type-int-float` or ``None``
        if no pair was found. ::

            >>> font.kerning[("A", "V")]
            -25
        """
        pair = normalizers.normalizeKerningKey(pair)
        value = self._find(pair, default)
        if value != default:
            value = normalizers.normalizeKerningValue(value)
        return value
Ejemplo n.º 2
0
    def find(self, pair, default=None):
        """
        Returns the value for the kerning pair.
        **pair** is a ``tuple`` of two :ref:`type-string`\s, and the returned
        values will either be :ref:`type-int-float` or ``None``
        if no pair was found. ::

            >>> font.kerning[("A", "V")]
            -25
        """
        pair = normalizers.normalizeKerningKey(pair)
        value = self._find(pair, default)
        if value != default:
            value = normalizers.normalizeKerningValue(value)
        return value
Ejemplo n.º 3
0
    def find(self, pair, default=None):
        """
        Returns the value for the kerning pair - even if the pair only exists
        implicitly (one or both sides may be members of a kerning group).

        **pair** is a ``tuple`` of two :ref:`type-string`\s, and the returned
        values will either be :ref:`type-int-float` or ``None``
        if no pair was found. ::

            >>> font.kerning[("A", "V")]
            -25
        """
        pair = normalizers.normalizeKerningKey(pair)
        value = self._find(pair, default)
        if value != default:
            value = normalizers.normalizeKerningValue(value)
        return value