Revert "Fix FcNameUnparseLangSet()" and redo it
This reverts commit 5c6d1ff23b
and
fixes that bug using the new reverse-map I added in the previous
commit.
This commit is contained in:
parent
d354a321ee
commit
c5f0a65b36
29
src/fclang.c
29
src/fclang.c
|
@ -551,20 +551,27 @@ bail0:
|
||||||
FcBool
|
FcBool
|
||||||
FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls)
|
FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls)
|
||||||
{
|
{
|
||||||
int i;
|
int i, bit;
|
||||||
|
FcChar32 bits;
|
||||||
FcBool first = FcTrue;
|
FcBool first = FcTrue;
|
||||||
|
|
||||||
for (i = 0; i < NUM_LANG_CHAR_SET; i++)
|
for (i = 0; i < NUM_LANG_SET_MAP; i++)
|
||||||
if (FcLangSetBitGet (ls, i))
|
{
|
||||||
{
|
if ((bits = ls->map[i]))
|
||||||
if (!first)
|
{
|
||||||
if (!FcStrBufChar (buf, '|'))
|
for (bit = 0; bit <= 31; bit++)
|
||||||
|
if (bits & (1 << bit))
|
||||||
|
{
|
||||||
|
int id = (i << 5) | bit;
|
||||||
|
if (!first)
|
||||||
|
if (!FcStrBufChar (buf, '|'))
|
||||||
|
return FcFalse;
|
||||||
|
if (!FcStrBufString (buf, fcLangCharSets[fcLangCharSetIndicesInv[id]].lang))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
if (!FcStrBufString (buf, fcLangCharSets[i].lang))
|
first = FcFalse;
|
||||||
return FcFalse;
|
}
|
||||||
first = FcFalse;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ls->extra)
|
if (ls->extra)
|
||||||
{
|
{
|
||||||
FcStrList *list = FcStrListCreate (ls->extra);
|
FcStrList *list = FcStrListCreate (ls->extra);
|
||||||
|
|
Loading…
Reference in New Issue