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

Commit 159ffa58 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move new_fonts_fallback_xml to released aconfig" into main

parents e9de3a9b 0b97ba75
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -34,3 +34,13 @@ flag {
  description: "Feature flag that preserve the line height of the TextView and EditText even if the the locale is different from Latin"
  bug: "303326708"
}

flag {
  name: "new_fonts_fallback_xml"
  is_exported: true
  namespace: "text"
  description: "Feature flag for deprecating fonts.xml. By setting true for this feature flag, the new font configuration XML, /system/etc/font_fallback.xml is used. The new XML has a new syntax and flexibility of variable font declarations, but it is not compatible with the apps that reads fonts.xml. So, fonts.xml is maintained as a subset of the font_fallback.xml"
  # Make read only, as it could be used before the Settings provider is initialized.
  is_fixed_read_only: true
  bug: "281769620"
}
+0 −10
Original line number Diff line number Diff line
package: "com.android.text.flags"
container: "system"

flag {
  name: "new_fonts_fallback_xml"
  is_exported: true
  namespace: "text"
  description: "Feature flag for deprecating fonts.xml. By setting true for this feature flag, the new font configuration XML, /system/etc/font_fallback.xml is used. The new XML has a new syntax and flexibility of variable font declarations, but it is not compatible with the apps that reads fonts.xml. So, fonts.xml is maintained as a subset of the font_fallback.xml"
  # Make read only, as it could be used before the Settings provider is initialized.
  is_fixed_read_only: true
  bug: "281769620"
}

flag {
  name: "no_break_no_hyphenation_span"
  is_exported: true
+2 −14
Original line number Diff line number Diff line
@@ -306,13 +306,7 @@ public final class SystemFonts {
            long lastModifiedDate,
            int configVersion
    ) {
        final String fontsXml;
        if (com.android.text.flags.Flags.newFontsFallbackXml()) {
            fontsXml = FONTS_XML;
        } else {
            fontsXml = LEGACY_FONTS_XML;
        }
        return getSystemFontConfigInternal(fontsXml, SYSTEM_FONT_DIR, OEM_XML, OEM_FONT_DIR,
        return getSystemFontConfigInternal(FONTS_XML, SYSTEM_FONT_DIR, OEM_XML, OEM_FONT_DIR,
                updatableFontMap, lastModifiedDate, configVersion);
    }

@@ -337,13 +331,7 @@ public final class SystemFonts {
     * @hide
     */
    public static @NonNull FontConfig getSystemPreinstalledFontConfig() {
        final String fontsXml;
        if (com.android.text.flags.Flags.newFontsFallbackXml()) {
            fontsXml = FONTS_XML;
        } else {
            fontsXml = LEGACY_FONTS_XML;
        }
        return getSystemFontConfigInternal(fontsXml, SYSTEM_FONT_DIR, OEM_XML, OEM_FONT_DIR, null,
        return getSystemFontConfigInternal(FONTS_XML, SYSTEM_FONT_DIR, OEM_XML, OEM_FONT_DIR, null,
                0, 0);
    }