]> git.wh0rd.org - fontconfig.git/commit
[fc-lang] Make LangSet representation in the cache files stable
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 18 Mar 2009 23:28:52 +0000 (19:28 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 24 Jun 2009 17:52:10 +0000 (13:52 -0400)
commitffd6668b469508177c4baf7745ae42aee5b00322
tree53ac3ee4580918576bed2c81913405874fcd9377
parent4d13536db49bdfba97f84f702325d1a99796c06b
[fc-lang] Make LangSet representation in the cache files stable

Fontconfig assigns an index number to each language it knows about.
The index is used to index a bit in FcLangSet language map.  The bit
map is stored in the cache.

Previously fc-lang simply sorted the list of languages and assigned
them an index starting from zero.  Net effect is that whenever new
orth files were added, all the FcLangSet info in the cache files would
become invalid.  This was causing weird bugs like this one:

  https://bugzilla.redhat.com/show_bug.cgi?id=490888

With this commit we fix the index assigned to each language.  The index
will be based on the order the orth files are passed to fc-lang.  As a
result all orth files are explicitly listed in Makefile.am now, and
new additions should be made to the end of the list.  The list is made
to reflect the sorted list of orthographies from 2.6.0 released followed
by new additions since.

This fixes the stability problem.  Needless to say, recreating caches
is necessary before any new orthography is recognized in existing fonts,
but at least the existing caches are still valid and don't cause bugs
like the above.
configure.in
fc-lang/Makefile.am
fc-lang/fc-lang.c
src/fclang.c