Lines 227-235
typedef enum _FcMatcherPriorityDummy {
Link Here
|
227 |
#undef FC_OBJECT |
227 |
#undef FC_OBJECT |
228 |
|
228 |
|
229 |
#undef PRI1 |
229 |
#undef PRI1 |
230 |
#define PRI1(n) \ |
230 |
#define PRI1(n) \ |
231 |
PRI_ ## n ## _STRONG, \ |
231 |
PRI_ ## n, \ |
232 |
PRI_ ## n ## _WEAK |
232 |
PRI_ ## n ## _STRONG = PRI_ ## n, \ |
|
|
233 |
PRI_ ## n ## _WEAK = PRI_ ## n |
233 |
|
234 |
|
234 |
typedef enum _FcMatcherPriority { |
235 |
typedef enum _FcMatcherPriority { |
235 |
PRI1(HASH), |
236 |
PRI1(HASH), |
Lines 237-245
typedef enum _FcMatcherPriority {
Link Here
|
237 |
PRI1(FOUNDRY), |
238 |
PRI1(FOUNDRY), |
238 |
PRI1(CHARSET), |
239 |
PRI1(CHARSET), |
239 |
PRI_FAMILY_STRONG, |
240 |
PRI_FAMILY_STRONG, |
240 |
PRI_LANG_STRONG, |
|
|
241 |
PRI_POSTSCRIPT_NAME_STRONG, |
241 |
PRI_POSTSCRIPT_NAME_STRONG, |
242 |
PRI_LANG_WEAK, |
242 |
PRI1(LANG), |
243 |
PRI_FAMILY_WEAK, |
243 |
PRI_FAMILY_WEAK, |
244 |
PRI_POSTSCRIPT_NAME_WEAK, |
244 |
PRI_POSTSCRIPT_NAME_WEAK, |
245 |
PRI1(SPACING), |
245 |
PRI1(SPACING), |
Lines 910-917
FcFontSetSort (FcConfig *config FC_UNUSED,
Link Here
|
910 |
* If this node matches any language, go check |
910 |
* If this node matches any language, go check |
911 |
* which ones and satisfy those entries |
911 |
* which ones and satisfy those entries |
912 |
*/ |
912 |
*/ |
913 |
if (nodeps[f]->score[PRI_LANG_STRONG] < 2000 || |
913 |
if (nodeps[f]->score[PRI_LANG] < 2000) |
914 |
nodeps[f]->score[PRI_LANG_WEAK] < 2000) |
|
|
915 |
{ |
914 |
{ |
916 |
for (i = 0; i < nPatternLang; i++) |
915 |
for (i = 0; i < nPatternLang; i++) |
917 |
{ |
916 |
{ |
Lines 935-947
FcFontSetSort (FcConfig *config FC_UNUSED,
Link Here
|
935 |
} |
934 |
} |
936 |
patternLangSat[i] = FcTrue; |
935 |
patternLangSat[i] = FcTrue; |
937 |
satisfies = FcTrue; |
936 |
satisfies = FcTrue; |
938 |
/* adjust score to ensure it's not more than 10000.0 |
|
|
939 |
* which would means the lang didn't satisfy the requirements |
940 |
*/ |
941 |
if (nodeps[f]->score[PRI_LANG_STRONG] > 10000.0) |
942 |
nodeps[f]->score[PRI_LANG_STRONG] = 10000.0; |
943 |
if (nodeps[f]->score[PRI_LANG_WEAK] > 10000.0) |
944 |
nodeps[f]->score[PRI_LANG_WEAK] = 10000.0; |
945 |
break; |
937 |
break; |
946 |
} |
938 |
} |
947 |
} |
939 |
} |
Lines 949-956
FcFontSetSort (FcConfig *config FC_UNUSED,
Link Here
|
949 |
} |
941 |
} |
950 |
if (!satisfies) |
942 |
if (!satisfies) |
951 |
{ |
943 |
{ |
952 |
nodeps[f]->score[PRI_LANG_STRONG] = 10000.0; |
944 |
nodeps[f]->score[PRI_LANG] = 10000.0; |
953 |
nodeps[f]->score[PRI_LANG_WEAK] = 10000.0; |
|
|
954 |
} |
945 |
} |
955 |
} |
946 |
} |
956 |
|
947 |
|
957 |
- |
|
|