Skip to content

Commit 35779b5

Browse files
committed
Add support to some ranges. #114
This adds quick camelcasing names for issue #114 * U+2900-U+297F Supplemental Arrows-B * U+2980-U+29FF Miscellaneous Mathematical Symbols-B * U+2A00-U+2AFF Supplemental Mathematical Operators * U+2B00-U+2BFF Miscellaneous Symbols and Arrows This also removes 2 gremlin characters from the "Supplementary" word in the unicodePlaneNames. I can't see if they caused any harm, but they should not be there. This also adds "Combining Diacritical Marks for Symbols", as the module was there but not committed. Basic camelcase names seem best. But noted that the "Combining Diacritical Marks Supplement" does everything lowercase and consistency is hard.
1 parent fcc4eb0 commit 35779b5

7 files changed

+84
-5
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Combining Diacritical Marks for Symbols
2+
#combining_diacritical_marks_for_symbols
3+
4+
# camelcase looks good for the longer names
5+
# but the range Combining Diacritical Marks Supplement
6+
# does everything lowercase.
7+
8+
def process(self):
9+
self.setExperimental()
10+
11+
self.edit("COMBINING")
12+
self.edit("OPEN")
13+
self.edit("ACCENT")
14+
self.edit("FLATTENED", "flat")
15+
16+
self.processAs("Helper Diacritics")
17+
self.handleCase()
18+
19+
self.camelCase()
20+
self.compress()
21+
self.scriptPrefix()
22+
23+
24+
if __name__ == "__main__":
25+
from glyphNameFormatter.exporters import printRange
26+
printRange("Combining Diacritical Marks for Symbols")

Lib/glyphNameFormatter/rangeProcessors/combining_diacritical_marks_supplement.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def process(self):
1212
self.edit("GRAVE-ACUTE-GRAVE", "graveacutegrave")
1313
self.edit("ACUTE-GRAVE-ACUTE", "acutegraveacute")
1414

15-
#self.editToFinal("COMBINING", "cmb")
1615
self.edit("COMBINING")
1716
self.edit("OPEN")
1817
self.edit("ACCENT")
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
def process(self):
3+
self.setExperimental()
4+
self.edit("-", " ")
5+
self.camelCase()
6+
7+
8+
if __name__ == "__main__":
9+
from glyphNameFormatter.exporters import printRange
10+
printRange("Miscellaneous Mathematical Symbols-B")
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
def process(self):
3+
self.setExperimental()
4+
self.edit("-", " ")
5+
self.camelCase()
6+
7+
8+
if __name__ == "__main__":
9+
from glyphNameFormatter.exporters import printRange
10+
printRange("Miscellaneous Symbols and Arrows")
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
3+
# The names in this range are quite long, but not really
4+
# any redundancy in the words. It is all relevant and
5+
# even contractions from rightward to right already cause
6+
# duplicates. So, camelCase seems like a reasonable approach.
7+
# Names are still very long though. What is the preference?
8+
# arrowPointingRightwardsThenCurvingDownwards - 2967 ⥧ LEFTWARDS HARPOON WITH BARB DOWN ABOVE RIGHTWARDS HARPOON WITH BARB DOWN
9+
10+
11+
def process(self):
12+
self.setExperimental()
13+
self.edit("-", " ")
14+
self.camelCase()
15+
16+
17+
if __name__ == "__main__":
18+
from glyphNameFormatter.exporters import printRange
19+
printRange("Supplemental Arrows-B")
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
def process(self):
3+
self.setExperimental()
4+
self.edit("-", " ")
5+
self.camelCase()
6+
7+
8+
if __name__ == "__main__":
9+
from glyphNameFormatter.exporters import printRange
10+
printRange("Supplemental Mathematical Operators")

Lib/glyphNameFormatter/unicodeRangeNames.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
(0x10000, 0x1FFFF): (u"Supplementary Multilingual Plane", ),
1212
(0x20000, 0x2FFFF): (u"Supplementary Ideographic Plane"),
1313
(0x30000, 0xDFFFF): (u"Plane 3 - 13, unassigned", ),
14-
(0xE0000, 0xEFFFF): (u"Supplement­ary Special-purpose Plane", ),
15-
(0xF0000, 0x10FFFF): (u"Supplement­ary Private Use Area", ),
14+
(0xE0000, 0xEFFFF): (u"Supplementary Special-purpose Plane", ),
15+
(0xF0000, 0x10FFFF): (u"Supplementary Private Use Area", ),
1616
}
1717

1818

@@ -22,7 +22,6 @@ def getRangeName(value):
2222
return unicodeRangeNames[(a, b)]
2323
return None
2424

25-
2625
def getRangeAndName(value):
2726
for a, b in unicodeRangeNames.keys():
2827
if a <= value <= b:
@@ -107,4 +106,10 @@ def getSupportedRangeNames():
107106
if __name__ == "__main__":
108107
names = getSupportedRangeNames()
109108
names.sort()
110-
print("\n".join(names))
109+
print("\n".join(names))
110+
111+
#print(rangeNameToModuleName("Supplemental Arrows-B"))
112+
#print(rangeNameToModuleName("Miscellaneous Mathematical Symbols-B"))
113+
#print(rangeNameToModuleName("Supplemental Mathematical Operators"))
114+
#print(rangeNameToModuleName("Miscellaneous Symbols and Arrows"))
115+

0 commit comments

Comments
 (0)