FontConfig character/lang match requires weak family.

In FontConfig the normal priority order of matches is character, family,
language; however family can be marked as weak which changes the order to
character, language, family. This is what is desired in
matchFamilyStyleCharacter.

Review URL: https://codereview.chromium.org/1118553002
This commit is contained in:
bungeman 2015-04-29 11:32:57 -07:00 committed by Commit bot
parent fa2008ff6e
commit 1d4ec0a1ad

View File

@ -771,7 +771,10 @@ protected:
FCLocker lock;
SkAutoFcPattern pattern;
FcPatternAddString(pattern, FC_FAMILY, (FcChar8*)familyName);
FcValue familyNameValue;
familyNameValue.type = FcTypeString;
familyNameValue.u.s = reinterpret_cast<const FcChar8*>(familyName);
FcPatternAddWeak(pattern, FC_FAMILY, familyNameValue, FcFalse);
fcpattern_from_skfontstyle(style, pattern);
SkAutoFcCharSet charSet;