skia2/include
Ben Wagner fcfd0af9fd Notify when SkFontMetrics bounds are bogus.
OpenType and many other font formats have the concept of pre-computed
metrics for the union of all glyph bounding boxes. This allows for fast
though course quick rejecting of bounds, since the glyphs themselves may
potentially be quite a bit larger than the EM. With the introduction of
variable fonts OpenType does not vary these bounds, so the bounds are
only valid for the default non-varied font.

As a result the fTop, fBottom, fXMax, and fXMin reported in
SkFontMetrics may be bogus. Since simply always setting them to empty
zeros may be disruptive, provide a way forward for new users to check if
the bounds are valid.

This exposed an issue where SkTextBlobBuilder::TightRunBounds does not
handle SkTextBlob::kRSXform_Positioning, so add a test for that.

Change-Id: I872729e0f16e2a196229f9902addf4b07b461590
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301455
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-07-09 19:26:40 +00:00
..
android androidFramework_replaceClip proposal 2020-06-25 21:54:11 +00:00
c Small fixes to C API. Add SK_API and fix function signature mismatch. 2019-06-07 01:29:23 +00:00
codec Allow decoding without color conversion - part 2 2020-02-07 19:24:33 +00:00
config rm SkPreConfig.h and SkPostConfig.h 2020-02-06 19:16:43 +00:00
core Notify when SkFontMetrics bounds are bogus. 2020-07-09 19:26:40 +00:00
docs Add appendNodeIdArray to avoid code duplication. 2020-06-23 14:25:33 +00:00
effects Change SampleMatrix to SampleUsage 2020-07-01 16:37:43 +00:00
encode Revert "add runtime registration for encoders" 2019-05-15 22:02:39 +00:00
gpu Make SkGpuDevice hold a GrRecordingContext (take 2) 2020-07-09 12:28:22 +00:00
pathops rm SkPreConfig.h and SkPostConfig.h 2020-02-06 19:16:43 +00:00
ports Make SkFontMgr::onMakeFromStreamArgs pure virtual. 2020-06-28 01:16:34 +00:00
private Mark SkGetThreadID SK_SPI in debug. 2020-07-07 21:50:55 +00:00
svg [svgcanvas] Add flag to suppress newlines and tabs in XML 2019-08-21 20:17:37 +00:00
third_party Roll skcms from da218e6af725 to 5404be4a2703 (1 revision) 2020-05-26 16:19:09 +00:00
utils Add missing recordingContext override to SkPaintFilterCanvas 2020-07-09 13:35:52 +00:00