mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 02:21:26 +00:00
38 lines
602 B
C++
38 lines
602 B
C++
// fontEncodingPool.cpp
|
|
//
|
|
// Part of KDVI - A DVI previewer for the KDE desktop environemt
|
|
//
|
|
// (C) 2003 Stefan Kebekus
|
|
// Distributed under the GPL
|
|
|
|
#include <../config.h>
|
|
#ifdef HAVE_FREETYPE
|
|
|
|
|
|
#include "fontEncodingPool.h"
|
|
|
|
fontEncodingPool::fontEncodingPool()
|
|
{
|
|
}
|
|
|
|
|
|
fontEncoding *fontEncodingPool::findByName(const QString &name)
|
|
{
|
|
fontEncoding *ptr = dictionary.find( name );
|
|
|
|
if (ptr == 0) {
|
|
ptr = new fontEncoding(name);
|
|
if (ptr->isValid())
|
|
dictionary.insert(name, ptr );
|
|
else {
|
|
delete ptr;
|
|
ptr = 0;
|
|
}
|
|
}
|
|
|
|
return ptr;
|
|
}
|
|
|
|
|
|
#endif // HAVE_FREETYPE
|