File: component.rst

package info (click to toggle)
fontparts 0.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,004 kB
  • sloc: python: 18,702; makefile: 216; javascript: 143
file content (169 lines) | stat: -rw-r--r-- 3,035 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
.. highlight:: python
.. module:: fontParts.base

#########
Component
#########

***********
Description
***********

A component can be a part of a glyph, and it is a reference to another glyph in the same font. With components you can make glyphs depend on other glyphs. Changes to the base glyph will reflect in the component as well.

The parent of a component is usually a glyph. Components can be decomposed: they replace themselves with the actual outlines from the base glyph. When that happens, the link between the original and the component is broken: changes to the base glyph will no longer reflect in the glyph that had the component.

********
Overview
********

Parents
=======

.. autosummary::
    :nosignatures:

    BaseComponent.glyph
    BaseComponent.layer
    BaseComponent.font

Copy
====

.. autosummary::
    :nosignatures:

    BaseComponent.copy

Identification
==============

.. autosummary::
    :nosignatures:

    BaseComponent.identifier
    BaseComponent.index

Attributes
==========

.. autosummary::
    :nosignatures:

    BaseComponent.baseGlyph
    BaseComponent.transformation
    BaseComponent.offset
    BaseComponent.scale

Queries
=======

.. autosummary::
    :nosignatures:

    BaseComponent.bounds
    BaseComponent.pointInside

Pens and Drawing
================

.. autosummary::
    :nosignatures:

    BaseComponent.draw
    BaseComponent.drawPoints

Transformations
===============

.. autosummary::
    :nosignatures:

    BaseComponent.transformBy
    BaseComponent.moveBy
    BaseComponent.scaleBy
    BaseComponent.rotateBy
    BaseComponent.skewBy

Normalization
=============

.. autosummary::
    :nosignatures:

    BaseComponent.decompose
    BaseComponent.round

Environment
===========

.. autosummary::
    :nosignatures:

    BaseComponent.naked
    BaseComponent.changed

*********
Reference
*********

.. autoclass:: BaseComponent

Parents
=======

.. autoattribute:: BaseComponent.glyph
.. autoattribute:: BaseComponent.layer
.. autoattribute:: BaseComponent.font

Copy
====

.. automethod:: BaseComponent.copy

Identification
==============

.. autoattribute:: BaseComponent.identifier
.. autoattribute:: BaseComponent.index

Attributes
==========

.. autoattribute:: BaseComponent.baseGlyph
.. autoattribute:: BaseComponent.transformation
.. autoattribute:: BaseComponent.offset
.. autoattribute:: BaseComponent.scale

Queries
=======

.. autoattribute:: BaseComponent.bounds
.. automethod:: BaseComponent.pointInside

Pens and Drawing
================

.. automethod:: BaseComponent.draw
.. automethod:: BaseComponent.drawPoints

Transformations
===============

.. automethod:: BaseComponent.transformBy
.. automethod:: BaseComponent.moveBy
.. automethod:: BaseComponent.scaleBy
.. automethod:: BaseComponent.rotateBy
.. automethod:: BaseComponent.skewBy

Normalization
=============

.. automethod:: BaseComponent.decompose
.. automethod:: BaseComponent.round

Environment
===========

.. automethod:: BaseComponent.naked
.. automethod:: BaseComponent.changed