1. 03 Apr, 2019 1 commit
    • Keith Packard's avatar
      Replace UUID file mechanism with per-directory 'map' attribute [v2] · c4324f54
      Keith Packard authored
      The UUID files would be placed in each font directory to provide the
      unique cache name, independent of path, for that directory. The UUID
      files are undesireable for a couple of reasons:
      
       1) They must be placed in the font directories to be useful. This
          requires modifying the font directories themselves, introducing
          potential visible timestamp changes when running multiple
          applications, and makes the cache processing inconsistent between
          applications with permission to write to the font directories and
          applications without such permission.
      
       2) The UUID contents were generated randomly, which makes the font
          cache not reproducible across multiple runs.
      
      One proposed fix for 2) is to make the UUID dependent on the font
      directory path, but once we do that, we can simply use the font
      directory path itself as the key as the original MD5-based font cache
      naming mechanism did.
      
      The goal of the UUID file mechanism was to fix startup time of
      flatpaks; as the font path names inside the flatpak did not match the
      font path names in the base system, the font cache would need to be
      reconstructed the first time the flatpak was launched.
      
      The new mechanism for doing this is to allow each '<dir>' element in
      the configuration include a 'map' attribute. When looking for a cache
      file for a particular directory, if the directory name starts with the
      contents of the <dir> element, that portion of the name will be
      replaced with the value of the 'map' attribute.
      
      Outside of the flatpak, nothing need change -- fontconfig will build
      cache files using real directory names.
      
      Inside the flatpak, the custom fonts.conf file will now include
      mappings such as this:
      
      	<dir map="/usr/share/fonts">/run/host/fonts</dir>
      
      When scanning the directory /run/host/fonts/ttf, fontconfig will
      use the name /usr/share/fonts/ttf as the source for building the cache
      file name.
      
      The existing FC_FILE replacement code used for the UUID-based
      implementation continues to correctly adapt font path names seen by
      applications.
      
      v2:
      	Leave FcDirCacheCreateUUID stub around to avoid removing
      	public API function.
      
      	Document 'map' attribute of <dir> element in
      	fontconfig-user.sgml
      Suggested-by: Akira TAGOH's avatarAkira TAGOH <akira@tagoh.org>
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      c4324f54
  2. 01 Aug, 2018 1 commit
    • Akira TAGOH's avatar
      Fix the build issue with gperf · a1efb5ea
      Akira TAGOH authored
      GPerf seems not allowing the empty lines though, current recipes are supposed to drop them.
      but seems not working on some env.
      So taking the proper way to do that instead of incompatible things against platforms.
      a1efb5ea
  3. 28 Mar, 2018 1 commit
  4. 09 Mar, 2018 1 commit
  5. 02 Mar, 2018 1 commit
  6. 01 Feb, 2018 1 commit
  7. 06 Jan, 2018 1 commit
  8. 05 Jan, 2018 1 commit
  9. 20 Nov, 2017 2 commits
  10. 07 Nov, 2017 1 commit
    • Akira TAGOH's avatar
      Add the ruleset description support · 9a0fcb94
      Akira TAGOH authored
      Trying to address what these configuration files really do.
      This change allows to see the short description that mention
      the purpose of the content in the config file and obtain
      them through API.
      
      This change also encourage one who want to make some UI for
      the user-specific configuration management. it is the main
      purpose of this change for me though.
      
      Aside from that, I've also made programs translatable. so
      we see more dependencies on the build time for gettext,
      and itstool to generate PO from xml.
      9a0fcb94
  11. 12 Sep, 2017 2 commits
  12. 15 Aug, 2017 1 commit
  13. 31 Jul, 2017 1 commit
  14. 05 Jul, 2017 1 commit
  15. 05 Jun, 2017 1 commit
  16. 03 Jun, 2017 1 commit
  17. 25 Jul, 2014 1 commit
  18. 12 Jun, 2014 1 commit
  19. 26 Mar, 2014 1 commit
    • Akira TAGOH's avatar
      Bug 71287 - size specific design selection support in OS/2 table version 5 · 3cd573fc
      Akira TAGOH authored
      This feature requires the FreeType 2.5.1 or later at the build time.
      
      Besides <range> element allows <double> elements with this changes.
      
      This may breaks the cache but not bumping in this change sets at this moment.
      please be aware if you want to try it and run fc-cache before/after to
      avoid the weird thing against it.
      3cd573fc
  20. 08 Apr, 2013 1 commit
  21. 05 Feb, 2013 1 commit
  22. 04 Feb, 2013 1 commit
  23. 22 Jan, 2013 1 commit
  24. 08 Jan, 2013 1 commit
  25. 03 Jan, 2013 2 commits
    • Behdad Esfahbod's avatar
      Second try to make Sun CPP happy · 86e32551
      Behdad Esfahbod authored
      86e32551
    • Behdad Esfahbod's avatar
      Work around Sun CPP · 32c1d32c
      Behdad Esfahbod authored
      According to Raimund Steger:
      
      > [...]
      > diff --git a/src/Makefile.am b/src/Makefile.am
      > index dc082b7..57c34a2 100644
      > [...]
      > +fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
      > +    $(AM_V_GEN) $(CPP) -I$(top_srcdir) $< | $(GREP) '^[^#]' | awk ' \
      > +    /CUT_OUT_BEGIN/ { no_write=1; next; }; \
      > +    /CUT_OUT_END/ { no_write=0; next; }; \
      > +    { if (!no_write) print; next; }; \
      > +    ' - > $@.tmp && \
      > +    mv -f $@.tmp $@
      
      Sun Studio CPP seems to insert whitespace in a different way than GCC's CPP.
      
      GCC generates in src/fcobjshash.gperf:
      
      [...]
      "family", FC_FAMILY_OBJECT
      "familylang", FC_FAMILYLANG_OBJECT
      [...]
      
      Sun Studio generates:
      
      [...]
       "family" , FC_FAMILY_OBJECT
       "familylang" , FC_FAMILYLANG_OBJECT
      [...]
      
      leading to:
      
      [...]
      Making all in src
      gmake[2]: Entering directory `/home/rs/src/fontconfig-git/fontconfig/src'
        GEN    fcobjshash.gperf
        GEN    fcobjshash.h
      Key link: " " = " ", with key set "".
      1 input keys have identical hash values,
      use option -D.
      gmake[2]: *** [fcobjshash.h] Error 1
      gmake[2]: Leaving directory `/home/rs/src/fontconfig-git/fontconfig/src'
      gmake[1]: *** [all-recursive] Error 1
      gmake[1]: Leaving directory `/home/rs/src/fontconfig-git/fontconfig'
      gmake: *** [all] Error 2
      
      ...maybe we could tuck in an additional sed to remove the whitespace, like:
      
      [...]
      fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
          $(AM_V_GEN) $(CPP) -I$(top_srcdir) $< | \
          $(SED) 's/^\s*//;s/\s*,\s*/,/;' | \
          $(GREP) '^[^#]' | \
          $(AWK) '/CUT_OUT_BEGIN/,/CUT_OUT_END/ { next; }; { print; };' \
          > $@.tmp && \
          mv -f $@.tmp $@
      [...]
      
      though I'm not sure what kind of guarantee CPP can give us/what easier option I might have missed...
      32c1d32c
  26. 02 Jan, 2013 5 commits
  27. 27 Nov, 2012 1 commit
  28. 14 Jun, 2012 1 commit
  29. 28 May, 2012 1 commit
  30. 10 Apr, 2012 1 commit
  31. 05 Apr, 2012 1 commit
    • Akira TAGOH's avatar
      Bug 29341 - Make some fontconfig paths configurable · e181ab4d
      Akira TAGOH authored
      Add configure options to set the directory to be installed:
        --with-templatedir for the configuration files a.k.a.
          /etc/fonts/conf.avail
        --with-baseconfigdir for fonts.conf etc a.k.a. /etc/fonts
        --with-configdir for the active configuration files a.k.a.
          /etc/fonts/conf.d
        --with-xmldir for fonts.dtd etc
      
      and the default path for templatedir is changed to
      ${datadir}/fontconfig/conf.avail
      e181ab4d
  32. 16 Mar, 2012 2 commits