diff options
Diffstat (limited to 'src/lib/font.cc')
| -rw-r--r-- | src/lib/font.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/font.cc b/src/lib/font.cc index f750bfc88..375427d93 100644 --- a/src/lib/font.cc +++ b/src/lib/font.cc @@ -28,6 +28,7 @@ LIBDCP_ENABLE_WARNINGS using std::string; +using boost::optional; using namespace dcpomatic; @@ -69,3 +70,19 @@ dcpomatic::operator!= (Font const & a, Font const & b) { return !(a == b); } + + +optional<dcp::ArrayData> +Font::data () const +{ + if (_data) { + return _data; + } + + if (_file) { + return dcp::ArrayData(*_file); + } + + return {}; +} + |
