///////////////////////////////////////////////////////
| 220 | |
| 221 | //////////////////////////////////////////////////////////// |
| 222 | bool Font::openFromStream(InputStream& stream) |
| 223 | { |
| 224 | // Make sure that the stream's reading position is at the beginning |
| 225 | if (!stream.seek(0).has_value()) |
| 226 | { |
| 227 | err() << "Failed to seek font stream" << std::endl; |
| 228 | return false; |
| 229 | } |
| 230 | |
| 231 | // Open the font, do not save the stream in m_stream, its owned by the caller |
| 232 | return openFromStreamImpl(stream, "stream"); |
| 233 | } |
| 234 | |
| 235 | |
| 236 | //////////////////////////////////////////////////////////// |