File indexing completed on 2024-12-22 05:15:55
0001 #pragma once 0002 0003 /* 0004 * SPDX-FileCopyrightText: 2003-2007 Craig Drummond <craig@kde.org> 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #include <KLazyLocalizedString> 0009 #include <KLocalizedString> 0010 #include <QLatin1String> 0011 #include <kio/udsentry.h> 0012 0013 #define KFI_NAME "kfontinst" 0014 #define KFI_CATALOGUE KFI_NAME 0015 0016 #define KFI_INSTALLER QLatin1String("kfontinst") 0017 #define KFI_VIEWER QLatin1String("kfontview") 0018 #define KFI_PRINTER QLatin1String("kfontprint"), "libexec" 0019 0020 #define KFI_PRINT_GROUP "Print" 0021 #define KFI_KIO_FONTS_PROTOCOL "fonts" 0022 constexpr const auto KFI_KIO_FONTS_USER = kli18n("Personal"); 0023 constexpr const auto KFI_KIO_FONTS_SYS = kli18n("System"); 0024 constexpr const auto KFI_KIO_FONTS_ALL = kli18n("All"); 0025 #define KFI_KIO_NO_CLEAR "noclear" 0026 #define KFI_KIO_TIMEOUT "timeout" 0027 #define KFI_KIO_FACE "face" 0028 0029 #define KFI_IFACE "org.kde.fontinst" 0030 0031 #define KFI_FILE_QUERY "file" 0032 #define KFI_NAME_QUERY "name" 0033 #define KFI_STYLE_QUERY "style" 0034 #define KFI_MIME_QUERY "mime" 0035 0036 #define KFI_SYS_USER "root" 0037 0038 constexpr const auto KFI_AUTHINF_USER = kli18n("Administrator"); 0039 #define KFI_UI_CFG_FILE KFI_NAME "uirc" 0040 #define KFI_ROOT_CFG_DIR "/etc/fonts/" 0041 #define KFI_DEFAULT_SYS_FONTS_FOLDER "/usr/local/share/fonts/" 0042 0043 #define KFI_NO_STYLE_INFO 0xFFFFFFFF 0044 #define KFI_NAME_KEY "Name=" 0045 #define KFI_STYLE_KEY "Style=" 0046 #define KFI_PATH_KEY "Path=" 0047 #define KFI_FACE_KEY "Face=" 0048 0049 #define KFI_FONTS_PACKAGE ".fonts.zip" 0050 #define KFI_FONTS_PACKAGE_LEN 10 0051 #define KFI_GROUPS_FILE "fontgroups.xml" 0052 #define KFI_TMP_DIR_PREFIX "kfi" 0053 0054 #define KFI_NULL_SETTING 0xFF 0055 0056 namespace KFI 0057 { 0058 // KIO::special 0059 enum ESpecial { 0060 SPECIAL_RESCAN = 0, 0061 SPECIAL_CONFIGURE, 0062 }; 0063 0064 // UDS_EXTRA entries... 0065 enum EUdsExtraEntries { 0066 UDS_EXTRA_FC_STYLE = (((KIO::UDSEntry::UDS_EXTRA | KIO::UDSEntry::UDS_STRING) ^ KIO::UDSEntry::UDS_STRING) | KIO::UDSEntry::UDS_NUMBER) + 1, 0067 UDS_EXTRA_FILE_NAME = KIO::UDSEntry::UDS_EXTRA + 2, 0068 UDS_EXTRA_FILE_FACE = KIO::UDSEntry::UDS_EXTRA + 3, 0069 }; 0070 0071 } 0072 0073 // Font name... 0074 constexpr const auto KFI_WEIGHT_THIN = kli18n("Thin"); 0075 constexpr const auto KFI_WEIGHT_EXTRALIGHT = kli18n("Extra Light"); 0076 constexpr const auto KFI_WEIGHT_ULTRALIGHT = kli18n("Ultra Light"); 0077 constexpr const auto KFI_WEIGHT_LIGHT = kli18n("Light"); 0078 constexpr const auto KFI_WEIGHT_REGULAR = kli18n("Regular"); 0079 constexpr const auto KFI_WEIGHT_NORMAL = kli18n("Normal"); 0080 constexpr const auto KFI_WEIGHT_MEDIUM = kli18n("Medium"); 0081 constexpr const auto KFI_WEIGHT_DEMIBOLD = kli18n("Demi Bold"); 0082 constexpr const auto KFI_WEIGHT_SEMIBOLD = kli18n("Semi Bold"); 0083 constexpr const auto KFI_WEIGHT_BOLD = kli18n("Bold"); 0084 constexpr const auto KFI_WEIGHT_EXTRABOLD = kli18n("Extra Bold"); 0085 constexpr const auto KFI_WEIGHT_ULTRABOLD = kli18n("Ultra Bold"); 0086 constexpr const auto KFI_WEIGHT_BLACK = kli18n("Black"); 0087 constexpr const auto KFI_WEIGHT_HEAVY = kli18n("Heavy"); 0088 0089 constexpr const auto KFI_SLANT_ROMAN = kli18n("Roman"); 0090 constexpr const auto KFI_SLANT_ITALIC = kli18n("Italic"); 0091 constexpr const auto KFI_SLANT_OBLIQUE = kli18n("Oblique"); 0092 0093 constexpr const auto KFI_WIDTH_ULTRACONDENSED = kli18n("Ultra Condensed"); 0094 constexpr const auto KFI_WIDTH_EXTRACONDENSED = kli18n("Extra Condensed"); 0095 constexpr const auto KFI_WIDTH_CONDENSED = kli18n("Condensed"); 0096 constexpr const auto KFI_WIDTH_SEMICONDENSED = kli18n("Semi Condensed"); 0097 constexpr const auto KFI_WIDTH_NORMAL = kli18n("Normal"); 0098 constexpr const auto KFI_WIDTH_SEMIEXPANDED = kli18n("Semi Expanded"); 0099 constexpr const auto KFI_WIDTH_EXPANDED = kli18n("Expanded"); 0100 constexpr const auto KFI_WIDTH_EXTRAEXPANDED = kli18n("Extra Expanded"); 0101 constexpr const auto KFI_WIDTH_ULTRAEXPANDED = kli18n("Ultra Expanded"); 0102 0103 constexpr const auto KFI_SPACING_MONO = kli18n("Monospaced"); 0104 constexpr const auto KFI_SPACING_CHARCELL = kli18n("Charcell"); 0105 constexpr const auto KFI_SPACING_PROPORTIONAL = kli18n("Proportional"); 0106 0107 constexpr const auto KFI_UNKNOWN_FOUNDRY = kli18n("Unknown");