mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 09:08:40 +02:00
fix some asterisk type squishes in TextRenderer
This commit is contained in:
parent
39d0851cc2
commit
58d5e0b9d3
1 changed files with 5 additions and 5 deletions
|
@ -143,23 +143,23 @@ private:
|
||||||
QStringList tokenizeForWrapping(const QString & str) const;
|
QStringList tokenizeForWrapping(const QString & str) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
static QHash<QString, Font *> LOADED_FONTS;
|
static QHash<QString, Font*> LOADED_FONTS;
|
||||||
|
|
||||||
Font * loadFont(QIODevice & buffer) {
|
Font* loadFont(QIODevice & buffer) {
|
||||||
Font * result = new Font();
|
Font* result = new Font();
|
||||||
result->read(buffer);
|
result->read(buffer);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, size_t N>
|
template<class T, size_t N>
|
||||||
Font * loadFont(T (&t)[N]) {
|
Font* loadFont(T (&t)[N]) {
|
||||||
QBuffer buffer;
|
QBuffer buffer;
|
||||||
buffer.setData((const char*) t, N);
|
buffer.setData((const char*) t, N);
|
||||||
buffer.open(QBuffer::ReadOnly);
|
buffer.open(QBuffer::ReadOnly);
|
||||||
return loadFont(buffer);
|
return loadFont(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
Font * loadFont(const QString & family) {
|
Font* loadFont(const QString & family) {
|
||||||
if (!LOADED_FONTS.contains(family)) {
|
if (!LOADED_FONTS.contains(family)) {
|
||||||
if (family == MONO_FONT_FAMILY) {
|
if (family == MONO_FONT_FAMILY) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue