bool AbstractFont::openFile(const std::string& filename, const Float size) { close(); const Metrics metrics = doOpenFile(filename, size); _size = metrics.size; _ascent = metrics.ascent; _descent = metrics.descent; _lineHeight = metrics.lineHeight; CORRADE_INTERNAL_ASSERT(isOpened() || (!_size && !_ascent && !_descent && !_lineHeight)); return isOpened(); }
bool AbstractFont::openFile(const std::string& filename, const Float size) { close(); std::tie(_size, _lineHeight) = doOpenFile(filename, size); CORRADE_INTERNAL_ASSERT(isOpened() || (_size == 0.0f && _lineHeight == 0.0f)); return isOpened(); }