Home | History | Annotate | Download | only in cts

Lines Matching defs:Font

42     final static String AUTHORITY = "android.provider.fonts.cts.font";
62 static class Font {
63 public Font(int id, int fileId, int ttcIndex, String varSettings, int weight, int italic,
117 private static Map<String, Font[]> QUERY_MAP;
119 HashMap<String, Font[]> map = new HashMap<>();
122 map.put(SINGLE_FONT_FAMILY_QUERY, new Font[] {
123 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 400, 0, Columns.RESULT_CODE_OK, true),
126 map.put(MULTIPLE_FAMILY_QUERY, new Font[] {
127 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 400, 0, Columns.RESULT_CODE_OK, true),
128 new Font(id++, SAMPLE_FONT_FILE_1_ID, 0, null, 400, 0, Columns.RESULT_CODE_OK, true),
129 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 700, 1, Columns.RESULT_CODE_OK, true),
130 new Font(id++, SAMPLE_FONT_FILE_1_ID, 0, null, 700, 1, Columns.RESULT_CODE_OK, true),
133 map.put(ALL_ATTRIBUTE_VALUES_QUERY, new Font[] {
134 new Font(id++, SAMPLE_TTC_FONT_FILE_ID, 0, "'wght' 100", 400, 0,
136 new Font(id++, SAMPLE_TTC_FONT_FILE_ID, 1, "'wght' 100", 700, 1,
140 map.put(NOT_FOUND_QUERY, new Font[] {
141 new Font(0, 0, 0, null, 400, 0, Columns.RESULT_CODE_FONT_NOT_FOUND, true),
144 map.put(UNAVAILABLE_QUERY, new Font[] {
145 new Font(0, 0, 0, null, 400, 0, Columns.RESULT_CODE_FONT_UNAVAILABLE, true),
148 map.put(MALFORMED_QUERY, new Font[] {
149 new Font(0, 0, 0, null, 400, 0, Columns.RESULT_CODE_MALFORMED_QUERY, true),
152 map.put(NOT_FOUND_SECOND_QUERY, new Font[] {
153 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 700, 0, Columns.RESULT_CODE_OK,
155 new Font(0, 0, 0, null, 400, 0, Columns.RESULT_CODE_FONT_NOT_FOUND, true),
158 map.put(NOT_FOUND_THIRD_QUERY, new Font[] {
159 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 700, 0, Columns.RESULT_CODE_OK,
161 new Font(0, 0, 0, null, 400, 0, Columns.RESULT_CODE_FONT_NOT_FOUND, true),
162 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 700, 0, Columns.RESULT_CODE_OK,
166 map.put(NEGATIVE_ERROR_CODE_QUERY, new Font[] {
167 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 700, 0, -5, true),
170 map.put(MANDATORY_FIELDS_ONLY_QUERY, new Font[] {
171 new Font(id++, SAMPLE_FONT_FILE_0_ID, 0, null, 400, 0,
179 private static Cursor buildCursor(Font[] in) {
182 for (Font font : in) {
184 builder.add(Columns._ID, font.getId());
185 builder.add(Columns.FILE_ID, font.getFileId());
192 for (Font font : in) {
194 builder.add(Columns._ID, font.getId());
195 builder.add(Columns.FILE_ID, font.getFileId());
196 builder.add(Columns.TTC_INDEX, font.getTtcIndex());
197 builder.add(Columns.VARIATION_SETTINGS, font.getVarSettings());
198 builder.add(Columns.WEIGHT, font.getWeight());
199 builder.add(Columns.ITALIC, font.getItalic());
200 builder.add(Columns.RESULT_CODE, font.getResultCode());
235 "Failed to find font file. Did you forget to call prepareFontFiles in setUp?");
246 return "vnd.android.cursor.dir/vnd.android.provider.cts.font";