From cd348c679ec577c47b74dbeb7bf80a15ced80202 Mon Sep 17 00:00:00 2001 From: Seigo Nonaka Date: Tue, 12 Sep 2023 16:05:44 +0900 Subject: Draw a single underline if multiple fonts are used in a single line. Bug: 297336724 Test: atest hwui_unit_tests (with flag on/off) Change-Id: I48018abd68c767c9c7ad08722a8974efc1bfe67c --- libs/hwui/SkiaCanvas.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/hwui/SkiaCanvas.cpp') diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index 8394c3cd4175..31fc929dfcdf 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -47,6 +47,7 @@ #include #include "CanvasProperty.h" +#include "FeatureFlags.h" #include "Mesh.h" #include "NinePatchUtils.h" #include "VectorDrawable.h" @@ -795,7 +796,9 @@ void SkiaCanvas::drawGlyphs(ReadGlyphFunc glyphFunc, int count, const Paint& pai sk_sp textBlob(builder.make()); applyLooper(&paintCopy, [&](const SkPaint& p) { mCanvas->drawTextBlob(textBlob, 0, 0, p); }); - drawTextDecorations(x, y, totalAdvance, paintCopy); + if (!text_feature::fix_double_underline()) { + drawTextDecorations(x, y, totalAdvance, paintCopy); + } } void SkiaCanvas::drawLayoutOnPath(const minikin::Layout& layout, float hOffset, float vOffset, -- cgit v1.2.3-59-g8ed1b