1. 26 Aug, 2020 1 commit
    • Akira TAGOH's avatar
      Integrate python scripts to autotools build · ef28c783
      Akira TAGOH authored
      Recently some python scripts has been added to the build toolchain for meson build support. but we don't want to maintain multiple files for one purpose. since autotools build support will be guradually discontinued, integrating those scripts into autotools would be better.
  2. 25 Aug, 2020 16 commits
    • Matthias Clasen's avatar
      Fix up FC_LIKELY macros · ff7d314a
      Matthias Clasen authored
      __builtin_expect returns the same type as the expression,
      so enforce that we pass in a boolean expression.
      Pointed out by Emmanuele Bassi.
    • Matthias Clasen's avatar
      Fixup: Handle patterns without family · e117d676
      Matthias Clasen authored
      Pointed out by Akira Tagoh.
    • Matthias Clasen's avatar
      Use FC_UNLIKELY · 51d40491
      Matthias Clasen authored
    • Matthias Clasen's avatar
      Add FC_LIKELY and FC_UNLIKELY macros · 76699a48
      Matthias Clasen authored
      These wrap __builtin_expect where it exists.
    • Matthias Clasen's avatar
      Fixup: Promote ints to ranges when appropriate · 835f9bbd
      Matthias Clasen authored
      Pointed out by Akira Tagoh.
    • Matthias Clasen's avatar
      Use __builtin_expect in a few places · 148ebf98
      Matthias Clasen authored
      utf8 is extremely rare in the strings we see in
      font configuration, so this seems to be a good
      case for __builtin_expect.
    • Matthias Clasen's avatar
      Use a hash table for families in FcConfigSubstitute · 13015a0a
      Matthias Clasen authored
      Use the same approach we used for FcFontMatch, and
      keep a hash table of family names. We only speed
      up the no-match case, for now.
    • Matthias Clasen's avatar
      Speed up FcCompareLang and FcCompareBool · 7deb07e3
      Matthias Clasen authored
      Avoid FcCanonicalize here too.
    • Matthias Clasen's avatar
      Speed up FcConfigCompareValue · 09729c90
      Matthias Clasen authored
      Avoid FcValueCanonicalize when we can, to avoid
      unnecessary copying of FcValue structs.
    • Matthias Clasen's avatar
      Speed up FcConfigCompareValue · 9d4e5d0f
      Matthias Clasen authored
      Make FcConfigPromote use a switch instead of
      an if-else cascade, and avoid calling it when
      we can.
      Note that we need to add a case for integers
      in FcConfigCompareValue, since we are no longer
      promoting integers to doubles unconditionally.
    • Matthias Clasen's avatar
      Speed up fonthashint matching · 922168af
      Matthias Clasen authored
      When we don't need to differentiate between weak and strong,
      we can exit the loop in FcCompareValueList once we found a
      best match.
      This change helps reducing the amount of list walking we do
      for fonthashint, where careless config files end up creating
      lists with ~100 booleans :( We don't want to walk all those
      to the end, over and over again.
      We are already special-casing family, and the only other case
      where weak != strong, PostScript names, doesn't have long lists
      of values, so the limitation to weak == strong doesn't matter
      much in practice.
    • Matthias Clasen's avatar
      Add a shortcut for FcQualAny matching · 1b0cb23a
      Matthias Clasen authored
      When checking whether a test matches a pattern,
      we cut the loop short for FcQualAll when we see
      the first non-matching value, but for FcQualAny
      we were always walking the full list. This patch
      cuts the loop short for FcQualAny when we see the
      first matching value.
    • Matthias Clasen's avatar
      Use a hash table for family matching · 8022ab4a
      Matthias Clasen authored
      With the way typical font configurations look, matching the lists
      of families is the bottleneck for both FcFontMatch and FcFontSort.
      After installing the Noto fonts on my system, an innocent match
      pattern like "Cantarell 14" turns into a monster with a list of
      300 family names after calling FcConfigSubstitute().
      With this setup, every FcFontSort call takes 80-100 ms, which is
      entirely incompatible with using FcFontSort for anything interactive.
      And many font choosers render every font in itself, causing on average
      one FcFontSort call per font.
      On my system, it takes more than 20 seconds to open the GTK font
      chooser dialog, with frequent stalls when scrolling.
      This patch special-cases font families and replaces the list
      walking for comparison with a hash table lookup. With this
      patch, the FcFontSort time goes to ~10ms per call. Which is
      still not good enough for calling it dozens of times when
      scrolling, but a significant improvement.
    • Matthias Clasen's avatar
      Add a hash function for families · 05584363
      Matthias Clasen authored
      Add a hash function that behaves like family
      comparison: ignoring case and blanks. This
      will be used to replace the list walking for
      finding family matches with a hash table.
    • Matthias Clasen's avatar
      Special-case some of the string walking code · 46d818df
      Matthias Clasen authored
      Make variants of FcStrCaseWalkerNext for the two
      common cases, delim == NULL and delim == " ", to
      speed things up.
      These are inner loops, and having the conditions
      as simple as possible helps.
    • Akira TAGOH's avatar
  3. 23 Aug, 2020 1 commit
  4. 18 Aug, 2020 1 commit
    • Jan Tojnar's avatar
      Turn unknown attributes into warning · 9133e799
      Jan Tojnar authored
      As far as I can tell, fontconfig can recover from encountering an unknown attribute.
      And unknown elements already print a warning instead of an error, so let's make this a warning too.
  5. 06 Aug, 2020 1 commit
  6. 31 Jul, 2020 2 commits
  7. 27 Jul, 2020 1 commit
  8. 22 Jul, 2020 1 commit
  9. 14 Jul, 2020 1 commit
  10. 07 Jul, 2020 2 commits
  11. 02 Jul, 2020 1 commit
  12. 01 Jul, 2020 4 commits
  13. 24 Jun, 2020 1 commit
  14. 02 Jun, 2020 1 commit
  15. 25 May, 2020 2 commits
  16. 19 May, 2020 1 commit
  17. 12 May, 2020 1 commit
    • Akira TAGOH's avatar
      Fix cache conflicts on OSTree based system · fdbd9d13
      Akira TAGOH authored
      mtime isn't reliable to detect updates of fonts on OSTree based system
      since they reset mtime to 0 for system files.
      Due to this, there are the situation likely to happen where mtime is
      newer but content is older.
      Fortunately, OSTree based system requires reboot to deploy changes. so
      we can assume we won't see any changes on system fonts. so system caches
      are always up-to-date. we can ignore meta data for system fonts in
      user caches.
  18. 28 Apr, 2020 1 commit
  19. 10 Apr, 2020 1 commit