1 /*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef MINIKIN_CONST_H
18 #define MINIKIN_CONST_H
19
20 #include <cstdint>
21 #include <memory>
22 #include <vector>
23
24 #include "minikin/FontVariation.h"
25
26 namespace minikin {
27
28 constexpr uint32_t CHAR_LIMIT_FOR_CACHE = 128;
29
MakeTag(char c1,char c2,char c3,char c4)30 constexpr uint32_t MakeTag(char c1, char c2, char c3, char c4) {
31 return ((uint32_t)c1 << 24) | ((uint32_t)c2 << 16) | ((uint32_t)c3 << 8) | (uint32_t)c4;
32 }
33
34 // Axis tags
35 const uint32_t TAG_wght = MakeTag('w', 'g', 'h', 't');
36 const uint32_t TAG_ital = MakeTag('i', 't', 'a', 'l');
37
38 } // namespace minikin
39
40 #endif // MINIKIN_CONST_H
41