Skip to content

Commit c19d77a

Browse files
committed
moved foundry to lib
1 parent 60f9060 commit c19d77a

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

plotdevice/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from os.path import exists, expanduser
66

77
from .lib.cocoa import *
8-
from .util.foundry import typespec, fontspec
9-
from .util import _copy_attr, _copy_attrs, _flatten, trim_zeroes, numlike
8+
from .lib.foundry import typespec
109
from .lib import pathmatics
10+
from .util import _copy_attr, _copy_attrs, _flatten, trim_zeroes, numlike
1111
from .gfx.transform import Dimension, parse_coords
1212
from .gfx import *
1313
from . import gfx, lib, util, Halted, DeviceError

plotdevice/gfx/atoms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from collections import namedtuple, defaultdict
66

77
from plotdevice import DeviceError
8-
from ..util.foundry import fontspec, typespec
8+
from ..lib.foundry import fontspec, typespec
99
from ..util import _copy_attrs, _copy_attr, _flatten, trim_zeroes, numlike
1010
from .colors import Color
1111
from .transform import Transform, Dimension, Region

plotdevice/gfx/typography.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from .transform import Transform, Region, Size, Point
1212
from .colors import Color
1313
from .bezier import Bezier
14-
from ..util.foundry import *
1514
from ..util import _copy_attrs, numlike, XMLParser, read
15+
from ..lib.foundry import *
1616
from ..lib import pathmatics
1717

1818
_ctx = None

plotdevice/lib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# test the sys.path by attempting to load the c-extensions
1616
try:
17-
import io, pathmatics
17+
import io, pathmatics, foundry
1818
except ImportError:
1919
from pprint import pformat
2020
notfound = "Couldn't locate C extensions (cIO.so, & cPathmatics.so).\nSearched in:\n%s\nto no avail..."%pformat(sys.path)
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from pprint import pprint, pformat
66
from operator import itemgetter, attrgetter
77
from collections import namedtuple, Counter, OrderedDict as odict, defaultdict as ddict
8-
from ..lib.cocoa import *
9-
from . import numlike
8+
from .cocoa import *
9+
from ..util import numlike
1010

1111
from plotdevice import DeviceError
1212

@@ -309,7 +309,7 @@ def fontspec(*args, **kwargs):
309309
print 'Font: unrecognized weight or family name "%s"'%item
310310
elif numlike(item) and 'size' not in kwargs:
311311
spec['size'] = item
312-
312+
313313
# incorporate any typesetting features
314314
spec.update(aat_features(kwargs))
315315

@@ -338,11 +338,11 @@ def typespec(**kwargs):
338338

339339
aat_consts = {
340340
"Ligatures":1, # kLigaturesType
341-
"CommonOn":2, "CommonOff":3, "RareOn":4, "RareOff":5,
342-
341+
"CommonOn":2, "CommonOff":3, "RareOn":4, "RareOff":5,
342+
343343
"LowerCase":37, # kLowerCaseType
344344
"UpperCase":38, # kUpperCaseType
345-
"DefaultCase":0, "SmallCaps":1,
345+
"DefaultCase":0, "SmallCaps":1,
346346

347347
"NumberCase":21, # kNumberCaseType
348348
"LowerCaseNumbers":0, "UpperCaseNumbers":1,
@@ -400,8 +400,8 @@ def typespec(**kwargs):
400400
NSFontFeatureTypeIdentifierKey as feature_id, \
401401
NSFontFeatureSelectorIdentifierKey as selector_id
402402

403-
# convert the semi-sensibly named items in pd_features's arrays into their SFNTLayoutTypes.h
404-
# const values. the _aat_features dict uses the same keys as pd_features but the contents of
403+
# convert the semi-sensibly named items in pd_features's arrays into their SFNTLayoutTypes.h
404+
# const values. the _aat_features dict uses the same keys as pd_features but the contents of
405405
# the 'command' tuples become ints
406406
_aat_features = {}
407407
# build feature dicts for the numbered `stylistic sets' construction

0 commit comments

Comments
 (0)