Macos QFontInfo未返回正确的字体系列
我正在尝试使用苹果在雪豹上提供的一种只有盲文的字体,叫做Macos QFontInfo未返回正确的字体系列,macos,qt,fonts,Macos,Qt,Fonts,我正在尝试使用苹果在雪豹上提供的一种只有盲文的字体,叫做苹果盲文,来模拟盲文显示 我正在尝试使用Qt4.7.3来完成这项工作,但到目前为止,我还没有成功地让它加载字体。查看下面的代码: #include <QCoreApplication> #include <QDebug> #include <QFontDatabase> #include <QFontInfo> #include <QStringList> Q_DECL_EXPO
苹果盲文
,来模拟盲文显示
我正在尝试使用Qt4.7.3来完成这项工作,但到目前为止,我还没有成功地让它加载字体。查看下面的代码:
#include <QCoreApplication>
#include <QDebug>
#include <QFontDatabase>
#include <QFontInfo>
#include <QStringList>
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QCoreApplication> app(new QCoreApplication(argc, argv));
int id = QFontDatabase::addApplicationFont(
"/System/Library/Fonts/Apple Braille Outline 8 Dot.ttf");
qDebug() << "Registered font Family is"
<< QFontDatabase::applicationFontFamilies(id).join(",");
QFont desired_font("Apple Braille");
qDebug() << "Got" << QFontInfo(desired_font).family();
return app->exec();
}
#包括
#包括
#包括
#包括
#包括
Q_DECL_导出int main(int argc,char*argv[])
{
QScopedPointer应用程序(新的qcore应用程序(argc,argv));
int id=QFontDatabase::addApplicationFont(
“/System/Library/Fonts/Apple Braille Outline 8 Dot.ttf”);
qDebug()这在操作系统10.8.1和Qt4.8.2上适用-获得了“苹果盲文”
。