|
Lines 1513-1525
Link Here
|
| 1513 |
convert the pixel size to a point size and request that. |
1513 |
convert the pixel size to a point size and request that. |
| 1514 |
*/ |
1514 |
*/ |
| 1515 |
double size_value = request.pixelSize; |
1515 |
double size_value = request.pixelSize; |
|
|
1516 |
double dpi = TQPaintDevice::x11AppDpiY(fp->screen); |
| 1516 |
double scale = 1.; |
1517 |
double scale = 1.; |
| 1517 |
if ( size_value > MAXFONTSIZE_XFT ) { |
1518 |
if ( size_value > MAXFONTSIZE_XFT ) { |
| 1518 |
scale = (double)size_value/(double)MAXFONTSIZE_XFT; |
1519 |
scale = (double)size_value/(double)MAXFONTSIZE_XFT; |
| 1519 |
size_value = MAXFONTSIZE_XFT; |
1520 |
size_value = MAXFONTSIZE_XFT; |
| 1520 |
} |
1521 |
} |
| 1521 |
|
1522 |
|
| 1522 |
size_value = size_value*72./TQPaintDevice::x11AppDpiY(fp->screen); |
1523 |
#ifdef QT_XFT2 |
|
|
1524 |
/* |
| 1525 |
2006-12-28 If QT is not compiled against xft1, there is no need |
| 1526 |
for the workaround above (confirmed). Thus, in addition, add |
| 1527 |
font pixelsize to the pattern to avoid fontconfig making wrong |
| 1528 |
guesses. Also provide a DPI value for fontconfig so it never |
| 1529 |
attempts to fallback to its default. |
| 1530 |
*/ |
| 1531 |
XftPatternAddDouble(pattern, XFT_PIXEL_SIZE, size_value); |
| 1532 |
XftPatternAddDouble(pattern, XFT_DPI, dpi); |
| 1533 |
#endif |
| 1534 |
size_value = size_value*72./dpi; |
| 1523 |
XftPatternAddDouble( pattern, XFT_SIZE, size_value ); |
1535 |
XftPatternAddDouble( pattern, XFT_SIZE, size_value ); |
| 1524 |
|
1536 |
|
| 1525 |
#ifdef XFT_MATRIX |
1537 |
#ifdef XFT_MATRIX |
|
Lines 1877-1882
Link Here
|
| 1877 |
FcResult result; |
1889 |
FcResult result; |
| 1878 |
FcFontSet *fs = 0; |
1890 |
FcFontSet *fs = 0; |
| 1879 |
FcPattern *fsp = 0; |
1891 |
FcPattern *fsp = 0; |
|
|
1892 |
|
| 1893 |
// Properly conform to fontconfig API. We need to call FcDefaultSubstitute() |
| 1894 |
// before FcFontSort()/FcFontMatch(). |
| 1895 |
FcDefaultSubstitute(pattern); |
| 1896 |
|
| 1880 |
if( use_fontsort ) { |
1897 |
if( use_fontsort ) { |
| 1881 |
fs = FcFontSort(0, pattern, FcFalse, 0, &result); |
1898 |
fs = FcFontSort(0, pattern, FcFalse, 0, &result); |
| 1882 |
if (!fs) |
1899 |
if (!fs) |