Commit Graph

3 Commits

Author SHA1 Message Date
Hal Canary
ccafca0054 DM: hide DM:FontMgr behind a factory
Change-Id: I4dc745479ceb1d5ca1ddb4a0904f342576e4562c
Reviewed-on: https://skia-review.googlesource.com/71240
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-11-14 16:24:44 +00:00
Mike Klein
cb6940bf42 DM FontMgr updates
- return nullptr for the various makeFromFoo() that we can't support,
    and tweak a few unit tests to bail out early when they do

  - create FontStyleSet and SkTypefaces once

  - abort early from FontHostStream if we can't openStream()

  - implement SkTestTypeface::onCreateFamilyNameIterator()
    with SkOTUtils::LocalizedStrings_SingleName() so FontNames passes

  - pin out-of-range glyph IDs to zero in SkTestTypeface

Change-Id: Iac53265e331fc1c5c507513af3ab299063e6610a
Reviewed-on: https://skia-review.googlesource.com/69501
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-11-10 15:30:57 +00:00
Mike Klein
3186821c7e add a SkFontMgr to DM that returns portable fonts
Controlled by --[no]nativeFonts, and still defaults to native fonts.

Change-Id: Ib2879e69fadb63ddb5a17a7e4ae227941893b8cf
Reviewed-on: https://skia-review.googlesource.com/67806
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-11-06 21:21:42 +00:00