871 QUnicodeTables::Common, // Limbu |
877 QUnicodeTables::Common, // Limbu |
872 QUnicodeTables::Common, // TaiLe |
878 QUnicodeTables::Common, // TaiLe |
873 QUnicodeTables::Common, // Braille |
879 QUnicodeTables::Common, // Braille |
874 QUnicodeTables::Common, // Symbol |
880 QUnicodeTables::Common, // Symbol |
875 QUnicodeTables::Ogham, // Ogham |
881 QUnicodeTables::Ogham, // Ogham |
876 QUnicodeTables::Runic // Runic |
882 QUnicodeTables::Runic, // Runic |
|
883 QUnicodeTables::Nko // Nko |
877 }; |
884 }; |
878 |
885 |
879 |
886 |
880 #if defined Q_WS_QWS || (defined(Q_WS_X11) && !defined(QT_NO_FONTCONFIG)) || defined(Q_WS_WIN) |
887 #if defined Q_WS_QWS || (defined(Q_WS_X11) && !defined(QT_NO_FONTCONFIG)) || defined(Q_WS_WIN) |
881 static inline bool requiresOpenType(int writingSystem) |
888 static inline bool requiresOpenType(int writingSystem) |
882 { |
889 { |
883 return ((writingSystem >= QFontDatabase::Syriac && writingSystem <= QFontDatabase::Sinhala) |
890 return ((writingSystem >= QFontDatabase::Syriac && writingSystem <= QFontDatabase::Sinhala) |
884 || writingSystem == QFontDatabase::Khmer); |
891 || writingSystem == QFontDatabase::Khmer || writingSystem == QFontDatabase::Nko); |
885 } |
892 } |
886 static inline bool scriptRequiresOpenType(int script) |
893 static inline bool scriptRequiresOpenType(int script) |
887 { |
894 { |
888 return ((script >= QUnicodeTables::Syriac && script <= QUnicodeTables::Sinhala) |
895 return ((script >= QUnicodeTables::Syriac && script <= QUnicodeTables::Sinhala) |
889 || script == QUnicodeTables::Khmer); |
896 || script == QUnicodeTables::Khmer || script == QUnicodeTables::Nko); |
890 } |
897 } |
891 #endif |
898 #endif |
892 |
899 |
893 |
900 |
894 /*! |
901 /*! |
1329 FM_DEBUG("QFontDatabase::match\n" |
1336 FM_DEBUG("QFontDatabase::match\n" |
1330 " request:\n" |
1337 " request:\n" |
1331 " family: %s [%s], script: %d\n" |
1338 " family: %s [%s], script: %d\n" |
1332 " weight: %d, style: %d\n" |
1339 " weight: %d, style: %d\n" |
1333 " stretch: %d\n" |
1340 " stretch: %d\n" |
1334 " pixelSize: %d\n" |
1341 " pixelSize: %g\n" |
1335 " pitch: %c", |
1342 " pitch: %c", |
1336 family_name.isEmpty() ? "-- first in script --" : family_name.toLatin1().constData(), |
1343 family_name.isEmpty() ? "-- first in script --" : family_name.toLatin1().constData(), |
1337 foundry_name.isEmpty() ? "-- any --" : foundry_name.toLatin1().constData(), |
1344 foundry_name.isEmpty() ? "-- any --" : foundry_name.toLatin1().constData(), |
1338 script, request.weight, request.style, request.stretch, request.pixelSize, pitch); |
1345 script, request.weight, request.style, request.stretch, request.pixelSize, pitch); |
1339 #if defined(FONT_MATCH_DEBUG) && defined(Q_WS_X11) |
1346 #if defined(FONT_MATCH_DEBUG) && defined(Q_WS_X11) |
1473 that are available for each family. An alternative to pointSizes() |
1480 that are available for each family. An alternative to pointSizes() |
1474 is smoothSizes() which returns the sizes at which a given family |
1481 is smoothSizes() which returns the sizes at which a given family |
1475 and style will look attractive. |
1482 and style will look attractive. |
1476 |
1483 |
1477 If the font family is available from two or more foundries the |
1484 If the font family is available from two or more foundries the |
1478 foundry name is included in the family name, e.g. "Helvetica |
1485 foundry name is included in the family name; for example: |
1479 [Adobe]" and "Helvetica [Cronyx]". When you specify a family you |
1486 "Helvetica [Adobe]" and "Helvetica [Cronyx]". When you specify a |
1480 can either use the old hyphenated Qt 2.x "foundry-family" format, |
1487 family, you can either use the old hyphenated "foundry-family" |
1481 e.g. "Cronyx-Helvetica", or the new bracketed Qt 3.x "family |
1488 format or the bracketed "family [foundry]" format; for example: |
1482 [foundry]" format e.g. "Helvetica [Cronyx]". If the family has a |
1489 "Cronyx-Helvetica" or "Helvetica [Cronyx]". If the family has a |
1483 foundry it is always returned, e.g. by families(), using the |
1490 foundry it is always returned using the bracketed format, as is |
1484 bracketed format. |
1491 the case with the value returned by families(). |
1485 |
1492 |
1486 The font() function returns a QFont given a family, style and |
1493 The font() function returns a QFont given a family, style and |
1487 point size. |
1494 point size. |
1488 |
1495 |
1489 A family and style combination can be checked to see if it is |
1496 A family and style combination can be checked to see if it is |
2230 name = QT_TRANSLATE_NOOP("QFontDatabase", "Ogham"); |
2238 name = QT_TRANSLATE_NOOP("QFontDatabase", "Ogham"); |
2231 break; |
2239 break; |
2232 case Runic: |
2240 case Runic: |
2233 name = QT_TRANSLATE_NOOP("QFontDatabase", "Runic"); |
2241 name = QT_TRANSLATE_NOOP("QFontDatabase", "Runic"); |
2234 break; |
2242 break; |
|
2243 case Nko: |
|
2244 name = QT_TRANSLATE_NOOP("QFontDatabase", "N'Ko"); |
|
2245 break; |
2235 default: |
2246 default: |
2236 Q_ASSERT_X(false, "QFontDatabase::writingSystemName", "invalid 'writingSystem' parameter"); |
2247 Q_ASSERT_X(false, "QFontDatabase::writingSystemName", "invalid 'writingSystem' parameter"); |
2237 break; |
2248 break; |
2238 } |
2249 } |
2239 return QApplication::translate("QFontDatabase", name); |
2250 return QApplication::translate("QFontDatabase", name); |
2443 sample += QChar(0x16a0); |
2454 sample += QChar(0x16a0); |
2444 sample += QChar(0x16a1); |
2455 sample += QChar(0x16a1); |
2445 sample += QChar(0x16a2); |
2456 sample += QChar(0x16a2); |
2446 sample += QChar(0x16a3); |
2457 sample += QChar(0x16a3); |
2447 break; |
2458 break; |
|
2459 case Nko: |
|
2460 sample += QChar(0x7ca); |
|
2461 sample += QChar(0x7cb); |
|
2462 sample += QChar(0x7cc); |
|
2463 sample += QChar(0x7cd); |
|
2464 break; |
2448 default: |
2465 default: |
2449 break; |
2466 break; |
2450 } |
2467 } |
2451 return sample; |
2468 return sample; |
2452 } |
2469 } |