public.default is more appropriate than public.foreground.

git-svn-id: http://svn.robofab.com/branches/ufo3k@297 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
This commit is contained in:
Tal Leming 2011-09-27 16:18:42 +00:00
parent 8ccc875640
commit b4782ab182
2 changed files with 13 additions and 13 deletions

View File

@ -80,7 +80,7 @@ FEATURES_FILENAME = "features.fea"
LAYERCONTENTS_FILENAME = "layercontents.plist" LAYERCONTENTS_FILENAME = "layercontents.plist"
LAYERINFO_FILENAME = "layerinfo.plist" LAYERINFO_FILENAME = "layerinfo.plist"
DEFAULT_LAYER_NAME = "public.foreground" DEFAULT_LAYER_NAME = "public.default"
supportedUFOFormatVersions = [1, 2, 3] supportedUFOFormatVersions = [1, 2, 3]

View File

@ -3503,7 +3503,7 @@ class UFO3ReadLayersTestCase(unittest.TestCase):
# layers # layers
if layerContents is None: if layerContents is None:
layerContents = [ layerContents = [
("public.foreground", "glyphs"), ("public.default", "glyphs"),
("layer 1", "glyphs.layer 1"), ("layer 1", "glyphs.layer 1"),
("layer 2", "glyphs.layer 2"), ("layer 2", "glyphs.layer 2"),
] ]
@ -3575,7 +3575,7 @@ class UFO3ReadLayersTestCase(unittest.TestCase):
path = os.path.join(self.ufoPath, "layercontents.plist") path = os.path.join(self.ufoPath, "layercontents.plist")
os.remove(path) os.remove(path)
layerContents = { layerContents = {
"public.foreground" : "glyphs", "public.default" : "glyphs",
"layer 1" : "glyphs.layer 1", "layer 1" : "glyphs.layer 1",
"layer 2" : "glyphs.layer 2", "layer 2" : "glyphs.layer 2",
} }
@ -3799,7 +3799,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
# layers # layers
if layerContents is None: if layerContents is None:
layerContents = [ layerContents = [
("public.foreground", "glyphs"), ("public.default", "glyphs"),
("layer 1", "glyphs.layer 1"), ("layer 1", "glyphs.layer 1"),
("layer 2", "glyphs.layer 2"), ("layer 2", "glyphs.layer 2"),
] ]
@ -3847,7 +3847,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
path = os.path.join(self.ufoPath, "layercontents.plist") path = os.path.join(self.ufoPath, "layercontents.plist")
os.remove(path) os.remove(path)
layerContents = { layerContents = {
"public.foreground" : "glyphs", "public.default" : "glyphs",
"layer 1" : "glyphs.layer 1", "layer 1" : "glyphs.layer 1",
"layer 2" : "glyphs.layer 2", "layer 2" : "glyphs.layer 2",
} }
@ -3975,7 +3975,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
) )
writer = UFOWriter(self.ufoPath) writer = UFOWriter(self.ufoPath)
path = os.path.join(self.ufoPath, "layercontents.plist") path = os.path.join(self.ufoPath, "layercontents.plist")
expected = [["public.foreground", "glyphs"]] expected = [["public.default", "glyphs"]]
result = readPlist(path) result = readPlist(path)
self.assertEqual(expected, result) self.assertEqual(expected, result)
@ -3988,7 +3988,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
) )
writer = UFOWriter(self.ufoPath) writer = UFOWriter(self.ufoPath)
path = os.path.join(self.ufoPath, "layercontents.plist") path = os.path.join(self.ufoPath, "layercontents.plist")
expected = [["public.foreground", "glyphs"]] expected = [["public.default", "glyphs"]]
result = readPlist(path) result = readPlist(path)
self.assertEqual(expected, result) self.assertEqual(expected, result)
@ -4072,7 +4072,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
self.assertEqual(True, exists) self.assertEqual(True, exists)
# layer contents # layer contents
path = os.path.join(self.ufoPath, "layercontents.plist") path = os.path.join(self.ufoPath, "layercontents.plist")
expected = [["public.foreground", "glyphs"]] expected = [["public.default", "glyphs"]]
result = readPlist(path) result = readPlist(path)
self.assertEqual(expected, result) self.assertEqual(expected, result)
@ -4094,7 +4094,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
self.assertEqual(True, exists) self.assertEqual(True, exists)
# layer contents # layer contents
path = os.path.join(self.ufoPath, "layercontents.plist") path = os.path.join(self.ufoPath, "layercontents.plist")
expected = [["layer 2", "glyphs.layer 2"], ["public.foreground", "glyphs"], ["layer 1", "glyphs.layer 1"]] expected = [["layer 2", "glyphs.layer 2"], ["public.default", "glyphs"], ["layer 1", "glyphs.layer 1"]]
result = readPlist(path) result = readPlist(path)
self.assertEqual(expected, result) self.assertEqual(expected, result)
@ -4119,7 +4119,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
self.assertEqual(True, exists) self.assertEqual(True, exists)
# layer contents # layer contents
path = os.path.join(self.ufoPath, "layercontents.plist") path = os.path.join(self.ufoPath, "layercontents.plist")
expected = [["layer 3", "glyphs.layer 3"], ['public.foreground', 'glyphs'], ['layer 1', 'glyphs.layer 1'], ['layer 2', 'glyphs.layer 2']] expected = [["layer 3", "glyphs.layer 3"], ['public.default', 'glyphs'], ['layer 1', 'glyphs.layer 1'], ['layer 2', 'glyphs.layer 2']]
result = readPlist(path) result = readPlist(path)
self.assertEqual(expected, result) self.assertEqual(expected, result)
@ -4144,7 +4144,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
self.assertEqual(True, exists) self.assertEqual(True, exists)
# layer contents # layer contents
path = os.path.join(self.ufoPath, "layercontents.plist") path = os.path.join(self.ufoPath, "layercontents.plist")
expected = [['public.foreground', 'glyphs'], ['layer 3', 'glyphs.layer 3'], ['layer 2', 'glyphs.layer 2']] expected = [['public.default', 'glyphs'], ['layer 3', 'glyphs.layer 3'], ['layer 2', 'glyphs.layer 2']]
result = readPlist(path) result = readPlist(path)
self.assertEqual(expected, result) self.assertEqual(expected, result)
@ -4180,7 +4180,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
self.assertEqual(True, exists) self.assertEqual(True, exists)
# layer contents # layer contents
path = os.path.join(self.ufoPath, "layercontents.plist") path = os.path.join(self.ufoPath, "layercontents.plist")
expected = [["public.foreground", "glyphs"], ["layer 2", "glyphs.layer 2"]] expected = [["public.default", "glyphs"], ["layer 2", "glyphs.layer 2"]]
result = readPlist(path) result = readPlist(path)
self.assertEqual(expected, result) self.assertEqual(expected, result)
@ -4189,7 +4189,7 @@ class UFO3WriteLayersTestCase(unittest.TestCase):
def testRemoveDefaultLayer(self): def testRemoveDefaultLayer(self):
self.makeUFO() self.makeUFO()
writer = UFOWriter(self.ufoPath) writer = UFOWriter(self.ufoPath)
writer.deleteGlyphSet("public.foreground") writer.deleteGlyphSet("public.default")
# directories # directories
path = os.path.join(self.ufoPath, "glyphs") path = os.path.join(self.ufoPath, "glyphs")
exists = os.path.exists(path) exists = os.path.exists(path)