Replace DCP parser with basic version that uses libdcp.
[libsub.git] / src / font_size.cc
index d11ee89e4f979acefcd2f325db06963dbd7e556b..a208867db00473309a9c5e870f17aa85dd65d8a1 100644 (file)
@@ -40,3 +40,25 @@ FontSize::points (int screen_height_in_points) const
 
        return _proportional.get() * screen_height_in_points;
 }
+
+FontSize
+FontSize::from_points (int p)
+{
+       FontSize s;
+       s.set_points (p);
+       return s;
+}
+
+FontSize
+FontSize::from_proportional (float p)
+{
+       FontSize s;
+       s.set_proportional (p);
+       return s;
+}
+
+bool
+FontSize::specified () const
+{
+       return _proportional || _points;
+}