Move flutter/third_party/txt into flutter/txt (#164248)
The flutter/txt library does not currently contain any third-party code.
This commit is contained in:
parent
6da9f78b22
commit
47a710ba99
@ -60,4 +60,4 @@ CheckOptions:
|
||||
# updated.
|
||||
#
|
||||
# tl;dr: I'm sorry.
|
||||
HeaderFilterRegex: "[..\/]+\/flutter\/(assets|benchmarking|bin|build|ci|common|display_list|docs|examples|flow|flutter_frontend_server|flutter_vma|fml|impeller|lib|runtime|shell|skia|sky|testing|tools|vulkan|wasm|web_sdk)\/.*"
|
||||
HeaderFilterRegex: "[..\/]+\/flutter\/(assets|benchmarking|bin|build|ci|common|display_list|docs|examples|flow|flutter_frontend_server|flutter_vma|fml|impeller|lib|runtime|shell|skia|sky|testing|tools|txt|vulkan|wasm|web_sdk)\/.*"
|
||||
|
@ -149,7 +149,7 @@ group("flutter") {
|
||||
"//flutter/impeller/geometry:geometry_benchmarks",
|
||||
"//flutter/lib/ui:ui_benchmarks",
|
||||
"//flutter/shell/common:shell_benchmarks",
|
||||
"//flutter/third_party/txt:txt_benchmarks",
|
||||
"//flutter/txt:txt_benchmarks",
|
||||
]
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ group("unittests") {
|
||||
"//flutter/testing/dart",
|
||||
"//flutter/testing/smoke_test_failure",
|
||||
"//flutter/third_party/tonic/tests:tonic_unittests",
|
||||
"//flutter/third_party/txt:txt_unittests",
|
||||
"//flutter/txt:txt_unittests",
|
||||
]
|
||||
|
||||
# The accessibility library only supports Mac and Windows at the moment.
|
||||
|
@ -140,7 +140,7 @@
|
||||
"flutter/shell/common:shell_benchmarks",
|
||||
"flutter/shell/testing",
|
||||
"flutter/tools/path_ops",
|
||||
"flutter/third_party/txt:txt_benchmarks"
|
||||
"flutter/txt:txt_benchmarks"
|
||||
]
|
||||
},
|
||||
"tests": [
|
||||
|
@ -33,7 +33,7 @@
|
||||
"flutter/lib/ui:ui_benchmarks",
|
||||
"flutter/shell/common:shell_benchmarks",
|
||||
"flutter/shell/testing",
|
||||
"flutter/third_party/txt:txt_benchmarks",
|
||||
"flutter/txt:txt_benchmarks",
|
||||
"flutter/tools/path_ops",
|
||||
"flutter/build/archives:flutter_patched_sdk",
|
||||
"flutter:unittests"
|
||||
|
@ -183,7 +183,6 @@ function verify_licenses() (
|
||||
echo "double-check that all newly added files have a BSD-style license"
|
||||
echo "header with the following copyright:"
|
||||
echo " Copyright 2013 The Flutter Authors. All rights reserved."
|
||||
echo "Files in 'third_party/txt' may have an Apache license header instead."
|
||||
echo "If you're absolutely sure that the change in license count is"
|
||||
echo "intentional, update 'flutter/ci/licenses.sh' with the new count."
|
||||
echo "================================================================="
|
||||
|
@ -3030,11 +3030,6 @@
|
||||
../../../flutter/third_party/tonic/filesystem/README.md
|
||||
../../../flutter/third_party/tonic/filesystem/tests
|
||||
../../../flutter/third_party/tonic/tests
|
||||
../../../flutter/third_party/txt/.clang-format
|
||||
../../../flutter/third_party/txt/.gitattributes
|
||||
../../../flutter/third_party/txt/.gitignore
|
||||
../../../flutter/third_party/txt/tests
|
||||
../../../flutter/third_party/txt/third_party/fonts
|
||||
../../../flutter/third_party/vulkan-deps/.git
|
||||
../../../flutter/third_party/vulkan-deps/.gitattributes
|
||||
../../../flutter/third_party/vulkan-deps/.gitignore
|
||||
@ -3322,6 +3317,11 @@
|
||||
../../../flutter/tools/licenses/lib/README
|
||||
../../../flutter/tools/licenses/pubspec.yaml
|
||||
../../../flutter/tools/licenses/test
|
||||
../../../flutter/txt/.clang-format
|
||||
../../../flutter/txt/.gitattributes
|
||||
../../../flutter/txt/.gitignore
|
||||
../../../flutter/txt/tests
|
||||
../../../flutter/txt/third_party/fonts
|
||||
../../../flutter/web_sdk
|
||||
../../../fuchsia/sdk/linux/.build-id
|
||||
../../../fuchsia/sdk/linux/.versions
|
||||
|
@ -959,7 +959,6 @@ LIBRARY: perfetto
|
||||
LIBRARY: shaderc
|
||||
LIBRARY: spirv-cross
|
||||
LIBRARY: swiftshader
|
||||
LIBRARY: txt
|
||||
LIBRARY: vulkan-headers
|
||||
LIBRARY: vulkan-utility-libraries
|
||||
LIBRARY: vulkan-validation-layers
|
||||
@ -2319,42 +2318,6 @@ ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutte
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/swiftshader/src/WSI/libWaylandClient.hpp
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/swiftshader/src/WSI/libXCB.cpp
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/swiftshader/src/WSI/libXCB.hpp
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/benchmarks/skparagraph_benchmarks.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/benchmarks/txt_run_all_benchmarks.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/skia/paragraph_builder_skia.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/skia/paragraph_builder_skia.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/skia/paragraph_skia.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/skia/paragraph_skia.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/asset_font_manager.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/asset_font_manager.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/font_asset_provider.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/font_asset_provider.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/font_collection.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/font_collection.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/font_features.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/font_features.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/font_style.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/font_weight.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/line_metrics.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/paragraph.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/paragraph_builder.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/paragraph_builder.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/paragraph_style.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/paragraph_style.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/placeholder_run.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/placeholder_run.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/run_metrics.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/test_font_manager.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/test_font_manager.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/text_baseline.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/text_decoration.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/text_decoration.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/text_shadow.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/text_shadow.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/text_style.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/text_style.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/typeface_font_asset_provider.cc
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/txt/src/txt/typeface_font_asset_provider.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/vulkan-deps/glslang/src/SPIRV/bitutils.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/vulkan-deps/glslang/src/SPIRV/hex_float.h
|
||||
ORIGIN: http://www.apache.org/licenses/LICENSE-2.0 referenced by ../../../flutter/third_party/vulkan-deps/glslang/src/gtests/Common.cpp
|
||||
@ -7079,42 +7042,6 @@ FILE: ../../../flutter/third_party/swiftshader/src/WSI/libWaylandClient.cpp
|
||||
FILE: ../../../flutter/third_party/swiftshader/src/WSI/libWaylandClient.hpp
|
||||
FILE: ../../../flutter/third_party/swiftshader/src/WSI/libXCB.cpp
|
||||
FILE: ../../../flutter/third_party/swiftshader/src/WSI/libXCB.hpp
|
||||
FILE: ../../../flutter/third_party/txt/benchmarks/skparagraph_benchmarks.cc
|
||||
FILE: ../../../flutter/third_party/txt/benchmarks/txt_run_all_benchmarks.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/skia/paragraph_builder_skia.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/skia/paragraph_builder_skia.h
|
||||
FILE: ../../../flutter/third_party/txt/src/skia/paragraph_skia.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/skia/paragraph_skia.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/asset_font_manager.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/asset_font_manager.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/font_asset_provider.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/font_asset_provider.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/font_collection.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/font_collection.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/font_features.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/font_features.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/font_style.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/font_weight.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/line_metrics.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/paragraph.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/paragraph_builder.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/paragraph_builder.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/paragraph_style.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/paragraph_style.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/placeholder_run.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/placeholder_run.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/run_metrics.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/test_font_manager.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/test_font_manager.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/text_baseline.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/text_decoration.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/text_decoration.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/text_shadow.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/text_shadow.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/text_style.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/text_style.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/typeface_font_asset_provider.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/typeface_font_asset_provider.h
|
||||
FILE: ../../../flutter/third_party/vulkan-deps/glslang/src/SPIRV/bitutils.h
|
||||
FILE: ../../../flutter/third_party/vulkan-deps/glslang/src/SPIRV/hex_float.h
|
||||
FILE: ../../../flutter/third_party/vulkan-deps/glslang/src/gtests/Common.cpp
|
||||
@ -41215,7 +41142,6 @@ LIBRARY: accessibility
|
||||
LIBRARY: engine
|
||||
LIBRARY: spring_animation
|
||||
LIBRARY: tonic
|
||||
LIBRARY: txt
|
||||
LIBRARY: web_test_fonts
|
||||
LIBRARY: web_unicode
|
||||
ORIGIN: ../../../flutter/LICENSE
|
||||
@ -44093,18 +44019,54 @@ ORIGIN: ../../../flutter/third_party/tonic/typed_data/typed_list.cc + ../../../f
|
||||
ORIGIN: ../../../flutter/third_party/tonic/typed_data/typed_list.h + ../../../flutter/third_party/tonic/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/tonic/typed_data/uint16_list.h + ../../../flutter/third_party/tonic/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/tonic/typed_data/uint8_list.h + ../../../flutter/third_party/tonic/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/txt/src/txt/platform.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/txt/src/txt/platform.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_android.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_fuchsia.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_linux.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_mac.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_mac.mm + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_windows.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/web_test_fonts/lib/web_test_fonts.dart + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/web_test_fonts/lib/web_test_fonts/web_test_fonts.dart + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/web_unicode/lib/web_unicode.dart + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/third_party/web_unicode/tool/unicode_sync_script.dart + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/benchmarks/skparagraph_benchmarks.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/benchmarks/txt_run_all_benchmarks.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/skia/paragraph_builder_skia.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/skia/paragraph_builder_skia.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/skia/paragraph_skia.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/skia/paragraph_skia.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/asset_font_manager.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/asset_font_manager.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/font_asset_provider.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/font_asset_provider.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/font_collection.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/font_collection.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/font_features.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/font_features.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/font_style.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/font_weight.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/line_metrics.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/paragraph.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/paragraph_builder.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/paragraph_builder.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/paragraph_style.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/paragraph_style.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/placeholder_run.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/placeholder_run.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/platform.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/platform.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/platform_android.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/platform_fuchsia.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/platform_linux.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/platform_mac.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/platform_mac.mm + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/platform_windows.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/run_metrics.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/test_font_manager.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/test_font_manager.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/text_baseline.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/text_decoration.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/text_decoration.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/text_shadow.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/text_shadow.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/text_style.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/text_style.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/typeface_font_asset_provider.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/txt/src/txt/typeface_font_asset_provider.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/vulkan/procs/vulkan_handle.cc + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/vulkan/procs/vulkan_handle.h + ../../../flutter/LICENSE
|
||||
ORIGIN: ../../../flutter/vulkan/procs/vulkan_interface.cc + ../../../flutter/LICENSE
|
||||
@ -47053,18 +47015,54 @@ FILE: ../../../flutter/third_party/tonic/typed_data/typed_list.cc
|
||||
FILE: ../../../flutter/third_party/tonic/typed_data/typed_list.h
|
||||
FILE: ../../../flutter/third_party/tonic/typed_data/uint16_list.h
|
||||
FILE: ../../../flutter/third_party/tonic/typed_data/uint8_list.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/platform.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/platform.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/platform_android.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/platform_fuchsia.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/platform_linux.cc
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/platform_mac.h
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/platform_mac.mm
|
||||
FILE: ../../../flutter/third_party/txt/src/txt/platform_windows.cc
|
||||
FILE: ../../../flutter/third_party/web_test_fonts/lib/web_test_fonts.dart
|
||||
FILE: ../../../flutter/third_party/web_test_fonts/lib/web_test_fonts/web_test_fonts.dart
|
||||
FILE: ../../../flutter/third_party/web_unicode/lib/web_unicode.dart
|
||||
FILE: ../../../flutter/third_party/web_unicode/tool/unicode_sync_script.dart
|
||||
FILE: ../../../flutter/txt/benchmarks/skparagraph_benchmarks.cc
|
||||
FILE: ../../../flutter/txt/benchmarks/txt_run_all_benchmarks.cc
|
||||
FILE: ../../../flutter/txt/src/skia/paragraph_builder_skia.cc
|
||||
FILE: ../../../flutter/txt/src/skia/paragraph_builder_skia.h
|
||||
FILE: ../../../flutter/txt/src/skia/paragraph_skia.cc
|
||||
FILE: ../../../flutter/txt/src/skia/paragraph_skia.h
|
||||
FILE: ../../../flutter/txt/src/txt/asset_font_manager.cc
|
||||
FILE: ../../../flutter/txt/src/txt/asset_font_manager.h
|
||||
FILE: ../../../flutter/txt/src/txt/font_asset_provider.cc
|
||||
FILE: ../../../flutter/txt/src/txt/font_asset_provider.h
|
||||
FILE: ../../../flutter/txt/src/txt/font_collection.cc
|
||||
FILE: ../../../flutter/txt/src/txt/font_collection.h
|
||||
FILE: ../../../flutter/txt/src/txt/font_features.cc
|
||||
FILE: ../../../flutter/txt/src/txt/font_features.h
|
||||
FILE: ../../../flutter/txt/src/txt/font_style.h
|
||||
FILE: ../../../flutter/txt/src/txt/font_weight.h
|
||||
FILE: ../../../flutter/txt/src/txt/line_metrics.h
|
||||
FILE: ../../../flutter/txt/src/txt/paragraph.h
|
||||
FILE: ../../../flutter/txt/src/txt/paragraph_builder.cc
|
||||
FILE: ../../../flutter/txt/src/txt/paragraph_builder.h
|
||||
FILE: ../../../flutter/txt/src/txt/paragraph_style.cc
|
||||
FILE: ../../../flutter/txt/src/txt/paragraph_style.h
|
||||
FILE: ../../../flutter/txt/src/txt/placeholder_run.cc
|
||||
FILE: ../../../flutter/txt/src/txt/placeholder_run.h
|
||||
FILE: ../../../flutter/txt/src/txt/platform.cc
|
||||
FILE: ../../../flutter/txt/src/txt/platform.h
|
||||
FILE: ../../../flutter/txt/src/txt/platform_android.cc
|
||||
FILE: ../../../flutter/txt/src/txt/platform_fuchsia.cc
|
||||
FILE: ../../../flutter/txt/src/txt/platform_linux.cc
|
||||
FILE: ../../../flutter/txt/src/txt/platform_mac.h
|
||||
FILE: ../../../flutter/txt/src/txt/platform_mac.mm
|
||||
FILE: ../../../flutter/txt/src/txt/platform_windows.cc
|
||||
FILE: ../../../flutter/txt/src/txt/run_metrics.h
|
||||
FILE: ../../../flutter/txt/src/txt/test_font_manager.cc
|
||||
FILE: ../../../flutter/txt/src/txt/test_font_manager.h
|
||||
FILE: ../../../flutter/txt/src/txt/text_baseline.h
|
||||
FILE: ../../../flutter/txt/src/txt/text_decoration.cc
|
||||
FILE: ../../../flutter/txt/src/txt/text_decoration.h
|
||||
FILE: ../../../flutter/txt/src/txt/text_shadow.cc
|
||||
FILE: ../../../flutter/txt/src/txt/text_shadow.h
|
||||
FILE: ../../../flutter/txt/src/txt/text_style.cc
|
||||
FILE: ../../../flutter/txt/src/txt/text_style.h
|
||||
FILE: ../../../flutter/txt/src/txt/typeface_font_asset_provider.cc
|
||||
FILE: ../../../flutter/txt/src/txt/typeface_font_asset_provider.h
|
||||
FILE: ../../../flutter/vulkan/procs/vulkan_handle.cc
|
||||
FILE: ../../../flutter/vulkan/procs/vulkan_handle.h
|
||||
FILE: ../../../flutter/vulkan/procs/vulkan_interface.cc
|
||||
|
@ -1,2 +1,2 @@
|
||||
Signature: c84f698d3be586c08f30d61b87c71a64
|
||||
Signature: 3e70644686476fd49381d86a050498ab
|
||||
|
||||
|
@ -141,8 +141,7 @@ source_set("display_list") {
|
||||
}
|
||||
|
||||
test_fixtures("display_list_fixtures") {
|
||||
fixtures =
|
||||
[ "//flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf" ]
|
||||
fixtures = [ "//flutter/txt/third_party/fonts/Roboto-Regular.ttf" ]
|
||||
}
|
||||
|
||||
if (enable_unittests) {
|
||||
@ -207,7 +206,7 @@ if (enable_unittests) {
|
||||
"//flutter/display_list/testing:display_list_testing",
|
||||
"//flutter/impeller/typographer/backends/skia:typographer_skia_backend",
|
||||
"//flutter/testing",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
|
||||
if (!defined(defines)) {
|
||||
|
@ -17,7 +17,7 @@ source_set("display_list_testing") {
|
||||
deps = [
|
||||
"//flutter/skia",
|
||||
"//flutter/testing:testing_lib",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
|
||||
public_deps = [ "//flutter/display_list:display_list" ]
|
||||
|
@ -99,7 +99,7 @@ source_set("flow") {
|
||||
"//flutter/common/graphics",
|
||||
"//flutter/display_list",
|
||||
"//flutter/fml",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
|
||||
deps = [ "//flutter/skia" ]
|
||||
@ -114,8 +114,7 @@ source_set("flow") {
|
||||
|
||||
if (enable_unittests) {
|
||||
test_fixtures("flow_fixtures") {
|
||||
fixtures =
|
||||
[ "//flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf" ]
|
||||
fixtures = [ "//flutter/txt/third_party/fonts/Roboto-Regular.ttf" ]
|
||||
}
|
||||
|
||||
source_set("flow_testing") {
|
||||
|
@ -23,7 +23,6 @@ int main(int argc, char** argv) {
|
||||
cmd.GetOptionValueWithDefault("golden-dir", "flutter/testing/resources"));
|
||||
#endif
|
||||
flutter::SetFontFile(cmd.GetOptionValueWithDefault(
|
||||
"font-file",
|
||||
"flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf"));
|
||||
"font-file", "flutter/txt/third_party/fonts/Roboto-Regular.ttf"));
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ template("display_list_unittests_component") {
|
||||
":display_list",
|
||||
"../playground:playground_test",
|
||||
"//flutter/impeller/golden_tests:screenshot",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
if (defined(invoker.public_configs)) {
|
||||
public_configs = invoker.public_configs
|
||||
@ -182,7 +182,7 @@ template("aiks_unittests_component") {
|
||||
"//flutter/impeller/golden_tests:golden_playground_test",
|
||||
"//flutter/impeller/playground:playground_test",
|
||||
"//flutter/testing:testing_lib",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
if (defined(invoker.public_configs)) {
|
||||
public_configs = invoker.public_configs
|
||||
|
@ -273,6 +273,6 @@ impeller_component("entity_unittests") {
|
||||
"../playground:playground_test",
|
||||
"//flutter/display_list/testing:display_list_testing",
|
||||
"//flutter/impeller/typographer/backends/skia:typographer_skia_backend",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
}
|
||||
|
@ -102,11 +102,11 @@ impellerc("runtime_stages") {
|
||||
|
||||
test_fixtures("file_fixtures") {
|
||||
fixtures = [
|
||||
"//flutter/third_party/txt/third_party/fonts/ahem.ttf",
|
||||
"//flutter/third_party/txt/third_party/fonts/HomemadeApple.ttf",
|
||||
"//flutter/third_party/txt/third_party/fonts/NotoColorEmoji.ttf",
|
||||
"//flutter/third_party/txt/third_party/fonts/Roboto-Medium.ttf",
|
||||
"//flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf",
|
||||
"//flutter/txt/third_party/fonts/ahem.ttf",
|
||||
"//flutter/txt/third_party/fonts/HomemadeApple.ttf",
|
||||
"//flutter/txt/third_party/fonts/NotoColorEmoji.ttf",
|
||||
"//flutter/txt/third_party/fonts/Roboto-Medium.ttf",
|
||||
"//flutter/txt/third_party/fonts/Roboto-Regular.ttf",
|
||||
"airplane.jpg",
|
||||
"bay_bridge.jpg",
|
||||
"blend_mode_dst.png",
|
||||
|
@ -267,12 +267,15 @@ bool RenderPass::BindDynamicResource(ShaderStage stage,
|
||||
return BindBuffer(stage, slot, std::move(resouce));
|
||||
}
|
||||
|
||||
bool RenderPass::BindDynamicResource(ShaderStage stage,
|
||||
DescriptorType type,
|
||||
const SampledImageSlot& slot,
|
||||
std::unique_ptr<ShaderMetadata> metadata,
|
||||
std::shared_ptr<const Texture> texture,
|
||||
raw_ptr<const Sampler> sampler) {
|
||||
bool RenderPass::BindDynamicResource(
|
||||
ShaderStage stage,
|
||||
DescriptorType type,
|
||||
const SampledImageSlot& slot,
|
||||
std::unique_ptr<ShaderMetadata> metadata,
|
||||
std::shared_ptr<const Texture> texture,
|
||||
raw_ptr<const Sampler>
|
||||
sampler // NOLINT(performance-unnecessary-value-param)
|
||||
) {
|
||||
if (!sampler) {
|
||||
return false;
|
||||
}
|
||||
@ -303,6 +306,7 @@ bool RenderPass::BindTexture(ShaderStage stage,
|
||||
TextureAndSampler data = TextureAndSampler{
|
||||
.stage = stage,
|
||||
.texture = std::move(resource),
|
||||
// NOLINTNEXTLINE(performance-move-const-arg)
|
||||
.sampler = sampler,
|
||||
};
|
||||
|
||||
|
@ -76,7 +76,7 @@ impeller_component("interop_base") {
|
||||
"../../renderer/backend",
|
||||
"//flutter/display_list",
|
||||
"//flutter/fml",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
||||
|
||||
#include "flutter/display_list/dl_builder.h"
|
||||
#include "flutter/display_list/dl_color.h"
|
||||
#include "flutter/third_party/txt/src/txt/font_style.h"
|
||||
#include "flutter/third_party/txt/src/txt/font_weight.h"
|
||||
#include "flutter/third_party/txt/src/txt/paragraph_style.h"
|
||||
#include "flutter/txt/src/txt/font_style.h"
|
||||
#include "flutter/txt/src/txt/font_weight.h"
|
||||
#include "flutter/txt/src/txt/paragraph_style.h"
|
||||
#include "impeller/entity/entity.h"
|
||||
#include "impeller/geometry/color.h"
|
||||
#include "impeller/geometry/matrix.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_H_
|
||||
#define FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_H_
|
||||
|
||||
#include "flutter/third_party/txt/src/txt/paragraph.h"
|
||||
#include "flutter/txt/src/txt/paragraph.h"
|
||||
#include "impeller/toolkit/interop/impeller.h"
|
||||
#include "impeller/toolkit/interop/object.h"
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "impeller/toolkit/interop/paragraph_builder.h"
|
||||
|
||||
#include "flutter/third_party/txt/src/skia/paragraph_builder_skia.h"
|
||||
#include "flutter/txt/src/skia/paragraph_builder_skia.h"
|
||||
#include "impeller/base/validation.h"
|
||||
#include "impeller/toolkit/interop/paragraph.h"
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "flutter/third_party/txt/src/txt/paragraph_builder.h"
|
||||
#include "flutter/txt/src/txt/paragraph_builder.h"
|
||||
#include "impeller/toolkit/interop/impeller.h"
|
||||
#include "impeller/toolkit/interop/object.h"
|
||||
#include "impeller/toolkit/interop/paragraph.h"
|
||||
|
@ -5,10 +5,10 @@
|
||||
#ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_STYLE_H_
|
||||
#define FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_STYLE_H_
|
||||
|
||||
#include "flutter/txt/src/txt/paragraph_style.h"
|
||||
#include "impeller/toolkit/interop/impeller.h"
|
||||
#include "impeller/toolkit/interop/object.h"
|
||||
#include "impeller/toolkit/interop/paint.h"
|
||||
#include "third_party/txt/src/txt/paragraph_style.h"
|
||||
|
||||
namespace impeller::interop {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <mutex>
|
||||
|
||||
#include "flutter/fml/icu_util.h"
|
||||
#include "flutter/third_party/txt/src/txt/platform.h"
|
||||
#include "flutter/txt/src/txt/platform.h"
|
||||
#include "impeller/base/validation.h"
|
||||
#include "impeller/toolkit/interop/embedded_icu_data.h"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "flutter/third_party/skia/modules/skparagraph/include/TypefaceFontProvider.h"
|
||||
#include "flutter/third_party/txt/src/txt/font_collection.h"
|
||||
#include "flutter/txt/src/txt/font_collection.h"
|
||||
#include "impeller/toolkit/interop/impeller.h"
|
||||
#include "impeller/toolkit/interop/object.h"
|
||||
|
||||
|
@ -51,6 +51,6 @@ impeller_component("typographer_unittests") {
|
||||
"../playground:playground_test",
|
||||
"backends/skia:typographer_skia_backend",
|
||||
"//flutter/display_list/testing:display_list_testing",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ source_set("ui") {
|
||||
"//flutter/shell/common:display",
|
||||
"//flutter/shell/common:platform_message_handler",
|
||||
"//flutter/skia/modules/skparagraph",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
|
||||
deps = [
|
||||
@ -230,7 +230,7 @@ if (enable_unittests) {
|
||||
"fixtures/FontManifest.json",
|
||||
"fixtures/unmultiplied_alpha.png",
|
||||
"fixtures/WideGamutIndexed.png",
|
||||
"//flutter/third_party/txt/third_party/fonts/Roboto-Medium.ttf",
|
||||
"//flutter/txt/third_party/fonts/Roboto-Medium.ttf",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "flutter/fml/message_loop.h"
|
||||
#include "flutter/lib/ui/dart_wrapper.h"
|
||||
#include "flutter/lib/ui/painting/canvas.h"
|
||||
#include "flutter/third_party/txt/src/txt/paragraph.h"
|
||||
#include "flutter/txt/src/txt/paragraph.h"
|
||||
|
||||
namespace flutter {
|
||||
|
||||
|
@ -13,12 +13,12 @@
|
||||
#include "flutter/lib/ui/text/font_collection.h"
|
||||
#include "flutter/lib/ui/ui_dart_state.h"
|
||||
#include "flutter/lib/ui/window/platform_configuration.h"
|
||||
#include "flutter/third_party/txt/src/txt/font_style.h"
|
||||
#include "flutter/third_party/txt/src/txt/font_weight.h"
|
||||
#include "flutter/third_party/txt/src/txt/paragraph_style.h"
|
||||
#include "flutter/third_party/txt/src/txt/text_baseline.h"
|
||||
#include "flutter/third_party/txt/src/txt/text_decoration.h"
|
||||
#include "flutter/third_party/txt/src/txt/text_style.h"
|
||||
#include "flutter/txt/src/txt/font_style.h"
|
||||
#include "flutter/txt/src/txt/font_weight.h"
|
||||
#include "flutter/txt/src/txt/paragraph_style.h"
|
||||
#include "flutter/txt/src/txt/text_baseline.h"
|
||||
#include "flutter/txt/src/txt/text_decoration.h"
|
||||
#include "flutter/txt/src/txt/text_style.h"
|
||||
#include "third_party/icu/source/common/unicode/ustring.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "third_party/tonic/converter/dart_converter.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "flutter/lib/ui/dart_wrapper.h"
|
||||
#include "flutter/lib/ui/painting/paint.h"
|
||||
#include "flutter/lib/ui/text/paragraph.h"
|
||||
#include "flutter/third_party/txt/src/txt/paragraph_builder.h"
|
||||
#include "flutter/txt/src/txt/paragraph_builder.h"
|
||||
#include "third_party/tonic/typed_data/typed_list.h"
|
||||
|
||||
namespace flutter {
|
||||
|
@ -132,7 +132,6 @@ class CopyArtifactsStep implements PipelineStep {
|
||||
|
||||
final String fontsPath = pathlib.join(
|
||||
environment.flutterDirectory.path,
|
||||
'third_party',
|
||||
'txt',
|
||||
'third_party',
|
||||
'fonts',
|
||||
|
@ -12,7 +12,7 @@ source_set("test_font") {
|
||||
]
|
||||
deps = [
|
||||
"//flutter/skia",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
public_configs = [ "//flutter:config" ]
|
||||
defines = []
|
||||
@ -116,7 +116,7 @@ source_set("runtime") {
|
||||
"//flutter/shell/common:display",
|
||||
"//flutter/skia",
|
||||
"//flutter/third_party/tonic",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
|
||||
if (flutter_runtime_mode != "release" && !is_fuchsia) {
|
||||
|
@ -135,7 +135,7 @@ source_set("common") {
|
||||
"//flutter/shell/version",
|
||||
"//flutter/third_party/rapidjson",
|
||||
"//flutter/third_party/tonic",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
|
||||
deps = [
|
||||
@ -205,7 +205,7 @@ if (enable_unittests) {
|
||||
fixtures = [
|
||||
"fixtures/shelltest_screenshot.png",
|
||||
"fixtures/hello_loop_2.gif",
|
||||
"//flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf",
|
||||
"//flutter/txt/third_party/fonts/Roboto-Regular.ttf",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ source_set("flutter_shell_native_src") {
|
||||
"//flutter/shell/platform/android/surface",
|
||||
"//flutter/shell/platform/android/surface:native_window",
|
||||
"//flutter/skia",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
"//flutter/vulkan",
|
||||
]
|
||||
|
||||
|
@ -38,6 +38,6 @@ executable("platform_view_android_delegate_unittests") {
|
||||
"//flutter/shell/platform/android/jni:jni_mock",
|
||||
"//flutter/testing",
|
||||
"//flutter/testing:dart",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ shared_library("ios_test_flutter") {
|
||||
"//flutter/third_party/rapidjson",
|
||||
"//flutter/third_party/spring_animation",
|
||||
"//flutter/third_party/tonic",
|
||||
"//flutter/third_party/txt",
|
||||
"//flutter/txt",
|
||||
]
|
||||
public_configs = [
|
||||
":ios_gpu_configuration_config",
|
||||
|
@ -644,8 +644,7 @@ if (enable_unittests) {
|
||||
binary = "display_list_unittests"
|
||||
resources = [
|
||||
{
|
||||
path = rebase_path(
|
||||
"//flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf")
|
||||
path = rebase_path("//flutter/txt/third_party/fonts/Roboto-Regular.ttf")
|
||||
dest = "assets/Roboto-Regular.ttf"
|
||||
},
|
||||
]
|
||||
@ -657,8 +656,7 @@ if (enable_unittests) {
|
||||
binary = "display_list_rendertests"
|
||||
resources = [
|
||||
{
|
||||
path = rebase_path(
|
||||
"//flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf")
|
||||
path = rebase_path("//flutter/txt/third_party/fonts/Roboto-Regular.ttf")
|
||||
dest = "assets/Roboto-Regular.ttf"
|
||||
},
|
||||
]
|
||||
@ -685,8 +683,7 @@ if (enable_unittests) {
|
||||
dest = "flutter/testing/resources/performance_overlay_gold_120fps.png"
|
||||
},
|
||||
{
|
||||
path = rebase_path(
|
||||
"//flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf")
|
||||
path = rebase_path("//flutter/txt/third_party/fonts/Roboto-Regular.ttf")
|
||||
dest = "assets/Roboto-Regular.ttf"
|
||||
},
|
||||
]
|
||||
@ -733,8 +730,7 @@ if (enable_unittests) {
|
||||
dest = "assets/shelltest_screenshot.png"
|
||||
},
|
||||
{
|
||||
path = rebase_path(
|
||||
"//flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf")
|
||||
path = rebase_path("//flutter/txt/third_party/fonts/Roboto-Regular.ttf")
|
||||
dest = "assets/Roboto-Regular.ttf"
|
||||
},
|
||||
]
|
||||
@ -744,7 +740,7 @@ if (enable_unittests) {
|
||||
}
|
||||
|
||||
fuchsia_test_archive("txt_tests") {
|
||||
deps = [ "//flutter/third_party/txt:txt_unittests" ]
|
||||
deps = [ "//flutter/txt:txt_unittests" ]
|
||||
gen_cml_file = true
|
||||
binary = "txt_unittests"
|
||||
|
||||
|
@ -65,7 +65,7 @@ foreach(test, tests) {
|
||||
"-DkFlutterBuildDirectory=$flutter_build_dir",
|
||||
"-DkSkiaGoldWorkDirectory=$skia_gold_work_dir",
|
||||
]
|
||||
deps = [ "//flutter/third_party/txt:txt_fixtures" ]
|
||||
deps = [ "//flutter/txt:txt_fixtures" ]
|
||||
testonly = true
|
||||
}
|
||||
}
|
||||
|
@ -752,7 +752,7 @@ void main() async {
|
||||
// However, Flutter opts-in to a Skia feature to render tabs as a single space.
|
||||
// See: https://github.com/flutter/flutter/issues/79153
|
||||
final File file = File(
|
||||
path.join(_flutterBuildPath, 'flutter', 'third_party', 'txt', 'assets', 'Roboto-Regular.ttf'),
|
||||
path.join(_flutterBuildPath, 'flutter', 'txt', 'assets', 'Roboto-Regular.ttf'),
|
||||
);
|
||||
final Uint8List fontData = await file.readAsBytes();
|
||||
await loadFontFromList(fontData, fontFamily: 'RobotoSerif');
|
||||
@ -1316,7 +1316,7 @@ void main() async {
|
||||
|
||||
test('TextDecoration renders non-solid lines', () async {
|
||||
final File file = File(
|
||||
path.join(_flutterBuildPath, 'flutter', 'third_party', 'txt', 'assets', 'Roboto-Regular.ttf'),
|
||||
path.join(_flutterBuildPath, 'flutter', 'txt', 'assets', 'Roboto-Regular.ttf'),
|
||||
);
|
||||
final Uint8List fontData = await file.readAsBytes();
|
||||
await loadFontFromList(fontData, fontFamily: 'RobotoSlab');
|
||||
|
@ -496,7 +496,7 @@
|
||||
../../../../third_party/skia,
|
||||
../../../../third_party,
|
||||
../../../../third_party/rapidjson/include,
|
||||
../../../../flutter/third_party/txt/src,
|
||||
../../../../flutter/txt/src,
|
||||
../../../../third_party/harfbuzz/src,
|
||||
../../../../third_party/icu/source/common,
|
||||
);
|
||||
@ -540,7 +540,7 @@
|
||||
../../../../third_party/skia,
|
||||
../../../../third_party,
|
||||
../../../../third_party/rapidjson/include,
|
||||
../../../../flutter/third_party/txt/src,
|
||||
../../../../flutter/txt/src,
|
||||
../../../../third_party/harfbuzz/src,
|
||||
../../../../third_party/icu/source/common,
|
||||
);
|
||||
|
@ -37,7 +37,7 @@ SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
BUILDROOT_DIR = os.path.abspath(os.path.join(os.path.realpath(__file__), '..', '..', '..'))
|
||||
OUT_DIR = os.path.join(BUILDROOT_DIR, 'out')
|
||||
GOLDEN_DIR = os.path.join(BUILDROOT_DIR, 'flutter', 'testing', 'resources')
|
||||
FONTS_DIR = os.path.join(BUILDROOT_DIR, 'flutter', 'third_party', 'txt', 'third_party', 'fonts')
|
||||
FONTS_DIR = os.path.join(BUILDROOT_DIR, 'flutter', 'txt', 'third_party', 'fonts')
|
||||
ROBOTO_FONT_PATH = os.path.join(FONTS_DIR, 'Roboto-Regular.ttf')
|
||||
FONT_SUBSET_DIR = os.path.join(BUILDROOT_DIR, 'flutter', 'tools', 'font_subset')
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
#include "txt/font_asset_provider.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
// Return a canonicalized version of a family name that is suitable for
|
||||
// matching.
|
||||
std::string FontAssetProvider::CanonicalFamilyName(std::string family_name) {
|
||||
std::string result(family_name.length(), 0);
|
||||
|
||||
// Convert ASCII characters to lower case.
|
||||
std::transform(family_name.begin(), family_name.end(), result.begin(),
|
||||
[](char c) { return (c & 0x80) ? c : ::tolower(c); });
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace txt
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef TXT_FONT_ASSET_PROVIDER_H_
|
||||
#define TXT_FONT_ASSET_PROVIDER_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "third_party/skia/include/core/SkFontMgr.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
class FontAssetProvider {
|
||||
public:
|
||||
virtual ~FontAssetProvider() = default;
|
||||
|
||||
virtual size_t GetFamilyCount() const = 0;
|
||||
virtual std::string GetFamilyName(int index) const = 0;
|
||||
virtual sk_sp<SkFontStyleSet> MatchFamily(const std::string& family_name) = 0;
|
||||
|
||||
protected:
|
||||
static std::string CanonicalFamilyName(std::string family_name);
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // TXT_FONT_ASSET_PROVIDER_H_
|
@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright 2019 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "font_features.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace txt {
|
||||
|
||||
void FontFeatures::SetFeature(std::string tag, int value) {
|
||||
feature_map_[tag] = value;
|
||||
}
|
||||
|
||||
std::string FontFeatures::GetFeatureSettings() const {
|
||||
if (feature_map_.empty())
|
||||
return "";
|
||||
|
||||
std::ostringstream stream;
|
||||
|
||||
for (const auto& kv : feature_map_) {
|
||||
if (stream.tellp()) {
|
||||
stream << ',';
|
||||
}
|
||||
stream << kv.first << '=' << kv.second;
|
||||
}
|
||||
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
const std::map<std::string, int>& FontFeatures::GetFontFeatures() const {
|
||||
return feature_map_;
|
||||
}
|
||||
|
||||
void FontVariations::SetAxisValue(std::string tag, float value) {
|
||||
axis_map_[tag] = value;
|
||||
}
|
||||
|
||||
const std::map<std::string, float>& FontVariations::GetAxisValues() const {
|
||||
return axis_map_;
|
||||
}
|
||||
|
||||
} // namespace txt
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef LIB_TXT_SRC_FONT_FEATURES_H_
|
||||
#define LIB_TXT_SRC_FONT_FEATURES_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace txt {
|
||||
|
||||
// Feature tags that can be applied in a text style to control how a font
|
||||
// selects glyphs.
|
||||
class FontFeatures {
|
||||
public:
|
||||
void SetFeature(std::string tag, int value);
|
||||
|
||||
std::string GetFeatureSettings() const;
|
||||
|
||||
const std::map<std::string, int>& GetFontFeatures() const;
|
||||
|
||||
private:
|
||||
std::map<std::string, int> feature_map_;
|
||||
};
|
||||
|
||||
// Axis tags and values that can be applied in a text style to control the
|
||||
// attributes of variable fonts.
|
||||
class FontVariations {
|
||||
public:
|
||||
void SetAxisValue(std::string tag, float value);
|
||||
|
||||
const std::map<std::string, float>& GetAxisValues() const;
|
||||
|
||||
private:
|
||||
std::map<std::string, float> axis_map_;
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_FONT_FEATURE_H_
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef LIB_TXT_SRC_FONT_STYLE_H_
|
||||
#define LIB_TXT_SRC_FONT_STYLE_H_
|
||||
|
||||
namespace txt {
|
||||
|
||||
enum class FontStyle {
|
||||
normal,
|
||||
italic,
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_FONT_STYLE_H_
|
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef LIB_TXT_SRC_FONT_WEIGHT_H_
|
||||
#define LIB_TXT_SRC_FONT_WEIGHT_H_
|
||||
|
||||
namespace txt {
|
||||
|
||||
enum class FontWeight {
|
||||
w100, // Thin
|
||||
w200, // Extra-Light
|
||||
w300, // Light
|
||||
w400, // Normal/Regular
|
||||
w500, // Medium
|
||||
w600, // Semi-bold
|
||||
w700, // Bold
|
||||
w800, // Extra-Bold
|
||||
w900, // Black
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_FONT_WEIGHT_H_
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright 2019 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "placeholder_run.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
PlaceholderRun::PlaceholderRun() {}
|
||||
|
||||
PlaceholderRun::PlaceholderRun(double width,
|
||||
double height,
|
||||
PlaceholderAlignment alignment,
|
||||
TextBaseline baseline,
|
||||
double baseline_offset)
|
||||
: width(width),
|
||||
height(height),
|
||||
alignment(alignment),
|
||||
baseline(baseline),
|
||||
baseline_offset(baseline_offset) {}
|
||||
|
||||
} // namespace txt
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef LIB_TXT_SRC_TEXT_BASELINE_H_
|
||||
#define LIB_TXT_SRC_TEXT_BASELINE_H_
|
||||
|
||||
namespace txt {
|
||||
|
||||
enum TextBaseline {
|
||||
kAlphabetic,
|
||||
kIdeographic,
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_TEXT_BASELINE_H_
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "text_decoration.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
//
|
||||
|
||||
} // namespace txt
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef LIB_TXT_SRC_TEXT_DECORATION_H_
|
||||
#define LIB_TXT_SRC_TEXT_DECORATION_H_
|
||||
|
||||
namespace txt {
|
||||
|
||||
// Multiple decorations can be applied at once. Ex: Underline and overline is
|
||||
// (0x1 | 0x2)
|
||||
enum TextDecoration {
|
||||
kNone = 0x0,
|
||||
kUnderline = 0x1,
|
||||
kOverline = 0x2,
|
||||
kLineThrough = 0x4,
|
||||
};
|
||||
|
||||
enum TextDecorationStyle { kSolid, kDouble, kDotted, kDashed, kWavy };
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_TEXT_DECORATION_H_
|
@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "text_shadow.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
TextShadow::TextShadow() {}
|
||||
TextShadow::TextShadow(SkColor color, SkPoint offset, double blur_sigma)
|
||||
: color(color), offset(offset), blur_sigma(blur_sigma) {}
|
||||
|
||||
bool TextShadow::operator==(const TextShadow& other) const {
|
||||
if (color != other.color)
|
||||
return false;
|
||||
if (offset != other.offset)
|
||||
return false;
|
||||
if (blur_sigma != other.blur_sigma)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TextShadow::operator!=(const TextShadow& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
bool TextShadow::hasShadow() const {
|
||||
if (!offset.isZero())
|
||||
return true;
|
||||
if (blur_sigma > 0.5)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace txt
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef LIB_TXT_SRC_TEXT_SHADOW_H_
|
||||
#define LIB_TXT_SRC_TEXT_SHADOW_H_
|
||||
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "third_party/skia/include/core/SkPoint.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
class TextShadow {
|
||||
public:
|
||||
SkColor color = SK_ColorBLACK;
|
||||
SkPoint offset;
|
||||
double blur_sigma = 0.0;
|
||||
|
||||
TextShadow();
|
||||
|
||||
TextShadow(SkColor color, SkPoint offset, double blur_sigma);
|
||||
|
||||
bool operator==(const TextShadow& other) const;
|
||||
|
||||
bool operator!=(const TextShadow& other) const;
|
||||
|
||||
bool hasShadow() const;
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_TEXT_SHADOW_H_
|
@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "text_style.h"
|
||||
|
||||
#include "font_style.h"
|
||||
#include "font_weight.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "txt/platform.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
TextStyle::TextStyle() : font_families(GetDefaultFontFamilies()) {}
|
||||
|
||||
bool TextStyle::equals(const TextStyle& other) const {
|
||||
if (color != other.color)
|
||||
return false;
|
||||
if (decoration != other.decoration)
|
||||
return false;
|
||||
if (decoration_color != other.decoration_color)
|
||||
return false;
|
||||
if (decoration_style != other.decoration_style)
|
||||
return false;
|
||||
if (decoration_thickness_multiplier != other.decoration_thickness_multiplier)
|
||||
return false;
|
||||
if (font_weight != other.font_weight)
|
||||
return false;
|
||||
if (font_style != other.font_style)
|
||||
return false;
|
||||
if (letter_spacing != other.letter_spacing)
|
||||
return false;
|
||||
if (word_spacing != other.word_spacing)
|
||||
return false;
|
||||
if (height != other.height)
|
||||
return false;
|
||||
if (has_height_override != other.has_height_override)
|
||||
return false;
|
||||
if (half_leading != other.half_leading)
|
||||
return false;
|
||||
if (locale != other.locale)
|
||||
return false;
|
||||
if (foreground != other.foreground)
|
||||
return false;
|
||||
if (font_families.size() != other.font_families.size())
|
||||
return false;
|
||||
if (text_shadows.size() != other.text_shadows.size())
|
||||
return false;
|
||||
for (size_t font_index = 0; font_index < font_families.size(); ++font_index) {
|
||||
if (font_families[font_index] != other.font_families[font_index])
|
||||
return false;
|
||||
}
|
||||
for (size_t shadow_index = 0; shadow_index < text_shadows.size();
|
||||
++shadow_index) {
|
||||
if (text_shadows[shadow_index] != other.text_shadows[shadow_index])
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace txt
|
@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "flutter/fml/backtrace.h"
|
||||
#include "flutter/testing/testing.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
fml::InstallCrashHandler();
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "txt_test_utils.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
static std::string gFontDir;
|
||||
|
||||
const std::string& GetFontDir() {
|
||||
return gFontDir;
|
||||
}
|
||||
|
||||
void SetFontDir(const std::string& dir) {
|
||||
gFontDir = dir;
|
||||
}
|
||||
|
||||
} // namespace txt
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef LIB_TXT_TESTS_TXT_TEST_UTILS_H_
|
||||
#define LIB_TXT_TESTS_TXT_TEST_UTILS_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace txt {
|
||||
|
||||
const std::string& GetFontDir();
|
||||
|
||||
void SetFontDir(const std::string& dir);
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_TESTS_TXT_TEST_UTILS_H_
|
@ -185,7 +185,6 @@ final Set<String> skippedPaths = <String>{
|
||||
r'flutter/third_party/stb',
|
||||
r'flutter/third_party/swiftshader/third_party', // See: https://github.com/flutter/flutter/issues/145726
|
||||
r'flutter/third_party/test_shaders', // for tests only
|
||||
r'flutter/third_party/txt/third_party/fonts',
|
||||
r'flutter/third_party/vulkan-deps/glslang/LICENSE', // excluded to make sure we don't accidentally apply it as a default license
|
||||
r'flutter/third_party/vulkan-deps/glslang/src/LICENSE.txt', // redundant with licenses inside files
|
||||
r'flutter/third_party/vulkan-deps/glslang/src/glslang/OSDependent/Web', // we only use glslang in impellerc, not in web apps
|
||||
@ -221,6 +220,7 @@ final Set<String> skippedPaths = <String>{
|
||||
r'flutter/third_party/zlib/contrib/minizip/miniunz.c', // sample file
|
||||
r'flutter/third_party/zlib/contrib/minizip/minizip.c', // sample file
|
||||
r'flutter/tools',
|
||||
r'flutter/txt/third_party/fonts', // only used on hosts for tests
|
||||
r'flutter/web_sdk', // this code is not linked into Flutter apps; it's only used by engine tests and tools
|
||||
r'fuchsia/sdk/linux/docs',
|
||||
r'fuchsia/sdk/linux/meta',
|
||||
|
@ -1,16 +1,6 @@
|
||||
# Copyright 2017 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//flutter/common/config.gni")
|
||||
import("//flutter/testing/testing.gni")
|
@ -1,24 +1,12 @@
|
||||
/*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "flutter/fml/command_line.h"
|
||||
#include "flutter/fml/logging.h"
|
||||
#include "flutter/third_party/txt/tests/txt_test_utils.h"
|
||||
#include "flutter/txt/tests/txt_test_utils.h"
|
||||
#include "third_party/benchmark/include/benchmark/benchmark.h"
|
||||
#include "third_party/icu/source/common/unicode/unistr.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
@ -55,8 +43,8 @@ BENCHMARK_F(SkParagraphFixture, ShortLayout)(benchmark::State& state) {
|
||||
sktxt::TextStyle text_style;
|
||||
text_style.setFontFamilies({SkString("Roboto")});
|
||||
text_style.setColor(SK_ColorBLACK);
|
||||
auto builder =
|
||||
sktxt::ParagraphBuilder::make(paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
builder->pushStyle(text_style);
|
||||
builder->addText(text);
|
||||
builder->pop();
|
||||
@ -90,8 +78,8 @@ BENCHMARK_F(SkParagraphFixture, LongLayout)(benchmark::State& state) {
|
||||
sktxt::TextStyle text_style;
|
||||
text_style.setFontFamilies({SkString("Roboto")});
|
||||
text_style.setColor(SK_ColorBLACK);
|
||||
auto builder =
|
||||
sktxt::ParagraphBuilder::make(paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
builder->pushStyle(text_style);
|
||||
builder->addText(text);
|
||||
builder->pop();
|
||||
@ -126,8 +114,8 @@ BENCHMARK_F(SkParagraphFixture, JustifyLayout)(benchmark::State& state) {
|
||||
sktxt::TextStyle text_style;
|
||||
text_style.setFontFamilies({SkString("Roboto")});
|
||||
text_style.setColor(SK_ColorBLACK);
|
||||
auto builder =
|
||||
sktxt::ParagraphBuilder::make(paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
builder->pushStyle(text_style);
|
||||
builder->addText(text);
|
||||
builder->pop();
|
||||
@ -144,8 +132,8 @@ BENCHMARK_F(SkParagraphFixture, ManyStylesLayout)(benchmark::State& state) {
|
||||
sktxt::TextStyle text_style;
|
||||
text_style.setFontFamilies({SkString("Roboto")});
|
||||
text_style.setColor(SK_ColorBLACK);
|
||||
auto builder =
|
||||
sktxt::ParagraphBuilder::make(paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
builder->pushStyle(text_style);
|
||||
builder->addText(text);
|
||||
@ -167,8 +155,8 @@ BENCHMARK_DEFINE_F(SkParagraphFixture, TextBigO)(benchmark::State& state) {
|
||||
sktxt::TextStyle text_style;
|
||||
text_style.setFontFamilies({SkString("Roboto")});
|
||||
text_style.setColor(SK_ColorBLACK);
|
||||
auto builder =
|
||||
sktxt::ParagraphBuilder::make(paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
builder->pushStyle(text_style);
|
||||
builder->addText(u16_text);
|
||||
builder->pop();
|
||||
@ -191,8 +179,7 @@ BENCHMARK_DEFINE_F(SkParagraphFixture, StylesBigO)(benchmark::State& state) {
|
||||
text_style.setFontFamilies({SkString("Roboto")});
|
||||
text_style.setColor(SK_ColorBLACK);
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style,
|
||||
sk_make_sp<sktxt::TestFontCollection>(txt::GetFontDir()),
|
||||
paragraph_style, sk_make_sp<sktxt::TestFontCollection>(txt::GetFontDir()),
|
||||
SkUnicodes::ICU::Make());
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
builder->pushStyle(text_style);
|
||||
@ -216,8 +203,8 @@ BENCHMARK_F(SkParagraphFixture, PaintSimple)(benchmark::State& state) {
|
||||
sktxt::TextStyle text_style;
|
||||
text_style.setFontFamilies({SkString("Roboto")});
|
||||
text_style.setColor(SK_ColorBLACK);
|
||||
auto builder =
|
||||
sktxt::ParagraphBuilder::make(paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
builder->pushStyle(text_style);
|
||||
builder->addText(text);
|
||||
builder->pop();
|
||||
@ -254,8 +241,8 @@ BENCHMARK_F(SkParagraphFixture, PaintLarge)(benchmark::State& state) {
|
||||
sktxt::TextStyle text_style;
|
||||
text_style.setFontFamilies({SkString("Roboto")});
|
||||
text_style.setColor(SK_ColorBLACK);
|
||||
auto builder =
|
||||
sktxt::ParagraphBuilder::make(paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
builder->pushStyle(text_style);
|
||||
builder->addText(text);
|
||||
builder->pop();
|
||||
@ -279,8 +266,8 @@ BENCHMARK_F(SkParagraphFixture, PaintDecoration)(benchmark::State& state) {
|
||||
text_style.setDecoration(static_cast<sktxt::TextDecoration>(
|
||||
sktxt::TextDecoration::kLineThrough | sktxt::TextDecoration::kOverline |
|
||||
sktxt::TextDecoration::kUnderline));
|
||||
auto builder =
|
||||
sktxt::ParagraphBuilder::make(paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
text_style.setDecorationStyle(sktxt::TextDecorationStyle::kSolid);
|
||||
builder->pushStyle(text_style);
|
||||
builder->addText(text);
|
||||
@ -309,8 +296,8 @@ BENCHMARK_F(SkParagraphFixture, SimpleBuilder)(benchmark::State& state) {
|
||||
text_style.setFontFamilies({SkString("Roboto")});
|
||||
text_style.setColor(SK_ColorBLACK);
|
||||
while (state.KeepRunning()) {
|
||||
auto builder =
|
||||
sktxt::ParagraphBuilder::make(paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
auto builder = sktxt::ParagraphBuilder::make(
|
||||
paragraph_style, font_collection_, SkUnicodes::ICU::Make());
|
||||
builder->pushStyle(text_style);
|
||||
builder->addText(text);
|
||||
builder->pop();
|
@ -1,24 +1,12 @@
|
||||
/*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "flutter/fml/command_line.h"
|
||||
#include "flutter/fml/icu_util.h"
|
||||
#include "flutter/fml/logging.h"
|
||||
#include "flutter/testing/testing.h"
|
||||
#include "flutter/third_party/txt/tests/txt_test_utils.h"
|
||||
#include "flutter/txt/tests/txt_test_utils.h"
|
||||
#include "third_party/benchmark/include/benchmark/benchmark.h"
|
||||
|
||||
// We will use a custom main to allow custom font directories for consistency.
|
@ -1,18 +1,6 @@
|
||||
/*
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "paragraph_builder_skia.h"
|
||||
#include "paragraph_skia.h"
|
||||
@ -47,7 +35,7 @@ SkFontStyle MakeSkFontStyle(txt::FontWeight font_weight,
|
||||
|
||||
ParagraphBuilderSkia::ParagraphBuilderSkia(
|
||||
const ParagraphStyle& style,
|
||||
std::shared_ptr<FontCollection> font_collection,
|
||||
const std::shared_ptr<FontCollection>& font_collection,
|
||||
const bool impeller_enabled)
|
||||
: base_style_(style.GetTextStyle()), impeller_enabled_(impeller_enabled) {
|
||||
builder_ = skt::ParagraphBuilder::make(
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef LIB_TXT_SRC_PARAGRAPH_BUILDER_SKIA_H_
|
||||
#define LIB_TXT_SRC_PARAGRAPH_BUILDER_SKIA_H_
|
||||
#ifndef FLUTTER_TXT_SRC_SKIA_PARAGRAPH_BUILDER_SKIA_H_
|
||||
#define FLUTTER_TXT_SRC_SKIA_PARAGRAPH_BUILDER_SKIA_H_
|
||||
|
||||
#include "txt/paragraph_builder.h"
|
||||
|
||||
@ -32,7 +20,7 @@ namespace txt {
|
||||
class ParagraphBuilderSkia : public ParagraphBuilder {
|
||||
public:
|
||||
ParagraphBuilderSkia(const ParagraphStyle& style,
|
||||
std::shared_ptr<FontCollection> font_collection,
|
||||
const std::shared_ptr<FontCollection>& font_collection,
|
||||
const bool impeller_enabled);
|
||||
|
||||
virtual ~ParagraphBuilderSkia();
|
||||
@ -69,4 +57,4 @@ class ParagraphBuilderSkia : public ParagraphBuilder {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_PARAGRAPH_BUILDER_SKIA_H_
|
||||
#endif // FLUTTER_TXT_SRC_SKIA_PARAGRAPH_BUILDER_SKIA_H_
|
@ -1,18 +1,6 @@
|
||||
/*
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "paragraph_skia.h"
|
||||
|
||||
@ -318,6 +306,7 @@ std::vector<Paragraph::TextBox> ParagraphSkia::GetRectsForRange(
|
||||
static_cast<skt::RectWidthStyle>(rect_width_style));
|
||||
|
||||
std::vector<Paragraph::TextBox> boxes;
|
||||
boxes.reserve(skia_boxes.size());
|
||||
for (const skt::TextBox& skia_box : skia_boxes) {
|
||||
boxes.emplace_back(skia_box.rect,
|
||||
static_cast<TextDirection>(skia_box.direction));
|
||||
@ -330,6 +319,7 @@ std::vector<Paragraph::TextBox> ParagraphSkia::GetRectsForPlaceholders() {
|
||||
std::vector<skt::TextBox> skia_boxes = paragraph_->getRectsForPlaceholders();
|
||||
|
||||
std::vector<Paragraph::TextBox> boxes;
|
||||
boxes.reserve(skia_boxes.size());
|
||||
for (const skt::TextBox& skia_box : skia_boxes) {
|
||||
boxes.emplace_back(skia_box.rect,
|
||||
static_cast<TextDirection>(skia_box.direction));
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef LIB_TXT_SRC_PARAGRAPH_SKIA_H_
|
||||
#define LIB_TXT_SRC_PARAGRAPH_SKIA_H_
|
||||
#ifndef FLUTTER_TXT_SRC_SKIA_PARAGRAPH_SKIA_H_
|
||||
#define FLUTTER_TXT_SRC_SKIA_PARAGRAPH_SKIA_H_
|
||||
|
||||
#include <optional>
|
||||
|
||||
@ -98,4 +86,4 @@ class ParagraphSkia : public Paragraph {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_PARAGRAPH_SKIA_H_
|
||||
#endif // FLUTTER_TXT_SRC_SKIA_PARAGRAPH_SKIA_H_
|
@ -1,18 +1,6 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "txt/asset_font_manager.h"
|
||||
|
||||
@ -56,8 +44,9 @@ sk_sp<SkTypeface> AssetFontManager::onMatchFamilyStyle(
|
||||
const SkFontStyle& style) const {
|
||||
sk_sp<SkFontStyleSet> font_style_set =
|
||||
font_provider_->MatchFamily(std::string(familyName));
|
||||
if (font_style_set == nullptr)
|
||||
if (font_style_set == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
return font_style_set->matchStyle(style);
|
||||
}
|
||||
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef TXT_ASSET_FONT_MANAGER_H_
|
||||
#define TXT_ASSET_FONT_MANAGER_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_ASSET_FONT_MANAGER_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_ASSET_FONT_MANAGER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
@ -96,4 +84,4 @@ class DynamicFontManager : public AssetFontManager {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // TXT_ASSET_FONT_MANAGER_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_ASSET_FONT_MANAGER_H_
|
24
engine/src/flutter/txt/src/txt/font_asset_provider.cc
Normal file
24
engine/src/flutter/txt/src/txt/font_asset_provider.cc
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
#include "txt/font_asset_provider.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
// Return a canonicalized version of a family name that is suitable for
|
||||
// matching.
|
||||
std::string FontAssetProvider::CanonicalFamilyName(std::string family_name) {
|
||||
std::string result(family_name.length(), 0);
|
||||
|
||||
// Convert ASCII characters to lower case.
|
||||
std::transform(family_name.begin(), family_name.end(), result.begin(),
|
||||
[](char c) { return (c & 0x80) ? c : ::tolower(c); });
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace txt
|
28
engine/src/flutter/txt/src/txt/font_asset_provider.h
Normal file
28
engine/src/flutter/txt/src/txt/font_asset_provider.h
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_FONT_ASSET_PROVIDER_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_FONT_ASSET_PROVIDER_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "third_party/skia/include/core/SkFontMgr.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
class FontAssetProvider {
|
||||
public:
|
||||
virtual ~FontAssetProvider() = default;
|
||||
|
||||
virtual size_t GetFamilyCount() const = 0;
|
||||
virtual std::string GetFamilyName(int index) const = 0;
|
||||
virtual sk_sp<SkFontStyleSet> MatchFamily(const std::string& family_name) = 0;
|
||||
|
||||
protected:
|
||||
static std::string CanonicalFamilyName(std::string family_name);
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // FLUTTER_TXT_SRC_TXT_FONT_ASSET_PROVIDER_H_
|
@ -1,18 +1,6 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "font_collection.h"
|
||||
|
||||
@ -50,36 +38,40 @@ void FontCollection::SetupDefaultFontManager(
|
||||
}
|
||||
|
||||
void FontCollection::SetDefaultFontManager(sk_sp<SkFontMgr> font_manager) {
|
||||
default_font_manager_ = font_manager;
|
||||
default_font_manager_ = std::move(font_manager);
|
||||
skt_collection_.reset();
|
||||
}
|
||||
|
||||
void FontCollection::SetAssetFontManager(sk_sp<SkFontMgr> font_manager) {
|
||||
asset_font_manager_ = font_manager;
|
||||
asset_font_manager_ = std::move(font_manager);
|
||||
skt_collection_.reset();
|
||||
}
|
||||
|
||||
void FontCollection::SetDynamicFontManager(sk_sp<SkFontMgr> font_manager) {
|
||||
dynamic_font_manager_ = font_manager;
|
||||
dynamic_font_manager_ = std::move(font_manager);
|
||||
skt_collection_.reset();
|
||||
}
|
||||
|
||||
void FontCollection::SetTestFontManager(sk_sp<SkFontMgr> font_manager) {
|
||||
test_font_manager_ = font_manager;
|
||||
test_font_manager_ = std::move(font_manager);
|
||||
skt_collection_.reset();
|
||||
}
|
||||
|
||||
// Return the available font managers in the order they should be queried.
|
||||
std::vector<sk_sp<SkFontMgr>> FontCollection::GetFontManagerOrder() const {
|
||||
std::vector<sk_sp<SkFontMgr>> order;
|
||||
if (dynamic_font_manager_)
|
||||
if (dynamic_font_manager_) {
|
||||
order.push_back(dynamic_font_manager_);
|
||||
if (asset_font_manager_)
|
||||
}
|
||||
if (asset_font_manager_) {
|
||||
order.push_back(asset_font_manager_);
|
||||
if (test_font_manager_)
|
||||
}
|
||||
if (test_font_manager_) {
|
||||
order.push_back(test_font_manager_);
|
||||
if (default_font_manager_)
|
||||
}
|
||||
if (default_font_manager_) {
|
||||
order.push_back(default_font_manager_);
|
||||
}
|
||||
return order;
|
||||
}
|
||||
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef LIB_TXT_SRC_FONT_COLLECTION_H_
|
||||
#define LIB_TXT_SRC_FONT_COLLECTION_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_FONT_COLLECTION_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_FONT_COLLECTION_H_
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
@ -73,4 +61,4 @@ class FontCollection : public std::enable_shared_from_this<FontCollection> {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_FONT_COLLECTION_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_FONT_COLLECTION_H_
|
44
engine/src/flutter/txt/src/txt/font_features.cc
Normal file
44
engine/src/flutter/txt/src/txt/font_features.cc
Normal file
@ -0,0 +1,44 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "font_features.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace txt {
|
||||
|
||||
void FontFeatures::SetFeature(const std::string& tag, int value) {
|
||||
feature_map_[tag] = value;
|
||||
}
|
||||
|
||||
std::string FontFeatures::GetFeatureSettings() const {
|
||||
if (feature_map_.empty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::ostringstream stream;
|
||||
|
||||
for (const auto& kv : feature_map_) {
|
||||
if (stream.tellp()) {
|
||||
stream << ',';
|
||||
}
|
||||
stream << kv.first << '=' << kv.second;
|
||||
}
|
||||
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
const std::map<std::string, int>& FontFeatures::GetFontFeatures() const {
|
||||
return feature_map_;
|
||||
}
|
||||
|
||||
void FontVariations::SetAxisValue(const std::string& tag, float value) {
|
||||
axis_map_[tag] = value;
|
||||
}
|
||||
|
||||
const std::map<std::string, float>& FontVariations::GetAxisValues() const {
|
||||
return axis_map_;
|
||||
}
|
||||
|
||||
} // namespace txt
|
42
engine/src/flutter/txt/src/txt/font_features.h
Normal file
42
engine/src/flutter/txt/src/txt/font_features.h
Normal file
@ -0,0 +1,42 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_FONT_FEATURES_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_FONT_FEATURES_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace txt {
|
||||
|
||||
// Feature tags that can be applied in a text style to control how a font
|
||||
// selects glyphs.
|
||||
class FontFeatures {
|
||||
public:
|
||||
void SetFeature(const std::string& tag, int value);
|
||||
|
||||
std::string GetFeatureSettings() const;
|
||||
|
||||
const std::map<std::string, int>& GetFontFeatures() const;
|
||||
|
||||
private:
|
||||
std::map<std::string, int> feature_map_;
|
||||
};
|
||||
|
||||
// Axis tags and values that can be applied in a text style to control the
|
||||
// attributes of variable fonts.
|
||||
class FontVariations {
|
||||
public:
|
||||
void SetAxisValue(const std::string& tag, float value);
|
||||
|
||||
const std::map<std::string, float>& GetAxisValues() const;
|
||||
|
||||
private:
|
||||
std::map<std::string, float> axis_map_;
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // FLUTTER_TXT_SRC_TXT_FONT_FEATURES_H_
|
19
engine/src/flutter/txt/src/txt/font_style.h
Normal file
19
engine/src/flutter/txt/src/txt/font_style.h
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_FONT_STYLE_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_FONT_STYLE_H_
|
||||
|
||||
namespace txt {
|
||||
|
||||
enum class FontStyle {
|
||||
// NOLINTBEGIN(readability-identifier-naming)
|
||||
normal,
|
||||
italic,
|
||||
// NOLINTEND(readability-identifier-naming)
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // FLUTTER_TXT_SRC_TXT_FONT_STYLE_H_
|
26
engine/src/flutter/txt/src/txt/font_weight.h
Normal file
26
engine/src/flutter/txt/src/txt/font_weight.h
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_FONT_WEIGHT_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_FONT_WEIGHT_H_
|
||||
|
||||
namespace txt {
|
||||
|
||||
enum class FontWeight {
|
||||
// NOLINTBEGIN(readability-identifier-naming)
|
||||
w100, // Thin
|
||||
w200, // Extra-Light
|
||||
w300, // Light
|
||||
w400, // Normal/Regular
|
||||
w500, // Medium
|
||||
w600, // Semi-bold
|
||||
w700, // Bold
|
||||
w800, // Extra-Bold
|
||||
w900, // Black
|
||||
// NOLINTEND(readability-identifier-naming)
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // FLUTTER_TXT_SRC_TXT_FONT_WEIGHT_H_
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef LIB_TXT_SRC_LINE_METRICS_H_
|
||||
#define LIB_TXT_SRC_LINE_METRICS_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_LINE_METRICS_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_LINE_METRICS_H_
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
@ -83,4 +71,4 @@ class LineMetrics {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_LINE_METRICS_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_LINE_METRICS_H_
|
@ -1,22 +1,9 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef LIB_TXT_SRC_PARAGRAPH_H_
|
||||
#define LIB_TXT_SRC_PARAGRAPH_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_PARAGRAPH_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_PARAGRAPH_H_
|
||||
|
||||
#include "flutter/display_list/dl_builder.h"
|
||||
#include "line_metrics.h"
|
||||
@ -34,6 +21,7 @@ namespace txt {
|
||||
// Skia's SkShaper/SkParagraph text layout module.
|
||||
class Paragraph {
|
||||
public:
|
||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||
enum Affinity { UPSTREAM, DOWNSTREAM };
|
||||
|
||||
// Options for various types of bounding boxes provided by
|
||||
@ -210,4 +198,4 @@ class Paragraph {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_PARAGRAPH_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_PARAGRAPH_H_
|
@ -1,22 +1,10 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "paragraph_builder.h"
|
||||
|
||||
#include "flutter/third_party/txt/src/skia/paragraph_builder_skia.h"
|
||||
#include "flutter/txt/src/skia/paragraph_builder_skia.h"
|
||||
#include "paragraph_style.h"
|
||||
#include "third_party/icu/source/common/unicode/unistr.h"
|
||||
|
||||
@ -30,7 +18,7 @@ namespace txt {
|
||||
/// @param[in] impeller_enabled Whether Impeller is enabled in the runtime.
|
||||
std::unique_ptr<ParagraphBuilder> ParagraphBuilder::CreateSkiaBuilder(
|
||||
const ParagraphStyle& style,
|
||||
std::shared_ptr<FontCollection> font_collection,
|
||||
const std::shared_ptr<FontCollection>& font_collection,
|
||||
const bool impeller_enabled) {
|
||||
return std::make_unique<ParagraphBuilderSkia>(style, font_collection,
|
||||
impeller_enabled);
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef LIB_TXT_SRC_PARAGRAPH_BUILDER_H_
|
||||
#define LIB_TXT_SRC_PARAGRAPH_BUILDER_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_PARAGRAPH_BUILDER_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_PARAGRAPH_BUILDER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -33,7 +21,7 @@ class ParagraphBuilder {
|
||||
public:
|
||||
static std::unique_ptr<ParagraphBuilder> CreateSkiaBuilder(
|
||||
const ParagraphStyle& style,
|
||||
std::shared_ptr<FontCollection> font_collection,
|
||||
const std::shared_ptr<FontCollection>& font_collection,
|
||||
const bool impeller_enabled);
|
||||
|
||||
virtual ~ParagraphBuilder() = default;
|
||||
@ -89,4 +77,4 @@ class ParagraphBuilder {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_PARAGRAPH_BUILDER_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_PARAGRAPH_BUILDER_H_
|
@ -1,18 +1,6 @@
|
||||
/*
|
||||
* Copyright 2017 Google, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "paragraph_style.h"
|
||||
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef LIB_TXT_SRC_PARAGRAPH_STYLE_H_
|
||||
#define LIB_TXT_SRC_PARAGRAPH_STYLE_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_PARAGRAPH_STYLE_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_PARAGRAPH_STYLE_H_
|
||||
|
||||
#include <climits>
|
||||
#include <string>
|
||||
@ -27,17 +15,21 @@
|
||||
namespace txt {
|
||||
|
||||
enum class TextAlign {
|
||||
// NOLINTBEGIN(readability-identifier-naming)
|
||||
left,
|
||||
right,
|
||||
center,
|
||||
justify,
|
||||
start,
|
||||
end,
|
||||
// NOLINTEND(readability-identifier-naming)
|
||||
};
|
||||
|
||||
enum class TextDirection {
|
||||
// NOLINTBEGIN(readability-identifier-naming)
|
||||
rtl,
|
||||
ltr,
|
||||
// NOLINTEND(readability-identifier-naming)
|
||||
};
|
||||
|
||||
// Adjusts the leading over and under text.
|
||||
@ -106,4 +98,4 @@ class ParagraphStyle {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_PARAGRAPH_STYLE_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_PARAGRAPH_STYLE_H_
|
22
engine/src/flutter/txt/src/txt/placeholder_run.cc
Normal file
22
engine/src/flutter/txt/src/txt/placeholder_run.cc
Normal file
@ -0,0 +1,22 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "placeholder_run.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
PlaceholderRun::PlaceholderRun() {}
|
||||
|
||||
PlaceholderRun::PlaceholderRun(double width,
|
||||
double height,
|
||||
PlaceholderAlignment alignment,
|
||||
TextBaseline baseline,
|
||||
double baseline_offset)
|
||||
: width(width),
|
||||
height(height),
|
||||
alignment(alignment),
|
||||
baseline(baseline),
|
||||
baseline_offset(baseline_offset) {}
|
||||
|
||||
} // namespace txt
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef LIB_TXT_SRC_PLACEHOLDER_RUN_H_
|
||||
#define LIB_TXT_SRC_PLACEHOLDER_RUN_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_PLACEHOLDER_RUN_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_PLACEHOLDER_RUN_H_
|
||||
|
||||
#include "text_baseline.h"
|
||||
|
||||
@ -86,4 +74,4 @@ class PlaceholderRun {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_PLACEHOLDER_RUN_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_PLACEHOLDER_RUN_H_
|
@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef TXT_PLATFORM_H_
|
||||
#define TXT_PLATFORM_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_PLATFORM_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_PLATFORM_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -19,4 +19,4 @@ sk_sp<SkFontMgr> GetDefaultFontManager(uint32_t font_initialization_data = 0);
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // TXT_PLATFORM_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_PLATFORM_H_
|
@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef TXT_PLATFORM_MAC_H_
|
||||
#define TXT_PLATFORM_MAC_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_PLATFORM_MAC_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_PLATFORM_MAC_H_
|
||||
|
||||
#include "txt/asset_font_manager.h"
|
||||
|
||||
@ -14,4 +14,4 @@ void RegisterSystemFonts(const DynamicFontManager& dynamic_font_manager);
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // TXT_PLATFORM_MAC_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_PLATFORM_MAC_H_
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef LIB_TXT_SRC_RUN_METRICS_H_
|
||||
#define LIB_TXT_SRC_RUN_METRICS_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_RUN_METRICS_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_RUN_METRICS_H_
|
||||
|
||||
#include "text_style.h"
|
||||
#include "third_party/skia/include/core/SkFontMetrics.h"
|
||||
@ -54,4 +42,4 @@ class RunMetrics {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // LIB_TXT_SRC_RUN_METRICS_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_RUN_METRICS_H_
|
@ -1,18 +1,6 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "txt/test_font_manager.h"
|
||||
#include "flutter/fml/logging.h"
|
||||
@ -23,7 +11,7 @@ TestFontManager::TestFontManager(
|
||||
std::unique_ptr<FontAssetProvider> font_provider,
|
||||
std::vector<std::string> test_font_family_names)
|
||||
: AssetFontManager(std::move(font_provider)),
|
||||
test_font_family_names_(test_font_family_names) {}
|
||||
test_font_family_names_(std::move(test_font_family_names)) {}
|
||||
|
||||
TestFontManager::~TestFontManager() = default;
|
||||
|
@ -1,21 +1,9 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef TXT_TEST_FONT_MANAGER_H_
|
||||
#define TXT_TEST_FONT_MANAGER_H_
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_TEST_FONT_MANAGER_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_TEST_FONT_MANAGER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -47,4 +35,4 @@ class TestFontManager : public AssetFontManager {
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // TXT_TEST_FONT_MANAGER_H_
|
||||
#endif // FLUTTER_TXT_SRC_TXT_TEST_FONT_MANAGER_H_
|
17
engine/src/flutter/txt/src/txt/text_baseline.h
Normal file
17
engine/src/flutter/txt/src/txt/text_baseline.h
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_TEXT_BASELINE_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_TEXT_BASELINE_H_
|
||||
|
||||
namespace txt {
|
||||
|
||||
enum TextBaseline {
|
||||
kAlphabetic,
|
||||
kIdeographic,
|
||||
};
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // FLUTTER_TXT_SRC_TXT_TEXT_BASELINE_H_
|
14
engine/src/flutter/txt/src/txt/text_decoration.cc
Normal file
14
engine/src/flutter/txt/src/txt/text_decoration.cc
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "text_decoration.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
//
|
||||
|
||||
} // namespace txt
|
23
engine/src/flutter/txt/src/txt/text_decoration.h
Normal file
23
engine/src/flutter/txt/src/txt/text_decoration.h
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_TXT_SRC_TXT_TEXT_DECORATION_H_
|
||||
#define FLUTTER_TXT_SRC_TXT_TEXT_DECORATION_H_
|
||||
|
||||
namespace txt {
|
||||
|
||||
// Multiple decorations can be applied at once. Ex: Underline and overline is
|
||||
// (0x1 | 0x2)
|
||||
enum TextDecoration {
|
||||
kNone = 0x0,
|
||||
kUnderline = 0x1,
|
||||
kOverline = 0x2,
|
||||
kLineThrough = 0x4,
|
||||
};
|
||||
|
||||
enum TextDecorationStyle { kSolid, kDouble, kDotted, kDashed, kWavy };
|
||||
|
||||
} // namespace txt
|
||||
|
||||
#endif // FLUTTER_TXT_SRC_TXT_TEXT_DECORATION_H_
|
43
engine/src/flutter/txt/src/txt/text_shadow.cc
Normal file
43
engine/src/flutter/txt/src/txt/text_shadow.cc
Normal file
@ -0,0 +1,43 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "text_shadow.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
|
||||
namespace txt {
|
||||
|
||||
TextShadow::TextShadow() {}
|
||||
TextShadow::TextShadow(SkColor color, SkPoint offset, double blur_sigma)
|
||||
: color(color), offset(offset), blur_sigma(blur_sigma) {}
|
||||
|
||||
bool TextShadow::operator==(const TextShadow& other) const {
|
||||
if (color != other.color) {
|
||||
return false;
|
||||
}
|
||||
if (offset != other.offset) {
|
||||
return false;
|
||||
}
|
||||
if (blur_sigma != other.blur_sigma) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TextShadow::operator!=(const TextShadow& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
bool TextShadow::hasShadow() const {
|
||||
if (!offset.isZero()) {
|
||||
return true;
|
||||
}
|
||||
if (blur_sigma > 0.5) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace txt
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user