Home | History | Annotate | Download | only in values
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3   ~ Copyright (C) 2017 The Android Open Source Project
      4   ~
      5   ~ Licensed under the Apache License, Version 2.0 (the "License");
      6   ~ you may not use this file except in compliance with the License.
      7   ~ You may obtain a copy of the License at
      8   ~
      9   ~      http://www.apache.org/licenses/LICENSE-2.0
     10   ~
     11   ~ Unless required by applicable law or agreed to in writing, software
     12   ~ distributed under the License is distributed on an "AS IS" BASIS,
     13   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14   ~ See the License for the specific language governing permissions and
     15   ~ limitations under the License.
     16   -->
     17 <resources>
     18     <!-- Attributes that are read when parsing a <fontfamily> tag. -->
     19     <declare-styleable name="FontFamily">
     20         <!-- The authority of the Font Provider to be used for the request. -->
     21         <attr name="fontProviderAuthority" format="string" />
     22         <!-- The package for the Font Provider to be used for the request. This is used to verify
     23         the identity of the provider. -->
     24         <attr name="fontProviderPackage" format="string" />
     25         <!-- The query to be sent over to the provider. Refer to your font provider's documentation
     26         on the format of this string. -->
     27         <attr name="fontProviderQuery" format="string" />
     28         <!-- The sets of hashes for the certificates the provider should be signed with. This is
     29         used to verify the identity of the provider, and is only required if the provider is not
     30         part of the system image. This value may point to one list or a list of lists, where each
     31         individual list represents one collection of signature hashes. Refer to your font provider's
     32         documentation for these values. -->
     33         <attr name="fontProviderCerts" format="reference" />
     34         <!-- The strategy to be used when fetching font data from a font provider in XML layouts.
     35           -->
     36         <attr name="fontProviderFetchStrategy">
     37             <!-- The blocking font fetch works as follows.
     38               First, check the local cache, then if the requested font is not cached, request the
     39               font from the provider and wait until it is finished.  You can change the length of
     40               the timeout by modifying fontProviderFetchTimeout.  If the timeout happens, the
     41               default typeface will be used instead. -->
     42             <enum name="blocking" value="0" />
     43             <!-- The async font fetch works as follows.
     44               First, check the local cache, then if the requeted font is not cached, trigger a
     45               request the font and continue with layout inflation. Once the font fetch succeeds, the
     46               target text view will be refreshed with the downloaded font data. The
     47               fontProviderFetchTimeout will be ignored if async loading is specified. -->
     48             <enum name="async" value="1" />
     49         </attr>
     50         <!-- The length of the timeout during fetching. -->
     51         <attr name="fontProviderFetchTimeout" format="integer">
     52           <!-- A special value for the timeout. In this case, the blocking font fetching will not
     53             timeout and wait until a reply is received from the font provider. -->
     54             <enum name="forever" value="-1" />
     55         </attr>
     56     </declare-styleable>
     57 
     58     <!-- Attributes that are read when parsing a <font> tag, which is a child of
     59          <font-family>. This represents an actual font file and its attributes. -->
     60     <declare-styleable name="FontFamilyFont">
     61         <!-- The style of the given font file. This will be used when the font is being loaded into
     62          the font stack and will override any style information in the font's header tables. If
     63          unspecified, the value in the font's header tables will be used. -->
     64         <attr name="fontStyle">
     65             <enum name="normal" value="0" />
     66             <enum name="italic" value="1" />
     67         </attr>
     68         <!-- The reference to the font file to be used. This should be a file in the res/font folder
     69          and should therefore have an R reference value. E.g. @font/myfont -->
     70         <attr name="font" format="reference" />
     71         <!-- The weight of the given font file. This will be used when the font is being loaded into
     72          the font stack and will override any weight information in the font's header tables. Must
     73          be a positive number, a multiple of 100, and between 100 and 900, inclusive. The most
     74          common values are 400 for regular weight and 700 for bold weight. If unspecified, the value
     75          in the font's header tables will be used. -->
     76         <attr name="fontWeight" format="integer" />
     77     </declare-styleable>
     78 </resources>
     79