278 Commits

Author SHA1 Message Date
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
Jason Simmons
2cd650d269
Minimal integration with the Skia text shaper module (#9556)
This converts the libtxt Paragraph and ParagraphBuilder classes into
interfaces with Minikin and SkShaper/SkParagraph based implementations.

Use the --enable-skshaper GN flag to select the Skia shaper implementation
at build time.
2019-07-10 14:13:55 -07:00
Chinmay Garde
f600ae830d
Use libc++ variant of string view and remove the FML variant. (#9737) 2019-07-10 12:11:39 -07:00
Jason Simmons
b453d3c3dd
libtxt: fix reference counting of SkFontStyleSets held by font asset providers (#9561) 2019-07-10 12:08:15 -07:00
Gary Qian
75387dbc14
TextStyle.height property as a multiple of font size instead of multiple of ascent+descent+leading. (#9041) 2019-07-08 15:32:02 -07:00
Gary Qian
185087a65f
Manually draw remainder curve for wavy decorations (#9468) 2019-06-27 10:33:13 -07:00
Gary Qian
8591bd32e6
Handle ambiguous directionality of final trailing whitespace in mixed bidi text (#9489) 2019-06-26 15:08:36 -07:00
Jason Simmons
b188479981
Remove variants of ParagraphBuilder::AddText that are not used within the engine (#9403) 2019-06-24 12:41:01 -07:00
Jason Simmons
14c3c79f57
libtxt: remove obsolete font_manager_available defines (#9376) 2019-06-20 11:04:59 -07:00
Chinmay Garde
96a1a843cb
Replace lock_guard with scoped_lock and use class template argument deduction. (#9338) 2019-06-17 10:08:45 -07:00
Gary Qian
c5c0da1bfd
Build txt_benchmarks, make benches compile again (#9330) 2019-06-14 17:20:44 -07:00
Chinmay Garde
54ff3c5183
Avoid using std::unary_function (#9314) 2019-06-13 12:56:54 -07:00
Zachary Anderson
0a2e28d797
Revert tracing changes (#9296)
* Revert "[fuchsia] Fix alignment of Fuchsia/non-Fuchsia tracing (#9289)"

This reverts commit f80ac5f571479053b134e60bca77603269b2ce2a.

* Revert "Align fuchsia and non-fuchsia tracing (#9199)"

This reverts commit 78265484623037c6544dfd5380367bca29fa27b0.
2019-06-12 10:25:49 -07:00
Gary Qian
3371da1e09
Add platform_fuchsia.cc for default font on fuchsia (#9204) 2019-06-05 16:01:58 -07:00
Dan Field
7826548462
Align fuchsia and non-fuchsia tracing (#9199) 2019-06-05 15:14:27 -07:00
Gary Qian
a4abfb2333
Text inline widget LibTxt/dart:ui implementation (#8207) 2019-06-03 10:32:46 -07:00
Gary Qian
0932008480
Remove outdated TODOs (#9114) 2019-05-28 17:06:57 -07:00
Chris Bracken
a44cbbf492
Delete BSDiff sources (#9086)
BSDiff is no longer used as of flutter/engine#8663. This removes the
unused Java import and sources.
2019-05-25 13:49:28 -07:00
Chris Bracken
0f1ff3bdb3
Correct typos, adopt US spellings (#9081)
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.

Made use of `misspell` tool:
https://github.com/client9/misspell
2019-05-25 13:14:46 -07:00
Jason Simmons
82ccba3030
libtxt: have GetRectsForRange(strut) fall back to tight bounds if layout isn't forcing use of the strut (#9058) 2019-05-22 13:57:59 -07:00
Jason Simmons
135a140591
Add font features (such as tabular numbers) as an option in text styles (#8823)
Fixes https://github.com/flutter/flutter/issues/31691
2019-05-21 16:47:57 -07:00
Jason Simmons
424940f171
Add support for the Fontconfig-based Skia font manager (#8977) 2019-05-16 15:22:22 -07:00