okachobi
25th January 2011, 21:52
I have a dialog designed with QT Designers QTCreator plug-in that uses "Helvetica Neue" under Mac OSX. On Kubuntu 10.04 the substitution font was too big, so I added code for the Linux build to set it to an appropriate size, and it appeared to be working fine.
Once it looked like I wanted under Linux, I built a .deb package for it and installed it on another Kubuntu 10.04 machine that had been setup nearly identical to the first. The fonts did not resize like they did with the same binary on the other machine.
I added code to dump the substitute font and it was identical on both systems. I dumped the attribute for scalable from the QFontDatabase for both the substitute font and the original and they both returned false. So I tried dumping the point sizes, and it was a 0 length list.
I've look at qtconfig on both machines, and the font settings are identical. I've done a package by package comparison and I'm having trouble finding any significant differences that would explain why the font isn't resizing.
I thought it might be the wrong binary, so I copied it over manually and the exact same executable generates results differently - but reports the same font substitution.
Can anyone help point me in the right direction for tracking this issue down? I've compared the linked libraries using ldd and they appear to be identical. The versions of the QT libraries are identical.
The code that changes the font sizes looks like this...
QFont font = ui->CreateNewProject->font();
qDebug("Font: %s is mapped to %s", qPrintable(font.family()), qPrintable(QFont::substitute(font.family())));
QFontDatabase db;
qDebug("Scalable? : %s", db.isScalable( font.family())?"yes":"no" );
qDebug("Fixed? : %s", db.isFixedPitch( font.family() )?"yes":"no");
qDebug() << "Point Sizes: " << db.pointSizes( font.family() );
qDebug() << "Available fonts: " << db.families();
font.setPointSize(42);
ui->CreateNewProject->setFont(font);
I suspect that a package has somehow changed a font or a setting- I checked the KDE desktop font settings and they are identical on both machines.
Thanks for any help or tips anyone can provide.
Once it looked like I wanted under Linux, I built a .deb package for it and installed it on another Kubuntu 10.04 machine that had been setup nearly identical to the first. The fonts did not resize like they did with the same binary on the other machine.
I added code to dump the substitute font and it was identical on both systems. I dumped the attribute for scalable from the QFontDatabase for both the substitute font and the original and they both returned false. So I tried dumping the point sizes, and it was a 0 length list.
I've look at qtconfig on both machines, and the font settings are identical. I've done a package by package comparison and I'm having trouble finding any significant differences that would explain why the font isn't resizing.
I thought it might be the wrong binary, so I copied it over manually and the exact same executable generates results differently - but reports the same font substitution.
Can anyone help point me in the right direction for tracking this issue down? I've compared the linked libraries using ldd and they appear to be identical. The versions of the QT libraries are identical.
The code that changes the font sizes looks like this...
QFont font = ui->CreateNewProject->font();
qDebug("Font: %s is mapped to %s", qPrintable(font.family()), qPrintable(QFont::substitute(font.family())));
QFontDatabase db;
qDebug("Scalable? : %s", db.isScalable( font.family())?"yes":"no" );
qDebug("Fixed? : %s", db.isFixedPitch( font.family() )?"yes":"no");
qDebug() << "Point Sizes: " << db.pointSizes( font.family() );
qDebug() << "Available fonts: " << db.families();
font.setPointSize(42);
ui->CreateNewProject->setFont(font);
I suspect that a package has somehow changed a font or a setting- I checked the KDE desktop font settings and they are identical on both machines.
Thanks for any help or tips anyone can provide.