From 49d9f400af1e4ef7a3b9833898fcfb3d46853d60 Mon Sep 17 00:00:00 2001 From: Takumi ASAKI Date: Thu, 19 Apr 2012 16:34:44 +0900 Subject: [PATCH] Version 0.5 * Add changing config order. * Add editing System font. * Add backup/restore configuration. * Improvement UI & performance --- applicationcontroller.cpp | 20 ++- applicationcontroller.h | 6 + fontconfigmanager.cpp | 94 +++++++++---- fontconfigmanager.h | 2 + qml/fontmanager/EditFontsConfPage.qml | 2 +- qml/fontmanager/MainPage.qml | 3 + qtc_packaging/debian_harmattan/changelog | 11 +- translations/fontmanager_ja.ts | 30 +--- translations/fontmanager_untranslated.ts | 230 +++++++++++++++++++++---------- 9 files changed, 279 insertions(+), 119 deletions(-) diff --git a/applicationcontroller.cpp b/applicationcontroller.cpp index ec930fc..2a5d132 100644 --- a/applicationcontroller.cpp +++ b/applicationcontroller.cpp @@ -46,6 +46,8 @@ #include +#define VERSION_STRING "0.5" + ApplicationController::ApplicationController(QObject *parent) : QObject(parent), mFontDirExists(false), mShowSystemFont(false), mUpdating(0), @@ -96,7 +98,7 @@ void ApplicationController::init() QString ApplicationController::version() const { - return QLatin1String("0.4.95(0.5RC)"); + return QLatin1String(VERSION_STRING); } QString ApplicationController::currentLanguage() const @@ -242,6 +244,11 @@ QString ApplicationController::path4display(const QString &path) const return str; } +QStringList ApplicationController::installedFonts() const +{ + return mInstalledFonts; +} + void ApplicationController::updateAllEditorController() { if (!mFontConfig->fontsConfModified() || mIgnoreUpdate) { @@ -362,6 +369,11 @@ void ApplicationController::installFont(FontInfo *fontinfo) mFontConfig->appendFontProperty(prop); } + if (!mInstalledFonts.contains(dstfont.absoluteFilePath())) { + mInstalledFonts.append(dstfont.absoluteFilePath()); + emit installedFontsChanged(); + } + emit installFinished(srcfont.fileName()); mWorking = true; @@ -378,6 +390,12 @@ void ApplicationController::updateFontsConf(InstalledFontInfo *fontInfo) void ApplicationController::uninstallFont(const QString &fontpath) { bool check = QFile::remove(fontpath); + + if (mInstalledFonts.contains(fontpath)) { + mInstalledFonts.removeOne(fontpath); + emit installedFontsChanged(); + } + if (check) { emit uninstallFinished(fontpath); diff --git a/applicationcontroller.h b/applicationcontroller.h index 134e662..f81ff5a 100644 --- a/applicationcontroller.h +++ b/applicationcontroller.h @@ -67,6 +67,8 @@ class ApplicationController : public QObject Q_PROPERTY(bool working READ working NOTIFY workingChanged) Q_PROPERTY(QUrl backupDir READ backupDir NOTIFY backupDirChanged) + + Q_PROPERTY(QStringList installedFonts READ installedFonts NOTIFY installedFontsChanged) public: explicit ApplicationController(QObject *parent = 0); @@ -103,6 +105,8 @@ public: Q_INVOKABLE QString url2path(const QUrl &url) const; Q_INVOKABLE QString path4display(const QString &path) const; + QStringList installedFonts() const; + public slots: void updateAllEditorController(); @@ -135,6 +139,7 @@ signals: void fontDirExistsChanged(); void showSystemFontChanged(); + void installedFontsChanged(); void installFinished(const QString &fontpath); void uninstallFinished(const QString &fontpath); @@ -184,6 +189,7 @@ private: QString mFontDirPath; bool mFontDirExists; bool mShowSystemFont; + QStringList mInstalledFonts; int mUpdating; bool mWorking; diff --git a/fontconfigmanager.cpp b/fontconfigmanager.cpp index 11e0d8a..dce59b3 100644 --- a/fontconfigmanager.cpp +++ b/fontconfigmanager.cpp @@ -51,9 +51,15 @@ #include #include #include +#include #include +#include +#undef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS + +#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS #include +#endif #define FCBIN_PATH "/usr/bin/" #define FCCACHE_COMMAND "fc-cache" @@ -61,13 +67,11 @@ #define FCLIST_COMMAND "fc-list" #define FCLIST_OPTION "-v" -//static QStringList configKeys; - FontConfigManager::FontConfigManager(QObject *parent) : QObject(parent), mLang("en"), mLocalFontsConf(0) { connect(this, SIGNAL(localFontsConfPathChanged()), SIGNAL(localFontsConfExistsChanged())); -// connect(this, SIGNAL(localFontsConfPathChanged()), SIGNAL(fontsConfUpdated())); + // connect(this, SIGNAL(localFontsConfPathChanged()), SIGNAL(fontsConfUpdated())); mLocalFontsConf = new FontsConf(this); mSystemLocalConf = new FontsConf(this); @@ -401,7 +405,7 @@ void FontConfigManager::createRecommendedSettings() emit startUpdateFontsConfig(); resetFontsConf(); -#if 0 +#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS QStringList f; foreach (InstalledFontInfo *info, monospaceFonts) f << info->localefamily(); @@ -431,59 +435,52 @@ void FontConfigManager::createRecommendedSettings() if (monospaceFonts.count()) foreach (InstalledFontInfo *info, monospaceFonts) { addPreferFamily(MONOSPACE_DEF, info->enfamily()); - addPreferFamily(MONOSPACE_DEF, info->localefamily()); } else if (monospaceSansSerifFonts.count()) foreach (InstalledFontInfo *info, monospaceSansSerifFonts) { addPreferFamily(MONOSPACE_DEF, info->enfamily()); - addPreferFamily(MONOSPACE_DEF, info->localefamily()); } else if (monospaceSerifFonts.count()) foreach (InstalledFontInfo *info, monospaceSerifFonts) { addPreferFamily(MONOSPACE_DEF, info->enfamily()); - addPreferFamily(MONOSPACE_DEF, info->localefamily()); } if (sansSerifFonts.count()) foreach (InstalledFontInfo *info, sansSerifFonts) { addPreferFamily(SANSSERIF_DEF, info->enfamily()); - addPreferFamily(SANSSERIF_DEF, info->localefamily()); + addPreferFamily(SYSTEM_DEF, info->enfamily()); } else if (monospaceSansSerifFonts.count()) foreach (InstalledFontInfo *info, monospaceSansSerifFonts) { addPreferFamily(SANSSERIF_DEF, info->enfamily()); - addPreferFamily(SANSSERIF_DEF, info->localefamily()); + addPreferFamily(SYSTEM_DEF, info->enfamily()); } else if (unknownFonts.count()) foreach (InstalledFontInfo *info, unknownFonts) { addPreferFamily(SANSSERIF_DEF, info->enfamily()); - addPreferFamily(SANSSERIF_DEF, info->localefamily()); + addPreferFamily(SYSTEM_DEF, info->enfamily()); } else if (monospaceFonts.count()) foreach (InstalledFontInfo *info, monospaceFonts) { addPreferFamily(SANSSERIF_DEF, info->enfamily()); - addPreferFamily(SANSSERIF_DEF, info->localefamily()); + addPreferFamily(SYSTEM_DEF, info->enfamily()); } if (serifFonts.count()) foreach (InstalledFontInfo *info, serifFonts) { addPreferFamily(SERIF_DEF, info->enfamily()); - addPreferFamily(SERIF_DEF, info->localefamily()); } else if (monospaceSerifFonts.count()) foreach (InstalledFontInfo *info, monospaceSerifFonts) { addPreferFamily(SANSSERIF_DEF, info->enfamily()); - addPreferFamily(SANSSERIF_DEF, info->localefamily()); } else if (unknownFonts.count()) foreach (InstalledFontInfo *info, unknownFonts) { addPreferFamily(SERIF_DEF, info->enfamily()); - addPreferFamily(SERIF_DEF, info->localefamily()); } else if (monospaceFonts.count()) foreach (InstalledFontInfo *info, monospaceFonts) { addPreferFamily(SERIF_DEF, info->enfamily()); - addPreferFamily(SERIF_DEF, info->localefamily()); } foreach (const QString &f, FontsConf::genericFamilies()) @@ -552,18 +549,56 @@ bool FontConfigManager::maybeSerifFont(InstalledFontInfo *info) const return false; } +#define DEFAULT_POINTSIZE 24 + bool FontConfigManager::maybeMonospaceFont(InstalledFontInfo *info) const { - QFont font(info->enfamily()); + int fontId = -1; + QFont font = font4info(info, DEFAULT_POINTSIZE); +#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS + qDebug() << "0 - FontConfigManager::maybeMonospaceFont(" << info->enfamily() << info->enstyle() << point << ")" << font.family() << font.exactMatch(); +#endif + if (!font.exactMatch() || font.family() != info->enfamily()) { + fontId = QFontDatabase::addApplicationFont(info->file()); +#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS + qDebug() << "\tfontId:" << fontId << info->file(); +#endif + if (fontId >= 0) { + font = font4info(info, DEFAULT_POINTSIZE); +#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS + qDebug() << "1 - FontConfigManager::maybeMonospaceFont(" << info->enfamily() << info->enstyle() << point << ")" << font.family() << font.exactMatch(); +#endif + if (!font.exactMatch() || font.family() != info->enfamily()) { + font = QFont(info->enfamily()); +#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS + qDebug() << "2 - FontConfigManager::maybeMonospaceFont(" << info->enfamily() << info->enstyle() << point << ")" << font.family() << font.exactMatch(); +#endif + } + } + } + bool isFixed = false; if (font.exactMatch()) { QFontInfo fi(font); - if (fi.fixedPitch()) - return true; - QFontMetrics fm(font); - int w = fm.width(QLatin1Char('A')); - if (fm.width(QLatin1Char('i')) == w && fm.width(QLatin1Char('X')) == w) - return true; +#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS + qDebug() << "\tfixedPitch:" << fi.fixedPitch(); +#endif + if (fi.fixedPitch()) { + isFixed = true; + } else { + QFontMetrics fm(font); + int w = fm.width(QLatin1Char('A')); +#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS + qDebug() << "\twidth:" << w << fm.width(QLatin1Char('i')) << fm.width(QLatin1Char('X')); +#endif + if (fm.width(QLatin1Char('i')) == w && fm.width(QLatin1Char('X')) == w) { + isFixed = true; + } + } } + if (fontId >= 0) + QFontDatabase::removeApplicationFont(fontId); + if (isFixed) + return true; foreach (const QString &f, info->family()) { if (f.contains("courier", Qt::CaseInsensitive) || f.contains("mono", Qt::CaseInsensitive)) @@ -572,6 +607,19 @@ bool FontConfigManager::maybeMonospaceFont(InstalledFontInfo *info) const return false; } +QFont FontConfigManager::font4info(InstalledFontInfo *info, int pointSize) const +{ + QFontDatabase fdb; + int point = pointSize; + if (!fdb.isScalable(info->enfamily(), info->enstyle())) { + QList points = fdb.pointSizes(info->enfamily(), info->enstyle()); + if (points.count() > 0) + point = points.first(); + } + QFont font = fdb.font(info->enfamily(), info->enstyle(), point); + return font; +} + void FontConfigManager::runFcCache() { QProcess *proc = new QProcess(this); @@ -597,7 +645,7 @@ void FontConfigManager::readFcList() QByteArray buf = proc->readAllStandardOutput(); QByteArray errbuf = proc->readAllStandardError(); if (!errbuf.isEmpty()) - qWarning() << errbuf; + qWarning("%s", errbuf.constData()); Q_ASSERT(errbuf.isEmpty()); static QByteArray emptyLine("\n"); diff --git a/fontconfigmanager.h b/fontconfigmanager.h index fd8dec4..98a439e 100644 --- a/fontconfigmanager.h +++ b/fontconfigmanager.h @@ -43,6 +43,7 @@ #include #include #include +#include #include "fontsconfigproperties.h" @@ -120,6 +121,7 @@ private: bool maybeSansSerifFont(InstalledFontInfo *info) const; bool maybeSerifFont(InstalledFontInfo *info) const; bool maybeMonospaceFont(InstalledFontInfo *info) const; + QFont font4info(InstalledFontInfo *info, int pointSize) const; signals: void fcCacheFinished(); diff --git a/qml/fontmanager/EditFontsConfPage.qml b/qml/fontmanager/EditFontsConfPage.qml index b2bd691..ceefbd5 100644 --- a/qml/fontmanager/EditFontsConfPage.qml +++ b/qml/fontmanager/EditFontsConfPage.qml @@ -62,7 +62,7 @@ Page { "  Higher: These fonts have a higher priority. ('prepend' fonts in fontconfig)
" + "  Normal: These fonts are usally used as default. System settings may be given priority than these. ('prefer' fonts in fontconfig)
" + "  Lowser: These fonts have a lower priority. ('accept' fonts in fontconfig)
" + - "Please check fontconfig for more details." + + "" + "
" + "

Import System Settings: Import settings from system(/etc/fonts/local.conf).

" + "
" + diff --git a/qml/fontmanager/MainPage.qml b/qml/fontmanager/MainPage.qml index 02626a4..f678f1c 100644 --- a/qml/fontmanager/MainPage.qml +++ b/qml/fontmanager/MainPage.qml @@ -194,6 +194,9 @@ Page { onClicked: { if (mainMenu.status !== DialogStatus.Closed) mainMenu.close() +// if (controller.installedFonts.length > 0) { +// console.log("Installed Fonts:" + controller.installedFonts) +// } if (controller.localFontsConfExists) openCreateConfirmDialog() else diff --git a/qtc_packaging/debian_harmattan/changelog b/qtc_packaging/debian_harmattan/changelog index 66aa674..6079c65 100644 --- a/qtc_packaging/debian_harmattan/changelog +++ b/qtc_packaging/debian_harmattan/changelog @@ -1,6 +1,13 @@ +fontmanager (0.5) unstable; urgency=low + + * fix bugs + * update helps + + -- Takumi Asaki Thu, 19 Apr 2012 16:15:00 +0900 + fontmanager (0.4.95) unstable; urgency=low - 0.5RC + 0.5 RC(for internal test only) * UI improvments * UI Optimizations @@ -8,7 +15,7 @@ fontmanager (0.4.95) unstable; urgency=low fontmanager (0.4.9) unstable; urgency=low - 0.5 beta + 0.5 beta(for test only) * Add reorder configuration. * Add backup/restore configuration. * Add edit System font configuration. diff --git a/translations/fontmanager_ja.ts b/translations/fontmanager_ja.ts index 70c44cb..2c42bf6 100644 --- a/translations/fontmanager_ja.ts +++ b/translations/fontmanager_ja.ts @@ -4,7 +4,7 @@ ApplicationController - + Could not remove Font '%1' フォント '%1' を削除できません @@ -38,10 +38,6 @@ EditFontsConfPage - <p>Select font family and edit priorities.</p><p><img src="image://theme/icon-m-toolbar-add">: Add fonts to the selected <i>Priority</i> in config file.</p><p><img src="image://theme/icon-m-toolbar-delete">: Remove fonts from the selected <i>Priority</i> in config file. <i>Note: The fonts are NOT uninstalled</i>.</p><hr/><p><b>Priorities</b>:<p>&nbsp;&nbsp;<b>Higher</b>: These fonts have a higher priority. ('prepend' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Normal</b>: These fonts are usally used as default. ('prefer' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/><hr/><p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p><hr/><p><b>Remove current font config</b>(Menu): Remove current user's font config file.</p><p><b>View current font config</b>(Menu): View current user's font config file.</p><hr/>Please check <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> for more details. - <p>フォントファミリーを選択し、プロパティを編集します。</p><p><img src="image://theme/icon-m-toolbar-add">: フォントを設定ファイルの選択した <i>優先順位</i> に追加します。</p><p><img src="image://theme/icon-m-toolbar-delete">: フォントを設定ファイルの選択した <i>優先順位</i> から削除します。<i>注: フォントはアンインストールされません。</i></p><hr/><p><b>優先順位</b>:<p>&nbsp;&nbsp;<b>高</b>: これらのフォントは優先して使用されます。(fontconfig で 'prepend' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>標準</b>: これらのフォントがデフォルトで使用されます。(fontconfig で 'prefer' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>低</b>: これらのフォントは代替フォントして使用されます。(fontconfig で 'accept' されるフォントとして扱います)<br/><hr/><p><b>システム設定のインポート</b>: システム(/etc/fonts/local.conf)の設定をインポートします。</p><hr/><p><b>現在のフォント設定を削除</b>(メニュー): 現在のユーザーのフォント設定ファイルを削除します。</p><p><b>現在のフォント設定を表示</b>(メニュー): 現在のユーザーのフォント設定ファイルを表示します。</p><hr/>詳細は <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> も参照してください。 - - Sans Serif @@ -67,13 +63,9 @@ 現在のフォント設定を削除 - <p>Select font family and edit priorities.</p><p><img src="image://theme/icon-m-toolbar-add">: Add fonts to the target <i>Priority</i> in config file.</p><hr/><p><img src="image://theme/icon-m-toolbar-up">: Move up selected font</p><p><img src="image://theme/icon-m-toolbar-delete">: Remove selected font from the its <i>Priority</i> in config file. <i>Note: The fonts are NOT uninstalled</i>.</p><p><img src="image://theme/icon-m-toolbar-down">: Move down selected font</p><hr/><p><b>Priorities</b>:<p>&nbsp;&nbsp;<b>Higher</b>: These fonts have a higher priority. ('prepend' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Normal</b>: These fonts are usally used as default. System settings may be given priority than these. ('prefer' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/>Please check <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> for more details.<hr/><p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p><hr/><h2>Menu(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>Remove current font config</b>(Menu): Remove current user's font config file.</p><p><b>View current font config</b>(Menu): View current user's font config file.</p> - <p>フォントファミリーを選択し、プロパティを編集します。</p><p><img src="image://theme/icon-m-toolbar-add">: フォントを設定ファイルの対象となる <i>優先順位</i> に追加します。</p><hr/><p><img src="image://theme/icon-m-toolbar-up">: 選択したフォントの順番を上げます。</p><p><img src="image://theme/icon-m-toolbar-delete">: 選択したフォントを設定ファイルの対象となる <i>優先順位</i> から削除します。<i>注: フォントはアンインストールされません。</i></p><p><img src="image://theme/icon-m-toolbar-down">: 選択したフォントの順番を下げます。</p><hr/><p><b>優先順位</b>:<p>&nbsp;&nbsp;<b>高</b>: これらのフォントは優先して使用されます。(fontconfig で 'prepend' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>標準</b>: これらのフォントがデフォルトで使用されます。(fontconfig で 'prefer' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>低</b>: これらのフォントは代替フォントして使用されます。(fontconfig で 'accept' されるフォントとして扱います)<br/><hr/><p><b>システム設定のインポート</b>: システム(/etc/fonts/local.conf)の設定をインポートします。</p><hr/><p><b>現在のフォント設定を削除</b>(メニュー): 現在のユーザーのフォント設定ファイルを削除します。</p><p><b>現在のフォント設定を表示</b>(メニュー): 現在のユーザーのフォント設定ファイルを表示します。</p><hr/>詳細は <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> も参照してください。 - - - <p>Select font family and edit priorities.</p><p><img src="image://theme/icon-m-toolbar-add">: Add fonts to the target <i>Priority</i> in config file.</p><hr/><p><img src="image://theme/icon-m-toolbar-up">: Move up selected font.</p><p><img src="image://theme/icon-m-toolbar-delete">: Remove selected font from the its <i>Priority</i> in config file. <i>Note: The fonts are NOT uninstalled</i>.</p><p><img src="image://theme/icon-m-toolbar-down">: Move down selected font.</p><hr/><h2>Priorities</h2><p>&nbsp;&nbsp;<b>Higher</b>: These fonts have a higher priority. ('prepend' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Normal</b>: These fonts are usally used as default. System settings may be given priority than these. ('prefer' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/>Please check <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> for more details.<hr/><p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p><hr/><h2>Menu(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>Remove current font config</b>(Menu): Remove current user's font config file.</p><p><b>View current font config</b>(Menu): View current user's font config file.</p> - <p>フォントファミリーを選択し、プロパティを編集します。</p><p><img src="image://theme/icon-m-toolbar-add">: フォントを設定ファイルの対象となる <i>優先順位</i> に追加します。</p><hr/><p><img src="image://theme/icon-m-toolbar-up">: 選択したフォントの順番を上げます。</p><p><img src="image://theme/icon-m-toolbar-delete">: 選択したフォントを設定ファイルの対象となる <i>優先順位</i> から削除します。<i>注: フォントはアンインストールされません。</i></p><p><img src="image://theme/icon-m-toolbar-down">: 選択したフォントの順番を下げます。</p><hr/><h2>優先順位</h2><p>&nbsp;&nbsp;<b>高</b>: これらのフォントは優先して使用されます。(fontconfig で 'prepend' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>標準</b>: これらのフォントがデフォルトで使用されます。システム設定のフォントが優先して使用されることがあります。(fontconfig で 'prefer' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>低</b>: これらのフォントは代替フォントして使用されます。(fontconfig で 'accept' されるフォントとして扱います)<br/>詳細は <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> も参照してください。<hr/><p><b>システム設定のインポート</b>: システム(/etc/fonts/local.conf)の設定をインポートします。</p><hr/><h2>メニュー(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>現在のフォント設定を削除</b>: 現在のユーザーのフォント設定ファイルを削除します。</p><p><b>現在のフォント設定を表示</b>: 現在のユーザーのフォント設定ファイルを表示します。</p> + <p>Select font family and edit priorities.</p><p><img src="image://theme/icon-m-toolbar-add">: Add fonts to the target <i>Priority</i> in config file.</p><hr/><p><img src="image://theme/icon-m-toolbar-up">: Move up selected font.</p><p><img src="image://theme/icon-m-toolbar-delete">: Remove selected font from the its <i>Priority</i> in config file. <i>Note: The fonts are NOT uninstalled</i>.</p><p><img src="image://theme/icon-m-toolbar-down">: Move down selected font.</p><hr/><h2>Priorities</h2><p>&nbsp;&nbsp;<b>Higher</b>: These fonts have a higher priority. ('prepend' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Normal</b>: These fonts are usally used as default. System settings may be given priority than these. ('prefer' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/><ul><li>Please check <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> for more details.</li></ul><hr/><p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p><hr/><h2>Menu(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>Remove current font config</b>(Menu): Remove current user's font config file.</p><p><b>View current font config</b>(Menu): View current user's font config file.</p> + <p>フォントファミリーを選択し、プロパティを編集します。</p><p><img src="image://theme/icon-m-toolbar-add">: フォントを設定ファイルの対象となる <i>優先順位</i> に追加します。</p><hr/><p><img src="image://theme/icon-m-toolbar-up">: 選択したフォントの順番を上げます。</p><p><img src="image://theme/icon-m-toolbar-delete">: 選択したフォントを設定ファイルの対象となる <i>優先順位</i> から削除します。<i>注: フォントはアンインストールされません。</i></p><p><img src="image://theme/icon-m-toolbar-down">: 選択したフォントの順番を下げます。</p><hr/><h2>優先順位</h2><p>&nbsp;&nbsp;<b>高</b>: これらのフォントは優先して使用されます。(fontconfig で 'prepend' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>標準</b>: これらのフォントがデフォルトで使用されます。システム設定のフォントが優先して使用されることがあります。(fontconfig で 'prefer' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>低</b>: これらのフォントは代替フォントして使用されます。(fontconfig で 'accept' されるフォントとして扱います)<br/><ul><li>詳細は <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> も参照してください。</li></ul><hr/><p><b>システム設定のインポート</b>: システム(/etc/fonts/local.conf)の設定をインポートします。</p><hr/><h2>メニュー(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>現在のフォント設定を削除</b>: 現在のユーザーのフォント設定ファイルを削除します。</p><p><b>現在のフォント設定を表示</b>: 現在のユーザーのフォント設定ファイルを表示します。</p> @@ -242,7 +234,7 @@ Use as Prefer Font for System - + システムフォントで使用 @@ -397,7 +389,7 @@ インストール済みフォント - + Close 閉じる @@ -412,30 +404,22 @@ Font managerについて - <h1>How to use</h1><p><img src="image://theme/icon-m-toolbar-add">: Install font. Please copy font file(s) to this device in advance. Currently *.ttf and *.ttc are supported.</p><p><img src="image://theme/icon-m-toolbar-settings">: Configure fonts(expert). You can assign/unassign any fonts to Serif/Sans Serif/Monospace.</p><hr/><p><b>Create Recommended Settings</b>(Menu): Create recommended settings. <i>Normal</i> priority is given to user installed font(s). System fonts have <i>Higher</i> priority. System CJK fonts conflicts your installed fonts have <i>Lower</i> priority.</p> - <h1>使い方</h1><p><img src="image://theme/icon-m-toolbar-add">: フォントのインストール。事前にデバイスにフォントファイルをコピーしておいてください。現状では *.ttf と *.ttc のみサポートしています。</p><p><img src="image://theme/icon-m-toolbar-settings">: フォント設定(詳細設定). Serif/Sans Serif/等幅フォントへ任意のフォントを割り当てられます。</p><hr/><p><b>推奨設定の作成</b>(メニュー): 推奨設定を生成します。ユーザーがインストールしたフォントは<i>標準</i>の優先順位に割り当てます。システムのフォントは<i>高い</i>優先順位に割り当てられますが、ユーザーがインストールしたCJKフォントと競合するフォントの優先順位は<i>低く</i>なります。</p> - - Help ヘルプ - + Create Recommended Settings 推奨設定の作成 - <h1>How to use</h1><hr/><h2>Toolbar</h2><p><img src="image://theme/icon-m-toolbar-add">: Install font. Please copy font file(s) to this device in advance. Currently *.ttf and *.ttc are supported.</p><p><img src="image://theme/icon-m-toolbar-settings">: Configure fonts(expert). You can assign/unassign any fonts to Serif/Sans Serif/Monospace.</p><hr/><h2>Menu(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>Create Recommended Settings</b>: Create recommended settings. <i>Normal</i> priority is given to user installed font(s). System fonts have <i>Higher</i> priority. System CJK fonts conflicts your installed fonts have <i>Lower</i> priority.</p><p><b>Backup Config</b>: Save current fonts config into ~/MyDocs/Documents</p><p><b>Restore Config</b>: Restore fonts config from backuped file</p> - <h1>使い方</h1><hr/><h2>ツールバー</h2><p><img src="image://theme/icon-m-toolbar-add">: フォントのインストール。事前にデバイスにフォントファイルをコピーしておいてください。現状では *.ttf と *.ttc のみサポートしています。</p><p><img src="image://theme/icon-m-toolbar-settings">: フォント設定(詳細設定). Serif/Sans Serif/等幅フォントへ任意のフォントを割り当てられます。</p><hr/><p><b>推奨設定の作成</b>(メニュー): 推奨設定を生成します。ユーザーがインストールしたフォントは<i>標準</i>の優先順位に割り当てます。システムのフォントは<i>高い</i>優先順位に割り当てられますが、ユーザーがインストールしたCJKフォントと競合するフォントの優先順位は<i>低く</i>なります。</p> - - <h1>How to use</h1><hr/><h2>Toolbar</h2><p><img src="image://theme/icon-m-toolbar-add">: Install font. Please copy font file(s) to this device in advance. Currently *.ttf and *.ttc are supported.</p><p><img src="image://theme/icon-m-toolbar-settings">: Configure fonts(expert). You can assign/unassign any fonts to Serif/Sans Serif/Monospace/System.</p><hr/><h2>Menu(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>Create Recommended Settings</b>: Create recommended settings. <i>Normal</i> priority is given to user installed font(s). System fonts have <i>Higher</i> priority. System CJK fonts conflicts your installed fonts have <i>Lower</i> priority.</p><p><b>Backup Config</b>: Save current fonts config into ~/MyDocs/Documents</p><p><b>Restore Config</b>: Restore fonts config from backuped file</p> <h1>使い方</h1><hr/><h2>ツールバー</h2><p><img src="image://theme/icon-m-toolbar-add">: フォントのインストール。事前にデバイスにフォントファイルをコピーしておいてください。現状では *.ttf と *.ttc のみサポートしています。</p><p><img src="image://theme/icon-m-toolbar-settings">: フォント設定(詳細設定). Serif/Sans Serif/等幅/システムフォントへ任意のフォントを割り当てられます。</p><hr/><h2>メニュー(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>推奨設定の作成</b>: 推奨設定を生成します。ユーザーがインストールしたフォントは<i>標準</i>の優先順位に割り当てます。システムのフォントは<i>高い</i>優先順位に割り当てられますが、ユーザーがインストールしたCJKフォントと競合するフォントの優先順位は<i>低く</i>なります。</p><p><b>設定のバックアップ</b>: 現在のフォント設定を ~/MyDocs/Documents に保存します。</p><p><b>設定の復旧</b>: バックアップしたファイルからフォント設定を復旧します。</p> - + Backup Config 設定のバックアップ diff --git a/translations/fontmanager_untranslated.ts b/translations/fontmanager_untranslated.ts index 62f1ddb..1708072 100644 --- a/translations/fontmanager_untranslated.ts +++ b/translations/fontmanager_untranslated.ts @@ -4,12 +4,20 @@ ApplicationController - + Could not remove Font '%1' + BottomButtons + + + Import System Settings + + + + ConfigValueComboBox @@ -30,52 +38,52 @@ EditFontsConfPage - - <p>Select font family and edit priorities.</p><p><img src="image://theme/icon-m-toolbar-add">: Add fonts to the selected <i>Priority</i> in config file.</p><p><img src="image://theme/icon-m-toolbar-delete">: Remove fonts from the selected <i>Priority</i> in config file. <i>Note: The fonts are NOT uninstalled</i>.</p><hr/><p><b>Priorities</b>:<p>&nbsp;&nbsp;<b>Higher</b>: These fonts have a higher priority. ('prepend' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Normal</b>: These fonts are usally used as default. ('prefer' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/><hr/><p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p><hr/><p><b>Remove current font config</b>(Menu): Remove current user's font config file.</p><p><b>View current font config</b>(Menu): View current user's font config file.</p><hr/>Please check <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> for more details. - - - - + Sans Serif - + Serif - + Monospace - - Add + + Help - - Add Family for %1 + + Remove current fonts config - - Help + + <p>Select font family and edit priorities.</p><p><img src="image://theme/icon-m-toolbar-add">: Add fonts to the target <i>Priority</i> in config file.</p><hr/><p><img src="image://theme/icon-m-toolbar-up">: Move up selected font.</p><p><img src="image://theme/icon-m-toolbar-delete">: Remove selected font from the its <i>Priority</i> in config file. <i>Note: The fonts are NOT uninstalled</i>.</p><p><img src="image://theme/icon-m-toolbar-down">: Move down selected font.</p><hr/><h2>Priorities</h2><p>&nbsp;&nbsp;<b>Higher</b>: These fonts have a higher priority. ('prepend' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Normal</b>: These fonts are usally used as default. System settings may be given priority than these. ('prefer' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/><ul><li>Please check <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> for more details.</li></ul><hr/><p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p><hr/><h2>Menu(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>Remove current font config</b>(Menu): Remove current user's font config file.</p><p><b>View current font config</b>(Menu): View current user's font config file.</p> - - Remove current fonts config + + System + Edit Fonts Config: %1 + + + + View current fonts config - + Remove it? @@ -94,16 +102,21 @@ Cancel + + + Select Family to edit + + FontInstallPage - + Install Font - + <b>Font Family</b>: %1 @@ -118,12 +131,12 @@ - + Install - + Create it? @@ -134,13 +147,13 @@ - + OK - - + + Cancel @@ -156,9 +169,9 @@ - FontSelectPage + FontSelectionPage - + Select Font to install @@ -166,37 +179,27 @@ FontsConfEditor - - Edit Fonts Config: %1 - - - - + Priority: %1 - + System Font - - + + User Font - - - Import System Settings - - FontsConfEditorController - + Higher @@ -214,7 +217,7 @@ FontsConfProperties - + Use as Prefer Font for Sans-Serif @@ -228,11 +231,16 @@ Use as Prefer Font for Monospace + + + Use as Prefer Font for System + + FontsConfViewPage - + Current Fonts Config @@ -245,20 +253,20 @@ HelpDialog - + Help - - OK + + Close InstalledFontInfoPage - + Installed Font Info @@ -338,7 +346,7 @@ - + Delete Font? @@ -353,7 +361,12 @@ - + + Unknown + + + + Do you really want to remove this font now? @@ -371,37 +384,52 @@ MainPage - + Installed Fonts - - No Fonts Installed + + Close - - About + + No Fonts Installed - - <h1>How to use</h1><p><img src="image://theme/icon-m-toolbar-add">: Install font. Please copy font file(s) to this device in advance. Currently *.ttf and *.ttc are supported.</p><p><img src="image://theme/icon-m-toolbar-settings">: Configure fonts(expert). You can assign/unassign any fonts to Serif/Sans Serif/Monospace.</p><hr/><p><b>Create Recommended Settings</b>(Menu): Create recommended settings. <i>Normal</i> priority is given to user installed font(s). System fonts have <i>Higher</i> priority. System CJK fonts conflicts your installed fonts have <i>Lower</i> priority.</p> + + About - + Help - + Create Recommended Settings - + + <h1>How to use</h1><hr/><h2>Toolbar</h2><p><img src="image://theme/icon-m-toolbar-add">: Install font. Please copy font file(s) to this device in advance. Currently *.ttf and *.ttc are supported.</p><p><img src="image://theme/icon-m-toolbar-settings">: Configure fonts(expert). You can assign/unassign any fonts to Serif/Sans Serif/Monospace/System.</p><hr/><h2>Menu(<img src="image://theme/icon-m-toolbar-view-menu">)</h2><p><b>Create Recommended Settings</b>: Create recommended settings. <i>Normal</i> priority is given to user installed font(s). System fonts have <i>Higher</i> priority. System CJK fonts conflicts your installed fonts have <i>Lower</i> priority.</p><p><b>Backup Config</b>: Save current fonts config into ~/MyDocs/Documents</p><p><b>Restore Config</b>: Restore fonts config from backuped file</p> + + + + + Backup Config + + + + + Restore Config + + + + Replace it? @@ -412,17 +440,16 @@ - OK - + Cancel - + Font Manager for N9 @@ -436,21 +463,66 @@ Application Icon is created by hirao - main + RestoreFontsConfPage - - - + + Restore Fonts Config + + + + + Restore it? + + + + + Existing Fonts Config will be replaced by '%1'. Are you sure? + + + + OK - + + Cancel + + + + + SelectInstallFamilyDialog + + + Add + + + + + Add Family for %1 + + + + + Unknwon + + + + + main + + Alert + + Close + + + + Install finished @@ -460,7 +532,7 @@ Application Icon is created by hirao - + Uninstall finished @@ -469,5 +541,25 @@ Application Icon is created by hirao Font '%1' is uninstalled successfully. + + + Backup finished + + + + + Fonts Config is backuped as '%1' successfully. + + + + + Restore finished + + + + + Fonts Config is restored from '%1' successfully. + + -- 2.11.0