Submitted by Akira TAGOH
Assigned to fon..@..op.org
there are some cases I feel an urge to cleanup/redesign fontconfig API though, let me add a note here for a chance to do so in the future.
- the API prefix isn't intuitive to find out where it's included in. e.g. FcDirCache* in fccache.c but some is in fcdir.c. and some can see in fcfs.c, fslist.c and fcmatch.c. for FcFontSet as well.
- some APIs is hard to imagine the functionality from the name e.g. FcDirCacheRead() vs FcDirCacheLoad()
- FcCacheDir() vs FcConfigGetCacheDirs() it implies from the name it may behaves similarly but FcCacheDir() returns the font directory at this moment.
- function doesn't take any structure as its prefix implies e.g. FcConfigFilename() etc
- FcConfigAppFontAddFile() and FcConfigAppFontAddDir() that could be integrated into one and branch if it's a file or a directory?
- In doc, FcConfigSubstitute() and FcDefaultSubstitute() are required to get FcFontMatch() and FcFontSort() working though, it's actually optional to do in the program. guess there may be a reason to do so but that looks to me like an error of API design.
may update more later...