[Fontconfig-bugs] [Bug 48755] New: API redesign

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Apr 15 18:26:06 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=48755

             Bug #: 48755
           Summary: API redesign
    Classification: Unclassified
           Product: fontconfig
           Version: 2.9
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: lowest
         Component: library
        AssignedTo: fontconfig-bugs at lists.freedesktop.org
        ReportedBy: akira at tagoh.org
         QAContact: freedesktop at behdad.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.

1. 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.
2. some APIs is hard to imagine the functionality from the name
   e.g. FcDirCacheRead() vs FcDirCacheLoad()
3. FcCacheDir() vs FcConfigGetCacheDirs()
   it implies from the name it may behaves similarly but FcCacheDir() returns
the font directory at this moment.
4. function doesn't take any structure as its prefix implies
   e.g. FcConfigFilename() etc
5. FcConfigAppFontAddFile() and FcConfigAppFontAddDir()
   that could be integrated into one and branch if it's a file or a directory?
6. 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...

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Fontconfig-bugs mailing list