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

Commit b03e1176 authored by Deepanshu Gupta's avatar Deepanshu Gupta Committed by Android Git Automerger
Browse files

am 533a52fe: am b7fd6315: Merge "Fix sans-serif-thin and sans-serif-light...

am 533a52fe: am b7fd6315: Merge "Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]" into jb-mr2-dev

* commit '533a52fe':
  Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
parents 90b0b69c 533a52fe
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -57,7 +57,9 @@ public final class FontLoader {
    private static final String FONT_SUFFIX_NONE = ".ttf";
    private static final String FONT_SUFFIX_REGULAR = "-Regular.ttf";
    private static final String FONT_SUFFIX_BOLD = "-Bold.ttf";
    private static final String FONT_SUFFIX_ITALIC = "-Italic.ttf";
    // FONT_SUFFIX_ITALIC will always match FONT_SUFFIX_BOLDITALIC and hence it must be checked
    // separately.
    private static final String FONT_SUFFIX_ITALIC = "Italic.ttf";
    private static final String FONT_SUFFIX_BOLDITALIC = "-BoldItalic.ttf";

    // This must match the values of Typeface styles so that we can use them for indices in this
@@ -285,10 +287,10 @@ public final class FontLoader {
                            mFontInfo.font[Typeface.NORMAL] = font;
                        } else if (fileName.endsWith(FONT_SUFFIX_BOLD)) {
                            mFontInfo.font[Typeface.BOLD] = font;
                        } else if (fileName.endsWith(FONT_SUFFIX_ITALIC)) {
                            mFontInfo.font[Typeface.ITALIC] = font;
                        } else if (fileName.endsWith(FONT_SUFFIX_BOLDITALIC)) {
                            mFontInfo.font[Typeface.BOLD_ITALIC] = font;
                        } else if (fileName.endsWith(FONT_SUFFIX_ITALIC)) {
                            mFontInfo.font[Typeface.ITALIC] = font;
                        } else if (fileName.endsWith(FONT_SUFFIX_NONE)) {
                            mFontInfo.font[Typeface.NORMAL] = font;
                        }