File: metrics_keys.py

package info (click to toggle)
fonts-junicode 2.211%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 104,448 kB
  • sloc: python: 304; sh: 236; xml: 18; makefile: 16
file content (26 lines) | stat: -rw-r--r-- 776 bytes parent folder | download
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
from Foundation import NSPoint
import copy

s = Glyphs.font.selection
for g in s:
    g.leftMetricsKey = g.rightMetricsKey = g.widthMetricsKey = None
    for l in g.layers:
        l.leftMetricsKey = l.rightMetricsKey = l.widthMetricsKey = None

#    reg = g.layers[0]
#    enl = g.layers[5]
#    if len(reg.components) == 0:
#        print("skipping ", g.name)
#        continue
#    print("editing ", g.name)
#    g.leftMetricsKey = g.rightMetricsKey = g.widthMetricsKey = None
#    for l in g.layers:
#        l.leftMetricsKey = l.rightMetricsKey = l.widthMetricsKey = None
#    enl.shapes = copy.copy(reg.shapes)
#    for s in enl.shapes:
#        s.position = NSPoint(s.position.x + 26, s.position.y)
#    enl.LSB = reg.LSB + 26
#    enl.width = reg.width