| 22 | } |
| 23 | |
| 24 | fontEncoding *fontEncodingPool::findByName(const QString &name) |
| 25 | { |
| 26 | fontEncoding *ptr = dictionary.value(name); |
| 27 | |
| 28 | if (ptr == nullptr) { |
| 29 | ptr = new fontEncoding(name); |
| 30 | if (ptr->isValid()) { |
| 31 | dictionary.insert(name, ptr); |
| 32 | } else { |
| 33 | delete ptr; |
| 34 | ptr = nullptr; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | return ptr; |
| 39 | } |
| 40 | |
| 41 | #endif // HAVE_FREETYPE |
no test coverage detected