fontchooser.cpp

来自「爱可视605看PDF程式源代码, 基于APDF」· C++ 代码 · 共 24 行

CPP
24
字号
#include "fontchooser.h"#include <qtextcodec.h>#include <qfont.h>#include <qstring.h>const QFont FontChooser::getFont(const QString& locale){	qWarning("locale used: '%s'", locale.ascii());	if (locale.startsWith("zh_TW")) {	// traditional and simplified chinese need different fontfiles.		return QFont("tc");	} else if (locale.startsWith("zh_CN")) {		return QFont("sc");	} else if (locale.startsWith("he_HE") || locale.startsWith("ru_RU")) {		return QFont("archos_world");	} else {		return QFont("archos");	}}const QFont FontChooser::getFont(){	return getFont(QTextCodec::locale());}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?