Merge "Use 'index' instead of 'ttcIndex' for attribute name."

This commit is contained in:
Ben Wagner
2015-12-12 17:26:43 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 5 deletions

View File

@@ -330,16 +330,16 @@
<font weight="400" style="normal">NotoSansSymbols-Regular-Subsetted.ttf</font>
</family>
<family lang="zh-Hans">
<font weight="400" style="normal" ttcIndex="2">NotoSansCJK-Regular.ttc</font>
<font weight="400" style="normal" index="2">NotoSansCJK-Regular.ttc</font>
</family>
<family lang="zh-Hant">
<font weight="400" style="normal" ttcIndex="3">NotoSansCJK-Regular.ttc</font>
<font weight="400" style="normal" index="3">NotoSansCJK-Regular.ttc</font>
</family>
<family lang="ja">
<font weight="400" style="normal" ttcIndex="0">NotoSansCJK-Regular.ttc</font>
<font weight="400" style="normal" index="0">NotoSansCJK-Regular.ttc</font>
</family>
<family lang="ko">
<font weight="400" style="normal" ttcIndex="1">NotoSansCJK-Regular.ttc</font>
<font weight="400" style="normal" index="1">NotoSansCJK-Regular.ttc</font>
</family>
<family>
<font weight="400" style="normal">NanumGothic.ttf</font>

View File

@@ -114,7 +114,7 @@ public class FontListParser {
if (parser.getEventType() != XmlPullParser.START_TAG) continue;
String tag = parser.getName();
if (tag.equals("font")) {
String ttcIndexStr = parser.getAttributeValue(null, "ttcIndex");
String ttcIndexStr = parser.getAttributeValue(null, "index");
int ttcIndex = ttcIndexStr == null ? 0 : Integer.parseInt(ttcIndexStr);
String weightStr = parser.getAttributeValue(null, "weight");
int weight = weightStr == null ? 400 : Integer.parseInt(weightStr);