summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp')
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp
index f4c9d6638d0..aaafd6aa68e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp
@@ -139,3 +139,19 @@ void Length::set (double val, string unitstr) {
throw UnitException(string("invalid length unit: ")+unitstr);
set(val, stringToUnit(unitstr));
}
+
+
+map<string,Length::Unit> Length::getUnits () {
+ map<string,Length::Unit> units = {
+ {"pt", Unit::PT},
+ {"bp", Unit::BP},
+ {"in", Unit::IN},
+ {"cm", Unit::CM},
+ {"mm", Unit::MM},
+ {"pc", Unit::PC},
+ {"dd", Unit::DD},
+ {"cc", Unit::CC},
+ {"sp", Unit::SP},
+ };
+ return units;
+}