/****************************************************************************
**
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
** All rights reserved.
** Contact: Takumi Asaki (takumi.asaki@gmail.com)
**
mFontProperty->setParent(this);
}
+bool InstalledFontInfo::compare(const InstalledFontInfo *info1, InstalledFontInfo *info2)
+{
+ QString key1 = info1->localefamily() + ":" + info1->localefullname();
+ QString key2 = info2->localefamily() + ":" + info2->localefullname();
+ return (key1 < key2);
+}
+
bool InstalledFontInfo::analyze(const QByteArray &buf, const QString &localFontPath)
{
static QRegExp headerRegexp("^Pattern has \\d+ elts \\(size \\d+\\)$");
int InstalledFontInfo::toInt(const QString &value)
{
- static QRegExp reg("\\d+\\(i\\)\\(s\\)");
+ static QRegExp reg("(\\d+)\\(i\\)\\(s\\)");
int val = 0;
if (reg.indexIn(value) == 0)
val = reg.cap(1).toInt();