• 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, notofonts_fonts_list) {
20  font_name = font.font_name
21  ohos_prebuilt_etc(font_name) {
22    if (font_name == "NotoSans") {
23      symlink_target_name = [ "Roboto-Regular.ttf" ]
24    }
25    source = font.font_path
26    module_install_dir = "fonts"
27    subsystem_name = "thirdparty"
28    part_name = "notofonts"
29  }
30  dep_list += [ font_name ]
31}
32
33group("fonts_notofonts") {
34  deps = []
35  foreach(dep, dep_list) {
36    deps += [ ":${dep}" ]
37  }
38}
39
40ohos_copy("copy_preview_fonts_notofonts") {
41  sources = []
42  foreach(font, notofonts_fonts_list) {
43    sources += [ font.font_path ]
44  }
45  outputs =
46      [ target_out_dir + "/previewer/common/bin/fonts/{{source_file_part}}" ]
47  module_source_dir = target_out_dir + "/previewer/common/bin/"
48  module_install_name = ""
49  subsystem_name = "thirdparty"
50  part_name = "notofonts"
51}
52