1 psprint/source/fontmanager/fontconfig.cxx | 24 +++++++++++++++---------
2 1 files changed, 15 insertions(+), 9 deletions(-)
5 diff --git psprint/source/fontmanager/fontconfig.cxx psprint/source/fontmanager/fontconfig.cxx
6 index 0a875f6..396726d 100644
7 --- psprint/source/fontmanager/fontconfig.cxx
8 +++ psprint/source/fontmanager/fontconfig.cxx
9 @@ -1002,19 +1002,25 @@ FontConfigHints PrintFontManager::getFontConfigHints( const FastPrintFontInfo& r
10 FcBool embitmap = true, antialias = true, autohint = true, hinting = true;
11 int hintstyle = FC_HINT_FULL, rgba = FC_RGBA_UNKNOWN;
13 - rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchFont );
14 + rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern );
15 GdkScreen *pScreen = gdk_screen_get_default();
16 if (const cairo_font_options_t *pOptions = pScreen ? gdk_screen_get_font_options(pScreen) : 0)
17 cairo_ft_font_options_substitute(pOptions, pPattern);
18 rWrapper.FcDefaultSubstitute( pPattern );
19 - FcResult eEmbeddedBitmap = rWrapper.FcPatternGetBool( pPattern, FC_EMBEDDED_BITMAP, 0, &embitmap );
20 - FcResult eAntialias = rWrapper.FcPatternGetBool( pPattern, FC_ANTIALIAS, 0, &antialias );
21 - FcResult eAutoHint = rWrapper.FcPatternGetBool( pPattern, FC_AUTOHINT, 0, &autohint );
22 - FcResult eSubPixel = rWrapper.FcPatternGetInteger( pPattern, FC_RGBA, 0, &rgba);
23 - FcResult eHinting = rWrapper.FcPatternGetBool( pPattern, FC_HINTING, 0, &hinting );
25 - FcResult eHintStyle = rWrapper.FcPatternGetInteger( pPattern, FC_HINT_STYLE, 0, &hintstyle );
26 - rWrapper.FcPatternDestroy(pPattern);
28 + FcResult eResult = FcResultNoMatch;
29 + FcFontSet* pFontSet = rWrapper.getFontSet();
30 + FcPattern* pResult = rWrapper.FcFontSetMatch( pConfig, &pFontSet, 1, pPattern, &eResult );
31 + rWrapper.FcPatternDestroy( pPattern );
33 + FcResult eEmbeddedBitmap = rWrapper.FcPatternGetBool( pResult, FC_EMBEDDED_BITMAP, 0, &embitmap );
34 + FcResult eAntialias = rWrapper.FcPatternGetBool( pResult, FC_ANTIALIAS, 0, &antialias );
35 + FcResult eAutoHint = rWrapper.FcPatternGetBool( pResult, FC_AUTOHINT, 0, &autohint );
36 + FcResult eSubPixel = rWrapper.FcPatternGetInteger( pResult, FC_RGBA, 0, &rgba);
37 + FcResult eHinting = rWrapper.FcPatternGetBool( pResult, FC_HINTING, 0, &hinting );
39 + FcResult eHintStyle = rWrapper.FcPatternGetInteger( pResult, FC_HINT_STYLE, 0, &hintstyle );
40 + rWrapper.FcPatternDestroy( pResult );
42 if( eEmbeddedBitmap == FcResultMatch )
43 aHints.m_eEmbeddedbitmap = embitmap ? fcstatus::istrue : fcstatus::isfalse;