1543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri<?xml version="1.0" encoding="utf-8"?>
2543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri<!--
3543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~ Copyright (C) 2017 The Android Open Source Project
4543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~
5543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~ Licensed under the Apache License, Version 2.0 (the "License");
6543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~ you may not use this file except in compliance with the License.
7543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~ You may obtain a copy of the License at
8543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~
9543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~      http://www.apache.org/licenses/LICENSE-2.0
10543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~
11543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~ Unless required by applicable law or agreed to in writing, software
12543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~ distributed under the License is distributed on an "AS IS" BASIS,
13543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~ See the License for the specific language governing permissions and
15543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  ~ limitations under the License.
16543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri  -->
17543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri<resources>
18543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri    <!-- Attributes that are read when parsing a <fontfamily> tag. -->
19543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri    <declare-styleable name="FontFamily">
20543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <!-- The authority of the Font Provider to be used for the request. -->
21543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <attr name="fontProviderAuthority" format="string" />
22543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <!-- The package for the Font Provider to be used for the request. This is used to verify
23543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        the identity of the provider. -->
24543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <attr name="fontProviderPackage" format="string" />
25543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <!-- The query to be sent over to the provider. Refer to your font provider's documentation
26543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        on the format of this string. -->
27543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <attr name="fontProviderQuery" format="string" />
28543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <!-- The sets of hashes for the certificates the provider should be signed with. This is
29543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        used to verify the identity of the provider, and is only required if the provider is not
30543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        part of the system image. This value may point to one list or a list of lists, where each
31543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        individual list represents one collection of signature hashes. Refer to your font provider's
32543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        documentation for these values. -->
33543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <attr name="fontProviderCerts" format="reference" />
342afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka        <!-- The strategy to be used when fetching font data from a font provider in XML layouts.
352afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka          -->
362afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka        <attr name="fontProviderFetchStrategy">
372afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka            <!-- The blocking font fetch works as follows.
382afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka              First, check the local cache, then if the requested font is not cached, request the
392afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka              font from the provider and wait until it is finished.  You can change the length of
402afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka              the timeout by modifying fontProviderFetchTimeout.  If the timeout happens, the
412afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka              default typeface will be used instead. -->
422afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka            <enum name="blocking" value="0" />
432afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka            <!-- The async font fetch works as follows.
442afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka              First, check the local cache, then if the requeted font is not cached, trigger a
452afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka              request the font and continue with layout inflation. Once the font fetch succeeds, the
462afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka              target text view will be refreshed with the downloaded font data. The
472afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka              fontProviderFetchTimeout will be ignored if async loading is specified. -->
482afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka            <enum name="async" value="1" />
492afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka        </attr>
502afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka        <!-- The length of the timeout during fetching. -->
512afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka        <attr name="fontProviderFetchTimeout" format="integer">
522afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka          <!-- A special value for the timeout. In this case, the blocking font fetching will not
532afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka            timeout and wait until a reply is received from the font provider. -->
542afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka            <enum name="forever" value="-1" />
552afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka        </attr>
56543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri    </declare-styleable>
57543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri
58543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri    <!-- Attributes that are read when parsing a <font> tag, which is a child of
59543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri         <font-family>. This represents an actual font file and its attributes. -->
60543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri    <declare-styleable name="FontFamilyFont">
61543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <!-- The style of the given font file. This will be used when the font is being loaded into
62543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri         the font stack and will override any style information in the font's header tables. If
63543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri         unspecified, the value in the font's header tables will be used. -->
64543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <attr name="fontStyle">
65543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri            <enum name="normal" value="0" />
66543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri            <enum name="italic" value="1" />
67543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        </attr>
68543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <!-- The reference to the font file to be used. This should be a file in the res/font folder
69543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri         and should therefore have an R reference value. E.g. @font/myfont -->
70543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <attr name="font" format="reference" />
71543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <!-- The weight of the given font file. This will be used when the font is being loaded into
72543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri         the font stack and will override any weight information in the font's header tables. Must
73543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri         be a positive number, a multiple of 100, and between 100 and 900, inclusive. The most
74543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri         common values are 400 for regular weight and 700 for bold weight. If unspecified, the value
75543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri         in the font's header tables will be used. -->
76543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri        <attr name="fontWeight" format="integer" />
77543fd2946ded1593b28553879e74ca4393eddd2eClara Bayarri    </declare-styleable>
782afabd060e15342c0ba622cb08f5be61a328e566Seigo Nonaka</resources>
79