| 1 |
load( |
| 2 |
"//bazel:skia_rules.bzl", |
| 3 |
"skia_cc_library", |
| 4 |
"skia_filegroup", |
| 5 |
) |
| 6 |
|
| 7 |
package( |
| 8 |
default_applicable_licenses = ["//:license"], |
| 9 |
) |
| 10 |
|
| 11 |
licenses(["notice"]) |
| 12 |
|
| 13 |
skia_filegroup( |
| 14 |
name = "test_font_manager_srcs", |
| 15 |
testonly = True, |
| 16 |
srcs = [ |
| 17 |
"FontToolUtils.cpp", |
| 18 |
"FontToolUtils.h", |
| 19 |
"TestFontMgr.cpp", |
| 20 |
"TestFontMgr.h", |
| 21 |
"TestSVGTypeface.cpp", |
| 22 |
"TestSVGTypeface.h", |
| 23 |
"TestTypeface.cpp", |
| 24 |
"TestTypeface.h", |
| 25 |
], |
| 26 |
visibility = [ |
| 27 |
"//tests:__pkg__", |
| 28 |
"//tools:__subpackages__", |
| 29 |
], |
| 30 |
) |
| 31 |
|
| 32 |
skia_filegroup( |
| 33 |
name = "test_fonts", |
| 34 |
testonly = True, |
| 35 |
srcs = [ |
| 36 |
"test_font_index.inc", |
| 37 |
"test_font_monospace.inc", |
| 38 |
"test_font_sans_serif.inc", |
| 39 |
"test_font_serif.inc", |
| 40 |
], |
| 41 |
visibility = [ |
| 42 |
"//tests:__pkg__", |
| 43 |
"//tools:__subpackages__", |
| 44 |
], |
| 45 |
) |
| 46 |
|
| 47 |
skia_filegroup( |
| 48 |
name = "test_empty_typeface", |
| 49 |
testonly = True, |
| 50 |
srcs = ["TestEmptyTypeface.h"], |
| 51 |
visibility = ["//tests:__pkg__"], |
| 52 |
) |
| 53 |
|
| 54 |
skia_cc_library( |
| 55 |
name = "font_tool_utils", |
| 56 |
testonly = True, |
| 57 |
srcs = [ |
| 58 |
"FontToolUtils.cpp", |
| 59 |
"TestFontMgr.cpp", |
| 60 |
"TestFontMgr.h", |
| 61 |
"TestTypeface.cpp", |
| 62 |
"TestTypeface.h", |
| 63 |
], |
| 64 |
hdrs = [ |
| 65 |
"FontToolUtils.h", |
| 66 |
], |
| 67 |
features = ["layering_check"], |
| 68 |
textual_hdrs = [ |
| 69 |
"//tools/fonts:test_fonts", |
| 70 |
], |
| 71 |
visibility = [ |
| 72 |
"//bench:__subpackages__", |
| 73 |
"//gm:__subpackages__", |
| 74 |
"//tests:__subpackages__", |
| 75 |
"//tools:__subpackages__", |
| 76 |
], |
| 77 |
deps = [ |
| 78 |
"//:core", |
| 79 |
"//src/base", |
| 80 |
"//src/core:core_priv", |
| 81 |
"//tools:resources", |
| 82 |
"//tools:tool_utils", |
| 83 |
"//tools/flags:cmd_flags", |
| 84 |
] + select({ |
| 85 |
"@platforms//os:android": [ |
| 86 |
"//:fontmgr_android", |
| 87 |
"//src/ports:freetype_support", |
| 88 |
], |
| 89 |
"@platforms//os:linux": [ |
| 90 |
"//:fontmgr_fontconfig", |
| 91 |
"//src/ports:fontations_support", |
| 92 |
"//src/ports:freetype_support", |
| 93 |
], |
| 94 |
"@platforms//os:macos": [ |
| 95 |
"//:fontmgr_coretext", |
| 96 |
"//:typeface_coretext", |
| 97 |
], |
| 98 |
"//conditions:default": ["//src/ports:fontmgr_fontations_empty"], |
| 99 |
}), |
| 100 |
) |