1. 09 5月, 2017 1 次提交
  2. 04 4月, 2017 1 次提交
    • S
      Support cmap tables with platform ID == 0 · db1b6cb7
      Seigo Nonaka 提交于
      Some fonts don't have cmap subtables of Microsoft Platform ID (3) and
      only have cmap subtables of Unicode Platform ID (0).
      
      Bug: 32505843
      Test: minikin_unittest passed
      Test: android.graphics.cts.TypefaceTest passed
      Change-Id: I24aa49860790c0ae8d8e578efd728b95ec0f93ae
      db1b6cb7
  3. 23 3月, 2017 1 次提交
    • S
      Remove unused functions. · dff5e5d5
      Seigo Nonaka 提交于
      This CL is essentially reverting following changes:
      - "Serialize and deserialize supported axes."
        I4086fb887e13f872390b533584bce6f1d5598ea0
      - "Make SparseBitSet serializable."
        I0463138adcf234739bb3ce1cdadf382021921f3e
      
      Bug: 36232655
      Test: N/A
      Change-Id: I25c701e1805e92b01034142147a9925f86533819
      dff5e5d5
  4. 16 3月, 2017 1 次提交
    • S
      Serialize and deserialize supported axes. · 1adbccfd
      Seigo Nonaka 提交于
      To avoid reading font files during FontFamily construction, serialize
      and deserialize supported axes and cmap coverage at the same time.
      
      Bug: 36232655
      Test: ran minikin_tests
      Change-Id: I4086fb887e13f872390b533584bce6f1d5598ea0
      1adbccfd
  5. 15 3月, 2017 1 次提交
  6. 14 3月, 2017 3 次提交
    • S
      Fix build failure due to unexpected merge. · 2cb3214e
      Seigo Nonaka 提交于
      FontLanguageListCache::kEmptyListId is gone, use kEmptyLanguageListId
      instead.
      
      Test: N/A
      Change-Id: I96075849c53f23fbce8dbc180a51d8f97e45f316
      2cb3214e
    • S
      Make SparseBitSet serializable. · fbbc5a6b
      Seigo Nonaka 提交于
      To share the calculated coverage information across the processes, make
      SparseBitSet serializable.
      
      Bug: 34042446
      Test: minikin_tests passes
      Change-Id: I0463138adcf234739bb3ce1cdadf382021921f3e
      fbbc5a6b
    • S
      Use std::mutex instead of android::Mutex · 62ad5653
      Seigo Nonaka 提交于
      This CL includes:
      - Stop using utils/Mutex and use std::mutex instead.
      - Stop using utils/Singleton.
      
      Test: minikin_tests passed
      Change-Id: Ib3f75b83397a546472bb5f91e066e44506e78263
      62ad5653
  7. 24 2月, 2017 1 次提交
    • S
      Remove MinikinRefCounted and use shared_ptr instead · dfbc6e37
      Seigo Nonaka 提交于
      Let's use shared_ptr since manual ref counting can be a bug-prone and
      using the global mutex inside destructor is not useful for some time.
      
      To remove raw pointer manipulation, needed to change Layout
      constructors. Layout is no longer copyable and need to pass
      FontCollection to constructor.
      
      Bug: 28119474
      Test: minikin_tests passed
      Test: hwui_unit_tests passed
      Test: No performance regression in minikin_perftest.
      Change-Id: I8824593206ecba74cbc9731e298f045e1ae442a3
      dfbc6e37
  8. 31 1月, 2017 1 次提交
    • S
      Introduce createCollectionWithVariation. · 065c46a6
      Seigo Nonaka 提交于
      This is 2nd attempt of I08e9b74192f8af1d045f1276498fa4e60d73863e.
      The original CL was reverted due to conflicting with another CL submitted
      before.
      
      Here is the original commit message of reverted change.
      
      This lays the groundwork for variation settings support.
      Since we should regard different variations of a font as different fonts, we
      need to create new typefaces. To reuse the same instance of MinikinFont, as
      much as possible, FontFamily::createFamilyWithVariation now reuses an
      existence instance, while incrementing the reference count.
      
      Test: minikin_tests
      Bug: 33062398
      Change-Id: Ib25bf1bb5a5191e15a6523954146521464c91906
      065c46a6
  9. 20 1月, 2017 3 次提交
    • S
      Remove FontFamily.addFont and make FontFamily immutable. · 41718c77
      Seigo Nonaka 提交于
      This is 2nd attempt of 41e02e96
      The difference is adding clearElementsEithLock to Font class which
      is necessary to delete Fonts object outside of minikin. This method
      should be removed once http://b/28119474 is fixed.
      
      Here is original commit message of reverted change.
      
      This lays the groundwork for making SparseBitSet serializable.
      FontFamily.addFont is only used when the FontFamily is constructed.
      Thus, instead of calling FontFamily.addFont multiple time, passes
      Font list to the constructor. By this change, FontFamily can be
      immutable now.
      
      By making FontFamily immutable, We can create FontFamily with
      pre-calculated SparseBitSet.
      
      Bug: 34042446
      Bug: 28119474
      Bug: 34378805
      Test: minikin_tests has passed
      Change-Id: Ice433931196f5ae79a1a7ee0c98020f914aeb5f2
      41718c77
    • S
      Revert "Remove FontFamily.addFont and make FontFamily immutable." · cc0352cc
      Siyamed Sinir 提交于
      This reverts commit 41e02e96.
      
      Bug: 34378805
      Change-Id: I8f1ee00b365c8b17c6140e9e286fbea082e31364
      cc0352cc
    • S
      Revert "Introduce createCollectionWithVariation." · 1c7b0261
      Siyamed Sinir 提交于
      This reverts commit 90e6b188.
      
      Bug: 34378805
      Change-Id: I22b683f774813724f220b1b8584ab188f3cf4fa7
      1c7b0261
  10. 12 1月, 2017 2 次提交
    • S
      Introduce createCollectionWithVariation. · 90e6b188
      Seigo Nonaka 提交于
      This lays the groundwork for variation settings support.
      Since we should regard different variations of a font as different fonts, we
      need to create new typefaces. To reuse the same instance of MinikinFont, as
      much as possible, FontFamily::createFamilyWithVariation now reuses an
      existence instance, while incrementing the reference count.
      
      Test: minikin_tests
      Bug: 33062398
      Change-Id: I08e9b74192f8af1d045f1276498fa4e60d73863e
      90e6b188
    • S
      Remove FontFamily.addFont and make FontFamily immutable. · 41e02e96
      Seigo Nonaka 提交于
      This lays the groundwork for making SparseBitSet serializable.
      FontFamily.addFont is only used when the FontFamily is constructed.
      Thus, instead of calling FontFamily.addFont multiple time, passes
      Font list to the constructor. By this change, FontFamily can be
      immutable now.
      
      By making FontFamily immutable, We can create FontFamily with
      pre-calculated SparseBitSet.
      
      Bug: 34042446
      Test: minikin_tests has passed
      Change-Id: I2576789fba6cb27687e920e2488e8bedbcf7d36f
      41e02e96
  11. 10 1月, 2017 1 次提交
  12. 28 12月, 2016 1 次提交
    • M
      minikin: Replace cutils/log.h with android/log.h or log/log.h · 555d84c6
      Mark Salyzyn 提交于
      - replace cutils/log.h with android/log.h (main buffer logging)
      - replace cutils/log.h with log.log.h (+SafetyNet logging)
      - define LOG_TAG before use.
      
      Test: compile
      Bug: 26552300
      Bug: 31289077
      Change-Id: I7a4803dd66f31b7103e09e5ff5b8fa523fa0fd60
      555d84c6
  13. 21 11月, 2016 1 次提交
    • Y
      Parse Emoji subtag and store it to FontLanguage · e1d7f616
      yirui 提交于
      Parse Emoji subtag and store into 4 different styles: default, text,
      color and empty. Replace hasEmojiFlag function with getEmojiStyle to
      get effective status according to script and subtag. However, score
      calculation for the font selection needs to be completed in the next
      stage. No performance regression is observed with this CL.
      
      Bug: 31608997
      Test: Done by unittests.
      Change-Id: I923243641c946248dd5a0aa9fb9c940515310d34
      e1d7f616
  14. 13 9月, 2016 1 次提交
  15. 10 6月, 2016 1 次提交
    • S
      Always use minikin namespace. · 14e2d136
      Seigo Nonaka 提交于
      Here is a new policy of the namespace of minikin.
      - All components should be in minikin namespace.
      - All tests are also in minikin namespace and no anonymous namespace.
      
      Bug: 29233740
      Change-Id: I71a8a35049bb8d624f7a78797231e90fed1e2b8c
      14e2d136
  16. 15 4月, 2016 1 次提交
    • S
      Returns hasVariationSelector true for VS15/VS16 · 994aa84f
      Seigo Nonaka 提交于
      Minikin has a special font fallback for VS15/VS16, so
      hasVariationSelector for emojis with VS15/VS16 should always return
      true.
      
      Bug: 27531970
      Change-Id: Ieebd58f48b135b6ec50d999df68dcc09b1284606
      994aa84f
  17. 08 4月, 2016 1 次提交
    • R
      Avoid copying of font table data · aaa4e347
      Raph Levien 提交于
      The hb_font_t object holds on to tables of font data, acquired through
      the MinikinFont::GetTable interface, which is based on copying data
      into caller-owned buffers. Now that we're caching lots of hb_font_t's,
      the cost of these buffers is significant.
      
      This patch moves to a different interface, inspired by HarfBuzz's
      hb_reference_table API, where the font can provide a pointer to the
      actual font data (which will often be mmap'ed, so it doesn't even
      consume physical RAM).
      
      Bug: 27860101
      Change-Id: Id766ab16a8d342bf7322a90e076e801271d527d4
      aaa4e347
  18. 17 2月, 2016 1 次提交
    • S
      Improve Paint.measureText and Paint.hasGlyph for variation sequences. · 6b1c227d
      Seigo Nonaka 提交于
      Before this patch, the font fallback chain iterated all installed font
      families if a variation selector was specified.
      
      This CL narrows down the range of iteration.
      To decide the font family for the variation sequence, we need to search
      for both the variation sequence and its base code point.
      The new range of the iteration is a union of them.
      
      With this change, the running time of Paint.hasGlyph for the variation
      sequence improves 50% and the running time of Paint.measureText for the
      variation sequence improves 40% for the large text case on Nexus 6
      userdebug.
      
      Bug: 26784699
      Bug: 11750374
      
      Change-Id: Iced1349e3ca750821d8882c551551f65bb569794
      6b1c227d
  19. 04 2月, 2016 1 次提交
    • S
      Improve Paint.hasGlyph performance by caching hb_font_t · 89e80237
      Seigo Nonaka 提交于
      It turned out that hb_font_t creation is not a lightweight operation.
      Especially, Paint.hasGlyph creates hb_font_t for all existing fonts
      every time. To improve the performance, cache hb_font_t instead
      of hb_face_t.
      
      Note that to calculate horizontal advance, MinikinPaint needs to be
      associated with hb_font_t by calling hb_font_set_funcs. With this patch,
      hb_font_set_funcs may be called multiple times for the same hb_font_t
      object. However this is not an issue since MinikinPaint is unique
      during layout.
      
      Bug: 26784699
      
      Change-Id: I516498ae9f0127d700fc9829327e9789845a1416
      89e80237
  20. 05 1月, 2016 1 次提交
    • S
      Save all kind of script tags into FontLanguage. · 198b46f1
      Seigo Nonaka 提交于
      This is 2nd attempt of I8df992a6851021903478972601a9a5c9424b100c.
      
      The main purpose of this CL is expanding FontLanguage to be able to
      save full script tag. Previously, FontLangauge kept only limited script
      tags. With this CL, FontLanguage keeps all script tags.
      
      This CL contains the following changes:
      - FontLanguage changes:
      -- Moved to private directory not to be instantiated outside of Minikin.
      -- Removed bool(), bits(), FontLanguage(uint32_t) methods which are no
         longer used.
      -- Change the FontLanguage internal data structure.
      -- Introduces script match logic.
      
      - FontLanguages changes:
      -- Moved to private directory not to be instantiated outside of Minikin.
      -- This is now std::vector<FontLanguage>
      
      - FontLanguageListCache changes:
      -- Now FontLanguageListCache::getId through
         FontStyle::registerLanguageList is the only way to instantiate the
         FontLanguage.
      -- Normalize input to be BCP47 compliant identifier by ICU.
      
      Bug: 26168983
      Change-Id: I431b3f361a7635497c05b85e8ecbeb48d9aef63e
      198b46f1
  21. 22 12月, 2015 2 次提交
    • B
      Revert "Save all kind of script tags into FontLanguage." · 6c4c098c
      Bart Sears 提交于
      This reverts commit 5e995fb8.
      
      Change-Id: I761e0e41906742fbe3d3ac34170af3101e18042a
      6c4c098c
    • S
      Save all kind of script tags into FontLanguage. · 5e995fb8
      Seigo Nonaka 提交于
      The main purpose of this CL is expanding FontLanguage to be able to
      save full script tag. Previously, FontLangauge kept only limited script
      tags. With this CL, FontLanguage keeps all script tags.
      
      This CL contains the following changes:
      - FontLanguage changes:
      -- Moved to private directory not to be instantiated outside of Minikin.
      -- Removed bool(), bits(), FontLanguage(uint32_t) methods which are no
         longer used.
      -- Change the FontLanguage internal data structure.
      -- Introduces script match logic.
      
      - FontLanguages changes:
      -- Moved to private directory not to be instantiated outside of Minikin.
      -- This is now std::vector<FontLanguage>
      
      - FontLanguageListCache changes:
      -- Now FontLanguageListCache::getId through
         FontStyle::registerLanguageList is the only way to instantiate the
         FontLanguage.
      -- Normalize input to be BCP47 compliant identifier by ICU.
      
      Bug: 26168983
      Change-Id: I8df992a6851021903478972601a9a5c9424b100c
      5e995fb8
  22. 11 12月, 2015 1 次提交
  23. 09 12月, 2015 1 次提交
    • S
      Introduce FontLanguageListCache. · 6d9dcd2c
      Seigo Nonaka 提交于
      FontLanguageListCache is an intentionally leaky singleton and its
      internal cache won't be purged.
      
      BUG: 25122318
      
      Change-Id: I272097e979fe44b83fd86822235350e12eda8f51
      6d9dcd2c
  24. 08 12月, 2015 1 次提交
    • S
      Select emoji font based on variation selectors. · 369d2d44
      Seigo Nonaka 提交于
      If U+FE0E is appended to the emoji code point, the glyph should have a
      text presentation.
      On the other hand, if U+FE0F is appended to the emoji code point, the
      glyph should have an emoji presentation.
      
      Bug: 11256006
      Change-Id: I5187d44500b13a138e7ffbcf2c72e2da06374c8c
      369d2d44
  25. 28 10月, 2015 1 次提交
    • S
      Add -Werror -Wall -Wextra to compiler option. · bae34768
      Seigo Nonaka 提交于
      This is 2nd trial of I30a0914a4633bd93eb60957cdf378770f04d8428
      
      - To suppress noisy unused parameter warnings, comment out unused
        arguments.
      - Add -Werror for suppressing further warning.
      - Add -Wall -Wextra for safety.
      - Use "z" prefix for format string of size_t.
      
      Verified that compile succeeded on all arm,arm64,mips,x86,x86_64.
      
      Change-Id: I7ad208464486b8a35da53929cb1cfe541ed0052f
      bae34768
  26. 23 10月, 2015 1 次提交
  27. 12 10月, 2015 1 次提交
    • S
      Introduce FontFamily::hasVariationSelector · 0f2a025d
      Seigo Nonaka 提交于
      This CL introduces new method hasVariationSelector into FontFamily but it
      is not used in production code. So no behavior changes are expected.
      
      This CL contains the following changes:
      - Introduce hasVariationSelector which returns true if the corresponding
        font has a glyph for a code point and variation selector pair.
      - Introduce purgeHbFontCache since hb_face_t won't be released by
        keeping hb_font_t.
      - Introduce unit tests with self-built font.
      
      Change-Id: I659a6d03d9ec446b409e1fba2758452abb9f44fa
      0f2a025d
  28. 08 8月, 2015 1 次提交
  29. 04 12月, 2014 2 次提交
    • A
      Minikin: Remove unused variables, fix init order · cb20a2f0
      Andreas Gampe 提交于
      For build-system CFLAGS clean-up, fix unused variables.
      
      Reorder initializer list to initialize in the order of member
      declarations.
      
      Change-Id: I64358b2dcf0e39d0f4e18fdc3473de867f84fcba
      cb20a2f0
    • R
      Move coverage bitmap from FontCollection to FontFamily · 13f1aae0
      Raph Levien 提交于
      This will significantly reduce memory usage and also speed the creation
      of new font families. In particular, the coverage bitmaps for the fonts
      in the fallback stack will be computed once in the Zygote, rather than
      separately in each app process.
      
      Bug: 17756900
      Change-Id: I66f5706bddd4658d78fe5b709f7251ca9d2ff4f8
      13f1aae0
  30. 30 10月, 2014 1 次提交
    • R
      Move coverage bitmap from FontCollection to FontFamily · 253320d2
      Raph Levien 提交于
      This will significantly reduce memory usage and also speed the creation
      of new font families. In particular, the coverage bitmaps for the fonts
      in the fallback stack will be computed once in the Zygote, rather than
      separately in each app process.
      
      Bug: 17756900
      Change-Id: I66f5706bddd4658d78fe5b709f7251ca9d2ff4f8
      253320d2
  31. 23 9月, 2014 1 次提交
    • R
      Fine-tune fake-bolding condition · d5804e39
      Raph Levien 提交于
      The old logic for fake bolding results in no fake bolding for a bold
      span on a light weight (300) because the target weight (600 in this
      case) didn't meet the condition. This patch fine-tunes the threshold
      to enable fake bolding for this.
      
      Bug: 17587185
      
      Change-Id: I04abd00a74240cbed79c417f81486aa2158b2806
      d5804e39
  32. 25 7月, 2014 1 次提交
    • B
      Towards CSS removal · a5bb9119
      Behdad Esfahbod 提交于
      Extract language from FontStyle during shaping.  Don't attach CSS
      to LayoutContext.
      
      Change-Id: Ie621d3415410178d0d15fa7b810eb8e412342ab6
      a5bb9119
  33. 13 6月, 2014 1 次提交
    • R
      Tighten requirements for fake bold · e68467e9
      Raph Levien 提交于
      The simple predicate for fake bold (2 or more grades darker than
      requested) was applying it to thin (100 weight) when normal was
      requested. This patch tightens the predicate to also require that
      the requested weight be in the bold range.
      
      Fix for bug 15588352 "sans-serif-thin doesn't work on lockscreen"
      
      Change-Id: Id9988bd149a9c8a7c943e3b221f7fb4b37fb6ddb
      (cherry picked from commit 9f9f3b1e)
      e68467e9