Resolves: fdo#50855 Nimbus Sans L missing styles

Change-Id: Ie8cdcf4ad0ffe52024fd5cfe33073abfc6aadca8
This commit is contained in:
Caolán McNamara
2014-03-12 15:56:15 +00:00
parent 2acdcb2374
commit 1e539dbf0f

View File

@@ -494,6 +494,7 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int,
FcChar8* format = NULL; FcChar8* format = NULL;
int slant = 0; int slant = 0;
int weight = 0; int weight = 0;
int width = 0;
int spacing = 0; int spacing = 0;
int nCollectionEntry = -1; int nCollectionEntry = -1;
FcBool outline = false; FcBool outline = false;
@@ -503,6 +504,7 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int,
FcResult eStyleRes = rWrapper.LocalizedElementFromPattern( pFSet->fonts[i], &style, FC_STYLE, FC_STYLELANG ); FcResult eStyleRes = rWrapper.LocalizedElementFromPattern( pFSet->fonts[i], &style, FC_STYLE, FC_STYLELANG );
FcResult eSlantRes = FcPatternGetInteger(pFSet->fonts[i], FC_SLANT, 0, &slant); FcResult eSlantRes = FcPatternGetInteger(pFSet->fonts[i], FC_SLANT, 0, &slant);
FcResult eWeightRes = FcPatternGetInteger(pFSet->fonts[i], FC_WEIGHT, 0, &weight); FcResult eWeightRes = FcPatternGetInteger(pFSet->fonts[i], FC_WEIGHT, 0, &weight);
FcResult eWidthRes = FcPatternGetInteger(pFSet->fonts[i], FC_WIDTH, 0, &width);
FcResult eSpacRes = FcPatternGetInteger(pFSet->fonts[i], FC_SPACING, 0, &spacing); FcResult eSpacRes = FcPatternGetInteger(pFSet->fonts[i], FC_SPACING, 0, &spacing);
FcResult eOutRes = FcPatternGetBool(pFSet->fonts[i], FC_OUTLINE, 0, &outline); FcResult eOutRes = FcPatternGetBool(pFSet->fonts[i], FC_OUTLINE, 0, &outline);
FcResult eIndexRes = FcPatternGetInteger(pFSet->fonts[i], FC_INDEX, 0, &nCollectionEntry); FcResult eIndexRes = FcPatternGetInteger(pFSet->fonts[i], FC_INDEX, 0, &nCollectionEntry);
@@ -514,11 +516,12 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int,
#if (OSL_DEBUG_LEVEL > 2) #if (OSL_DEBUG_LEVEL > 2)
fprintf( stderr, "found font \"%s\" in file %s\n" fprintf( stderr, "found font \"%s\" in file %s\n"
" weight = %d, slant = %d, style = \"%s\"\n" " weight = %d, slant = %d, style = \"%s\"\n"
" spacing = %d, outline = %d, format %s\n" " width = %d, spacing = %d, outline = %d, format %s\n"
, family, file , family, file
, eWeightRes == FcResultMatch ? weight : -1 , eWeightRes == FcResultMatch ? weight : -1
, eSpacRes == FcResultMatch ? slant : -1 , eSpacRes == FcResultMatch ? slant : -1
, eStyleRes == FcResultMatch ? (const char*) style : "<nil>" , eStyleRes == FcResultMatch ? (const char*) style : "<nil>"
, eWeightRes == FcResultMatch ? width : -1
, eSpacRes == FcResultMatch ? spacing : -1 , eSpacRes == FcResultMatch ? spacing : -1
, eOutRes == FcResultMatch ? outline : -1 , eOutRes == FcResultMatch ? outline : -1
, eFormatRes == FcResultMatch ? (const char*)format : "<unknown>" , eFormatRes == FcResultMatch ? (const char*)format : "<unknown>"
@@ -620,6 +623,8 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int,
} }
if( eWeightRes == FcResultMatch ) if( eWeightRes == FcResultMatch )
pUpdate->m_eWeight = convertWeight(weight); pUpdate->m_eWeight = convertWeight(weight);
if( eWidthRes == FcResultMatch )
pUpdate->m_eWidth = convertWidth(width);
if( eSpacRes == FcResultMatch ) if( eSpacRes == FcResultMatch )
pUpdate->m_ePitch = convertSpacing(spacing); pUpdate->m_ePitch = convertSpacing(spacing);
if( eSlantRes == FcResultMatch ) if( eSlantRes == FcResultMatch )