299 Commits

Author SHA1 Message Date
Dan Field
e18aba3321
Refactor of ClaimDartHandle -> AssociateWithDartWrapper (#16720) 2020-02-20 17:31:03 -08:00
Dan Field
60b27fd545
Reland "Remove usage of Dart_AllocateWithNativeFields" (#16713) 2020-02-20 16:06:02 -08:00
Dan Field
f2f8c342be
Revert "Remove usage of Dart_AllocateWithNativeFields from tonic (#16588)" (#16684)
This reverts commit 4941ff7bf608e0bca764e1edad769a3f8cca797f.
2020-02-19 10:00:05 -08:00
Ben Konyi
4941ff7bf6
Remove usage of Dart_AllocateWithNativeFields from tonic (#16588)
This API is being removed from the Dart SDK.
2020-02-14 13:55:38 -08:00
Jason Simmons
ea56ad22da
libtxt: use a fixture in the benchmarks (#16531) 2020-02-11 10:24:47 -08:00
Jason Simmons
a195a92cc8
[SkParagraph] Text layout benchmarks using SkParagraph (#16373)
Imported from @Rusino's branch
2020-02-07 14:17:57 -08:00
stuartmorgan
473f55940f
Suppress some deprecation warnings on Windows (#16416)
Targeted suppression of some deprecation warnings that are build errors under
clang:
- Ignore the deprecation of codecvt's unicode conversion until we decide on
  a replacement strategy.
- Allow the deprecated posix names of functions in third_party/txt.

Part of https://github.com/flutter/flutter/issues/16256
2020-02-05 21:10:25 -08:00
Chinmay Garde
f7b78e001d
Remove all uses of the redundant flutter_root variable. (#16311)
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
2020-01-31 21:49:48 -08:00
Gary Qian
ee297aa699
Reland "Engine/LibTxt/dart:ui impl of TextHeightBehavior #15087" (#16155) 2020-01-29 10:52:24 -08:00
Dan Field
53baa7aee5
Revert breaking PRs (#16148)
* Revert "Web PargraphStyle TextHeightBehavior integration (#16075)"

This reverts commit 86682a2d09e7d111a5c4fd2156b9971bd65fb693.

* Revert "Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087)"

This reverts commit cbf4536d158e25e372469c242e326c48cc730de7.
2020-01-28 10:40:05 -08:00
Chinmay Garde
da1a5d58c2
Remove tonic/platform. (#16062)
This is unused.
2020-01-27 14:41:15 -08:00
Gary Qian
cbf4536d15
Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087) 2020-01-27 13:37:11 -08:00
Chinmay Garde
276481c4d3
Move tonic into //flutter/third_party. (#15895)
Tonic used to be used by multiple consumers outside of Flutter Engine. Due to
this, it has an unnecessary abstraction layer as well as utilities duplicated in
FML and other engine subsystems. The sole user of Tonic is now the Flutter
Engine. It is intended that the Flutter Engine team now owns this subsystem,
remove unnecessary utilities and document the headers. This is the first step in
the transition. No history is being imported as the initial history was already
lost in the transition of this component to fuchsia.googlesource. As this
component was unmaintained there, I could see no additional value in importing
the history of the patches there.

No functional change. Just moved the repo from //third_party to
//flutter/third_party and updates GN refs.
2020-01-25 17:01:56 -08:00
Dan Field
89f3471fa7
the the fix (#15973) 2020-01-24 12:43:32 -08:00
Jason Simmons
766f53c0c7 [libtxt] Assign a unique ID to each glyph cluster within a line (#15742) 2020-01-22 10:38:03 -08:00
Gary Qian
329154171c
Add FML_DCHECK to ensure layout before calling getters (#15635) 2020-01-14 13:44:29 -08:00
Jason Simmons
fd269f60bf
Use Skia's CSS3 style matcher for dynamically loaded font sets (#15468)
This will improve font matching for SkParagraph, which relies on the
FontStyleSet's matchStyle implementation to find the closest match for a
FontStyle.
2020-01-13 17:35:56 -08:00
Jason Simmons
0535b5e7df
[SkParagraph] Copy font features to the Skia layout engine text style (#15562) 2020-01-13 15:47:31 -08:00
Jason Simmons
bd322a69b0
[SkParagraph] Cache the font collection created for use by the Skia text shaper library (#15317) 2020-01-08 15:21:35 -08:00
Gary Qian
f9a2fab7c0
Fix RectHeightStyle::kMax ascent computation bug (#15106) 2020-01-07 10:43:42 -08:00
Jason Simmons
d6172fdcfa
libtxt: cache fallback fonts found by a Minikin font collection (#14482)
If a new fallback font is discovered during paragraph layout, the fallback
font cache in txt::FontCollection will use that font in future layouts.

However, that cache is not available if the new fallback font needs to be
used for other characters within the current layout.  This PR adds a cache
to minikin::FontCollection and checks whether fonts in the cache can handle
a character before calling the fallback font provider.

See https://github.com/flutter/engine/pull/13257
2019-12-13 15:18:37 -08:00
Jason Simmons
76d264ee71
[SkParagraph] Convert the height override flag in text styles (#14283) 2019-12-10 13:40:54 -08:00
Jason Simmons
bf99efe65b
libtxt: pass an RTL bool flag instead of a bidiFlags enum to measureText (#13736)
Fixes https://github.com/flutter/flutter/issues/41086
2019-11-08 15:18:06 -08:00
Gary Qian
0928c1af2f
Add 'Cough' test font and support multiple test fonts. (#13649) 2019-11-05 12:27:34 -08:00
Gary Qian
728e473f1a
Pass LinearTextFlat to SkFont - iOS13 letter spacing (#13321) 2019-10-28 11:09:26 -07:00
Gary Qian
5061b61a9a
Update harfbuzz to 2.6.2, Roll buildroot to a518e (#13242) 2019-10-22 15:18:36 -07:00
Gary Qian
ee1a140fa9
Add utils to disable on mac/windows, disable invalid LibLxt tests on mac (#13189) 2019-10-16 16:43:31 -07:00
Chinmay Garde
b6858d2092
Use the fixtures mechanism for txt unit-tests and benchmarks. (#13180)
These tests and benchmarks can now be run without needing additional flags on the command line.
2019-10-16 16:29:55 -07:00
Jason Simmons
c710a981f4
Integrate more SkParagraph builder patches (#13094)
* ParagraphBuilderSkia::AddPlaceholder implementation
* StrutStyle height override
2019-10-14 11:17:11 -07:00
Jason Simmons
ed3928087d
Integration with more of Skia's SkShaper/SkParagraph APIs (#13008)
Based on https://github.com/Rusino/engine/tree/temp
2019-10-10 10:08:29 -07:00
Gary Qian
73c0397d4e
Explain vertical font metrics and refactor UpdateLineMetrics. (#11795) 2019-10-02 18:08:48 -04:00
Gary Qian
075c5b0f61
Track fallback font names as a vector instead of a set. (#12426) 2019-09-24 20:10:40 -04:00
chunhtai
aadd5a346b
Add system font change listener for windows (#12276)
* Add windows font change logic

* update

* fix comment
2019-09-23 13:23:46 -07:00
Gary Qian
21b456d52b
Check for index bounds in RTL handling for trailing whitespace runs. (#12336)
* Check for special case index out of bounds condition for leading space

* Add TODO

* Rework to pass tests

* More robust check for leading

* Minor adjustment

* Fix order bug

* Do not modify for leading space

* Fix test value

* Condition
2019-09-24 04:21:35 +08:00
Alexander Aprelev
1b63444390
Revert "Started taking advantage of Skia's new copyTableData to avoid (#10154)" (#12263)
This reverts commit 6beba539af8f4480e233f76f7820b0169467c67b as it breaks flutter on ios 32-bit devices.
2019-09-13 10:24:28 -07:00
gaaclarke
6beba539af
Started taking advantage of Skia's new copyTableData to avoid (#10154)
superfluous copies.
2019-09-12 11:30:11 -07:00
Gary Qian
e18298c973
Fix RTL justification alignment with newline (#11842) 2019-09-03 16:42:53 -07:00
Gary Qian
13ece5c7fc
Update the ui.LineMetrics.height metric to be more useful to external users (#11456) 2019-08-28 12:26:42 -07:00
Brian Osman
193deaf670
Include <string> from font_asset_provider (#11622) 2019-08-28 10:20:03 -04:00
Gary Qian
9f1eab2f1f
Expose LineMetrics in dart:ui (#10670) 2019-08-26 13:40:22 -07:00
Gary Qian
a1fe6a6871
Reland "Track detailed LibTxt metrics with LineMetrics(#10127)" (#11064) 2019-08-22 16:00:45 -07:00
Jason Simmons
dd0eecc2e0
Sort the Skia typefaces in a font style set into a consistent order (#11056)
When Minikin searches for a font based on a font style, it will score the fonts
in the family and choose the best match.  However, multiple fonts may have
equal scores (e.g. searching for a font with weight 600 when the set includes
fonts with weights 500 and 700).  In this case Minikin will select the first
font in the list with the best score.

However, the fonts in a font family's SkFontStyleSet may not always be provided
in a consistent order by the SkFontMgr.  So if the minikin::FontFamily list is
populated based on the SkFontStyleSet order, then a query for a given style might
not always return the same font.

This change sorts the typefaces in the SkFontStyleSet before converting them
into a Minikin font family.

Fixes https://github.com/flutter/flutter/issues/31212
2019-08-16 14:09:41 -07:00
Jason Simmons
cdaf44265b
Remove a tracing macro with a dangling pointer (#11002)
Fixes https://github.com/flutter/flutter/issues/38543
2019-08-14 12:40:14 -07:00
Dan Field
da352d0f72
Revert "Track detailed LibTxt metrics with LineMetrics(#10127)" (#10982)
This reverts commit 8682aaf4cd051fe46023fd82b41dd751b7f4ae7f.
2019-08-13 13:26:32 -07:00
Gary Qian
8682aaf4cd
Track detailed LibTxt metrics with LineMetrics(#10127) 2019-08-02 13:03:23 -07:00
Gary Qian
30c202a68d
Fix run.start -> run_start (#10295) 2019-07-31 14:07:56 -07:00
Jason Simmons
f742514a56
Cache font family lookups that fail to obtain a font collection (#10109) 2019-07-24 11:33:04 -07:00
Gary Qian
3c76b90b25
Track clusters and return cluster boundaries in getGlyphPositionForCoordinates (emoji fix) (#10063) 2019-07-23 16:44:30 -07:00
Gary Qian
dd06cda54b
Fix justify for RTL paragraphs. (#9859) 2019-07-17 13:55:43 -07:00
Jason Simmons
b22410ef6b
Include SkParagraph headers only when the enable-skshaper flag is on (#9758)
These headers are currently causing errors in MSVC-based Windows builds.
2019-07-10 16:32:02 -07:00