• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#Copyright (c) 2024 Huawei Device Co., Ltd.
2#Licensed under the Apache License, Version 2.0 (the "License");
3#you may not use this file except in compliance with the License.
4#You may obtain a copy of the License at
5#
6#    http://www.apache.org/licenses/LICENSE-2.0
7#
8#Unless required by applicable law or agreed to in writing, software
9#distributed under the License is distributed on an "AS IS" BASIS,
10#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11#See the License for the specific language governing permissions and
12#limitations under the License.
13
14import("//build/ohos.gni")
15import("fonts_config.gni")
16
17dep_list = []
18
19foreach(font, notocjk_fonts_list) {
20  isLoadFont = false
21  foreach(device, font.support_devices) {
22    if (noto_cjk_font_feature_product == device) {
23      isLoadFont = true
24    }
25  }
26
27  if (isLoadFont) {
28    font_name = font.font_name
29    ohos_prebuilt_etc(font_name) {
30      source = font.font_path
31      if (font.alias_name != "") {
32        output = font.alias_name
33      }
34      module_install_dir = "fonts"
35      subsystem_name = "thirdparty"
36      part_name = "noto-cjk"
37    }
38    dep_list += [ font_name ]
39  }
40}
41
42group("fonts_notocjk") {
43  deps = []
44  foreach(dep, dep_list) {
45    deps += [ ":${dep}" ]
46  }
47}
48
49ohos_copy("copy_preview_fonts_notocjk") {
50  sources = []
51  foreach(font, notocjk_fonts_list) {
52    sources += [ font.font_path ]
53  }
54  outputs =
55      [ target_out_dir + "/previewer/common/bin/fonts/{{source_file_part}}" ]
56  module_source_dir = target_out_dir + "/previewer/common/bin/"
57  module_install_name = ""
58  subsystem_name = "thirdparty"
59  part_name = "noto-cjk"
60}
61
62ohos_copy("copy_preview_fonts_notocjk_ext") {
63  sources = []
64  foreach(font, notocjk_fonts_list) {
65    sources += [ font.font_path ]
66  }
67  outputs =
68      [ target_out_dir + "/previewer/resources/fonts/{{source_file_part}}" ]
69  module_source_dir = target_out_dir + "/previewer/resources"
70  module_install_name = ""
71  subsystem_name = "thirdparty"
72  part_name = "noto-cjk"
73}
74