Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b60dc9a3 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Remove fix_double_underline flag

Bug: 297336724
Bug: 364533012
Flag: EXEMPT removing com.android.text.flags.fix_double_underline
Test: N/A
Change-Id: I794d7f7061e7f11be495a3b26ba98a8fc69c5820
parent 4725fe6c
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -19,13 +19,6 @@ flag {
  bug: "281769620"
}

flag {
  name: "fix_double_underline"
  namespace: "text"
  description: "Feature flag for fixing double underline because of the multiple font used in the single line."
  bug: "297336724"
}

flag {
  name: "fix_line_height_for_locale"
  is_exported: true
+0 −8
Original line number Diff line number Diff line
@@ -25,14 +25,6 @@ namespace android {

namespace text_feature {

inline bool fix_double_underline() {
#ifdef __ANDROID__
    return com_android_text_flags_fix_double_underline();
#else
    return true;
#endif  // __ANDROID__
}

inline bool deprecate_ui_fonts() {
#ifdef __ANDROID__
    return com_android_text_flags_deprecate_ui_fonts();
+0 −3
Original line number Diff line number Diff line
@@ -841,9 +841,6 @@ void SkiaCanvas::drawGlyphs(ReadGlyphFunc glyphFunc, int count, const Paint& pai
    sk_sp<SkTextBlob> textBlob(builder.make());

    applyLooper(&paintCopy, [&](const SkPaint& p) { mCanvas->drawTextBlob(textBlob, 0, 0, p); });
    if (!text_feature::fix_double_underline()) {
        drawTextDecorations(x, y, totalAdvance, paintCopy);
    }
}

void SkiaCanvas::drawLayoutOnPath(const minikin::Layout& layout, float hOffset, float vOffset,
+19 −21
Original line number Diff line number Diff line
@@ -110,7 +110,6 @@ void Canvas::drawText(const uint16_t* text, int textSize, int start, int count,
    DrawTextFunctor f(layout, this, paint, x, y, layout.getAdvance());
    MinikinUtils::forFontRun(layout, &paint, f);

    if (text_feature::fix_double_underline()) {
    Paint copied(paint);
    PaintFilter* filter = getPaintFilter();
    if (filter != nullptr) {
@@ -134,7 +133,6 @@ void Canvas::drawText(const uint16_t* text, int textSize, int start, int count,
        }
    }
}
}

void Canvas::drawDoubleRoundRectXY(float outerLeft, float outerTop, float outerRight,
                            float outerBottom, float outerRx, float outerRy, float innerLeft,
+23 −25
Original line number Diff line number Diff line
@@ -142,7 +142,6 @@ public:
            canvas->drawGlyphs(glyphFunc, glyphCount, paint, x, y, totalAdvance);
        }

        if (text_feature::fix_double_underline()) {
        // Extract underline position and thickness.
        if (paint.isUnderline()) {
            SkFontMetrics metrics;
@@ -169,7 +168,6 @@ public:
            underlineThickness = std::max(underlineThickness, thickness);
        }
    }
    }

    float getUnderlinePosition() const { return underlinePosition; }
    float getUnderlineThickness() const { return underlineThickness; }
Loading