Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import weakref
from defcon.objects.base import BaseDictObject
class Lib(BaseDictObject):
"""
This object contains arbitrary data.
**This object posts the following notifications:**
===============
Name
===============
Lib.Changed
Lib.BeginUndo
Lib.EndUndo
Lib.BeginRedo
Lib.EndRedo
Lib.ItemSet
Lib.ItemDeleted
Lib.Cleared
from __future__ import absolute_import
import weakref
import unicodedata
from fontTools.agl import AGL2UV
from defcon.tools import unicodeTools
from defcon.objects.base import BaseDictObject
class UnicodeData(BaseDictObject):
"""
This object serves Unicode data for the font.
**This object posts the following notifications:**
- UnicodeData.Changed
This object behaves like a dict. The keys are Unicode values and the
values are lists of glyph names associated with that unicode value::
{
65 : ["A"],
66 : ["B"],
}
import weakref
from defcon.objects.base import BaseDictObject
class Groups(BaseDictObject):
"""
This object contains all of the groups in a font.
**This object posts the following notifications:**
===================
Name
===================
Groups.Changed
Groups.BeginUndo
Groups.EndUndo
Groups.BeginRedo
Groups.EndRedo
Groups.GroupSet
Groups.GroupDeleted
Groups.Cleared
import weakref
from defcon.objects.base import BaseDictObject
from defcon.objects.color import Color
from defcon.tools.identifiers import makeRandomIdentifier
class Guideline(BaseDictObject):
"""
This object represents a guideline.
**This object posts the following notifications:**
===========================
Name
===========================
Guideline.Changed
Guideline.XChanged
Guideline.YChanged
Guideline.AngleChanged
Guideline.NameChanged
Guideline.IdentifierChanged
===========================
from __future__ import absolute_import
import weakref
from defcon.objects.base import BaseDictObject
from defcon.tools.representations import kerningSide1GroupsRepresentationFactory, kerningSide2GroupsRepresentationFactory, glyphToKerningSide1GroupsRepresentationFactory, glyphToKerningSide2GroupsRepresentationFactory
class Groups(BaseDictObject):
"""
This object contains all of the groups in a font.
**This object posts the following notifications:**
- Groups.Changed
- Groups.BeginUndo
- Groups.EndUndo
- Groups.BeginRedo
- Groups.EndRedo
- Groups.GroupSet
- Groups.GroupDeleted
- Groups.Cleared
- Groups.Updated
import weakref
from defcon.objects.base import BaseDictObject
from defcon.objects.color import Color
_defaultTransformation = {
"xScale": 1,
"xyScale": 0,
"yxScale": 0,
"yScale": 1,
"xOffset": 0,
"yOffset": 0
}
class Image(BaseDictObject):
"""
This object represents an image reference in a glyph.
**This object posts the following notifications:**
===========================
Name
===========================
Image.Changed
Image.FileNameChanged
Image.TransformationChanged
Image.ColorChanged
Image.ImageDataChanged
===========================
During initialization an image dictionary, following the format defined
import weakref
from defcon.objects.base import BaseDictObject
from defcon.objects.color import Color
from defcon.tools.identifiers import makeRandomIdentifier
class Anchor(BaseDictObject):
"""
This object represents an anchor point.
**This object posts the following notifications:**
========================
Name
========================
Anchor.Changed
Anchor.XChanged
Anchor.YChanged
Anchor.NameChanged
Anchor.ColorChanged
Anchor.IdentifierChanged
========================
from __future__ import absolute_import
import weakref
from fontTools.ufoLib.kerning import lookupKerningValue
from defcon.objects.base import BaseDictObject
class Kerning(BaseDictObject):
"""
This object contains all of the kerning pairs in a font.
**This object posts the following notifications:**
- Kerning.Changed
- Kerning.BeginUndo
- Kerning.EndUndo
- Kerning.BeginRedo
- Kerning.EndRedo
- Kerning.PairSet
- Kerning.PairDeleted
- Kerning.Cleared
- Kerning.Updated
import weakref
from defcon.objects.base import BaseDictObject
class Kerning(BaseDictObject):
"""
This object contains all of the kerning pairs in a font.
**This object posts the following notifications:**
===================
Name
===================
Kerning.Changed
Kerning.BeginUndo
Kerning.EndUndo
Kerning.BeginRedo
Kerning.EndRedo
Kerning.PairSet
Kerning.PairDeleted
Kerning.Cleared
from __future__ import absolute_import
import weakref
from defcon.objects.base import BaseDictObject
class Lib(BaseDictObject):
"""
This object contains arbitrary data.
**This object posts the following notifications:**
- Lib.Changed
- Lib.BeginUndo
- Lib.EndUndo
- Lib.BeginRedo
- Lib.EndRedo
- Lib.ItemSet
- Lib.ItemDeleted
- Lib.Cleared
- Lib.Updated