Load typefaces via Consumer in Piet Android

TextElementAdapter still handles typeface fallbacks when the host calls consumer.accept(null).

I changed the missing fonts error to be called as a warning, since it is still be able to load a default font. I also updated it so that it's only called when no typefaces can be loaded, which is what is specified in errors.proto. That's also the behavior errors.proto specifies for image loading.

I had to update all of the font/typeface tests, since getTypeface() is a void method now that we're using a consumer.

PiperOrigin-RevId: 244713868
Change-Id: I14246f5a91f071e616811843615e48edb14e00e9
8 files changed
tree: 7a8c1fc1d8b90d4f68f546e124647f68dcd9704a
  1. AUTHORS
  2. CONTRIBUTING.md
  3. CONTRIBUTORS
  4. LICENSE
  5. README.md
  6. WORKSPACE
  7. src/
  8. third_party/
README.md

Feed Libraries

This directory includes various libraries and protocols which users can use to to embed the proactive content recommendations into their application. Supported surfaces currently include Android.

Contributing

See CONTRIBUTING.md.