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

Commit 5f4912fe authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Remove deprecate_ui_fonts flag

Bug: 279646685
Bug: 364533012
Flag: EXEMPT removing com.android.text.flags.deprecate_ui_fonts
Test: N/A
Change-Id: I2d050e6c36eb2e0d0d3d05ee9ceb63067ae66895
parent 784140a0
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -58,13 +58,6 @@ flag {
  bug: "63938206"
}

flag {
  name: "deprecate_ui_fonts"
  namespace: "text"
  description: "Feature flag for deprecating UI fonts. By setting true for this feature flag, the elegant text height of will be turned on by default unless explicitly setting it to false by attribute or Java API call."
  bug: "279646685"
}

flag {
  name: "word_style_auto"
  is_exported: true
+1 −10
Original line number Diff line number Diff line
@@ -1805,16 +1805,7 @@ public class Paint {
     * @return true if elegant metrics are enabled for text drawing.
     */
    public boolean isElegantTextHeight() {
        int rawValue = nGetElegantTextHeight(mNativePaint);
        switch (rawValue) {
            case ELEGANT_TEXT_HEIGHT_DISABLED:
                return false;
            case ELEGANT_TEXT_HEIGHT_ENABLED:
                return true;
            case ELEGANT_TEXT_HEIGHT_UNSET:
            default:
                return com.android.text.flags.Flags.deprecateUiFonts();
        }
        return nGetElegantTextHeight(mNativePaint) != ELEGANT_TEXT_HEIGHT_DISABLED;
    }

    // Note: the following three values must be equal to the ones in the JNI file: Paint.cpp
+0 −8
Original line number Diff line number Diff line
@@ -25,14 +25,6 @@ namespace android {

namespace text_feature {

inline bool deprecate_ui_fonts() {
#ifdef __ANDROID__
    return com_android_text_flags_deprecate_ui_fonts();
#else
    return true;
#endif  // __ANDROID__
}

inline bool letter_spacing_justification() {
#ifdef __ANDROID__
    return com_android_text_flags_letter_spacing_justification();
+1 −3
Original line number Diff line number Diff line
@@ -53,9 +53,7 @@ minikin::MinikinPaint MinikinUtils::prepareMinikinPaint(const Paint* paint,
    if (familyVariant.has_value()) {
        minikinPaint.familyVariant = familyVariant.value();
    } else {
        minikinPaint.familyVariant = text_feature::deprecate_ui_fonts()
                                             ? minikin::FamilyVariant::ELEGANT
                                             : minikin::FamilyVariant::DEFAULT;
        minikinPaint.familyVariant = minikin::FamilyVariant::ELEGANT;
    }
    return minikinPaint;
}